Barometric Vario function changed
new menu items added to handle new function sound function changed for Vario sound driver changed to remove crisps on continues sound frsky data structure changed to fit new variables, some spares reused
This commit is contained in:
+12
-12
@@ -128,8 +128,8 @@ uint8_t vpot_mod_state = 0;
|
||||
|
||||
ISR(USART2_RX_vect)
|
||||
{
|
||||
//receive data from extension board
|
||||
//bit 9 = 1 mean encoder number, following byte with bit 9 = 0 is increment value
|
||||
//receive data from extension board
|
||||
//bit 9 = 1 mean encoder number, following byte with bit 9 = 0 is increment value
|
||||
/* Get status and 9th bit, then data */
|
||||
/* from buffer */
|
||||
//uint8_t status = UCSR2A;
|
||||
@@ -140,19 +140,19 @@ ISR(USART2_RX_vect)
|
||||
|
||||
/* Filter the 9th bit, then return */
|
||||
resh = (resh >> 1) & 0x01;
|
||||
res = ((resh << 8) | resl);
|
||||
res = ((resh << 8) | resl);
|
||||
if((res & 0x100) == 0x100){
|
||||
vpotToChange = res & 0xff;
|
||||
vpot_mod_state = 1;
|
||||
vpotToChange = res & 0xff;
|
||||
vpot_mod_state = 1;
|
||||
}else{
|
||||
if(vpot_mod_state & (vpotToChange>0) & (vpotToChange<=NUM_EXTRA_ROTARY_ENCODERS))
|
||||
{
|
||||
if(vpot_mod_state & (vpotToChange>0) & (vpotToChange<=NUM_EXTRA_ROTARY_ENCODERS))
|
||||
{
|
||||
int8_t vpot_inc = res & 0xff;
|
||||
if(vpot_inc){
|
||||
incRotaryEncoder(NUM_ROTARY_ENCODERS-NUM_EXTRA_ROTARY_ENCODERS+vpotToChange-1, vpot_inc);
|
||||
}
|
||||
vpot_mod_state = 0;
|
||||
}
|
||||
if(vpot_inc){
|
||||
incRotaryEncoder(NUM_ROTARY_ENCODERS-NUM_EXTRA_ROTARY_ENCODERS+vpotToChange-1, vpot_inc);
|
||||
}
|
||||
vpot_mod_state = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //EXTRA_ROTARY_ENCODERS
|
||||
|
||||
Reference in New Issue
Block a user