diff --git a/arch/apollo3/apollo3.ini b/arch/apollo3/apollo3.ini
index 75eaf89e5..05a56eb4f 100644
--- a/arch/apollo3/apollo3.ini
+++ b/arch/apollo3/apollo3.ini
@@ -1,5 +1,5 @@
[apollo3_base]
-platform = https://github.com/nigelb/platform-apollo3blue.git#cdbb76ec805033a4543f2d3c136d926d06bfc361
+platform = https://github.com/nigelb/platform-apollo3blue.git#e24b0b1970aab9e7b20d759e5e86ce6b2647d1e1
platform_packages=framework-arduinoapollo3@https://github.com/sparkfun/Arduino_Apollo3#v2.2.1
framework = arduino
build_type = debug
@@ -10,5 +10,6 @@ build_src_filter =
${arduino_base.build_src_filter} - - - - - - - - - - - - - - -
lib_deps =
${env.lib_deps}
+ jgromes/RadioLib@^6.1.0
lib_ignore =
mathertel/OneButton@^2.0.3
diff --git a/boards/wiscore_rak11720.json b/boards/wiscore_rak11720.json
index 74c39f45f..ae521882d 100644
--- a/boards/wiscore_rak11720.json
+++ b/boards/wiscore_rak11720.json
@@ -13,7 +13,7 @@
"extra_flags": "-DSFE_ARTEMIS"
},
"v2": {
- "variant": "WisCore_RAK11720_Board",
+ "variant": "rak11720",
"extra_flags": "-DARDUINO_RAK_11720_MODULE"
}
},
diff --git a/src/AccelerometerThread.h b/src/AccelerometerThread.h
index 875ca2e22..2a7ba3b64 100644
--- a/src/AccelerometerThread.h
+++ b/src/AccelerometerThread.h
@@ -4,6 +4,8 @@
#include "main.h"
#include "power.h"
+#if defined(HAS_TELEMETRY) && (HAS_TELEMETRY == 1)
+
#include
#include
@@ -90,3 +92,5 @@ class AccelerometerThread : public concurrency::OSThread
};
} // namespace concurrency
+
+#endif
\ No newline at end of file
diff --git a/src/FSCommon.cpp b/src/FSCommon.cpp
index 150391237..cc093dfe6 100644
--- a/src/FSCommon.cpp
+++ b/src/FSCommon.cpp
@@ -37,8 +37,8 @@ bool copyFile(const char *from, const char *to)
f2.flush();
f2.close();
f1.close();
- return true;
#endif
+ return true;
}
bool renameFile(const char *pathFrom, const char *pathTo)
@@ -55,6 +55,7 @@ bool renameFile(const char *pathFrom, const char *pathTo)
}
#endif
#endif
+ return true;
}
void listDir(const char *dirname, uint8_t levels, bool del = false)
diff --git a/src/FSCommon.h b/src/FSCommon.h
index ef1d3e4c1..4564eae3c 100644
--- a/src/FSCommon.h
+++ b/src/FSCommon.h
@@ -20,6 +20,13 @@
using namespace LittleFS_Namespace;
#endif
+#if defined(ARCH_APOLLO3)
+#include "platform/apollo3/InternalFileSystem.h" // Apollo3
+#define FSCom InternalFS
+#define FSBegin() FSCom.begin()
+using namespace LittleFS_Namespace;
+#endif
+
#if defined(ARCH_RP2040)
// RP2040
#include "LittleFS.h"
diff --git a/src/Power.cpp b/src/Power.cpp
index 37d80a31f..9dd3f7aee 100644
--- a/src/Power.cpp
+++ b/src/Power.cpp
@@ -134,7 +134,7 @@ class AnalogBatteryLevel : public HasBatteryLevel
virtual uint16_t getBattVoltage() override
{
-#if defined(HAS_TELEMETRY) && !defined(ARCH_PORTDUINO) && !defined(HAS_PMU)
+#if defined(HAS_TELEMETRY) && (HAS_TELEMETRY == 1) && !defined(ARCH_PORTDUINO) && !defined(HAS_PMU)
if (hasINA()) {
LOG_DEBUG("Using INA on I2C addr 0x%x for device battery voltage\n", config.power.device_battery_ina_address);
return getINAVoltage();
@@ -260,7 +260,7 @@ class AnalogBatteryLevel : public HasBatteryLevel
float last_read_value = 0.0;
uint32_t last_read_time_ms = 0;
-#if defined(HAS_TELEMETRY) && !defined(ARCH_PORTDUINO)
+#if defined(HAS_TELEMETRY) && (HAS_TELEMETRY == 1) && !defined(ARCH_PORTDUINO)
uint16_t getINAVoltage()
{
if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219] == config.power.device_battery_ina_address) {
diff --git a/src/RedirectablePrint.cpp b/src/RedirectablePrint.cpp
index 0e8e1c798..0ee3be1a5 100644
--- a/src/RedirectablePrint.cpp
+++ b/src/RedirectablePrint.cpp
@@ -1,6 +1,6 @@
#include "RedirectablePrint.h"
#include "NodeDB.h"
-#include "RTC.h"
+#include "gps/RTC.h"
#include "concurrency/OSThread.h"
#include "configuration.h"
#include
diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp
index 7afb03ee2..107d1694f 100644
--- a/src/detect/ScanI2CTwoWire.cpp
+++ b/src/detect/ScanI2CTwoWire.cpp
@@ -73,7 +73,7 @@ ScanI2C::DeviceType ScanI2CTwoWire::probeOLED(ScanI2C::DeviceAddress addr) const
}
void ScanI2CTwoWire::printATECCInfo() const
{
-#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)
+#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(ARCH_APOLLO3)
atecc.readConfigZone(false);
LOG_DEBUG("ATECC608B Serial Number: ");
@@ -172,7 +172,7 @@ void ScanI2CTwoWire::scanPort(I2CPort port)
type = probeOLED(addr);
break;
-#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)
+#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(ARCH_APOLLO3)
case ATECC608B_ADDR:
type = ATECC608B;
if (atecc.begin(addr.address) == true) {
diff --git a/src/freertosinc.h b/src/freertosinc.h
index 166054241..988dc4379 100644
--- a/src/freertosinc.h
+++ b/src/freertosinc.h
@@ -12,7 +12,7 @@
#include
#endif
-#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RP2040)
+#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_APOLLO3)
#define HAS_FREE_RTOS
#include
diff --git a/src/main.cpp b/src/main.cpp
index c867930d0..d4ceef893 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -11,7 +11,7 @@
#include "power.h"
// #include "debug.h"
#include "FSCommon.h"
-#include "RTC.h"
+#include "gps/RTC.h"
#include "SPILock.h"
#include "concurrency/OSThread.h"
#include "concurrency/Periodic.h"
@@ -107,7 +107,7 @@ ScanI2C::DeviceAddress accelerometer_found = ScanI2C::ADDRESS_NONE;
// The I2C address of the RGB LED (if found)
ScanI2C::FoundDevice rgb_found = ScanI2C::FoundDevice(ScanI2C::DeviceType::NONE, ScanI2C::ADDRESS_NONE);
-#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)
+#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(ARCH_APOLLO3)
ATECCX08A atecc;
#endif
@@ -459,7 +459,7 @@ void setup()
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64
#endif
-#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)
+#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(ARCH_APOLLO3)
if (acc_info.type != ScanI2C::DeviceType::NONE) {
accelerometerThread = new AccelerometerThread(acc_info.type);
}
@@ -481,6 +481,9 @@ void setup()
SPI.setRX(RF95_MISO);
SPI.begin(false);
#endif // HW_SPI1_DEVICE
+#elif defined(ARCH_APOLLO3)
+ // Apollo3
+ SPI.begin();
#elif !defined(ARCH_ESP32) // ARCH_RP2040
SPI.begin();
#else
diff --git a/src/main.h b/src/main.h
index 93baec590..d1c06d42a 100644
--- a/src/main.h
+++ b/src/main.h
@@ -10,7 +10,7 @@
#include "mesh/generated/meshtastic/telemetry.pb.h"
#include
#include