fix(VTX): ignore temperature data if not available for tramp protocol

(cherry picked from commit da47c17fd6)
This commit is contained in:
Oleksandr Vynnyk authored and Jacob Dahl committed 2026-08-18 05:42:09 -06:00
1 parent 6a097d6620
commit de0bbd2937
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -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);
+3 -1
View File
@@ -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;
}