Hi,
I finally found some time to do some further investigations in CHDK development.
Today I wanted to try to create an additional menu inside CHDK Settings-->Remote Parameters.
I already could making a submenu with two subitems (of type MENUITEM_BOOL) working.
I can see and toggle the subitems using the 'set' button of my camera.
But if I switch off the camera and on again these values are always enabled.
So for some reason my settings are not persistent.
What I did:
1. Added the menu and two submenus in gui.c:
static CMenuItem test_submenu_items[] = {
MENU_ITEM (0x2c, LANG_MENU_TEST1_ENABLE, MENUITEM_BOOL, &conf.test1_enable, 0),
MENU_ITEM (0x2c, LANG_MENU_TEST2_ENABLE, MENUITEM_BOOL, &conf.test2_enable, 0),
MENU_ITEM (0x51, LANG_MENU_BACK, MENUITEM_UP, 0, 0),
{0}
};
static CMenu test_submenu = {0x86, LANG_MENU_TEST_TITLE, test_submenu_items };
2. Added the two int values to struct 'Conf' inside conf.h
3. Added following to conf.c:
CONF_INFO(300, conf.test1_enable, CONF_DEF_VALUE, i:0),
CONF_INFO(301, conf.test2_enable, CONF_DEF_VALUE, i:0),
4. Appended values to gui_lang.h and english.lng for the menuitems text
I see inside conf.c that there are functions config_save and save_config_file. But it seems that they don't care for my additional menuitems.
I also found out that the seetings are stored in CCHDK4.CFG. I used the Java tool chdkcfg.jar (from I think Dave Mitchell? -->Thanks :-)) to make these values readable, but my values are not in that file.
May someone from the experienced guys here can tell me how to make my values persistent?
Thanks a lot...