Browse Source

AP_GPS_UBlox: send_next_rate_update always runs all steps

Moving the if, endif checks within the case statement ensures the state
machine goes through all 10 states
mission-4.1.18
Randy Mackay 10 years ago
parent
commit
2c33250bee
  1. 19
      libraries/AP_GPS/AP_GPS_UBLOX.cpp

19
libraries/AP_GPS/AP_GPS_UBLOX.cpp

@ -112,29 +112,36 @@ AP_GPS_UBLOX::send_next_rate_update(void)
case 5: case 5:
_configure_message_rate(CLASS_NAV, MSG_DOP, 1); // 18+8 bytes _configure_message_rate(CLASS_NAV, MSG_DOP, 1); // 18+8 bytes
break; break;
#if UBLOX_HW_LOGGING
case 6: case 6:
#if UBLOX_HW_LOGGING
// gather MON_HW at 0.5Hz // gather MON_HW at 0.5Hz
_configure_message_rate(CLASS_MON, MSG_MON_HW, 2); // 64+8 bytes _configure_message_rate(CLASS_MON, MSG_MON_HW, 2); // 64+8 bytes
#endif
break; break;
case 7: case 7:
#if UBLOX_HW_LOGGING
// gather MON_HW2 at 0.5Hz // gather MON_HW2 at 0.5Hz
_configure_message_rate(CLASS_MON, MSG_MON_HW2, 2); // 24+8 bytes _configure_message_rate(CLASS_MON, MSG_MON_HW2, 2); // 24+8 bytes
break;
#endif #endif
#if UBLOX_RXM_RAW_LOGGING break;
case 8: case 8:
#if UBLOX_RXM_RAW_LOGGING
_configure_message_rate(CLASS_RXM, MSG_RXM_RAW, gps._raw_data); _configure_message_rate(CLASS_RXM, MSG_RXM_RAW, gps._raw_data);
#endif
break; break;
case 9: case 9:
#if UBLOX_RXM_RAW_LOGGING
_configure_message_rate(CLASS_RXM, MSG_RXM_RAWX, gps._raw_data); _configure_message_rate(CLASS_RXM, MSG_RXM_RAWX, gps._raw_data);
break;
#endif #endif
#if UBLOX_VERSION_AUTODETECTION break;
case 10: case 10:
#if UBLOX_VERSION_AUTODETECTION
_request_version(); _request_version();
break;
#endif #endif
break;
default: default:
need_rate_update = false; need_rate_update = false;
rate_update_step = 0; rate_update_step = 0;

Loading…
Cancel
Save