Parcourir la source

getVelocity() returns 0 when parsing from lastPosition fails

tags/v1.2.0
Bertrand Lemasle il y a 7 ans
Parent
révision
fe7723c9d9
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      GpsTracker/Gps.cpp

+ 1
- 1
GpsTracker/Gps.cpp Voir le fichier

@@ -47,7 +47,7 @@ namespace gps {

uint8_t getVelocity() {
uint8_t velocity;
hardware::sim808::device.getGpsField(lastPosition, SIM808_GPS_FIELD::SPEED, &velocity);
if (!hardware::sim808::device.getGpsField(lastPosition, SIM808_GPS_FIELD::SPEED, &velocity)) velocity = 0;

VERBOSE_FORMAT("getVelocity", "%d", velocity);



Chargement…
Annuler
Enregistrer