EXTRA_ROTARY_ENCODERS all buttons transmitting and REb button receiving now
This commit is contained in:
@@ -145,14 +145,16 @@ ISR(USART1_RX_vect)
|
||||
/* Filter the 9th bit, then return */
|
||||
resh = (resh >> 1) & 0x01;
|
||||
res = ((resh << 8) | resl);
|
||||
if((res & 0x100) == 0x100){
|
||||
vpotToChange = res & 0xff;
|
||||
if((res == 0x181) | (res == 0x1C1)){ //button REb filter
|
||||
keys[BTN_REb].input((res & 0x1C1) == 0x1C1, BTN_REb);
|
||||
} else if((res & 0x100) == 0x100){ //rotary filter
|
||||
vpotToChange = res & 0xEF;
|
||||
vpot_mod_state = 1;
|
||||
}
|
||||
else {
|
||||
if(vpot_mod_state & (vpotToChange>0) & (vpotToChange<=NUM_UART_ROTARY_ENCODERS))
|
||||
{
|
||||
int8_t vpot_inc = res & 0xff;
|
||||
int8_t vpot_inc = res & 0xFF;
|
||||
if(vpot_inc){
|
||||
incRotaryEncoder((NUM_ROTARY_ENCODERS - NUM_UART_ROTARY_ENCODERS) + (vpotToChange - 1), vpot_inc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user