mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 05:23:34 +08:00
forgot to remove some rprintfs
This commit is contained in:
+9
-9
@@ -726,7 +726,7 @@ void *ubx_watchdog_loop(void *args)
|
|||||||
|
|
||||||
int mavlink_fd = open(MAVLINK_LOG_DEVICE, 0);
|
int mavlink_fd = open(MAVLINK_LOG_DEVICE, 0);
|
||||||
|
|
||||||
int err_skip_counter = 0;
|
//int err_skip_counter = 0;
|
||||||
|
|
||||||
while (!(*thread_should_exit)) {
|
while (!(*thread_should_exit)) {
|
||||||
/* if some values are to old reconfigure gps */
|
/* if some values are to old reconfigure gps */
|
||||||
@@ -739,7 +739,7 @@ void *ubx_watchdog_loop(void *args)
|
|||||||
// printf("timestamp_now=%llu\n", timestamp_now);
|
// printf("timestamp_now=%llu\n", timestamp_now);
|
||||||
// printf("last_message_timestamps=%llu\n", ubx_state->last_message_timestamps[i]);
|
// printf("last_message_timestamps=%llu\n", ubx_state->last_message_timestamps[i]);
|
||||||
if (timestamp_now - ubx_state->last_message_timestamps[i] > UBX_WATCHDOG_CRITICAL_TIME_MICROSECONDS) {
|
if (timestamp_now - ubx_state->last_message_timestamps[i] > UBX_WATCHDOG_CRITICAL_TIME_MICROSECONDS) {
|
||||||
printf("Warning: GPS ubx message %d not received for a long time\n", i);
|
//printf("Warning: GPS ubx message %d not received for a long time\n", i);
|
||||||
all_okay = false;
|
all_okay = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -749,13 +749,13 @@ void *ubx_watchdog_loop(void *args)
|
|||||||
if (!all_okay) {
|
if (!all_okay) {
|
||||||
/* gps error */
|
/* gps error */
|
||||||
ubx_fail_count++;
|
ubx_fail_count++;
|
||||||
if (err_skip_counter == 0)
|
// if (err_skip_counter == 0)
|
||||||
{
|
// {
|
||||||
printf("GPS Watchdog detected gps not running or having problems\n");
|
// printf("GPS Watchdog detected gps not running or having problems\n");
|
||||||
err_skip_counter = 20;
|
// err_skip_counter = 20;
|
||||||
}
|
// }
|
||||||
err_skip_counter--;
|
// err_skip_counter--;
|
||||||
printf("gps_mode_try_all =%u, ubx_fail_count=%u, ubx_healthy=%u, once_ok=%u\n", gps_mode_try_all, ubx_fail_count, ubx_healthy, once_ok);
|
//printf("gps_mode_try_all =%u, ubx_fail_count=%u, ubx_healthy=%u, once_ok=%u\n", gps_mode_try_all, ubx_fail_count, ubx_healthy, once_ok);
|
||||||
|
|
||||||
|
|
||||||
/* If we have too many failures and another mode or baud should be tried, exit... */
|
/* If we have too many failures and another mode or baud should be tried, exit... */
|
||||||
|
|||||||
Reference in New Issue
Block a user