Explorar el Código

sprintf on arduino cannot handle %.2f format, using temperature * 100 as in the position csv format

tags/v1.2.0
Bertrand Lemasle hace 6 años
padre
commit
3b08d64b1f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      GpsTracker/Core.cpp

+ 1
- 1
GpsTracker/Core.cpp Ver fichero

@@ -53,7 +53,7 @@ namespace core {
}
if (bitRead(triggered, ALERT_RTC_FAILURE)) {
sprintf_P(buffer + strlen(buffer), PSTR(" - Temperature is %.2fC. Backup battery failure ?\n"), metadata.batteryLevel);
sprintf_P(buffer + strlen(buffer), PSTR(" - Temperature is %dC. Backup battery failure ?\n"), static_cast<uint16_t>(metadata.temperature * 100));
}

config_t* config = &config::main::value;


Cargando…
Cancelar
Guardar