mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 08:40:30 +08:00
fix(VTX): ignore temperature data if not available for tramp protocol
(cherry picked from commit da47c17fd6)
This commit is contained in:
1 parent
6a097d6620
commit
de0bbd2937
2 files changed
+4
-2
No files matched your search
@@ -437,7 +437,7 @@ int VTX::print_status()
|
||||
PX4_INFO(" pit mode: %s", _pit_mode ? "on" : "off");
|
||||
|
||||
if (!(_comms_ok && _protocol && _protocol->print_settings())) {
|
||||
PX4_ERR("%s device not found", _param_vtx_device.get() == 1 ? "Tramp" : "SmartAudio");
|
||||
PX4_ERR("%s device not found", (_param_vtx_device.get() & 0xff) == vtx_s::PROTOCOL_TRAMP ? "Tramp" : "SmartAudio");
|
||||
}
|
||||
|
||||
perf_print_counter(_perf_cycle);
|
||||
|
||||
@@ -50,7 +50,9 @@ int Tramp::get_settings()
|
||||
if (rv != 0) { return rv; }
|
||||
|
||||
px4_usleep(30_ms);
|
||||
return get_temperature();
|
||||
int temperature_data = get_temperature();
|
||||
// ignore temperature data if not available
|
||||
return temperature_data == -ETIMEDOUT ? 0 : temperature_data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user