novski
July 19, 2012, 8:38am
1
Hi
Im trying to decrease a Encoder just in Software for a reason of a Menu that has to be chosen before i can edit the parameters manualy.
What i tried is to start this on pressing a button:
} else if( button_id < 0x7f ) { // Range SAC_Special
ENC_NotifyChange(8,2)
}
the 8 is meant for the Encodernumber i need to decrease for 2 Detents. and i thought that it will jump to Main.c where this is the Encoder function:
void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam
well, the main question is: how can i decrease a Enc. virtualy?
Thanks for help
Best regards
novski
novski
July 19, 2012, 12:46pm
2
Well as usual… as soon as i give up, i find the solution I’m searching for ages.
// 0x58..0x7f could be used for other purposes
} else if( button_id < 0x7f ) { // Range SAC_Special
MM_VPOT_SendJogWheelEvent(-1);
}
That helps to decrease. But it decreases 3 clicks, not one. Does somebody know how to make smaller steps?
T.K
July 22, 2012, 5:53pm
3
You have to check if the button has been pressed (pin_value == 0):
if( pin_value == 0 ) {
MM_VPOT_SendJogWheelEvent(-1);
}
[/code]
this explains why it would be decremented twice before.
It doesn't explain why it has been decremented 3 ticks... but maybe this was just a wrong observation?
Best Regards, Thorsten.