From ff2fcaf3d2d3f4ba9adc4efb46110195f9e0f9bd Mon Sep 17 00:00:00 2001 From: Oliver Cullis Date: Fri, 23 Aug 2024 11:19:18 +0200 Subject: [PATCH] small vscode change type convert on measure function --- .vscode/Pico-W-Stub | 1 + .vscode/settings.json | 7 ++----- async_tasks/general_tasks.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) create mode 120000 .vscode/Pico-W-Stub diff --git a/.vscode/Pico-W-Stub b/.vscode/Pico-W-Stub new file mode 120000 index 0000000..1e89347 --- /dev/null +++ b/.vscode/Pico-W-Stub @@ -0,0 +1 @@ +/home/ocullis/.config/Code/User/Pico-W-Stub \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 35e9ae5..2b576bf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,15 +2,12 @@ "python.linting.enabled": true, "python.languageServer": "Pylance", "python.analysis.typeCheckingMode": "basic", - "python.analysis.diagnosticSeverityOverrides": { - "reportMissingModuleSource": "none" - }, "micropico.syncFolder": "", "micropico.openOnStart": true, "python.analysis.typeshedPaths": [ - "~/.micropico-stubs/included" + ".vscode/Pico-W-Stub" ], "python.analysis.extraPaths": [ - "~/.micropico-stubs/included" + ".vscode/Pico-W-Stub/stubs" ] } \ No newline at end of file diff --git a/async_tasks/general_tasks.py b/async_tasks/general_tasks.py index 2ad7eba..c1c684b 100644 --- a/async_tasks/general_tasks.py +++ b/async_tasks/general_tasks.py @@ -52,7 +52,7 @@ async def measure_sensors( message_queue.add(x) # Calculate time to sleep - next_time = time.ticks_add(next_time, interval_s*1000000) + next_time = time.ticks_add(next_time, int(interval_s*1000000)) sleep_time = time.ticks_diff(next_time, time.ticks_us())/1e6 await asyncio.sleep(sleep_time)