|
@@ -1,7 +1,9 @@
|
|
|
#include <Arduino.h>
|
|
#include <Arduino.h>
|
|
|
#include "target.h"
|
|
#include "target.h"
|
|
|
#include <helpers/ArduinoHelpers.h>
|
|
#include <helpers/ArduinoHelpers.h>
|
|
|
-
|
|
|
|
|
|
|
+#ifdef ENV_INCLUDE_GPS
|
|
|
|
|
+#include <helpers/sensors/MicroNMEALocationProvider.h>
|
|
|
|
|
+#endif
|
|
|
SenseCapSolarBoard board;
|
|
SenseCapSolarBoard board;
|
|
|
|
|
|
|
|
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
|
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
|
@@ -10,7 +12,12 @@ WRAPPER_CLASS radio_driver(radio, board);
|
|
|
|
|
|
|
|
VolatileRTCClock fallback_clock;
|
|
VolatileRTCClock fallback_clock;
|
|
|
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|
|
-EnvironmentSensorManager sensors;
|
|
|
|
|
|
|
+#ifdef ENV_INCLUDE_GPS
|
|
|
|
|
+MicroNMEALocationProvider nmea = MicroNMEALocationProvider(Serial1, &rtc_clock);
|
|
|
|
|
+EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea);
|
|
|
|
|
+#else
|
|
|
|
|
+EnvironmentSensorManager sensors = EnvironmentSensorManager();
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
bool radio_init() {
|
|
bool radio_init() {
|
|
|
rtc_clock.begin(Wire);
|
|
rtc_clock.begin(Wire);
|