From 9e9a3e7800669593400e75d52d9aa1f510669055 Mon Sep 17 00:00:00 2001 From: David Montero Date: Mon, 25 May 2026 00:17:47 +0200 Subject: [PATCH] fix(esp32): use JS template literals (backticks) for stub interpolation --- frontend/src/store/useSimulatorStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/store/useSimulatorStore.ts b/frontend/src/store/useSimulatorStore.ts index 9729cdc6..d78ddddb 100644 --- a/frontend/src/store/useSimulatorStore.ts +++ b/frontend/src/store/useSimulatorStore.ts @@ -1330,7 +1330,7 @@ export const useSimulatorStore = create((set, get) => { 'sys.modules["network"] = _StubNetwork()', '', '# ntptime: pre-load RTC with host UTC so localtime() works.', - f'_VLX_BOOT_UTC = ({now.getUTCFullYear()}, {now.getUTCMonth() + 1}, {now.getUTCDate()}, {now.getUTCDay() || 7}, {now.getUTCHours()}, {now.getUTCMinutes()}, {now.getUTCSeconds()}, 0)', + `_VLX_BOOT_UTC = (${now.getUTCFullYear()}, ${now.getUTCMonth() + 1}, ${now.getUTCDate()}, ${now.getUTCDay() || 7}, ${now.getUTCHours()}, ${now.getUTCMinutes()}, ${now.getUTCSeconds()}, 0)`, 'class _StubNTP:', ' host = "pool.ntp.org"', ' timeout = 1', @@ -1345,7 +1345,7 @@ export const useSimulatorStore = create((set, get) => { '', '# urequests: fake responses so examples that call HTTP APIs', '# show real-looking data on the OLED instead of "API Error".', - f'_VLX_WEATHER = {{"main": {{"temp": 22.5, "humidity": 58, "pressure": 1013}}, "weather": [{{"main": "Clouds", "description": "partly cloudy"}}], "name": "{fakeWeatherCity}", "wind": {{"speed": 3.4}}}}', + `_VLX_WEATHER = {"main": {"temp": 22.5, "humidity": 58, "pressure": 1013}, "weather": [{"main": "Clouds", "description": "partly cloudy"}], "name": "${fakeWeatherCity}", "wind": {"speed": 3.4}}`, 'class _StubResponse:', ' def __init__(self, payload):', ' self._payload = payload',