diff --git a/flight/modules/GPS/GPS.c b/flight/modules/GPS/GPS.c index f2e69786b..768dbc396 100644 --- a/flight/modules/GPS/GPS.c +++ b/flight/modules/GPS/GPS.c @@ -414,16 +414,6 @@ static void gpsTask(__attribute__((unused)) void *parameters) GPSPositionSensorStatusOptions status = GPSPOSITIONSENSOR_STATUS_NOGPS; GPSPositionSensorStatusSet(&status); AlarmsSet(SYSTEMALARMS_ALARM_GPS, SYSTEMALARMS_ALARM_ERROR); - - if (res == PARSER_ERROR) { - DEBUG_PRINTF(3, "NoGPS-ParserError\r"); - } - if ((timeNowMs - timeOfLastUpdateMs) >= GPS_TIMEOUT_MS) { - DEBUG_PRINTF(3, "NoGPS-TimeOUT:%d\r", (timeNowMs - timeOfLastUpdateMs)); - } - if (gpsSettings.DataProtocol == GPSSETTINGS_DATAPROTOCOL_UBX && gpspositionsensor.AutoConfigStatus == GPSPOSITIONSENSOR_AUTOCONFIGSTATUS_ERROR) { - DEBUG_PRINTF(3, "NoGPS-AutoCfgError\r"); - } } // if we parsed at least one packet successfully // we aren't offline, but we still may not have a good enough fix to fly @@ -564,15 +554,12 @@ void gps_set_fc_baud_from_arg(uint8_t baud) if (__sync_fetch_and_add(&mutex, 1) == 0) { // don't bother doing the baud change if it is actually the same if (previous_baud != baud) { - DEBUG_PRINTF(3, "SetBaud:%d - %d", baud, hwsettings_gpsspeed_enum_to_baud(baud)); previous_baud = baud; // Set Revo port hwsettings_baud PIOS_COM_ChangeBaud(PIOS_COM_GPS, hwsettings_gpsspeed_enum_to_baud(baud)); // clear Rx buffer PIOS_COM_ClearRxBuffer(PIOS_COM_GPS); GPSPositionSensorBaudRateSet(&baud); - } else { - DEBUG_PRINTF(3, "SetBaud:%d - NoChange\r", baud); } } --mutex; diff --git a/flight/modules/GPS/UBX.c b/flight/modules/GPS/UBX.c index bbbd95733..e8a79a3b5 100644 --- a/flight/modules/GPS/UBX.c +++ b/flight/modules/GPS/UBX.c @@ -197,7 +197,6 @@ int parse_ubx_stream(uint8_t *rx, uint16_t len, char *gps_rx_buffer, GPSPosition restart_state = RESTART_NO_ERROR; } else { restart_state = RESTART_WITH_ERROR; - DEBUG_PRINTF(3, "UbxPayloadError: 0x%02x:0x%02x\r", ubx->header.class, ubx->header.id); } #endif // We won't see the end of the packet. Which means it is useless to do any further processing. @@ -249,7 +248,6 @@ int parse_ubx_stream(uint8_t *rx, uint16_t len, char *gps_rx_buffer, GPSPosition } else { gpsRxStats->gpsRxChkSumError++; restart_state = RESTART_WITH_ERROR; - DEBUG_PRINTF(3, "UbxCheckError\r"); break; } continue; @@ -549,7 +547,6 @@ static void parse_ubx_mon_ver(struct UBXPacket *ubx, __attribute__((unused)) GPS // send sensor type right now because on UBX NEMA we don't get a full set of messages // and we want to be able to see sensor type even on UBX NEMA GPS's GPSPositionSensorSensorTypeSet((uint8_t *)&ubxSensorType); - DEBUG_PRINTF(3, "ParseMonVer\r"); } static void parse_ubx_op_sys(struct UBXPacket *ubx, __attribute__((unused)) GPSPositionSensorData *GpsPosition) @@ -621,7 +618,6 @@ uint32_t parse_ubx_message(struct UBXPacket *ubx, GPSPositionSensorData *GpsPosi // see OP GPSV9 comment in parse_ubx_stream() for further information status = GPSPOSITIONSENSOR_STATUS_NOFIX; GPSPositionSensorStatusSet(&status); - DEBUG_PRINTF(3, "Detected UBX\r"); } } return id; diff --git a/flight/modules/GPS/ubx_autoconfig.c b/flight/modules/GPS/ubx_autoconfig.c index 76c424795..847960d3d 100644 --- a/flight/modules/GPS/ubx_autoconfig.c +++ b/flight/modules/GPS/ubx_autoconfig.c @@ -269,7 +269,6 @@ static void config_reset(uint16_t *bytes_to_send) status->working_packet.message.payload.cfg_cfg.deviceMask = UBX_CFG_CFG_DEVICE_ALL; *bytes_to_send = prepare_packet((UBXSentPacket_t *)&status->working_packet, UBX_CLASS_CFG, UBX_ID_CFG_CFG, sizeof(ubx_cfg_cfg_t)); - DEBUG_PRINTF(3, "CfgReset\r"); } @@ -290,7 +289,6 @@ static void config_gps_baud(uint16_t *bytes_to_send) // GPS will be found later at this new_gps_speed new_gps_speed = hwsettings_baud; - DEBUG_PRINTF(3, "CfgBaud: %d\r", new_gps_speed); } @@ -313,7 +311,7 @@ static void config_rate(uint16_t *bytes_to_send, bool min_rate) status->working_packet.message.payload.cfg_rate.timeRef = 1; // 0 = UTC Time, 1 = GPS Time *bytes_to_send = prepare_packet((UBXSentPacket_t *)&status->working_packet, UBX_CLASS_CFG, UBX_ID_CFG_RATE, sizeof(ubx_cfg_rate_t)); - DEBUG_PRINTF(3, "CfgRate: %dHz\r", rate); + if (min_rate) { // used for INIT_STEP_SET_LOWRATE step status->lastConfigSent = LAST_CONFIG_SENT_COMPLETED; @@ -330,7 +328,6 @@ static void config_nav(uint16_t *bytes_to_send) status->working_packet.message.payload.cfg_nav5.mask = UBX_CFG_NAV5_DYNMODEL + UBX_CFG_NAV5_FIXMODE; *bytes_to_send = prepare_packet((UBXSentPacket_t *)&status->working_packet, UBX_CLASS_CFG, UBX_ID_CFG_NAV5, sizeof(ubx_cfg_nav5_t)); - DEBUG_PRINTF(3, "CfgNav\r"); } static void config_navx(uint16_t *bytes_to_send) @@ -340,7 +337,6 @@ static void config_navx(uint16_t *bytes_to_send) status->working_packet.message.payload.cfg_navx5.mask1 = UBX_CFG_NAVX5_AOP; *bytes_to_send = prepare_packet((UBXSentPacket_t *)&status->working_packet, UBX_CLASS_CFG, UBX_ID_CFG_NAVX5, sizeof(ubx_cfg_navx5_t)); - DEBUG_PRINTF(3, "CfgNavX\r"); } @@ -366,7 +362,6 @@ static void config_sbas(uint16_t *bytes_to_send) UBX_CFG_SBAS_SCANMODE2; *bytes_to_send = prepare_packet((UBXSentPacket_t *)&status->working_packet, UBX_CLASS_CFG, UBX_ID_CFG_SBAS, sizeof(ubx_cfg_sbas_t)); - DEBUG_PRINTF(3, "CfgSBAS\n"); } @@ -428,7 +423,6 @@ static void config_gnss(uint16_t *bytes_to_send) } *bytes_to_send = prepare_packet((UBXSentPacket_t *)&status->working_packet, UBX_CLASS_CFG, UBX_ID_CFG_GNSS, sizeof(ubx_cfg_gnss_t)); - DEBUG_PRINTF(3, "CfgGNSS\r"); } @@ -442,7 +436,6 @@ static void config_save(uint16_t *bytes_to_send) status->working_packet.message.payload.cfg_cfg.deviceMask = UBX_CFG_CFG_DEVICE_ALL; *bytes_to_send = prepare_packet((UBXSentPacket_t *)&status->working_packet, UBX_CLASS_CFG, UBX_ID_CFG_CFG, sizeof(ubx_cfg_cfg_t)); - DEBUG_PRINTF(3, "CfgSavenew: %d\r", new_gps_speed); } static void configure(uint16_t *bytes_to_send) @@ -608,7 +601,6 @@ void gps_ubx_autoconfig_run(char * *buffer, uint16_t *bytes_to_send) // increase baud_to_try for next try, in case ubxHwVersion is not set baud_to_try = (baud_to_try < HWSETTINGS_GPSSPEED_230400) ? baud_to_try + 1 : HWSETTINGS_GPSSPEED_2400; - DEBUG_PRINTF(3, "IncreaseBaudToTry\r"); } // this code is executed even if ubxautoconfig is disabled @@ -645,7 +637,6 @@ void gps_ubx_autoconfig_run(char * *buffer, uint16_t *bytes_to_send) // keep timeouts running properly, we (will have) just sent a packet that generates a reply set_current_step_if_untouched(INIT_STEP_WAIT_MON_VER_ACK); status->lastStepTimestampRaw = PIOS_DELAY_GetRaw(); - DEBUG_PRINTF(3, "Mon_verRefresh\r"); break; case INIT_STEP_WAIT_MON_VER_ACK: diff --git a/flight/targets/boards/revolution/firmware/inc/pios_config.h b/flight/targets/boards/revolution/firmware/inc/pios_config.h index f069c8fd2..6694ff33d 100644 --- a/flight/targets/boards/revolution/firmware/inc/pios_config.h +++ b/flight/targets/boards/revolution/firmware/inc/pios_config.h @@ -37,8 +37,8 @@ * details. */ -#define PIOS_INCLUDE_DEBUG_CONSOLE -#define DEBUG_LEVEL 3 +/* #define PIOS_INCLUDE_DEBUG_CONSOLE */ +/* #define DEBUG_LEVEL 0 */ /* #define PIOS_ENABLE_DEBUG_PINS */ /* PIOS FreeRTOS support */