File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 10
10
11
11
namespace {
12
12
13
- class MyServerCallbacks : public BLEServerCallbacks {
13
+ class BleServerConnectionCallbacks : public BLEServerCallbacks {
14
14
void onConnect (BLEServer* server) override {
15
15
deviceConnected = true ;
16
16
USBSerial.println (" Device connected" );
@@ -30,7 +30,7 @@ class MyServerCallbacks : public BLEServerCallbacks {
30
30
void setupBLE () {
31
31
BLEDevice::init (" OpenPPG Controller" );
32
32
pServer = BLEDevice::createServer ();
33
- pServer->setCallbacks (new MyServerCallbacks ());
33
+ pServer->setCallbacks (new BleServerConnectionCallbacks ());
34
34
35
35
initConfigBleService (pServer);
36
36
initBmsBleService (pServer);
Original file line number Diff line number Diff line change @@ -94,27 +94,23 @@ volatile bool uiReady = false;
94
94
95
95
SemaphoreHandle_t eepromSemaphore;
96
96
SemaphoreHandle_t stateMutex;
97
+ SemaphoreHandle_t lvglMutex;
97
98
98
- // Add near other queue declarations
99
- QueueHandle_t bleStateQueue = NULL ;
100
- QueueHandle_t deviceStateQueue = NULL ;
101
-
102
- // Add struct for BLE state updates
99
+ // BLE state propagation
103
100
struct BLEStateUpdate {
104
101
uint8_t state;
105
102
bool needsNotify;
106
103
};
107
-
108
- // Add new task handle
104
+ QueueHandle_t bleStateQueue = NULL ;
109
105
TaskHandle_t bleStateUpdateTaskHandle = NULL ;
106
+
107
+ // Device state broadcast
108
+ QueueHandle_t deviceStateQueue = NULL ;
110
109
TaskHandle_t deviceStateUpdateTaskHandle = NULL ;
111
110
112
- // Add near other task handles
111
+ // WebSerial worker
113
112
TaskHandle_t webSerialTaskHandle = NULL ;
114
113
115
- // Add mutex for LVGL thread safety
116
- SemaphoreHandle_t lvglMutex;
117
-
118
114
// Variable to track the current screen page
119
115
ScreenPage currentScreenPage = MAIN_SCREEN;
120
116
You can’t perform that action at this time.
0 commit comments