pub fn priority(alert: Alert, alert_level: AlertLevel) -> u8 {
    use Alert::*;
    use AlertLevel::*;

    match (alert, alert_level) {
        (Mode1, Warning) => 2,
        (Mode2, Warning) => 3,
        (Flta, Warning) => 6,
        (Mode2, Caution) => 9,
        (Flta, Caution) => 11,
        (Mode4, Caution) => 13, // Terrain caution
        (Pda, Caution) => 14,
        //(Mode4, Caution)=>16 // Gear caution
        //(Mode4, Caution)=>17 // Flaps caution
        (Mode1, Caution) => 18,
        (Mode3, Caution) => 19,
        (Mode5, Caution) => 20,
        _ => u8::MAX, // TODO is this a safe assumption
    }
}
/// Get the priority of a n (Alert, AlertLevel) tupel
///
/// A low value means a high priority.
Get the priority of a n (Alert, AlertLevel) tupel
A low value means a high priority.
Get the priority of a n ( Alert AlertLevel ) tupel A low value means a high priority .
pub fn priority(alert: Alert, alert_level: AlertLevel) -> u8 {
    use Alert::*;
    use AlertLevel::*;
    match (alert, alert_level) {
        (Mode1, Warning) => 2,
        (Mode2, Warning) => 3,
        (Flta, Warning) => 6,
        (Mode2, Caution) => 9,
        (Flta, Caution) => 11,
        (Mode4, Caution) => 13, // Terrain caution
        (Pda, Caution) => 14,
        //(Mode4, Caution)=>16 // Gear caution
        //(Mode4, Caution)=>17 // Flaps caution
        (Mode1, Caution) => 18,
        (Mode3, Caution) => 19,
        (Mode5, Caution) => 20,
        _ => u8::MAX, // TODO is this a safe assumption
    }
}
pub fn priority ( alert : Alert , alert_level : AlertLevel ) -> u8 { use Alert :: * ; use AlertLevel :: * ; match ( alert , alert_level ) { ( Mode1 , Warning ) => 2 , ( Mode2 , Warning ) => 3 , ( Flta , Warning ) => 6 , ( Mode2 , Caution ) => 9 , ( Flta , Caution ) => 11 , ( Mode4 , Caution ) => 13 , // Terrain caution ( Pda , Caution ) => 14 , //(Mode4, Caution)=>16 // Gear caution //(Mode4, Caution)=>17 // Flaps caution ( Mode1 , Caution ) => 18 , ( Mode3 , Caution ) => 19 , ( Mode5 , Caution ) => 20 , _ => u8 :: MAX , // TODO is this a safe assumption } }
Get the priority of a n (Alert, AlertLevel) tupel
A low value means a high priority.
Get the priority of a n ( Alert AlertLevel ) tupel A low value means a high priority .
alert
Alert
alert_level
AlertLevel
alert
Alert
alert_level
AlertLevel