diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5caff3a..3629338 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,16 +66,23 @@ jobs: features: '' continue-on-error: true steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.toolchain }} - target: thumbv7em-none-eabihf - override: true - - uses: actions-rs/cargo@v1 + targets: thumbv7em-none-eabihf + components: llvm-tools-preview + - run: cargo build --release --features "${{ matrix.features }}" + - name: Extract Stable Binary Using cargo-binutils + if: matrix.toolchain == 'stable' && github.ref == 'refs/heads/main' + run: | + cargo install cargo-binutils + cargo objcopy --release --bin thermostat-eem -- -O binary thermostat-eem.bin + - name: Upload Artifacts + if: matrix.toolchain == 'stable' && github.ref == 'refs/heads/main' + uses: actions/upload-artifact@v4.4.0 with: - command: build - args: --release --features "${{ matrix.features }}" + path: thermostat-eem.bin doc: runs-on: ubuntu-latest diff --git a/Cargo.lock b/Cargo.lock index c952c64..29b3cea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1025,9 +1025,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.213" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] @@ -1045,9 +1045,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.213" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index fa63eb7..6f05bc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ fugit = "0.3" mono-clock = "0.1" heapless = { version = "0.8", features = ["serde"] } minimq = "0.9" -serde = { version = "1.0.210", features = ["derive"], default-features = false } +serde = { version = "1.0.214", features = ["derive"], default-features = false } serde-json-core = "0.6" rtt-logger = "0.2" rtt-target = { version = "0.3", features = ["cortex-m"] } diff --git a/py/thermostat/__init__.py b/py/thermostat/__init__.py index aa14e9f..d32ba47 100644 --- a/py/thermostat/__init__.py +++ b/py/thermostat/__init__.py @@ -1,5 +1,2 @@ #!/usr/bin/python3 """Thermostat EEM utilities""" - -# Sample period in seconds for all channels. -SAMPLE_PERIOD = 1 / 503.5 # ADC ODR 1007 split between two channels per ADC