pub fn display_dots(&mut self, dots: [bool; 4]) -> Result<(), Error<E>> {
        
        let mut dotvalues: u8 = 0;
        
        for (idx, dot) in dots.iter().enumerate() {
            match dot {
                true => dotvalues += 2_u8.pow(idx as u32 + 1_u32),
                false => ()
            }
        };

        self.write(&[Register::DOTS, dotvalues])?;
        Ok(())
    }
// dots are numbered 1,2,3,4 from the left, and they correspond to bits
// so 0b0000_0010 is bit 1, dot 1, 0b0000_1000 is bit 3, dot 3 and so on
dots are numbered 1,2,3,4 from the left, and they correspond to bits
so 0b0000_0010 is bit 1, dot 1, 0b0000_1000 is bit 3, dot 3 and so on
dots are numbered 1 2 3 4 from the left and they correspond to bits so 0b0000_0010 is bit 1 dot 1 0b0000_1000 is bit 3 dot 3 and so on
pub fn display_dots(&mut self, dots: [bool; 4]) -> Result<(), Error<E>> {
        let mut dotvalues: u8 = 0;
        for (idx, dot) in dots.iter().enumerate() {
            match dot {
                true => dotvalues += 2_u8.pow(idx as u32 + 1_u32),
                false => ()
            }
        };
        self.write(&[Register::DOTS, dotvalues])?;
        Ok(())
    }
pub fn display_dots ( & mut self , dots : [ bool ; 4 ] ) -> Result < ( ) , Error < E > > { let mut dotvalues : u8 = 0 ; for ( idx , dot ) in dots . iter ( ) . enumerate ( ) { match dot { true => dotvalues += 2_u8 . pow ( idx as u32 + 1_u32 ) , false => ( ) } } ; self . write ( & [ Register :: DOTS , dotvalues ] ) ? ; Ok ( ( ) ) }
dots are numbered 1,2,3,4 from the left, and they correspond to bits
so 0b0000_0010 is bit 1, dot 1, 0b0000_1000 is bit 3, dot 3 and so on
dots are numbered 1 2 3 4 from the left and they correspond to bits so 0b0000_0010 is bit 1 dot 1 0b0000_1000 is bit 3 dot 3 and so on
&mut self
dots
[bool; 4]
&mut self
dots
[bool; 4]