pub fn encode_digit(digit: u8) -> u8 {
        let digit = digit % 10;
        if digit == 0 { NumCharBits::Zero as u8 }
        else if digit == 1 { NumCharBits::One as u8 }
        else if digit == 2 { NumCharBits::Two as u8 }
        else if digit == 3 { NumCharBits::Three as u8 }
        else if digit == 4 { NumCharBits::Four as u8 }
        else if digit == 5 { NumCharBits::Five as u8 }
        else if digit == 6 { NumCharBits::Six as u8 }
        else if digit == 7 { NumCharBits::Seven as u8 }
        else if digit == 8 { NumCharBits::Eight as u8 }
        // else if digit == 9 { NumCharBits::Nine as u8 }
        else { NumCharBits::Nine as u8 }
    }
/// Encodes a number/digit from 0 to 9 to it's bit representation on the display.
/// This is not the char (ASCII) representation. It's a number/integer.
Encodes a number/digit from 0 to 9 to it's bit representation on the display.
This is not the char (ASCII) representation. It's a number/integer.
Encodes a number / digit from 0 to 9 to it ' s bit representation on the display . This is not the char ( ASCII ) representation . It ' s a number / integer .
pub fn encode_digit(digit: u8) -> u8 {
        let digit = digit % 10;
        if digit == 0 { NumCharBits::Zero as u8 }
        else if digit == 1 { NumCharBits::One as u8 }
        else if digit == 2 { NumCharBits::Two as u8 }
        else if digit == 3 { NumCharBits::Three as u8 }
        else if digit == 4 { NumCharBits::Four as u8 }
        else if digit == 5 { NumCharBits::Five as u8 }
        else if digit == 6 { NumCharBits::Six as u8 }
        else if digit == 7 { NumCharBits::Seven as u8 }
        else if digit == 8 { NumCharBits::Eight as u8 }
        // else if digit == 9 { NumCharBits::Nine as u8 }
        else { NumCharBits::Nine as u8 }
    }
pub fn encode_digit ( digit : u8 ) -> u8 { let digit = digit % 10 ; if digit == 0 { NumCharBits :: Zero as u8 } else if digit == 1 { NumCharBits :: One as u8 } else if digit == 2 { NumCharBits :: Two as u8 } else if digit == 3 { NumCharBits :: Three as u8 } else if digit == 4 { NumCharBits :: Four as u8 } else if digit == 5 { NumCharBits :: Five as u8 } else if digit == 6 { NumCharBits :: Six as u8 } else if digit == 7 { NumCharBits :: Seven as u8 } else if digit == 8 { NumCharBits :: Eight as u8 } // else if digit == 9 { NumCharBits::Nine as u8 } else { NumCharBits :: Nine as u8 } }
Encodes a number/digit from 0 to 9 to it's bit representation on the display.
Encodes a number / digit from 0 to 9 to it ' s bit representation on the display .
digit
u8