small vscode change

type convert on measure function
This commit is contained in:
Oliver Cullis 2024-08-23 11:19:18 +02:00
parent e11188bd5e
commit ff2fcaf3d2
3 changed files with 4 additions and 6 deletions

1
.vscode/Pico-W-Stub vendored Symbolic link
View File

@ -0,0 +1 @@
/home/ocullis/.config/Code/User/Pico-W-Stub

View File

@ -2,15 +2,12 @@
"python.linting.enabled": true, "python.linting.enabled": true,
"python.languageServer": "Pylance", "python.languageServer": "Pylance",
"python.analysis.typeCheckingMode": "basic", "python.analysis.typeCheckingMode": "basic",
"python.analysis.diagnosticSeverityOverrides": {
"reportMissingModuleSource": "none"
},
"micropico.syncFolder": "", "micropico.syncFolder": "",
"micropico.openOnStart": true, "micropico.openOnStart": true,
"python.analysis.typeshedPaths": [ "python.analysis.typeshedPaths": [
"~/.micropico-stubs/included" ".vscode/Pico-W-Stub"
], ],
"python.analysis.extraPaths": [ "python.analysis.extraPaths": [
"~/.micropico-stubs/included" ".vscode/Pico-W-Stub/stubs"
] ]
} }

View File

@ -52,7 +52,7 @@ async def measure_sensors(
message_queue.add(x) message_queue.add(x)
# Calculate time to sleep # 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 sleep_time = time.ticks_diff(next_time, time.ticks_us())/1e6
await asyncio.sleep(sleep_time) await asyncio.sleep(sleep_time)