Jump to content

Recommended Posts

Posted (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 by novski
Posted

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?

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...