MTK: Bail out correctly

This commit is contained in:
Lorenz Meier 2014-05-19 21:07:19 +02:00
parent ce62f07379
commit f0630547aa
1 changed files with 6 additions and 0 deletions

View File

@ -249,6 +249,12 @@ MTK::handle_message(gps_mtk_packet_t &packet)
warnx("mtk: unknown revision");
_gps_position->lat = 0;
_gps_position->lon = 0;
// Indicate this data is not usable and bail out
_gps_position->eph_m = 1000.0f;
_gps_position->epv_m = 1000.0f;
_gps_position->fix_type = 0;
return;
}
_gps_position->alt = (int32_t)(packet.msl_altitude * 10); // from cm to mm