(&self, min: u8, max: u8)
| 432 | } |
| 433 | |
| 434 | pub fn set_charge_limit(&self, min: u8, max: u8) -> EcResult<()> { |
| 435 | // Sending bytes manually because the Set command, as opposed to the Get command, |
| 436 | // does not return any data |
| 437 | let limits = &[ChargeLimitControlModes::Set as u8, max, min]; |
| 438 | let data = self.send_command(EcCommands::ChargeLimitControl as u16, 0, limits)?; |
| 439 | |
| 440 | util::assert_win_len(data.len(), 0); |
| 441 | |
| 442 | Ok(()) |
| 443 | } |
| 444 | |
| 445 | /// Get charge limit in percent (min, max) |
| 446 | pub fn get_charge_limit(&self) -> EcResult<(u8, u8)> { |
no test coverage detected