Explorar el Código

getVelocity() returns 0 when parsing from lastPosition fails

tags/v1.2.0
Bertrand Lemasle hace 7 años
padre
commit
fe7723c9d9
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      GpsTracker/Gps.cpp

+ 1
- 1
GpsTracker/Gps.cpp Ver fichero

@@ -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);



Cargando…
Cancelar
Guardar