File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ void setup() {
270
270
271
271
Serial.println (" Display brightness: " + String (configuration.getDisplayBrightness ()));
272
272
oledDisplay.setBrightness (configuration.getDisplayBrightness ());
273
+ delay (DISPLAY_DELAY_SHOW_CONTENT_MS);
273
274
}
274
275
275
276
@@ -1428,13 +1429,17 @@ void postUsingCellular(bool forcePost) {
1428
1429
1429
1430
// Post success, remove the data that previously sent from queue
1430
1431
xSemaphoreTake (mutexMeasurementCycleQueue, portMAX_DELAY);
1431
- measurementCycleQueue.erase (measurementCycleQueue.begin (),
1432
- measurementCycleQueue.begin () + queueSize);
1433
1432
1434
1433
if (measurementCycleQueue.capacity () > RESERVED_MEASUREMENT_CYCLE_CAPACITY) {
1435
1434
Serial.println (" measurementCycleQueue capacity more than reserved space, resizing.." );
1436
- measurementCycleQueue.resize (RESERVED_MEASUREMENT_CYCLE_CAPACITY);
1435
+ std::vector<Measurements::Measures> tmp;
1436
+ tmp.reserve (RESERVED_MEASUREMENT_CYCLE_CAPACITY);
1437
+ measurementCycleQueue.swap (tmp);
1438
+ } else {
1439
+ // If not more than the capacity, then just clear all the values
1440
+ measurementCycleQueue.clear ();
1437
1441
}
1442
+
1438
1443
xSemaphoreGive (mutexMeasurementCycleQueue);
1439
1444
}
1440
1445
You can’t perform that action at this time.
0 commit comments