WIP: Update python to 3.11 and use StrEnum #74
|
@ -18,16 +18,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1641870998,
|
"lastModified": 1671313200,
|
||||||
"narHash": "sha256-6HkxR2WZsm37VoQS7jgp6Omd71iw6t1kP8bDbaqCDuI=",
|
"narHash": "sha256-itZTrtHeDJjV696+ur0/TzkTqb5y3Eb57WRLRPK3rwA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "386234e2a61e1e8acf94dfa3a3d3ca19a6776efb",
|
"rev": "0938d73bb143f4ae037143572f11f4338c7b2d1c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-21.11",
|
"ref": "nixos-22.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
description = "Firmware for the Sinara 8451 Thermostat";
|
description = "Firmware for the Sinara 8451 Thermostat";
|
||||||
|
|
||||||
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11;
|
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11;
|
||||||
inputs.mozilla-overlay = { url = github:mozilla/nixpkgs-mozilla; flake = false; };
|
inputs.mozilla-overlay = { url = github:mozilla/nixpkgs-mozilla; flake = false; };
|
||||||
|
|
||||||
outputs = { self, nixpkgs, mozilla-overlay }:
|
outputs = { self, nixpkgs, mozilla-overlay }:
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
rustPlatform.rust.rustc
|
rustPlatform.rust.rustc
|
||||||
rustPlatform.rust.cargo
|
rustPlatform.rust.cargo
|
||||||
openocd dfu-util
|
openocd dfu-util
|
||||||
] ++ (with python3Packages; [
|
] ++ (with python311Packages; [
|
||||||
|
|||||||
numpy matplotlib
|
numpy matplotlib
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import math
|
import math
|
||||||
import logging
|
import logging
|
||||||
from collections import deque, namedtuple
|
from collections import deque, namedtuple
|
||||||
from enum import Enum
|
from enum import StrEnum
|
||||||
|
|
||||||
from pytec.client import Client
|
from pytec.client import Client
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ from pytec.client import Client
|
||||||
# See https://github.com/t0mpr1c3/Arduino-PID-AutoTune-Library
|
# See https://github.com/t0mpr1c3/Arduino-PID-AutoTune-Library
|
||||||
|
|
||||||
|
|
||||||
class PIDAutotuneState(Enum):
|
class PIDAutotuneState(StrEnum):
|
||||||
STATE_OFF = 'off'
|
STATE_OFF = 'off'
|
||||||
STATE_RELAY_STEP_UP = 'relay step up'
|
STATE_RELAY_STEP_UP = 'relay step up'
|
||||||
STATE_RELAY_STEP_DOWN = 'relay step down'
|
STATE_RELAY_STEP_DOWN = 'relay step down'
|
||||||
|
|
Loading…
Reference in New Issue
Did you test this?