-
-
Save CamDavidsonPilon/f87bd4a5e661296e66042164340d4bb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pioreactor.utils import local_persistant_storage | |
from msgspec.json import decode as loads, encode as dumps | |
name = "my_cali_name" | |
with local_persistant_storage("pump_calibrations") as c: | |
blob = loads(c[name]) | |
print(f"old={blob}") | |
print() | |
blob['duration_'] = 1000 * blob['duration_'] | |
print(f"new={blob}") | |
print() | |
c[name] = dumps(blob) | |
print(f"Saved! Now run `pio run pump_calibration change_current {name}`") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment