novski Posted July 19, 2012 Posted July 19, 2012 (edited) 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 Edited July 19, 2012 by novski
novski Posted July 19, 2012 Author Posted July 19, 2012 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?
TK. Posted July 22, 2012 Posted July 22, 2012 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now