//make sure <ALT> key is a valid option#if defined(CAM_ALT_BUTTON_OPTIONS) int keys[] = CAM_ALT_BUTTON_OPTIONS; int i=0; while((i < sizeof(keys)/sizeof(keys[0]))&&(conf.alt_mode_button != keys[i]))i++; if(i == sizeof(keys)/sizeof(keys[0])) { conf.alt_mode_button=keys[0]; kbd_set_alt_mode_key_mask(conf.alt_mode_button); }#endif
Simpler solution:- add "#define DEFAULT_ALT_KEY KEY_PRINT" to camera.h (with suitable comments)- replace KEY_PRINT with DEFAULT_ALT_KEY in conf.c (two locations)- override DEFAULT_ALT_KEY in platform_camera.h for affected cameras.
Making sure the assigned alt key is one of the cameras valid alt keys seems like a good sanity check.
#if CAM_ADJUSTABLE_ALT_BUTTON gui_alt_mode_button_enum(0,0);#else conf.alt_mode_button = DEFAULT_ALT_KEY;#endif
Can be done in clear_values with the following code:This will also handle the cases where DEFAULT_ALT_KEY is changed for cameras that do not have CAM_ADJUSTABLE_ALT_BUTTON defined, or if the SD card is used in another camera.
From some of the comments in the code, it looks like you might be able to take the .cfg file from one camera and use it in a different camera? Is this what you meant about the SD card being used in another camera? I assume that would be after updating the CHDK build to the new camera.I have 4 different cameras, so I wonder if I could set up one camera and copy the .cfg files onto the other 3?
Agreed.Can be done in clear_values with the following code:Code: [Select]#if CAM_ADJUSTABLE_ALT_BUTTON gui_alt_mode_button_enum(0,0);#else conf.alt_mode_button = DEFAULT_ALT_KEY;#endif
Started by CNW Script Writing
Started by halofuji General Help and Assistance on using CHDK stable releases
Started by YAFU Non-CANON cameras development
Started by waterwingz « 1 2 3 » General Discussion and Assistance
Started by reyalp General Discussion and Assistance