Firmware for the b-parasite board, but in Rust!
at main 763 B view raw
1use sachy_battery::BatteryDischargeProfile; 2use trouble_host::prelude::TxPower; 3 4pub const PARA_SLEEP_SECS: u64 = 300; 5pub const PARA_ADV_DURATION_SECS: u64 = 4; 6pub const PARA_MIN_ADV_INTERVAL_MS: u64 = 30; 7pub const PARA_MAX_ADV_INTERVAL_MS: u64 = 80; 8pub const PARA_BLE_TX_POWER: TxPower = TxPower::Plus8dBm; 9 10pub static PARA_NAME: &str = "spara"; 11 12pub static DRY_COEFFS: [f32; 3] = [154.0, 110.0, -15.3]; 13pub static WET_COEFFS: [f32; 3] = [319.0, -63.1, 7.2]; 14 15pub static DISCARGE_PROFILES: [BatteryDischargeProfile; 4] = [ 16 BatteryDischargeProfile::new(3.00, 2.90, 1.00, 0.42), 17 BatteryDischargeProfile::new(2.90, 2.74, 0.42, 0.18), 18 BatteryDischargeProfile::new(2.74, 2.44, 0.18, 0.06), 19 BatteryDischargeProfile::new(2.44, 2.01, 0.06, 0.00), 20];