ganchan Posted April 10, 2008 Report Share Posted April 10, 2008 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) Quote Link to comment Share on other sites More sharing options...
stryd_one Posted April 10, 2008 Report Share Posted April 10, 2008 That sounds like it would be a good mod, and I can't think of any reason why it shoudn't be possible... just find the code for that button press, and check if you are in the correct menu, and call the shift function? Quote Link to comment Share on other sites More sharing options...
nILS Posted April 15, 2008 Report Share Posted April 15, 2008 It is possible :-) And it's not even all that hard. Some pointers: * read my HowTos on the WIKI they cover most of the stuff you'll need to do * cs_menu_buttons.inc is the file you'll need to edit Quote Link to comment Share on other sites More sharing options...
ganchan Posted April 15, 2008 Author Report Share Posted April 15, 2008 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.. :Pi 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 Quote Link to comment Share on other sites More sharing options...
ganchan Posted April 15, 2008 Author Report Share Posted April 15, 2008 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 likebtfsc CS_MENU, CS_MENU_MAINgoto CS_MENU_BUTTON_Shiftand 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 #endifin this way the screen remain in SHIFT mode.. :-\ Quote Link to comment Share on other sites More sharing options...
ganchan Posted April 17, 2008 Author Report Share Posted April 17, 2008 ;; -------------------------------------------------------------------------- ;; 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 returnthis 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.. Quote Link to comment Share on other sites More sharing options...
ganchan Posted April 18, 2008 Author Report Share Posted April 18, 2008 wtf i'm so stupid ;DCS_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 :-\ Quote Link to comment Share on other sites More sharing options...
TD Posted April 18, 2008 Report Share Posted April 18, 2008 ive been watching this thread.. im gonna try this same thing but with 'play' on the menu button as opposed to 'shift' ..ill let you know how it goes. Quote Link to comment Share on other sites More sharing options...
ganchan Posted April 18, 2008 Author Report Share Posted April 18, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.