Jump to content

decrease a Encoder just in Software


novski
 Share

Recommended Posts

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...