Bi-monthly INDI Library released with new drivers and bug fixes.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
CHECK_STRUCT_HAS_MEMBER("libraw_imgother_t" CameraTemperature "libraw/libraw_types.h" HAVE_LIBRAW_CAMERA_TEMPERATURE LANGUAGE C)
if (HAVE_LIBRAW_CAMERA_TEMPERATURE)
set(LIBRAW_CAMERA_TEMPERATURE 1)
message(STATUS "Found CameraTemperature in 'libraw/libraw_types.h'")
endif ()
CHECK_STRUCT_HAS_MEMBER("libraw_imgother_t" SensorTemperature "libraw/libraw_types.h" HAVE_LIBRAW_SENSOR_TEMPERATURE LANGUAGE C)
if (HAVE_LIBRAW_SENSOR_TEMPERATURE)
set(LIBRAW_SENSOR_TEMPERATURE 1)
message(STATUS "Found SensorTemperature in 'libraw/libraw_types.h'")
endif ()
if (lib_raw.imgdata.other.SensorTemperature > -273.15f)
gphoto->last_sensor_temp = lib_raw.imgdata.other.SensorTemperature;
else if (lib_raw.imgdata.other.CameraTemperature > -273.15f)
gphoto->last_sensor_temp = lib_raw.imgdata.other.CameraTemperature;
if (isTemperatureSupported)
{
double cameraTemperature = static_cast<double>(gphoto_get_last_sensor_temperature(gphotodrv));
if (fabs(cameraTemperature - TemperatureN[0].value) > 0.01)
{
// Check if we are getting bogus temperature values and set property to alert
// unless it is already set
if (cameraTemperature < MINUMUM_CAMERA_TEMPERATURE)
{
if (TemperatureNP.s != IPS_ALERT)
{
TemperatureNP.s = IPS_ALERT;
IDSetNumber(&TemperatureNP, nullptr);
}
}
else
{
TemperatureNP.s = IPS_OK;
TemperatureN[0].value = cameraTemperature;
IDSetNumber(&TemperatureNP, nullptr);
}
}
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.