Jump to content

Menu button as SHIFT button when Main screen is displayed.


ganchan
 Share

Recommended Posts

well, here i am.

i've not absolutely programming skill but i'm studying.

my sid have a control surface step A like the V1 had. 5select b, 1edit b, 1 rotary; 2 rotary for CS and 1 button layer. (i must program this last one too).

since i want to 'shift' between lead and bassline engine, i can do that only with a shift button. but i haven't.

so it would be usefull if the edit button, during Main screen, instead 'no function' will have 'shift function', not?

i don't know if it's hard to program, for now i can't realize, i will try..  8)

Link to comment
Share on other sites

thankyou for input, i'm trying to do this and understanding how can i do a toggle button to toggle my 3 new windows, but for me, i must say, it's not so simple.

i had thought to do all by myself but i think a little help it's necessary..  :P

i will paste my work at this point, to have some help :)

tnx in advice.

p.s. nILS i've read all your wiki obviously. all my code born from that ones!

pp.ss. i think i must start from here and here

Link to comment
Share on other sites

well i think that i must modify CS_MENU_BUTTON_Exec inserting the code of CS_MENU_BUTTON_Shift or just recall the Shift function right?

i must control that i am in the main menu first, something like

btfsc    CS_MENU, CS_MENU_MAIN

goto    CS_MENU_BUTTON_Shift

and i must use an #if #endif.

don't kill me for that horrible, i know there is something wrong about last significant bit

-edit-

ok

	;; new: shif function activated on MENU button if MAIN MENU dispayed
#if 2
	movf	CS_MENU_MAIN, W
	btfss	CS_MENU, W
	goto	CS_MENU_BUTTON_Shift
#endif

in this way the screen remain in SHIFT mode..  :-\

Link to comment
Share on other sites

;; --------------------------------------------------------------------------
;;  called by cs_menu_buttons.inc when the exec button has been pressed
;; --------------------------------------------------------------------------
CS_MENU_Exec
	;; exit if SID not available
	btfss	CS_STAT, CS_STAT_SID_AVAILABLE
	return

	;; clear CS_SELECT_CTR (so that new message appears immediately)
	clrf	CS_SELECT_CTR

	;; clear refresh item counter --- ensures that the whole display will be refreshed
	clrf	CS_MENU_REFRESH_ITEM_CTR

	;; call shift function if we are in main menu (was: exit if we are in main menu)
	btfsc	CS_MENU, 7
	goto	CS_MENU_BUTTON_Shift

	;; execute function
	;; calc pointer to function: CS_MENU_TABLES + (CS_MENU*CS_MENU_T_ENTRY_LEN) + CS_MENU_ENTRY_EXEC_OFFSET
	movlw	CS_MENU_T_ENTRY_EXEC_OFFSET
	call	CS_MENU_GetMenuTablesPtr
	goto	MIOS_HLP_IndirectJump
different code but same problem. don't return to main menu on button depressed. i think because of this in CS_MENU_BUTTON_Exec
	;; do nothing if button has been depressed
	btfsc	MIOS_PARAMETER2, 0
	return

this is not the right way. too many crossed problems through functions. encoder speed is setting in slow after 1 push.

i think i can wrote a new exec function under cs_menu_exec.inc..

Link to comment
Share on other sites

wtf i'm so stupid  ;D

CS_MENU_BUTTON_Exec_NoStartup
	;; activate/deactivate menu button function
	bcf	CS_MENU_MODE, CS_MENU_MODE_MENU_PRESSED
	btfss	MIOS_PARAMETER2, 0; if button is pressed
	bsf	CS_MENU_MODE, CS_MENU_MODE_MENU_PRESSED

;;***************************************************************************
;; ganchan's addon: new menu button functions combined with select buttons or main menu
;;***************************************************************************
	;; special condition if main menu displayed and menu button pressed, go to shif function
	btfsc	CS_MENU, 7
	goto	CS_MENU_BUTTON_Shift
;;***************************************************************************

	;; do nothing if button has been depressed
	btfsc	MIOS_PARAMETER2, 0
	return
CS_MENU_Exec
	;; exit if SID not available
	btfss	CS_STAT, CS_STAT_SID_AVAILABLE
	return

	;; clear CS_SELECT_CTR (so that new message appears immediately)
	clrf	CS_SELECT_CTR

	;; clear refresh item counter --- ensures that the whole display will be refreshed
	clrf	CS_MENU_REFRESH_ITEM_CTR

;;***************************************************************************
;; ganchan's addon: comment this lines to avoid conflict with shift function on menu button
;;***************************************************************************
	;; exit if we are in main menu
	;; btfsc	CS_MENU, 7
	;; return
;;***************************************************************************

done.

-edit-

this way slow encoder movement don't work on shift (menu) pressed  :-\

Link to comment
Share on other sites

i think you can just replace the function. as i can see play have not particular operations that make conflict with menu button.

now, the problem is this:

slow function for encoders work only if shift it's pressed during main menu and than you turn the CS encoder. slow function remain set ON since you come back to main menu with menu button. otherwise if you push menu button meanwhile you turn an encoder, the speed don't change.

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...