style(v0.4): rustfmt thermal/protocol/coprocessor/service/integration
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Alexander <akotenev2003@gmail.com>
This commit is contained in:
@@ -42,7 +42,9 @@ impl SocToMcu {
|
||||
pub fn from_wire(t: u8, p: &[u8]) -> Option<Self> {
|
||||
match t {
|
||||
wire::HEARTBEAT => Some(SocToMcu::Heartbeat),
|
||||
wire::SHUTDOWN_IMMINENT => Some(SocToMcu::ShutdownImminent { budget: *p.first()? }),
|
||||
wire::SHUTDOWN_IMMINENT => Some(SocToMcu::ShutdownImminent {
|
||||
budget: *p.first()?,
|
||||
}),
|
||||
wire::SAFE_TO_CUT => Some(SocToMcu::SafeToCut),
|
||||
_ => None,
|
||||
}
|
||||
@@ -68,7 +70,9 @@ impl McuToSoc {
|
||||
pub fn from_wire(t: u8, p: &[u8]) -> Option<Self> {
|
||||
match t {
|
||||
wire::ACK => Some(McuToSoc::Ack),
|
||||
wire::ACC => Some(McuToSoc::Acc { on: *p.first()? != 0 }),
|
||||
wire::ACC => Some(McuToSoc::Acc {
|
||||
on: *p.first()? != 0,
|
||||
}),
|
||||
wire::VOLTAGE => Some(McuToSoc::Voltage {
|
||||
mv: u16::from_be_bytes([*p.first()?, *p.get(1)?]),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user