Skip to content

Commit 2a9bd58

Browse files
authored
Add 7.5" BWRY
1 parent c755600 commit 2a9bd58

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

src/main.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,10 +1837,10 @@ void initDisplay(){
18371837
bbepSendCMDSequence(&bbep, bbep.pInitFull);
18381838
String chipId = getChipIdHex();
18391839
String infoText = "opendisplay.org\nName: OD" + chipId + "\nFW: " + String(getFirmwareMajor()) + "." + String(getFirmwareMinor()) + "\nFirmware by\nJonas Niesner";
1840-
if (globalConfig.displays[0].transmission_modes & TRANSMISSION_MODE_CLEAR_ON_BOOT) writeTextAndFill("");
1841-
else writeTextAndFill(infoText.c_str());
1840+
if (! (globalConfig.displays[0].transmission_modes & TRANSMISSION_MODE_CLEAR_ON_BOOT)){
18421841
bbepRefresh(&bbep, REFRESH_FULL);
18431842
waitforrefresh(60);
1843+
}
18441844
pwrmgm(false);
18451845
}
18461846
else{
@@ -1973,9 +1973,15 @@ void sendResponse(uint8_t* response, uint8_t len){
19731973
writeSerial("ERROR: Response too large for queue (" + String(len) + " > " + String(MAX_RESPONSE_SIZE) + ")");
19741974
}
19751975
#endif
1976-
#ifndef TARGET_ESP32
1977-
delay(20);
1978-
writeSerial("Response sent successfully");
1976+
#ifdef TARGET_NRF
1977+
// NRF devices send BLE notifications directly
1978+
if (Bluefruit.connected() && imageCharacteristic.notifyEnabled()) {
1979+
imageCharacteristic.notify(response, len);
1980+
writeSerial("NRF: BLE notification sent (" + String(len) + " bytes)");
1981+
} else {
1982+
writeSerial("ERROR: Cannot send BLE response - not connected or notifications not enabled");
1983+
}
1984+
delay(20); // Brief delay to let BLE stack process
19791985
#endif
19801986
}
19811987

0 commit comments

Comments
 (0)