Skip to content

Commit b6c3c27

Browse files
committed
Offline/SD - Fix small regression in fs
1 parent 4578099 commit b6c3c27

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

src/components/uart/drivers/drvUartPm25.h

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,10 @@ class drvUartPm25 : public drvUartBase {
9696
*/
9797
bool getEventPM10_STD(sensors_event_t *pm10StdEvent) {
9898
PM25_AQI_Data data;
99-
if (!_pm25->read(&data)) {
100-
// TODO: Debug - remove for production PR
101-
WS_DEBUG_PRINTLN("Failed to read PM10STD data");
99+
if (!_pm25->read(&data))
102100
return false; // couldn't read data
103-
}
104101

105102
pm10StdEvent->pm10_std = (float)data.pm10_standard;
106-
// TODO: Debug - remove for production PR
107-
WS_DEBUG_PRINT("PM10STD: ");
108-
WS_DEBUG_PRINTLN(pm10StdEvent->pm10_std);
109103
return true;
110104
}
111105

@@ -119,14 +113,9 @@ class drvUartPm25 : public drvUartBase {
119113
bool getEventPM25_STD(sensors_event_t *pm25StdEvent) {
120114
PM25_AQI_Data data;
121115
if (!_pm25->read(&data)) {
122-
// TODO: Debug - remove for production PR
123-
WS_DEBUG_PRINTLN("Failed to read PM25STD data");
124116
return false; // couldn't read data
125-
}
117+
126118
pm25StdEvent->pm25_std = (float)data.pm25_standard;
127-
// TODO: Debug - remove for production PR
128-
WS_DEBUG_PRINT("PM25STD: ");
129-
WS_DEBUG_PRINTLN(pm25StdEvent->pm25_std);
130119
return true;
131120
}
132121

@@ -139,16 +128,10 @@ class drvUartPm25 : public drvUartBase {
139128
*/
140129
bool getEventPM100_STD(sensors_event_t *pm100StdEvent) {
141130
PM25_AQI_Data data;
142-
if (!_pm25->read(&data)) {
143-
// TODO: Debug - remove for production PR
144-
WS_DEBUG_PRINTLN("Failed to read PM100STD data");
131+
if (!_pm25->read(&data))
145132
return false; // couldn't read data
146-
}
147133

148134
pm100StdEvent->pm100_std = (float)data.pm100_standard;
149-
// TODO: Debug - remove for production PR
150-
WS_DEBUG_PRINT("PM100STD: ");
151-
WS_DEBUG_PRINTLN(pm100StdEvent->pm100_std);
152135
return true;
153136
}
154137

src/provisioning/tinyusb/Wippersnapper_FS.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ void Wippersnapper_FS::AddI2cDeviceToFileConfig(
422422
}
423423
}
424424

425+
425426
/*!
426427
@brief Writes the in-memory config document to the filesystem.
427428
@returns True if the file was successfully written, False otherwise.
@@ -438,7 +439,7 @@ bool Wippersnapper_FS::WriteFileConfig() {
438439
// Write the document to the filesystem
439440
File32 file_cfg = wipperFatFs_v2.open("/config.json", FILE_WRITE);
440441
if (!file_cfg) {
441-
fsHalt("Could not create the config file!");
442+
HaltFilesystem("Could not create the config file!");
442443
return false;
443444
}
444445
_doc_cfg.shrinkToFit();
@@ -450,11 +451,10 @@ bool Wippersnapper_FS::WriteFileConfig() {
450451
flash_v2.syncBlocks();
451452
refreshMassStorage();
452453
delay(500);
453-
initUSBMSC();
454+
InitUsbMsc();
454455
WS_PRINTER.flush();
455456
delay(2500);
456-
WS_PRINTER.println("Config file written to flash!"); // List current config /
457-
// components and periods
457+
WS_PRINTER.println("Config file written to flash!"); // List current config / components and periods
458458
WsV2._i2c_controller->PrintAllDrivers();
459459
return true;
460460
}

0 commit comments

Comments
 (0)