mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-08 06:23:53 +01:00
height correction with gps
This commit is contained in:
parent
45edf2ffa3
commit
c3d94d673a
|
|
@ -1,4 +1,6 @@
|
|||
#include <TinyGPS++.h>
|
||||
#include "configuration.h"
|
||||
#include "board_pinout.h"
|
||||
#include "wx_utils.h"
|
||||
#include "display.h"
|
||||
|
||||
|
|
@ -8,6 +10,9 @@
|
|||
|
||||
extern Configuration Config;
|
||||
extern String fifthLine;
|
||||
#ifdef HAS_GPS
|
||||
extern TinyGPSPlus gps;
|
||||
#endif
|
||||
|
||||
int wxModuleType = 0;
|
||||
uint8_t wxModuleAddress = 0x00;
|
||||
|
|
@ -227,7 +232,13 @@ namespace WX_Utils {
|
|||
humStr = "..";
|
||||
}
|
||||
|
||||
String presStr = (wxModuleAddress == 4) ? "....." : generatePresString(newPress + (Config.wxsensor.heightCorrection/CORRECTION_FACTOR));
|
||||
String presStr = (wxModuleAddress == 4)
|
||||
? "....."
|
||||
#ifdef HAS_GPS
|
||||
: generatePresString(newPress + (gps.altitude.meters() / CORRECTION_FACTOR));
|
||||
#else
|
||||
: generatePresString(newPress + (Config.wxsensor.heightCorrection / CORRECTION_FACTOR));
|
||||
#endif
|
||||
|
||||
fifthLine = "BME-> ";
|
||||
fifthLine += String(int(newTemp + Config.wxsensor.temperatureCorrection));
|
||||
|
|
|
|||
Loading…
Reference in a new issue