Topics

Menu Sequence for CEC Firmware v1.200 #ubitx #firmware

Dan Pflugrath
 

I would like to change the menu sequence for the CEC Firmware v1.200.  I am familiar with the basics of the Arduino software development platform but after trying several times find it is beyond what I can figure out.  Any help in pointing out the method to use to modify the code to change the sequence of the menu items?

John (vk2eta)
 

Hello Dan,

Not tested since I use my own customized version, so just by reading his code therefore that solution could be buggy but should point to what you need to do.

Example swap around the position of toggle VFO and Mode in the menu:

in ubitx_menu.ino change from:

#if FN_VFO_TOGGLE == 1
      case FN_VFO_TOGGLE_IDX :
        menuVfoToggle(btnState);
        break;
#endif       
#if FN_MODE == 1
      case FN_MODE_IDX :
        menuSelectMode(btnState);
        break;
#endif       

To (swap around):

#if FN_MODE == 1
      case FN_MODE_IDX :
        menuSelectMode(btnState);
        break;
#endif       
#if FN_VFO_TOGGLE == 1
      case FN_VFO_TOGGLE_IDX :
        menuVfoToggle(btnState);
        break;
#endif       

AND change from:

  #define FN_VFO_TOGGLE_IDX   (FN_BAND_IDX         + FN_VFO_TOGGLE)
  #define FN_MODE_IDX         (FN_VFO_TOGGLE_IDX  + FN_MODE)
  #define FN_RIT_IDX             (FN_MODE_IDX                  + FN_RIT)

To (re-sequence from menu item position to menu item position):

  #define FN_MODE_IDX                 (FN_BAND_IDX                + FN_MODE)
  #define FN_VFO_TOGGLE_IDX   (FN_MODE_IDX               + FN_VFO_TOGGLE)
  #define FN_RIT_IDX                      (FN_VFO_TOGGLE_IDX  + FN_RIT)

That should do the trick I suspect.

All the best,

73, John

John (vk2eta)
 

Hello Dan,

After coffee the two and half neurons left seem to start working together..hihi: in fact you should only need to do the second part of the changes since the switch statement does not care about the order of tests. It is only a code optimization issue.

So only the #define FN_xxxx section should need to be adjusted.

73, John

Dan Pflugrath
 

Hi John,
I edited the statements tonight and will compile and load the code tomorrow night after checking my code with a clear head.  I will let you know how it works.
73 Dan KA7GPP.  

Dan Pflugrath
 

Thank You John (vk2eta),  I edited the define statements in the ubitx_menu.ino file per your suggestion, it compiled, uploaded and ran perfectly.  I reordered about half of the define statements to make it easier to use with CW for SOTA.  I made RIT the first menu item so with a double click I turn it on or off.  Next is MEMTOVFO to make quick band changes and then the MODE to switch between CWU and SSB followed by VFO_TOGGLE, BAND, and CW_SPEED. 
That takes care of my new Version 5.  Now on to my Version 3 which I think uses case statements which should be easy to figure out.
 
Best Regards,
73 Dan KA7GPP

John (vk2eta)
 

Glad you got it to work Dan.

That's the beauty of the rig, being able to customize it to your application.

Just a question, why not load the latest software on your V3 rig (maybe you made some modifications of the firmware)?

73, John

Dan Pflugrath
 

The V3 is next on the to do list.  I have downloaded the V3 firmware that is updated but has the V3 IF frequency.  I will check but I think the menu firmware did not change.

Again, thanks for the help.

73, Dan