Browse Source

small vscode change

type convert on measure function
master
Oliver Cullis 1 month ago
parent
commit
ff2fcaf3d2
  1. 1
      .vscode/Pico-W-Stub
  2. 7
      .vscode/settings.json
  3. 2
      async_tasks/general_tasks.py

1
.vscode/Pico-W-Stub

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

7
.vscode/settings.json

@ -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"
] ]
} }

2
async_tasks/general_tasks.py

@ -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)

Loading…
Cancel
Save