Go to the documentation of this file.00001
00002
00003 #include "GPS.h"
00004 #include "WProgram.h"
00005
00006 void
00007 GPS::update(void)
00008 {
00009 bool result;
00010
00011
00012 result = read();
00013
00014
00015 if (!result) {
00016 if ((millis() - _idleTimer) > _idleTimeout) {
00017 _status = NO_GPS;
00018 init();
00019 }
00020 } else {
00021
00022 _status = fix ? GPS_OK : NO_FIX;
00023
00024 valid_read = true;
00025 new_data = true;
00026 }
00027
00028
00029 _idleTimer = millis();
00030 }
00031
00032
00033 void
00034 GPS::_error(const char *msg)
00035 {
00036 Serial.println(msg);
00037 }