Skip to content

Commit

Permalink
Renaming Alert -> SupplyAlert
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-summers committed Jan 20, 2021
1 parent fc27d88 commit 8fef435
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rf_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct SupplyMeasurements {
pub enum ChannelFault {
OverTemperature,
UnderTemperature,
Alert,
SupplyAlert,
}

/// Represents the three power interlocks present on the device.
Expand Down Expand Up @@ -97,8 +97,8 @@ pub enum ChannelState {
impl serde::Serialize for ChannelState {
fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
match *self {
ChannelState::Blocked(ChannelFault::Alert) => {
serializer.serialize_unit_variant("ChannelState", 0, "Blocked(Alert)")
ChannelState::Blocked(ChannelFault::SupplyAlert) => {
serializer.serialize_unit_variant("ChannelState", 0, "Blocked(SupplyAlert)")
}
ChannelState::Blocked(ChannelFault::UnderTemperature) => {
serializer.serialize_unit_variant("ChannelState", 0, "Blocked(UnderTempeterature)")
Expand Down Expand Up @@ -585,7 +585,7 @@ impl RfChannel {
} else if temperature < 5.0 {
Some(ChannelFault::UnderTemperature)
} else if self.pins.alert.is_low().unwrap() {
Some(ChannelFault::Alert)
Some(ChannelFault::SupplyAlert)
} else {
None
}
Expand Down

0 comments on commit 8fef435

Please sign in to comment.