travisgoodspeed / md380tools

Firmware patches for the TYT-MD380 handheld radio.
804 stars 244 forks source link

Max. number of main_menu entries limited #770

Closed DL2MF closed 7 years ago

DL2MF commented 7 years ago

@travisgoodspeed @Wolf-DL4YHF @KG5IEN

Today I ran into an issue on extending the MD380Tools main_menu, after adding a new item the scrolling in MD380Tools menu causes a reboot.

The number of entries is defined in menu.c by uint8_t numberof_menu_entries; But the limitation is the BYTE value in symbols: md380_menu_id = 0x2001e915 ;

I could reproduce the main_menu is working fine up to 17! entries, adding an additional entry is causing the overflow when scrolling up at the first or scrolling down at the last menu_entry.

Latest and current development are/were adding:

I did move the keyb option from config.h to menu.c/keyb.c, so the keyb layout can dynamically selected by the user (currently supporting 4 layouts:

No more need to compile fw either for for MD-3x0 or MD-446. It's working fine, but I would have to remove temporarily one of the other menu options ...

Time for a redesign of the MD380Tools main menu? My suggest is, to put rarely used developer options to a submenu, like this:

// 15 Dev. setup // ! // +--- 1 USB logging // +--- 2 Experimental // +--- 3 CoPl Override // +--- 4 Dev Only

Any other ideas or suggestions?

DL2MF commented 7 years ago

@travisgoodspeed With the new grouped and ordered menu we should have a workaround for this with a lot of space left for upcoming features.