13 std::shared_ptr<option> tl_toggle) :
14 _monitor([this](
dispatcher::cancellable_timer cancellable_timer)
60 bool tl_state = (std::fabs(tl_active->query()) > std::numeric_limits< float >::epsilon());
77 auto cur_temp = temp->query();
82 << std::dec << std::setprecision(1) <<
_temp_base <<
" to " << cur_temp <<
" deg (C)");
89 LOG_ERROR(
"Thermal Compensation: temperature sensor option is not present");
92 catch (
const std::exception& ex)
94 LOG_ERROR(
"Error during thermal compensation handling: " << ex.what());
98 LOG_ERROR(
"Unresolved error during Thermal Compensation handling");
unsigned int _poll_intervals_ms
void polling(dispatcher::cancellable_timer cancellable_timer)
float _thermal_threshold_deg
#define LOG_DEBUG_THERMAL_LOOP(...)
void notify(float temperature)
unsigned __int64 uint64_t
ds5_thermal_monitor(std::shared_ptr< option > temp_option, std::shared_ptr< option > tl_toggle)
std::weak_ptr< option > _temperature_sensor
std::weak_ptr< option > _tl_activation
std::vector< std::function< void(float)> > _thermal_changes_callbacks
bool try_sleep(std::chrono::milliseconds::rep ms)