Hotfix: Silence GPS driver if no GPS is connected

This commit is contained in:
Lorenz Meier 2013-09-22 12:04:30 +02:00
parent 3189b4a9b4
commit 9eb4e05c9d
3 changed files with 1 additions and 18 deletions

View File

@ -51,8 +51,7 @@
typedef enum { typedef enum {
GPS_DRIVER_MODE_NONE = 0, GPS_DRIVER_MODE_NONE = 0,
GPS_DRIVER_MODE_UBX, GPS_DRIVER_MODE_UBX,
GPS_DRIVER_MODE_MTK, GPS_DRIVER_MODE_MTK
GPS_DRIVER_MODE_NMEA,
} gps_driver_mode_t; } gps_driver_mode_t;

View File

@ -279,10 +279,6 @@ GPS::task_main()
_Helper = new MTK(_serial_fd, &_report); _Helper = new MTK(_serial_fd, &_report);
break; break;
case GPS_DRIVER_MODE_NMEA:
//_Helper = new NMEA(); //TODO: add NMEA
break;
default: default:
break; break;
} }
@ -328,10 +324,6 @@ GPS::task_main()
mode_str = "MTK"; mode_str = "MTK";
break; break;
case GPS_DRIVER_MODE_NMEA:
mode_str = "NMEA";
break;
default: default:
break; break;
} }
@ -362,9 +354,6 @@ GPS::task_main()
_mode = GPS_DRIVER_MODE_UBX; _mode = GPS_DRIVER_MODE_UBX;
break; break;
// case GPS_DRIVER_MODE_NMEA:
// _mode = GPS_DRIVER_MODE_UBX;
// break;
default: default:
break; break;
} }
@ -400,10 +389,6 @@ GPS::print_info()
warnx("protocol: MTK"); warnx("protocol: MTK");
break; break;
case GPS_DRIVER_MODE_NMEA:
warnx("protocol: NMEA");
break;
default: default:
break; break;
} }

View File

@ -281,7 +281,6 @@ UBX::receive(unsigned timeout)
return 1; return 1;
} else { } else {
warnx("ubx: timeout - no messages");
return -1; return -1;
} }