diff --git a/.github/workflows/sfy-buoy.yml b/.github/workflows/sfy-buoy.yml index d5804b71..6d972541 100644 --- a/.github/workflows/sfy-buoy.yml +++ b/.github/workflows/sfy-buoy.yml @@ -8,7 +8,6 @@ on: env: CARGO_TERM_COLOR: always - BUOYPR: test.product jobs: build: @@ -41,7 +40,7 @@ jobs: - name: Build (buoy) working-directory: sfy-buoy/sfy-artemis - run: cargo build --verbose + run: cargo build --verbose --release - name: Test (host-tests) working-directory: sfy-buoy/ @@ -51,3 +50,68 @@ jobs: working-directory: sfy-buoy/target-test run: cargo build --verbose --tests + - name: Build firmware (default) + working-directory: sfy-buoy/ + run: | + mkdir -p target/bins + make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-default-no-storage.bin + + CARGO_FLAGS="--features storage" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-default-with-storage.bin + + - name: Build firmware (5 min GPS) + working-directory: sfy-buoy/ + run: | + mkdir -p target/bins + GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-5min-gps-no-storage.bin + + GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features storage" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-5min-gps-with-storage.bin + + + - name: Build firmware (surf) + working-directory: sfy-buoy/ + run: | + mkdir -p target/bins + GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features surf" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-surf-no-storage.bin + + GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features surf,storage" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-surf-with-storage.bin + + - name: Build firmware (26Hz, 10min GPS, drifter) + working-directory: sfy-buoy/ + run: | + mkdir -p target/bins + GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features 20Hz" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-26Hz-drifter-no-storage.bin + + GPS_PERIOD=300 GPS_HEARTBEAT=-5 SYNC_PERIOD=20 CARGO_FLAGS="--features 20Hz,storage" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-26Hz-drifter-with-storage.bin + + - name: Build firmware (Mooring, 1h gps, 26Hz) + working-directory: sfy-buoy/ + run: | + mkdir -p target/bins + GPS_PERIOD=3600 GPS_HEARTBEAT=1 SYNC_PERIOD=40 CARGO_FLAGS="--features 20Hz" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-26Hz-mooring-no-storage.bin + + GPS_PERIOD=3600 GPS_HEARTBEAT=1 SYNC_PERIOD=40 CARGO_FLAGS="--features 20Hz,storage" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-26Hz-mooring-with-storage.bin + + - name: Build firmware (Mooring, 1h gps, 52Hz) + working-directory: sfy-buoy/ + run: | + mkdir -p target/bins + GPS_PERIOD=3600 GPS_HEARTBEAT=1 SYNC_PERIOD=40 make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-52Hz-mooring-no-storage.bin + + GPS_PERIOD=3600 GPS_HEARTBEAT=1 SYNC_PERIOD=40 CARGO_FLAGS="--features storage" make T=r bin + mv target/sfy-buoy.bin target/bins/sfy-fw-52Hz-mooring-with-storage.bin + + - uses: actions/upload-artifact@v4 + with: + name: firmware + path: sfy-buoy/target/bins diff --git a/sfy-buoy/sfy-artemis/src/main.rs b/sfy-buoy/sfy-artemis/src/main.rs index 1c72a47a..d5a2d7a9 100644 --- a/sfy-buoy/sfy-artemis/src/main.rs +++ b/sfy-buoy/sfy-artemis/src/main.rs @@ -127,7 +127,7 @@ fn main() -> ! { delay.delay_ms(1_000u32); let i2c4 = i2c::I2c::new(dp.IOM4, pins.d10, pins.d9, i2c::Freq::F100kHz); - let i2c3 = i2c::I2c::new(dp.IOM3, pins.d6, pins.d7, i2c::Freq::F1mHz); + let i2c3 = i2c::I2c::new(dp.IOM3, pins.d6, pins.d7, i2c::Freq::F400kHz); // Set up RTC let mut rtc = hal::rtc::Rtc::new(dp.RTC, &mut dp.CLKGEN);