From a2bcc7dd2a1791f8d39eeadd373401f3dab88483 Mon Sep 17 00:00:00 2001 From: brentru Date: Fri, 27 Dec 2024 11:17:59 -0500 Subject: [PATCH] [SD] Resolve all Wokwi test issues, all green --- src/provisioning/sdcard/ws_sdcard.cpp | 2 +- tests/scenarios/offline/test-log-analogin.scenario.yaml | 1 - tests/scenarios/offline/test-log-digital-in.scenario.yaml | 2 +- tests/scenarios/offline/test-log-ds18b20.scenario.yaml | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/provisioning/sdcard/ws_sdcard.cpp b/src/provisioning/sdcard/ws_sdcard.cpp index ae2cc7f5..0fa57a0c 100644 --- a/src/provisioning/sdcard/ws_sdcard.cpp +++ b/src/provisioning/sdcard/ws_sdcard.cpp @@ -1023,7 +1023,7 @@ void ws_sdcard::waitForSerialConfig() { _serialInput.trim(); // Print out the received JSON string - // TODO: REMOVE this for the PR + // TODO: REMOVE this for the PR WS_DEBUG_PRINT("[SD][Debug] JSON string received!"); if (_use_test_data) { WS_DEBUG_PRINTLN("[from json test data]"); diff --git a/tests/scenarios/offline/test-log-analogin.scenario.yaml b/tests/scenarios/offline/test-log-analogin.scenario.yaml index a6923682..08e0ec13 100644 --- a/tests/scenarios/offline/test-log-analogin.scenario.yaml +++ b/tests/scenarios/offline/test-log-analogin.scenario.yaml @@ -6,7 +6,6 @@ steps: - wait-serial: '[SD] Waiting for incoming JSON string...' - write-serial: '{"exportVersion": "1.0.0", "exportedBy": "wokwi", "exportedAt": "2024-10-28T18:58:23.976Z", "exportedFromDevice": {"board": "metroesp32s3", "firmwareVersion": "1.0.0-beta.93", "referenceVoltage": 2.6, "totalGPIOPins": 11, "totalAnalogPins": 6}, "components": [{"componentAPI": "analogio", "name": "Analog Pin", "pinName": "D14", "type": "analog_pin", "mode": "ANALOG", "direction": "INPUT", "sampleMode": "TIMER", "analogReadMode": "PIN_VALUE", "period": 5, "isPin": true}], "checksum": 149}' - write-serial: '\n' - - wait-serial: '[SD] Valid JSON string received!' - wait-serial: '[analogio] Added new pin:' - wait-serial: 'Pin Name: 14' - wait-serial: 'Period: 5000.00' diff --git a/tests/scenarios/offline/test-log-digital-in.scenario.yaml b/tests/scenarios/offline/test-log-digital-in.scenario.yaml index 7eeaec1a..d2c9bc3a 100644 --- a/tests/scenarios/offline/test-log-digital-in.scenario.yaml +++ b/tests/scenarios/offline/test-log-digital-in.scenario.yaml @@ -6,7 +6,7 @@ steps: - wait-serial: '[SD] Waiting for incoming JSON string...' - write-serial: '{"checksum":183,"components":[{"componentAPI":"digitalio","direction":"INPUT","isPin":true,"mode":"DIGITAL","name":"Button (D4)","period":5,"pinName":"D4","pull":"UP","sampleMode":"TIMER","type":"push_button"}],"exportVersion":"1.0.0","exportedAt":"2024-10-28T18:58:23.976Z","exportedBy":"wokwi","exportedFromDevice":{"board":"metroesp32s3","firmwareVersion":"1.0.0-beta.93","referenceVoltage":2.6,"totalAnalogPins":6,"totalGPIOPins":11}}' - write-serial: '\n' - - wait-serial: '[SD] Valid JSON string received!' + - wait-serial: '[SD] JSON string received!' - wait-serial: '[digitalio] Added new pin:' - wait-serial: 'Pin Name: 4' - wait-serial: 'Period: 5000' diff --git a/tests/scenarios/offline/test-log-ds18b20.scenario.yaml b/tests/scenarios/offline/test-log-ds18b20.scenario.yaml index 559148e1..90eb160e 100644 --- a/tests/scenarios/offline/test-log-ds18b20.scenario.yaml +++ b/tests/scenarios/offline/test-log-ds18b20.scenario.yaml @@ -6,6 +6,5 @@ steps: - wait-serial: '[SD] Waiting for incoming JSON string...' - write-serial: '{"exportVersion": "1.0.0", "exportedBy": "wokwi", "exportedAt": "2024-10-28T18:58:23.976Z", "exportedFromDevice": {"board": "metroesp32s3", "firmwareVersion": "1.0.0-beta.93", "referenceVoltage": 2.6, "totalGPIOPins": 11, "totalAnalogPins": 6}, "components": [{"componentAPI": "ds18x20", "name": "DS18B20: Temperature Sensor", "sensorTypeCount": 2, "sensorType1": "object-temp-fahrenheit", "sensorType2": "object-temp", "pinName": "D6", "sensorResolution": 12, "period": 5}], "checksum": 34}' - write-serial: '\n' - - wait-serial: '[SD] Valid JSON string received!' - wait-serial: '{"timestamp":0,"pin":"D6","value":0,"si_unit":"OBJECT_TEMPERATURE"}' - wait-serial: '{"timestamp":0,"pin":"D6","value":32,"si_unit":"OBJECT_TEMPERATURE_FAHRENHEIT"}' \ No newline at end of file