So, these are encoder number #1, 2, 3, 8, 9, 10, 11, 12 in the MIOS_ENC_PIN_TABLE (-> setup_* file)
Workaround (simplified form, there are also ways to optimize this check but it would lead to more complicated code):
;; --------------------------------------------------------------------------
;; This function is called by MIOS when an encoder has been moved
;; Input:
;; o Encoder number in WREG and MIOS_PARAMETER1
;; o signed incrementer value in MIOS_PARAMETER2:
;; - is positive when encoder has been turned clockwise
;; - is negative when encoder has been turned counter clockwise
;; --------------------------------------------------------------------------
USER_ENC_NotifyChange
movf MIOS_PARAMETER1, W
xorlw 1
skpnz
comf MIOS_PARAMETER2, F ; inverse incrementer
movf MIOS_PARAMETER1, W
xorlw 2
skpnz
comf MIOS_PARAMETER2, F ; inverse incrementer
movf MIOS_PARAMETER1, W
xorlw 3
skpnz
comf MIOS_PARAMETER2, F ; inverse incrementer
movf MIOS_PARAMETER1, W
xorlw 8
skpnz
comf MIOS_PARAMETER2, F ; inverse incrementer
movf MIOS_PARAMETER1, W
xorlw 9
skpnz
comf MIOS_PARAMETER2, F ; inverse incrementer
movf MIOS_PARAMETER1, W
xorlw 10
skpnz
comf MIOS_PARAMETER2, F ; inverse incrementer
movf MIOS_PARAMETER1, W
xorlw 11
skpnz
comf MIOS_PARAMETER2, F ; inverse incrementer
movf MIOS_PARAMETER1, W
xorlw 12
skpnz
comf MIOS_PARAMETER2, F ; inverse incrementer
…
Best Regards, .
thx Thorsten thats work but wiht this code the increment not work on osc env section (for a d s r) he work fine on sub menu (fin por phs pw k#2 k#3 k#5 k#5) and i have the same bug like sidmonster if turn the encoder slowly it not increment or decrement if turn normally or quickly thats work fine best regards my code :
;; --------------------------------------------------------------------------
;; This function is called by MIOS when an encoder has been moved
;; Input:
;; o Encoder number in WREG and MIOS_PARAMETER1
;; o signed incrementer value in MIOS_PARAMETER2:
;; - is positive when encoder has been turned clockwise
;; - is negative when encoder has been turned counter clockwise
;; --------------------------------------------------------------------------
USER_ENC_NotifyChange
movf MIOS_PARAMETER1, W
xorlw 2
skpnz
comf MIOS_PARAMETER2, F ; inverse incre
movf MIOS_PARAMETER1, W
xorlw 3
skpnz
comf MIOS_PARAMETER2, F ; inverse incre
movf MIOS_PARAMETER1, W
xorlw 13
skpnz
comf MIOS_PARAMETER2, F ; inverse incre
movf MIOS_PARAMETER1, W
xorlw 14
skpnz
comf MIOS_PARAMETER2, F ; inverse incre
movf MIOS_PARAMETER1, W
xorlw 8
skpnz
comf MIOS_PARAMETER2, F ; inverse incre
movf MIOS_PARAMETER1, W
xorlw 9
skpnz
comf MIOS_PARAMETER2, F ; inverse incre
movf MIOS_PARAMETER1, W
xorlw 10
skpnz
comf MIOS_PARAMETER2, F ; inverse incre
movf MIOS_PARAMETER1, W
xorlw 1
skpnz
comf MIOS_PARAMETER2, F ; inverse incre
movf SID_MIDI_DEVICE, W ; exit if device ID != 0x00
skpz
return
;; store encoder number in CS_MENU_USED_ENCODER - will be used by CS_MENU_ENC_CSInc later to set a new speed!
movff MIOS_PARAMETER1, CS_MENU_USED_ENCODER
; comf MIOS_PARAMETER2, F ; inverse incrementer
#if CS_MENU_USE_INCDEC_BUTTONS == 0
;; if encoder #0 has been moved, jump to Control Surface Menu Encoder Handler
movlw 0x00 ; encoder #0
cpfseq MIOS_PARAMETER1, ACCESS
rgoto USER_ENC_Handler_NoMenu
;; get incrementer and jump to control surface menu encoder handler
movf MIOS_PARAMETER2, W
goto CS_MENU_ENC_Handler
USER_ENC_Handler_NoMenu
decf MIOS_PARAMETER1, F; decrement encoder number (the CS encoders begin at 0)
#endif
;; jump to CS handler
goto CS_MENU_ENC_CS_Handler