Skip to content
Snippets Groups Projects
Commit 8606b284 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Change pylon temp monitor

parent 594e2c09
No related branches found
No related tags found
1 merge request!338Resolves #375 full colour resolution
Pipeline #29339 passed
......@@ -124,15 +124,14 @@ PylonDevice::PylonDevice(nlohmann::json &config)
});
monitor_ = true;
temperature_monitor_ = ftl::timer::add(ftl::timer::timerlevel_t::kTimerIdle1, 3.0, [this](int64_t ts) {
for (auto* cam : {lcam_, rcam_}) {
// is this thread safe?
float temperature = cam->DeviceTemperature();
temperature_monitor_ = ftl::timer::add(ftl::timer::timerlevel_t::kTimerIdle1, 10.0, [this](int64_t ts) {
float temperature = (rcam_) ? std::max(lcam_->DeviceTemperature(), rcam_->DeviceTemperature()) : lcam_->DeviceTemperature();
LOG_IF(WARNING, temperature > 53.0)
<< "Camera temperature over 50C (value: " << temperature << ")";
// TODO: stop if camera temperature exceeds threshold
}
return true;
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment