Add ChecksumError handling to FatError conversion
This commit is contained in:
@@ -316,9 +316,12 @@ impl From<sntpc::Error> for FatError {
|
|||||||
impl From<BmsProtocolError> for FatError {
|
impl From<BmsProtocolError> for FatError {
|
||||||
fn from(value: BmsProtocolError) -> Self {
|
fn from(value: BmsProtocolError) -> Self {
|
||||||
match value {
|
match value {
|
||||||
BmsProtocolError::I2cCommunicationError => FatError::String {
|
BmsProtocolError::I2cCommunicationError =>FatError::String {
|
||||||
error: "I2C communication error".to_string(),
|
error: "I2C communication error".to_string(),
|
||||||
},
|
},
|
||||||
|
BmsProtocolError::ChecksumError => FatError::String {
|
||||||
|
error: "BMS checksum error".to_string(),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user