mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Do not use fixed width integer types for the TinyGPS example, as this causes issues on the ESP8266 platform
This commit is contained in:
parent
f443d2af25
commit
a057d83d5e
1 changed files with 6 additions and 6 deletions
|
@ -150,12 +150,12 @@ void printFloat(double number, int16_t digits)
|
|||
|
||||
void gpsdump(TinyGPS &gps)
|
||||
{
|
||||
int32_t lat, lon;
|
||||
long lat, lon;
|
||||
float flat, flon;
|
||||
uint32_t age, date, time, chars;
|
||||
int16_t year;
|
||||
unsigned long age, date, time, chars;
|
||||
int year;
|
||||
uint8_t month, day, hour, minute, second, hundredths;
|
||||
uint16_t sentences, failed;
|
||||
unsigned short sentences, failed;
|
||||
|
||||
gps.get_position(&lat, &lon, &age);
|
||||
Serial.print("Lat/Long(10^-5 deg): "); Serial.print(lat); Serial.print(", "); Serial.print(lon);
|
||||
|
@ -175,7 +175,7 @@ void gpsdump(TinyGPS &gps)
|
|||
|
||||
feedgps();
|
||||
|
||||
gps.crack_datetime((int*)&year, &month, &day, &hour, &minute, &second, &hundredths, &age);
|
||||
gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths, &age);
|
||||
Serial.print("Date: "); Serial.print(static_cast<int>(month)); Serial.print("/"); Serial.print(static_cast<int>(day)); Serial.print("/"); Serial.print(year);
|
||||
Serial.print(" Time: "); Serial.print(static_cast<int>(hour)); Serial.print(":"); Serial.print(static_cast<int>(minute)); Serial.print(":"); Serial.print(static_cast<int>(second)); Serial.print("."); Serial.print(static_cast<int>(hundredths));
|
||||
Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms.");
|
||||
|
@ -189,7 +189,7 @@ void gpsdump(TinyGPS &gps)
|
|||
|
||||
feedgps();
|
||||
|
||||
gps.stats(&chars, (unsigned short*)&sentences, (unsigned short*)&failed);
|
||||
gps.stats(&chars, &sentences, &failed);
|
||||
Serial.print("Stats: characters: "); Serial.print(chars); Serial.print(" sentences: "); Serial.print(sentences); Serial.print(" failed checksum: "); Serial.println(failed);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue