Skip to content

Commit e550309

Browse files
committed
Use ESP_LOGI insteal of Serial.print() for ElocConfig.cpp
There is a potential bug with the Arduino serial library in combination with tickless sleep, i.e. automatic light sleep mode. see: espressif/arduino-esp32#8122
1 parent 2014220 commit e550309

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

eloc610LowPowerPartition/src/ElocConfig.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ void writeMicInfo() {
5757
file2.print(gMicInfo.MicMountType + '\n');
5858
file2.print(gMicInfo.MicBluetoothOnOrOff + '\n');
5959
file2.close();
60-
Serial.println("micinfo: " + gMicInfo.MicType + " " + gMicInfo.MicBitShift + " " + gMicInfo.MicGPSCoords + " " + gMicInfo.MicPointingDirectionDegrees + " " + gMicInfo.MicHeight + " " + gMicInfo.MicMountType + " " + gMicInfo.MicBluetoothOnOrOff);
60+
String info = "micinfo: " + gMicInfo.MicType + " " + gMicInfo.MicBitShift + " " + gMicInfo.MicGPSCoords + " " + gMicInfo.MicPointingDirectionDegrees + " " + gMicInfo.MicHeight + " " + gMicInfo.MicMountType + " " + gMicInfo.MicBluetoothOnOrOff;
61+
ESP_LOGI(TAG, "%s", info.c_str());
6162
}
6263

6364
void readMicInfo() {
@@ -83,7 +84,8 @@ void readMicInfo() {
8384
gMicInfo.MicBluetoothOnOrOff.trim();
8485

8586
file2.close();
86-
Serial.println("micinfo: " + gMicInfo.MicType + " " + gMicInfo.MicBitShift + " " + gMicInfo.MicGPSCoords + " " + gMicInfo.MicPointingDirectionDegrees + " " + gMicInfo.MicHeight + " " + gMicInfo.MicMountType + " " + gMicInfo.MicBluetoothOnOrOff);
87+
String info = "micinfo: " + gMicInfo.MicType + " " + gMicInfo.MicBitShift + " " + gMicInfo.MicGPSCoords + " " + gMicInfo.MicPointingDirectionDegrees + " " + gMicInfo.MicHeight + " " + gMicInfo.MicMountType + " " + gMicInfo.MicBluetoothOnOrOff;
88+
ESP_LOGI(TAG, "%s", info.c_str());
8789
}
8890
/**************************************************************************************************/
8991

@@ -226,7 +228,7 @@ void writeSettings(String settings) {
226228
file.print(temp);
227229

228230
file.close();
229-
Serial.println("new name: " + temp);
231+
ESP_LOGI(TAG, "new name: %s", temp.c_str());
230232
btwrite("new name " + temp + "\n\n--- Restarting ELOC ----");
231233
vTaskDelay(pdMS_TO_TICKS(100));
232234
sendSettings();
@@ -324,7 +326,7 @@ void readSettings() {
324326
gLocation = getSubstring(temp, '#', 4);
325327
gLocation.trim();
326328

327-
Serial.println("settings read: " + temp);
329+
ESP_LOGI(TAG, "settings read: %s", temp.c_str());
328330

329331
/*printf("File Content:");
330332

0 commit comments

Comments
 (0)