mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 04:10:35 +08:00
logger: fixed watchdog not logging, increased cycle trigger (#23769)
This commit is contained in:
@@ -1615,6 +1615,11 @@ void Logger::initialize_load_output(PrintLoadReason reason)
|
||||
{
|
||||
// If already in progress, don't try to start again
|
||||
if (_next_load_print != 0) {
|
||||
// To never miss watchdog triggers due to load measuring in progress, overwrite the measurement reason
|
||||
if (reason == PrintLoadReason::Watchdog) {
|
||||
_print_load_reason = reason;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1635,7 +1640,13 @@ void Logger::write_load_output()
|
||||
_writer.set_need_reliable_transfer(true, _print_load_reason != PrintLoadReason::Watchdog);
|
||||
|
||||
if (_print_load_reason == PrintLoadReason::Watchdog) {
|
||||
PX4_ERR("Writing watchdog data"); // this is just that we see it easily in the log
|
||||
// This is just that we see it easily in the log
|
||||
PX4_ERR("Writing watchdog data...");
|
||||
#ifdef __PX4_NUTTX
|
||||
bool cycle_trigger = _timer_callback_data.watchdog_data.triggered_by_cycle_delay;
|
||||
bool ready_trigger = _timer_callback_data.watchdog_data.triggered_by_ready_delay;
|
||||
PX4_ERR("Watchdog triggers - cycle trigger: %d, ready trigger: %d", cycle_trigger, ready_trigger);
|
||||
#endif
|
||||
write_perf_data(PrintLoadReason::Watchdog);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user