feat: add Bluetooth-controlled LoRa OTA

Add the framed BLE mOTA transport and companion control path, complete the full-profile build and runtime fixes, and document and test the OTA workflow.
This commit is contained in:
mikecarper committed 2026-08-27 01:22:18 -07:00
1 parent bd3a94bddb
commit 69ded9d6c7
79 files changed
+3178 -304

No files matched your search

+6
View File
@@ -15,6 +15,7 @@ class DisplayDriver {
int _w, _h;
protected:
DisplayDriver(int w, int h) { _w = w; _h = h; }
void setDimensions(int w, int h) { _w = w; _h = h; }
static size_t trimLastUTF8Codepoint(char* str, size_t length) {
if (length == 0) return 0;
@@ -30,6 +31,11 @@ public:
int height() const { return _h; }
virtual bool isOn() = 0;
virtual bool supportsRotation() const { return false; }
virtual bool setRotationDegrees(uint16_t degrees) {
(void)degrees;
return false;
}
virtual bool isEink() { return false; } // default to non-eink, override in eink drivers
virtual void forceFullRefresh() {} // next refresh will be full for eink
virtual void turnOn() = 0;
+28 -4
View File
@@ -22,10 +22,34 @@ bool SSD1306Display::begin() {
if (_peripher_power) _peripher_power->claim();
_isOn = true;
}
#ifdef DISPLAY_ROTATION
display.setRotation(DISPLAY_ROTATION);
#endif
return display.begin(SSD1306_SWITCHCAPVCC, DISPLAY_ADDRESS, true, false) && i2c_probe(Wire, DISPLAY_ADDRESS);
const bool started = display.begin(SSD1306_SWITCHCAPVCC, DISPLAY_ADDRESS,
true, false)
&& i2c_probe(Wire, DISPLAY_ADDRESS);
if (started) setRotationDegrees(0);
return started;
}
bool SSD1306Display::setRotationDegrees(uint16_t degrees) {
uint8_t rotation;
switch (degrees) {
case 0:
#ifdef DISPLAY_ROTATION
rotation = DISPLAY_ROTATION & 3;
#else
rotation = 0;
#endif
break;
case 90: rotation = 1; break;
case 180: rotation = 2; break;
case 270: rotation = 3; break;
default: return false;
}
display.setRotation(rotation);
setDimensions(display.width(), display.height());
display.clearDisplay();
display.display();
return true;
}
void SSD1306Display::turnOn() {
+2
View File
@@ -32,6 +32,8 @@ public:
bool begin();
bool isOn() override { return _isOn; }
bool supportsRotation() const override { return true; }
bool setRotationDegrees(uint16_t degrees) override;
void turnOn() override;
void turnOff() override;
void clear() override;