void ControllerFallingMode::updateNote(float dt) { updateAudio(); setCurTime(dt); moveNotesInField(); setTopTime(); drawNewNotes(); //resizeLongNotes(); removeOldNotes(); autoPlay(); }
void updateTopLCD( uint32_t time, uint32_t batteryState ) { uint32_t x ; setTopTime( time ) ; if ( batteryState ) { Ht1621Data1[8] |= 0x80 ; } if ( batteryState > 1 ) { Ht1621Data1[10] |= 0x80 ; } if ( batteryState > 2 ) { Ht1621Data1[6] |= 0x80 ; } if ( batteryState > 3 ) { Ht1621Data1[11] |= 0x80 ; } if ( batteryState > 4 ) { Ht1621Data1[5] |= 0x80 ; } x = RssiValue ; if ( x > 42 ) { Ht1621Data2[3] |= 1 ; } if ( x > 45 ) { Ht1621Data2[2] |= 1 ; } if ( x > 50 ) { Ht1621Data2[1] |= 1 ; } if ( x > 60 ) { Ht1621Data2[4] |= 0x10 ; } if ( x > 70 ) { Ht1621Data2[4] |= 0x20 ; } if ( x > 80 ) { Ht1621Data2[4] |= 0x40 ; } if ( x > 90 ) { Ht1621Data2[4] |= 0x80 ; } Ht1621Data1[0] = 0x40 ; // last 2 bits command and 6 bits 0 address Ht1621Data2[0] = 0x40 ; // last 2 bits command and 6 bits 0 address TopLcdControl.data = Ht1621Data1 ; TopLcdControl.data2 = Ht1621Data2 ; TopLcdControl.chip = 0 ; TopLcdControl.count = 12*8-4 ; TopLcdControl.count2 = 8*8-4 ; TopLcdControl.state = TOP_LCD_IDLE ; TIM12->DIER |= 1 ; }