Changeset 479
- Timestamp:
- 08/12/08 12:52:17 (2 years ago)
- Files:
-
- branches/juciphox/CHDK/LANG/english.lng (modified) (3 diffs)
- branches/juciphox/CHDK/LANG/german.lng (modified) (1 diff)
- branches/juciphox/Makefile (modified) (1 diff)
- branches/juciphox/core/conf.c (modified) (5 diffs)
- branches/juciphox/core/gui.c (modified) (22 diffs)
- branches/juciphox/core/gui_fselect.c (modified) (6 diffs)
- branches/juciphox/core/gui_lang.c (modified) (3 diffs)
- branches/juciphox/core/gui_lang.h (modified) (3 diffs)
- branches/juciphox/core/gui_logo.h (added)
- branches/juciphox/core/gui_mpopup.c (modified) (1 diff)
- branches/juciphox/core/gui_mpopup.h (modified) (2 diffs)
- branches/juciphox/core/gui_osd.c (modified) (3 diffs)
- branches/juciphox/core/kbd.c (modified) (3 diffs)
- branches/juciphox/core/luascript.c (modified) (1 diff)
- branches/juciphox/core/raw.c (modified) (2 diffs)
- branches/juciphox/core/raw_merge.c (modified) (2 diffs)
- branches/juciphox/core/raw_merge.h (modified) (1 diff)
- branches/juciphox/doc/1_intro.txt (added)
- branches/juciphox/doc/2_dryos.txt (added)
- branches/juciphox/doc/2_vxworks.txt (added)
- branches/juciphox/doc/3_faq.txt (added)
- branches/juciphox/doc/4_urls.txt (added)
- branches/juciphox/doc/5_gpl.txt (added)
- branches/juciphox/doc/dryos (deleted)
- branches/juciphox/doc/readme.txt (added)
- branches/juciphox/doc/version.txt (modified) (1 diff)
- branches/juciphox/doc/vxworks (deleted)
- branches/juciphox/include/camera.h (modified) (4 diffs)
- branches/juciphox/include/conf.h (modified) (5 diffs)
- branches/juciphox/include/lolevel.h (modified) (1 diff)
- branches/juciphox/include/platform.h (modified) (3 diffs)
- branches/juciphox/include/stdlib.h (modified) (1 diff)
- branches/juciphox/lib/font/rbf_font.c (modified) (2 diffs)
- branches/juciphox/lib/ubasic/ubasic.c (modified) (2 diffs)
- branches/juciphox/makefile.inc (modified) (2 diffs)
- branches/juciphox/platform/a450/notes.txt (added)
- branches/juciphox/platform/a460/notes.txt (added)
- branches/juciphox/platform/a530/notes.txt (added)
- branches/juciphox/platform/a540/notes.txt (added)
- branches/juciphox/platform/a550/notes.txt (added)
- branches/juciphox/platform/a560/notes.txt (added)
- branches/juciphox/platform/a570/notes.txt (added)
- branches/juciphox/platform/a610/notes.txt (added)
- branches/juciphox/platform/a620/notes.txt (added)
- branches/juciphox/platform/a630/notes.txt (added)
- branches/juciphox/platform/a640/notes.txt (added)
- branches/juciphox/platform/a650/notes.txt (added)
- branches/juciphox/platform/a700/notes.txt (added)
- branches/juciphox/platform/a710/notes.txt (added)
- branches/juciphox/platform/a720/notes.txt (added)
- branches/juciphox/platform/g7/notes.txt (added)
- branches/juciphox/platform/generic/wrappers.c (modified) (2 diffs)
- branches/juciphox/platform/ixus40_sd300/notes.txt (added)
- branches/juciphox/platform/ixus50_sd400/notes.txt (added)
- branches/juciphox/platform/ixus55_sd450/notes.txt (added)
- branches/juciphox/platform/ixus60_sd600/notes.txt (added)
- branches/juciphox/platform/ixus65_sd630/notes.txt (added)
- branches/juciphox/platform/ixus700_sd500/notes.txt (added)
- branches/juciphox/platform/ixus70_sd1000/notes.txt (added)
- branches/juciphox/platform/ixus750_sd550/notes.txt (added)
- branches/juciphox/platform/ixus800_sd700/notes.txt (added)
- branches/juciphox/platform/ixus850_sd800/notes.txt (added)
- branches/juciphox/platform/ixus860_sd870/lib.c (modified) (2 diffs)
- branches/juciphox/platform/ixus860_sd870/notes.txt (added)
- branches/juciphox/platform/ixus950_sd850/notes.txt (added)
- branches/juciphox/platform/ixus960_sd950/notes.txt (added)
- branches/juciphox/platform/ixusW_sd430/notes.txt (added)
- branches/juciphox/platform/s2is/notes.txt (added)
- branches/juciphox/platform/s3is/notes.txt (added)
- branches/juciphox/platform/s5is/notes.txt (added)
- branches/juciphox/platform/s80/notes.txt (added)
- branches/juciphox/platform/sx100is/notes.txt (added)
- branches/juciphox/platform/tx1/notes.txt (added)
- branches/juciphox/version.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/juciphox/CHDK/LANG/english.lng
r473 r479 121 121 79 "Debug" 122 122 123 80 "Show PropCases" 123 // 80 "Show PropCases" 124 80 "Debug data display" 124 125 81 "PropCase Page" 125 126 82 "Show Misc. Values" 126 127 83 "Memory Browser" 127 84 "Dump RAM on ALT +/- Press" 128 // 84 "Dump RAM on ALT +/- Press" 129 84 "ALT +/- debug action" 128 130 85 "Make Card Bootable..." 129 131 … … 378 380 379 381 272 "Show OSD in Review Mode" 380 273 "Show Parameter Data" 382 //273 "Show Parameter Data" 383 273 "Task List start" 381 384 382 385 274 "Subject distance from lens" … … 538 541 400 "Zoom Time-out 0.1s" 539 542 401 "Startup sound" 543 402 "Raw subtract prefix" 544 403 "Raw subtract extension" 545 404 "Subtract input dark value" 546 405 "Subtract output dark value" 547 406 "from" 548 407 "...%d more files" 549 408 "Subtract" 550 409 "Sub from marked" 551 410 "Save params" branches/juciphox/CHDK/LANG/german.lng
r473 r479 545 545 400 "Zoom Time-out 0.1s" 546 546 401 "Startup sound" 547 402 "Raw subtract prefix" 548 403 "Raw subtract extension" 549 404 "Subtract input dark value" 550 405 "Subtract output dark value" 551 406 "from" 552 407 "...%d more files" 553 408 "Subtract" 554 409 "Sub from marked" 555 410 "Save params" branches/juciphox/Makefile
r473 r479 96 96 cp $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB).FIR $(topdir)bin/PS.FIR 97 97 zip -9j $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)_complete.zip $(topdir)bin/PS.FIR > $(DEVNULL) 98 zip -9j $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)_complete.zip $(topdir)doc/vxworks/readme.txt 98 cat $(topdir)doc/1_intro.txt $(topdir)/platform/$(PLATFORM)/notes.txt $(topdir)doc/2_vxworks.txt $(topdir)doc/3_faq.txt $(topdir)doc/4_urls.txt $(topdir)doc/5_gpl.txt > $(topdir)doc/readme.txt 99 zip -9j $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)_complete.zip $(topdir)doc/readme.txt 99 100 rm -f $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB).FIR 100 101 rm -f $(topdir)bin/PS.FIR 101 102 endif 102 103 ifeq ($(PLATFORMOS),dryos) 103 zip -9j $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)_complete.zip $(topdir)doc/dryos/readme.txt 104 cat $(topdir)doc/1_intro.txt $(topdir)/platform/$(PLATFORM)/notes.txt $(topdir)doc/2_dryos.txt $(topdir)doc/3_faq.txt $(topdir)doc/4_urls.txt $(topdir)doc/5_gpl.txt > $(topdir)doc/readme.txt 105 zip -9j $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)_complete.zip $(topdir)doc/readme.txt 104 106 #cp $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB).FI2 $(topdir)bin/PS.FI2 105 107 #zip -9jc $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER)_complete.zip $(topdir)bin/PS.FI2 > $(DEVNULL) branches/juciphox/core/conf.c
r473 r479 51 51 int debug_vals_show; 52 52 int debug_pardata_show; 53 54 // reyalp: putting these in conf, since the conf values are lookups for them 55 // prefixes and extentions available for raw images (index with conf.raw_prefix etc) 56 const char* img_prefixes[NUM_IMG_PREFIXES]={ "IMG_", "CRW_", "SND_" /*, "AUT_", "ETC_","SDR_", "MVI_", "MRK_"*/}; 57 const char* img_exts[NUM_IMG_EXTS]={ ".JPG", ".CRW", ".CR2", ".THM", ".WAV"/*, ".AVI", ".MRK"*/}; 58 // ugh 59 const char *video_bitrate_strings[VIDEO_BITRATE_STEPS]={ "0.25x", "0.5x","0.75x", "1x", "1.25x", "1.5x", "1.75x", "2x", "2.5x", "3x"}; 53 60 54 61 //------------------------------------------------------------------- … … 117 124 if (conf.clear_video) 118 125 { 119 conf.video_mode = 0;120 conf.video_quality = 84;121 conf.video_bitrate = 3;122 shooting_video_bitrate_change(conf.video_bitrate);126 conf.video_mode = 0; 127 conf.video_quality = VIDEO_DEFAULT_QUALITY; 128 conf.video_bitrate = VIDEO_DEFAULT_BITRATE; 129 shooting_video_bitrate_change(conf.video_bitrate); 123 130 } 124 131 } … … 159 166 CONF_INFO( 32, conf.ricoh_ca1_mode, CONF_DEF_VALUE, i:0, NULL), 160 167 CONF_INFO( 33, conf.flashlight, CONF_DEF_VALUE, i:0, NULL), 161 CONF_INFO( 34, conf.ns_enable_memdump, CONF_DEF_VALUE, i:0, NULL), 168 // CONF_INFO( 34, conf.ns_enable_memdump, CONF_DEF_VALUE, i:0, NULL), 169 CONF_INFO( 34, conf.debug_shortcut_action, CONF_DEF_VALUE, i:0, NULL), // backwards compatible 162 170 CONF_INFO( 35, conf.raw_in_dir, CONF_DEF_VALUE, i:0, NULL), 163 171 CONF_INFO( 36, conf.raw_prefix, CONF_DEF_VALUE, i:RAW_PREFIX_CRW, NULL), … … 221 229 222 230 CONF_INFO( 99, conf.video_mode, CONF_DEF_VALUE, i:0, NULL), 223 CONF_INFO(100, conf.video_quality, CONF_DEF_VALUE, i: 84,NULL),224 CONF_INFO(101, conf.video_bitrate, CONF_DEF_VALUE, i: 3, conf_change_video_bitrate),231 CONF_INFO(100, conf.video_quality, CONF_DEF_VALUE, i:VIDEO_DEFAULT_QUALITY,NULL), 232 CONF_INFO(101, conf.video_bitrate, CONF_DEF_VALUE, i:VIDEO_DEFAULT_BITRATE, conf_change_video_bitrate), 225 233 226 234 CONF_INFO(102, conf.tv_override_value, CONF_DEF_VALUE, i:0, NULL), … … 346 354 CONF_INFO(207, conf.zoom_timeout, CONF_DEF_VALUE, i:5, NULL), 347 355 CONF_INFO(208, conf.start_sound, CONF_DEF_VALUE, i:0, NULL), 356 CONF_INFO(209, conf.sub_batch_prefix, CONF_DEF_VALUE, i:2, NULL), // SND_ 357 CONF_INFO(210, conf.sub_batch_ext, CONF_DEF_VALUE, i:1, NULL), // .CRW 358 CONF_INFO(211, conf.sub_in_dark_value, CONF_DEF_VALUE, i:30, NULL), 359 CONF_INFO(212, conf.sub_out_dark_value, CONF_DEF_VALUE, i:0, NULL), 360 CONF_INFO(213, conf.debug_display, CONF_DEF_VALUE, i:0, NULL), 361 CONF_INFO(214, conf.script_param_save, CONF_DEF_VALUE, i:0, NULL), 348 362 349 363 branches/juciphox/core/gui.c
r473 r479 31 31 #include "raw.h" 32 32 #include "curves.h" 33 33 #include "gui_logo.h" 34 34 //------------------------------------------------------------------- 35 35 … … 146 146 static const char* gui_raw_prefix_enum(int change, int arg); 147 147 static const char* gui_raw_ext_enum(int change, int arg); 148 static const char* gui_sub_batch_prefix_enum(int change, int arg); 149 static const char* gui_sub_batch_ext_enum(int change, int arg); 150 148 151 static const char* gui_raw_nr_enum(int change, int arg); 149 152 static const char* gui_autoiso_shutter_enum(int change, int arg); … … 193 196 static const char* gui_override_disable_enum(int change, int arg); 194 197 static const char* gui_conf_curve_enum(int change, int arg); 198 static const char* gui_debug_shortcut_enum(int change, int arg); 199 static const char* gui_debug_display_enum(int change, int arg); 200 static void gui_debug_shortcut(void); 201 195 202 void rinit(); 196 203 … … 207 214 static void cb_zebra_restore_osd(); 208 215 216 static int debug_tasklist_start; 217 static int debug_display_direction=1; 209 218 // Menu definition 210 219 //------------------------------------------------------------------- … … 236 245 {0x5d,LANG_MENU_SCRIPT_DEFAULT_VAL, MENUITEM_PROC, (int*)gui_load_script_default }, 237 246 {0x5e,LANG_MENU_SCRIPT_PARAM_SET, MENUITEM_ENUM, (int*)gui_script_param_set_enum }, 247 {0x5c,LANG_MENU_SCRIPT_PARAM_SAVE, MENUITEM_BOOL, &conf.script_param_save }, 238 248 {0x0,(int)script_title, MENUITEM_SEPARATOR }, 239 249 // {0x0,LANG_MENU_SCRIPT_CURRENT, MENUITEM_SEPARATOR }, … … 317 327 318 328 static CMenuItem debug_submenu_items[] = { 319 {0x5c,LANG_MENU_DEBUG_SHOW_PROPCASES, MENUITEM_BOOL, &debug_propcase_show }, 320 {0x5c,LANG_MENU_DEBUG_SHOW_PARAMETER_DATA, MENUITEM_BOOL, &debug_pardata_show }, 329 {0x5c,LANG_MENU_DEBUG_DISPLAY, MENUITEM_ENUM, (int*)gui_debug_display_enum }, 321 330 {0x2a,LANG_MENU_DEBUG_PROPCASE_PAGE, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &debug_propcase_page, MENU_MINMAX(0, 128) }, 331 {0x2a,LANG_MENU_DEBUG_TASKLIST_START, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &debug_tasklist_start, MENU_MINMAX(0, 63) }, 322 332 {0x5c,LANG_MENU_DEBUG_SHOW_MISC_VALS, MENUITEM_BOOL, &debug_vals_show }, 323 333 {0x2a,LANG_MENU_DEBUG_MEMORY_BROWSER, MENUITEM_PROC, (int*)gui_draw_debug }, 324 334 {0x2a,LANG_MENU_DEBUG_BENCHMARK, MENUITEM_PROC, (int*)gui_draw_bench }, 325 {0x5c,LANG_MENU_DEBUG_ DUMP_RAM, MENUITEM_BOOL, &conf.ns_enable_memdump},335 {0x5c,LANG_MENU_DEBUG_SHORTCUT_ACTION, MENUITEM_ENUM, (int*)gui_debug_shortcut_enum }, 326 336 {0x33,LANG_MENU_DEBUG_MAKE_BOOTABLE, MENUITEM_PROC, (int*)gui_menuproc_mkbootdisk }, 327 337 #if CAM_MULTIPART … … 661 671 {0x5f,LANG_MENU_RAW_PREFIX, MENUITEM_ENUM, (int*)gui_raw_prefix_enum }, 662 672 {0x5f,LANG_MENU_RAW_EXTENSION, MENUITEM_ENUM, (int*)gui_raw_ext_enum }, 673 {0x5f,LANG_MENU_SUB_PREFIX, MENUITEM_ENUM, (int*)gui_sub_batch_prefix_enum }, 674 {0x5f,LANG_MENU_SUB_EXTENSION, MENUITEM_ENUM, (int*)gui_sub_batch_ext_enum }, 675 {0x60,LANG_MENU_SUB_IN_DARK_VALUE, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &conf.sub_in_dark_value, MENU_MINMAX(0, 1023)}, 676 {0x60,LANG_MENU_SUB_OUT_DARK_VALUE, MENUITEM_INT|MENUITEM_F_UNSIGNED|MENUITEM_F_MINMAX, &conf.sub_out_dark_value, MENU_MINMAX(0, 1023)}, 663 677 {0x2a,LANG_MENU_RAW_DEVELOP, MENUITEM_PROC, (int*)gui_raw_develop }, 664 678 {0x5c,LANG_MENU_BAD_PIXEL_REMOVAL, MENUITEM_ENUM, (int*)gui_bad_pixel_enum }, … … 814 828 if (change != 0) 815 829 { 830 if (conf.script_param_save) 831 { 816 832 save_params_values(0); 817 833 } 818 834 conf.script_param_set += change; 819 835 if (conf.script_param_set < 0) conf.script_param_set = (sizeof(modes)/sizeof(modes[0]))-1; else … … 911 927 //------------------------------------------------------------------- 912 928 const char* gui_raw_prefix_enum(int change, int arg) { 913 static const char* prefixes[]={ "IMG_", "CRW_", "SND_"};914 915 929 conf.raw_prefix+=change; 916 930 if (conf.raw_prefix<0) 917 conf.raw_prefix= (sizeof(prefixes)/sizeof(prefixes[0]))-1;918 else if (conf.raw_prefix>= (sizeof(prefixes)/sizeof(prefixes[0])))931 conf.raw_prefix=NUM_IMG_PREFIXES-1; 932 else if (conf.raw_prefix>=NUM_IMG_PREFIXES) 919 933 conf.raw_prefix=0; 920 934 921 return prefixes[conf.raw_prefix];935 return img_prefixes[conf.raw_prefix]; 922 936 } 923 937 924 938 //------------------------------------------------------------------- 925 939 const char* gui_raw_ext_enum(int change, int arg) { 926 static const char* exts[]={ ".JPG", ".CRW", ".CR2", ".THM", ".WAV"};927 928 940 conf.raw_ext+=change; 929 941 if (conf.raw_ext<0) 930 conf.raw_ext= (sizeof(exts)/sizeof(exts[0]))-1;931 else if (conf.raw_ext>= (sizeof(exts)/sizeof(exts[0])))942 conf.raw_ext=NUM_IMG_EXTS-1; 943 else if (conf.raw_ext>=NUM_IMG_EXTS) 932 944 conf.raw_ext=0; 933 945 934 return exts[conf.raw_ext]; 946 return img_exts[conf.raw_ext]; 947 } 948 949 //------------------------------------------------------------------- 950 const char* gui_sub_batch_prefix_enum(int change, int arg) { 951 conf.sub_batch_prefix+=change; 952 if (conf.sub_batch_prefix<0) 953 conf.sub_batch_prefix=NUM_IMG_PREFIXES-1; 954 else if (conf.sub_batch_prefix>=NUM_IMG_PREFIXES) 955 conf.sub_batch_prefix=0; 956 957 return img_prefixes[conf.sub_batch_prefix]; 958 } 959 960 //------------------------------------------------------------------- 961 const char* gui_sub_batch_ext_enum(int change, int arg) { 962 conf.sub_batch_ext+=change; 963 if (conf.sub_batch_ext<0) 964 conf.sub_batch_ext=NUM_IMG_EXTS-1; 965 else if (conf.sub_batch_ext>=NUM_IMG_EXTS) 966 conf.sub_batch_ext=0; 967 968 return img_exts[conf.sub_batch_ext]; 935 969 } 936 970 … … 1257 1291 //------------------------------------------------------------------- 1258 1292 const char* gui_video_bitrate_enum(int change, int arg) { 1259 static const char* modes[]={ "0.25x", "0.5x","0.75x", "1x", "1.25x", "1.5x", "1.75x", "2x", "2.5x", "3x"};1260 1261 1293 conf.video_bitrate+=change; 1262 1294 if (conf.video_bitrate<0) 1263 conf.video_bitrate= sizeof(modes)/sizeof(modes[0])-1;1264 else if (conf.video_bitrate>= (sizeof(modes)/sizeof(modes[0])))1295 conf.video_bitrate=VIDEO_BITRATE_STEPS-1; 1296 else if (conf.video_bitrate>=VIDEO_BITRATE_STEPS) 1265 1297 conf.video_bitrate=0; 1266 1298 1267 1299 shooting_video_bitrate_change(conf.video_bitrate); 1268 1300 1269 return modes[conf.video_bitrate];1301 return video_bitrate_strings[conf.video_bitrate]; 1270 1302 } 1271 1303 … … 1589 1621 int m=mode_get(); 1590 1622 gui_fselect_init(LANG_RAW_DEVELOP_SELECT_FILE, "A/DCIM", raw_fselect_cb); 1623 } 1624 1625 //------------------------------------------------------------------- 1626 #define TASKLIST_MAX_LINES 12 // probably as much as will fit on screen 1627 #define TASKLIST_NUM_TASKS 64 // should be enough ? 1628 static void gui_debug_draw_tasklist(void) { 1629 #ifndef CAM_DRYOS 1630 int tasklist[TASKLIST_NUM_TASKS]; // max number of tasks we will look at 1631 char buf[40]; // a single line of the list 1632 int n_tasks,n_show_tasks,show_start; 1633 const char *name; 1634 int i; 1635 n_tasks = task_id_list_get(tasklist,sizeof(tasklist)/sizeof(tasklist[0])); 1636 show_start = debug_tasklist_start; 1637 n_show_tasks = n_tasks - show_start; 1638 // auto adjust to show the last N tasks 1639 if(n_show_tasks < TASKLIST_MAX_LINES) { 1640 show_start = n_tasks - TASKLIST_MAX_LINES; 1641 if(show_start<0) 1642 show_start = 0; 1643 n_show_tasks = n_tasks - show_start; 1644 } 1645 else if( n_show_tasks > TASKLIST_MAX_LINES ) { 1646 n_show_tasks = TASKLIST_MAX_LINES; 1647 } 1648 sprintf(buf,"%d-%d of %d tasks %c",show_start,show_start+n_show_tasks,n_tasks,debug_display_direction > 0?'+':'-'); 1649 draw_string(64,0,buf, conf.osd_color); 1650 for( i = 0; i < n_show_tasks; i++ ) { 1651 // TODO get full task info 1652 name = task_name(tasklist[show_start+i]); 1653 if ( !name || !*name ) { 1654 name = "(unknown)"; 1655 } 1656 sprintf(buf,"%10s %8X",name,tasklist[show_start+i]); 1657 draw_string(64,16+16*i,buf, conf.osd_color); 1658 } 1659 #endif //CAM_DRYOS 1660 } 1661 1662 #define DEBUG_DISPLAY_NONE 0 1663 #define DEBUG_DISPLAY_PROPS 1 1664 #define DEBUG_DISPLAY_PARAMS 2 1665 #define DEBUG_DISPLAY_TASKS 3 1666 static const char * gui_debug_shortcut_enum(int change, int arg) { 1667 static const char* modes[]={ "None", "Dmp RAM", "Page"}; 1668 1669 conf.debug_shortcut_action += change; 1670 if (conf.debug_shortcut_action < 0) 1671 conf.debug_shortcut_action = sizeof(modes)/sizeof(modes[0])-1; 1672 else if (conf.debug_shortcut_action >= (sizeof(modes)/sizeof(modes[0]))) 1673 conf.debug_shortcut_action = 0; 1674 1675 return modes[conf.debug_shortcut_action]; 1676 } 1677 1678 static const char * gui_debug_display_enum(int change, int arg) { 1679 static const char* modes[]={ "None", "Props", "Params", "Tasks"}; 1680 1681 conf.debug_display += change; 1682 if (conf.debug_display < 0) 1683 conf.debug_display=sizeof(modes)/sizeof(modes[0])-1; 1684 else if (conf.debug_display >= (sizeof(modes)/sizeof(modes[0]))) 1685 conf.debug_display = 0; 1686 1687 return modes[conf.debug_display]; 1688 } 1689 1690 static void gui_debug_shortcut(void) { 1691 static int lastcall = -1; 1692 int t=get_tick_count(); 1693 if ( lastcall != -1) { 1694 if (t-lastcall <= 400) 1695 debug_display_direction = -debug_display_direction; 1696 } 1697 lastcall=t; 1698 switch(conf.debug_shortcut_action) { 1699 case 1: 1700 dump_memory(); 1701 break; 1702 case 2: 1703 if(conf.debug_display == DEBUG_DISPLAY_TASKS) { 1704 debug_tasklist_start += debug_display_direction*(TASKLIST_MAX_LINES-2); // a little intentional overlap 1705 if(debug_tasklist_start >= TASKLIST_NUM_TASKS || debug_tasklist_start < 0) 1706 debug_tasklist_start = 0; 1707 } 1708 else if (conf.debug_display == DEBUG_DISPLAY_PROPS || conf.debug_display == DEBUG_DISPLAY_PARAMS) { 1709 debug_propcase_page += debug_display_direction*1; 1710 if(debug_propcase_page > 128 || debug_propcase_page < 0) 1711 debug_propcase_page = 0; 1712 } 1713 break; 1714 } 1591 1715 } 1592 1716 … … 1847 1971 case GUI_MODE_ALT: 1848 1972 if (kbd_is_key_clicked(SHORTCUT_TOGGLE_RAW)) { 1849 if (conf. ns_enable_memdump) dump_memory();1973 if (conf.debug_shortcut_action > 0) gui_debug_shortcut(); 1850 1974 #if !CAM_HAS_ERASE_BUTTON && CAM_CAN_SD_OVERRIDE 1851 1975 else if (!shooting_get_common_focus_mode()) … … 2125 2249 } 2126 2250 2127 mode_video = ((m&MODE_SHOOTING_MASK)==MODE_VIDEO_STD || 2128 (m&MODE_SHOOTING_MASK)==MODE_VIDEO_SPEED || 2129 (m&MODE_SHOOTING_MASK)==MODE_VIDEO_COMPACT || 2130 (m&MODE_SHOOTING_MASK)==MODE_VIDEO_MY_COLORS || 2131 (m&MODE_SHOOTING_MASK)==MODE_VIDEO_COLOR_ACCENT || 2132 (m&MODE_SHOOTING_MASK)==MODE_VIDEO_TIME_LAPSE); 2133 2134 2251 // TODO some of the ifs below should probably use this 2252 mode_video = MODE_IS_VIDEO(m); 2253 2135 2254 mode_photo = (m&MODE_MASK) == MODE_PLAY || 2136 2255 !( mode_video || … … 2183 2302 gui_grid_draw_osd(1); 2184 2303 } 2185 if ((gui_mode==GUI_MODE_NONE || gui_mode==GUI_MODE_ALT) && (((kbd_is_key_pressed(KEY_SHOOT_HALF) || (state_kbd_script_run) || (shooting_get_common_focus_mode())) && (mode_photo || (m&MODE_SHOOTING_MASK)==MODE_STITCH )) || ( mode_video&& conf.show_values_in_video) )) {2304 if ((gui_mode==GUI_MODE_NONE || gui_mode==GUI_MODE_ALT) && (((kbd_is_key_pressed(KEY_SHOOT_HALF) || (state_kbd_script_run) || (shooting_get_common_focus_mode())) && (mode_photo || (m&MODE_SHOOTING_MASK)==MODE_STITCH )) || ((mode_video || movie_status > 1) && conf.show_values_in_video) )) { 2186 2305 2187 2306 if (conf.show_dof!=DOF_DONT_SHOW) gui_osd_calc_dof(); … … 2191 2310 if (conf.values_show_real_iso || conf.values_show_market_iso || conf.values_show_ev_seted || conf.values_show_ev_measured || conf.values_show_bv_measured || conf.values_show_bv_seted || conf.values_show_overexposure || conf.values_show_canon_overexposure) gui_osd_calc_expo_param(); 2192 2311 } 2193 if (conf.show_state && !mode_video) gui_osd_draw_state();2312 if (conf.show_state) gui_osd_draw_state(); 2194 2313 if (conf.save_raw && conf.show_raw_state && !mode_video && (!kbd_is_key_pressed(KEY_SHOOT_HALF))) gui_osd_draw_raw_info(); 2195 2314 2196 if ((conf.show_values==SHOW_ALWAYS && mode_photo) || ( mode_video&& conf.show_values_in_video) || ((kbd_is_key_pressed(KEY_SHOOT_HALF) || (recreview_hold==1)) && (conf.show_values==SHOW_HALF)))2315 if ((conf.show_values==SHOW_ALWAYS && mode_photo) || ((mode_video || movie_status > 1)&& conf.show_values_in_video) || ((kbd_is_key_pressed(KEY_SHOOT_HALF) || (recreview_hold==1)) && (conf.show_values==SHOW_HALF))) 2197 2316 gui_osd_draw_values(1); 2198 2317 else if (shooting_get_common_focus_mode() && mode_photo && conf.show_values && !(conf.show_dof==DOF_SHOW_IN_DOF) ) … … 2219 2338 gui_osd_draw_temp(); 2220 2339 } 2221 if (conf.show_movie_time > 0 )2340 if (conf.show_movie_time > 0 && (mode_video || movie_status > 1)) 2222 2341 { 2223 2342 gui_osd_draw_movie_time_left(); 2224 2225 if ((movie_status > 1) && (conf.fast_movie_quality_control==1)){2226 if (conf.video_mode == 0 )2227 {2228 gui_print_osd_state_string_chr("Bitrate: ",gui_video_bitrate_enum(0,0));2229 }2230 else2231 {2232 gui_print_osd_state_string_int("Quality: ",conf.video_quality);2233 }2234 }2235 2343 } 2236 2344 … … 2270 2378 static char sbuf[100]; 2271 2379 int r,i, p, len; 2272 if ( debug_propcase_show){2380 if (conf.debug_display == DEBUG_DISPLAY_PROPS){ 2273 2381 2274 2382 for (i=0;i<10;i++){ … … 2281 2389 } 2282 2390 2283 if (debug_pardata_show){2391 if (conf.debug_display == DEBUG_DISPLAY_PARAMS){ 2284 2392 extern long* FlashParamsTable[]; 2285 2393 char s[30]; … … 2308 2416 } 2309 2417 2418 if(conf.debug_display == DEBUG_DISPLAY_TASKS) { 2419 gui_debug_draw_tasklist(); 2420 } 2310 2421 2311 2422 if (ubasic_error){ … … 2443 2554 int i, l; 2444 2555 // color cl = MAKE_COLOR((gui_splash_mode==MODE_REC)?0xDA:0xD9, COLOR_WHITE); 2445 color cl = MAKE_COLOR(COLOR_RED, COLOR_WHITE);2556 color cl = MAKE_COLOR(COLOR_RED, COLOR_WHITE); 2446 2557 2447 2558 … … 2456 2567 w=w*FONT_WIDTH+10; 2457 2568 2458 x = (screen_width-w)>>1; y = ( screen_height-h)>>1;2459 draw_filled_round_rect(x, y, x+w, y+h, cl);2569 x = (screen_width-w)>>1; y = ((screen_height-h)>>1) + 20; 2570 draw_filled_round_rect(x, y, x+w, y+h, MAKE_COLOR(COLOR_RED, COLOR_RED)); 2460 2571 for (i=0; i<sizeof(text)/sizeof(text[0]); ++i) { 2461 2572 draw_string(x+((w-strlen(text[i])*FONT_WIDTH)>>1), y+i*FONT_HEIGHT+4, text[i], cl); 2573 } 2574 int mx,my; 2575 int offset_x = (screen_width-150)>>1; 2576 int offset_y = ((screen_height-84)>>1) - 42; 2577 2578 for(mx=0; mx<150; mx++){ 2579 for(my=0; my<84; my++){ 2580 color c = header_data[my*150+mx]; 2581 if (c != 0x00) 2582 draw_pixel(offset_x+mx,offset_y+my,c); 2583 } 2462 2584 } 2463 2585 } … … 2490 2612 void gui_load_script_default(int arg) { 2491 2613 script_load(conf.script_file, 0); 2492 save_params_values(1); 2493 } 2614 if (conf.script_param_save) 2615 { 2616 save_params_values(1); 2617 }} 2494 2618 2495 2619 branches/juciphox/core/gui_fselect.c
r416 r479 11 11 #include "gui_fselect.h" 12 12 #include "raw_merge.h" 13 #include "conf.h" 13 14 14 15 //------------------------------------------------------------------- … … 712 713 713 714 //------------------------------------------------------------------- 714 static unsigned int fselect_marked_count() {715 static inline unsigned int fselect_real_marked_count() { 715 716 struct fitem *ptr; 716 717 register unsigned int cnt=0; … … 720 721 ++cnt; 721 722 } 723 return cnt; 724 } 725 //------------------------------------------------------------------- 726 static unsigned int fselect_marked_count() { 727 struct fitem *ptr; 728 register unsigned int cnt=fselect_real_marked_count(); 722 729 723 730 if (!cnt) { … … 783 790 gui_fselect_read_dir(current_dir); 784 791 } 792 } 793 794 static void fselect_subtract_cb(unsigned int btn) { 795 struct fitem *ptr; 796 char *raw_subtract_from; 797 char *raw_subtract_sub; 798 char *raw_subtract_dest; 799 if (btn != MBOX_BTN_YES) return; 800 801 if(!(raw_subtract_from = malloc(300))) //3x full path 802 return; 803 raw_subtract_sub = raw_subtract_from + 100; 804 raw_subtract_dest = raw_subtract_sub + 100; 805 sprintf(raw_subtract_sub,"%s/%s",current_dir,selected->name); 806 for (ptr=head; ptr; ptr=ptr->next) { 807 if (ptr->marked && ptr->attr != 0xFF && 808 !(ptr->attr & DOS_ATTR_DIRECTORY) && 809 ptr->size == hook_raw_size() && 810 (strcmp(ptr->name,selected->name)) != 0) { 811 sprintf(raw_subtract_from,"%s/%s",current_dir,ptr->name); 812 sprintf(raw_subtract_dest,"%s/%s%s",current_dir,img_prefixes[conf.sub_batch_prefix],ptr->name+4); 813 strcpy(raw_subtract_dest + strlen(raw_subtract_dest) - 4,img_exts[conf.sub_batch_ext]); 814 // don't let users attempt to write one of the files being read 815 if( strcmp(raw_subtract_dest,raw_subtract_from) != 0 && strcmp(raw_subtract_dest,raw_subtract_sub) != 0) { 816 raw_subtract(raw_subtract_from,raw_subtract_sub,raw_subtract_dest); 817 } 818 } 819 } 820 free(raw_subtract_from); 821 gui_fselect_read_dir(current_dir); 822 gui_fselect_redraw = 2; 823 } 824 825 826 #define MAX_SUB_NAMES 6 827 static void setup_batch_subtract(void) { 828 struct fitem *ptr; 829 int i; 830 char *p = buf + sprintf(buf,"%s %s\n",selected->name,lang_str(LANG_FSELECT_SUB_FROM)); 831 for (ptr=head, i=0; ptr; ptr=ptr->next) { 832 if (ptr->marked && ptr->attr != 0xFF && !(ptr->attr & DOS_ATTR_DIRECTORY) && ptr->size == hook_raw_size()) { 833 if ( i < MAX_SUB_NAMES ) { 834 sprintf(p, "%s\n",ptr->name); 835 // keep a pointer to the one before the end, so we can stick ...and more on 836 if (i < MAX_SUB_NAMES - 1) { 837 p += strlen(p); 838 } 839 } 840 i++; 841 } 842 } 843 if (i > MAX_SUB_NAMES) { 844 // "...%d more files" 845 sprintf(p,lang_str(LANG_FSELECT_SUB_AND_MORE),i - (MAX_SUB_NAMES - 1)); 846 } 847 gui_mbox_init(LANG_FSELECT_SUBTRACT, (int)buf, 848 MBOX_TEXT_CENTER|MBOX_BTN_YES_NO|MBOX_DEF_BTN2, fselect_subtract_cb); 785 849 } 786 850 … … 848 912 process_raw_files(); 849 913 break; 914 case MPOPUP_SUBTRACT: 915 { 916 setup_batch_subtract(); 917 break; 918 } 850 919 } 851 920 gui_fselect_redraw = 2; … … 893 962 if (selected && selected->attr != 0xFF) { 894 963 i=MPOPUP_CUT|MPOPUP_COPY|MPOPUP_SELINV|MPOPUP_RAW_ADD|MPOPUP_RAW_AVERAGE; 895 if (fselect_marked_count() > 0) 964 if (fselect_marked_count() > 0) { 896 965 i |= MPOPUP_DELETE; 966 // doesn't make sense to subtract from itself! 967 if( selected->marked == 0 && fselect_real_marked_count() > 0) 968 i |= MPOPUP_SUBTRACT; 969 } 897 970 if (marked_operation == MARKED_OP_CUT || marked_operation == MARKED_OP_COPY) 898 971 i |= MPOPUP_PASTE; branches/juciphox/core/gui_lang.c
r473 r479 121 121 " 79 \"Debug\"\n" 122 122 123 " 80 \" Show PropCases\"\n"123 " 80 \"Debug data display\"\n" 124 124 " 81 \"PropCase/ParamsData page\"\n" 125 125 " 82 \"Show misc. values\"\n" 126 126 " 83 \"Memory browser\"\n" 127 " 84 \" Dump RAM on ALT +/- press\"\n"127 " 84 \"ALT +/- debug action\"\n" 128 128 " 85 \"Make card bootable...\"\n" 129 129 … … 365 365 366 366 "272 \"Show OSD in Review Mode\"\n" 367 "273 \" Show Parameter Data\"\n"367 "273 \"Task list start\"\n" 368 368 369 369 "274 \"Subject distance from lens\"\n" … … 521 521 "400 \"Zoom Time-out 0.1s\"\n" 522 522 "401 \"Startup sound\"\n" 523 "402 \"Raw subtract prefix\"\n" 524 "403 \"Raw subtract extension\"\n" 525 "404 \"Subtract input dark value\"\n" 526 "405 \"Subtract output dark value\"\n" 527 "406 \"from\"\n" 528 "407 \"...%d more files\"\n" 529 "408 \"Subtract\"\n" 530 "409 \"Sub from marked\"\n" 531 "410 \"Save params\"\n" 523 532 ; 524 533 branches/juciphox/core/gui_lang.h
r473 r479 108 108 #define LANG_MENU_DEBUG_TITLE 79 109 109 110 #define LANG_MENU_DEBUG_ SHOW_PROPCASES80110 #define LANG_MENU_DEBUG_DISPLAY 80 111 111 #define LANG_MENU_DEBUG_PROPCASE_PAGE 81 112 112 #define LANG_MENU_DEBUG_SHOW_MISC_VALS 82 113 113 #define LANG_MENU_DEBUG_MEMORY_BROWSER 83 114 #define LANG_MENU_DEBUG_ DUMP_RAM84114 #define LANG_MENU_DEBUG_SHORTCUT_ACTION 84 115 115 #define LANG_MENU_DEBUG_MAKE_BOOTABLE 85 116 116 … … 356 356 357 357 #define LANG_MENU_OSD_SHOW_IN_REVIEW 272 358 #define LANG_MENU_DEBUG_ SHOW_PARAMETER_DATA273358 #define LANG_MENU_DEBUG_TASKLIST_START 273 359 359 360 360 #define LANG_MENU_DOF_DIST_FROM_LENS 274 … … 509 509 #define LANG_MENU_REMOTE_ZOOM_ENABLE 399 510 510 #define LANG_MENU_REMOTE_ZOOM_TIMEOUT 400 511 512 511 #define LANG_MENU_MISC_START_SOUND 401 513 512 #define LANG_MENU_SUB_PREFIX 402 513 #define LANG_MENU_SUB_EXTENSION 403 514 #define LANG_MENU_SUB_IN_DARK_VALUE 404 515 #define LANG_MENU_SUB_OUT_DARK_VALUE 405 516 #define LANG_FSELECT_SUB_FROM 406 517 #define LANG_FSELECT_SUB_AND_MORE 407 518 #define LANG_FSELECT_SUBTRACT 408 519 #define LANG_POPUP_SUB_FROM_MARKED 409 520 #define LANG_MENU_SCRIPT_PARAM_SAVE 410 514 521 //------------------------------------------------------------------- 515 522 516 #define GUI_LANG_ITEMS 4 01523 #define GUI_LANG_ITEMS 410 517 524 518 525 //------------------------------------------------------------------- branches/juciphox/core/gui_mpopup.c
r416 r479 26 26 { MPOPUP_RAW_AVERAGE, LANG_POPUP_RAW_AVERAGE }, 27 27 { MPOPUP_PURGE, LANG_POPUP_PURGE }, 28 { MPOPUP_SUBTRACT, LANG_POPUP_SUB_FROM_MARKED }, 28 29 }; 29 30 30 31 #define ACTIONSNUM (sizeof(actions)/sizeof(actions[0])) 31 #define MAX_ACTIONS 832 #define MAX_ACTIONS 9 32 33 static int mpopup_actions[MAX_ACTIONS], mpopup_actions_num, mpopup_actions_active; 33 34 static coord mpopup_actions_x, mpopup_actions_y; branches/juciphox/core/gui_mpopup.h
r416 r479 3 3 4 4 //------------------------------------------------------------------- 5 #define MPOPUP_MASK 0x0 0FF5 #define MPOPUP_MASK 0x01FF 6 6 #define MPOPUP_CUT 0x0001 7 7 #define MPOPUP_COPY 0x0002 … … 11 11 #define MPOPUP_RAW_ADD 0x0020 12 12 #define MPOPUP_RAW_AVERAGE 0x0040 13 #define MPOPUP_CANCEL 0x0 10013 #define MPOPUP_CANCEL 0x0200 14 14 #define MPOPUP_PURGE 0x0080 15 #define MPOPUP_SUBTRACT 0x0100 15 16 16 17 //------------------------------------------------------------------- branches/juciphox/core/gui_osd.c
r473 r479 703 703 void gui_osd_draw_state() { 704 704 int a, gui_mode=gui_get_mode(), m=(mode_get()&MODE_SHOOTING_MASK); 705 int mode_video = MODE_IS_VIDEO(m); 705 706 long t; 706 707 … … 710 711 //draw_string(conf.mode_state_pos.x, conf.mode_state_pos.y+6*FONT_HEIGHT, osd_buf, conf.osd_color); 711 712 //////////////////////////// 713 if (mode_video || movie_status > 1) { 714 // if manual adjust, show the field item to be adjusted 715 // if any value overriden, show the override value 716 if ((conf.video_mode == 0 && conf.fast_movie_quality_control==1) || conf.video_bitrate != VIDEO_DEFAULT_BITRATE) { 717 gui_print_osd_state_string_chr("Bitrate: ",video_bitrate_strings[conf.video_bitrate]); 718 } 719 if ((conf.video_mode == 1 && conf.fast_movie_quality_control==1) || conf.video_quality != VIDEO_DEFAULT_QUALITY) { 720 gui_print_osd_state_string_int("Quality: ",conf.video_quality); 721 } 722 // everything else is for stills 723 if(mode_video) 724 return; 725 } 712 726 713 727 if ((((conf.tv_enum_type) || (conf.tv_override_value)) && (conf.tv_override_koef) && !(conf.override_disable==1)) || gui_mode==GUI_MODE_OSD){ … … 992 1006 993 1007 void gui_osd_draw_temp() { 994 if (conf.show_temp ==1||0)1008 if (conf.show_temp == 1) 995 1009 { 996 1010 if (conf.clock_format == 0) branches/juciphox/core/kbd.c
r474 r479 261 261 script_print_screen_init(); 262 262 263 save_params_values(0); 264 263 if (conf.script_param_save) 264 { 265 save_params_values(0); 266 } 265 267 if( autostart ) 266 268 script_console_add_line("***Autostart***"); … … 568 570 mmode = mode_get(); 569 571 mplay = (mmode&MODE_MASK)==MODE_PLAY; 570 mvideo= ((mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_STD || (mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_SPEED || (mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_COMPACT ||(mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_MY_COLORS || (mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_COLOR_ACCENT); 572 // mvideo= ((mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_STD || (mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_SPEED || (mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_COMPACT ||(mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_MY_COLORS || (mmode&MODE_SHOOTING_MASK)==MODE_VIDEO_COLOR_ACCENT); 573 mvideo=MODE_IS_VIDEO(mmode); 571 574 } 572 575 // deals with alt-mode switch and delay emulation … … 1353 1356 1354 1357 long kbd_use_up_down_left_right_as_fast_switch() { 1355 static const char* modes[]={ "0.25x", "0.5x","0.75x", "1x", "1.25x", "1.5x", "1.75x", "2x", "2.5x", "3x"}; 1356 static long key_pressed = 0; 1357 if (!(kbd_is_key_pressed(KEY_UP)) && !(kbd_is_key_pressed(KEY_DOWN))) key_pressed = 0; 1358 if (kbd_is_key_pressed(KEY_UP) && (mode_get()&MODE_MASK) == MODE_REC && ((mode_get()&MODE_SHOOTING_MASK) != MODE_M) && ((mode_get()&MODE_SHOOTING_MASK) != MODE_VIDEO_STD) && movie_status<4 && (canon_shoot_menu_active==0)) { 1359 1358 static long key_pressed = 0; // ??? static masking a global 1359 int m=mode_get(); 1360 int mode_video = MODE_IS_VIDEO(m) || (movie_status > 1); 1361 1362 if (!(kbd_is_key_pressed(KEY_UP)) && !(kbd_is_key_pressed(KEY_DOWN))) key_pressed = 0; 1363 1364 if (canon_shoot_menu_active!=0 || (m&MODE_MASK) != MODE_REC) 1365 return 0; 1366 1367 if (kbd_is_key_pressed(KEY_UP) && ((m&MODE_SHOOTING_MASK) != MODE_M) && !mode_video) { 1360 1368 if (conf.fast_ev && key_pressed == 0) { 1361 #if (CAM_PROPSET == 1) 1362 shooting_set_prop(25,shooting_get_prop(25)+(conf.fast_ev_step+1)*16); 1363 shooting_set_prop(26,shooting_get_prop(26)+(conf.fast_ev_step+1)*16); 1364 #elif (CAM_PROPSET == 2) 1365 shooting_set_prop(107,shooting_get_prop(107)+(conf.fast_ev_step+1)*16); 1366 shooting_set_prop(207,shooting_get_prop(207)+(conf.fast_ev_step+1)*16); 1367 #endif 1369 shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_prop(PROPCASE_EV_CORRECTION_1)+(conf.fast_ev_step+1)*16); 1370 shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_prop(PROPCASE_EV_CORRECTION_2)+(conf.fast_ev_step+1)*16); 1368 1371 EnterToCompensationEVF(); 1369 1372 key_pressed = KEY_UP; 1370 1373 1371 1374 return 1; 1372 1375 } 1373 1376 1374 1377 } 1375 if (kbd_is_key_pressed(KEY_UP) && (mode_get()&MODE_MASK) == MODE_REC && movie_status == 4 && (canon_shoot_menu_active==0)) { 1376 1378 if (kbd_is_key_pressed(KEY_UP) && mode_video && movie_status == 4 ) { 1377 1379 if (conf.fast_movie_quality_control && key_pressed == 0) { 1378 1379 1380 if (conf.video_mode==0) 1381 { 1382 conf.video_bitrate+=1; 1383 if (conf.video_bitrate<0) 1384 conf.video_bitrate=sizeof(modes)/sizeof(modes[0])-1; 1385 else if (conf.video_bitrate>=(sizeof(modes)/sizeof(modes[0]))) 1386 conf.video_bitrate=sizeof(modes)/sizeof(modes[0])-1; 1387 shooting_video_bitrate_change(conf.video_bitrate); 1388 movie_reset = 1; 1389 } 1390 1391 if (conf.video_mode==1) 1392 { 1393 conf.video_quality+=1; 1394 if (conf.video_quality<1) 1395 conf.video_quality=1; 1396 else if (conf.video_quality>99) 1397 conf.video_quality=99; 1398 movie_reset = 1; 1399 } 1380 if (conf.video_mode==0) { 1381 conf.video_bitrate+=1; 1382 if (conf.video_bitrate>=VIDEO_BITRATE_STEPS) 1383 conf.video_bitrate=VIDEO_BITRATE_STEPS-1; 1384 shooting_video_bitrate_change(conf.video_bitrate); 1385 movie_reset = 1; 1386 } 1387 else if (conf.video_mode==1) { 1388 conf.video_quality+=1; 1389 if (conf.video_quality>VIDEO_MAX_QUALITY) 1390 conf.video_quality=VIDEO_MAX_QUALITY; 1391 movie_reset = 1; 1392 } 1400 1393 key_pressed = KEY_UP; 1401 1394 return 1; 1402 1395 } 1403 1404 1396 } 1405 if (kbd_is_key_pressed(KEY_DOWN) && (mode_get()&MODE_MASK) == MODE_REC && ((mode_get()&MODE_SHOOTING_MASK) != MODE_M) && ((mode_get()&MODE_SHOOTING_MASK) != MODE_VIDEO_STD) && movie_status<4 && (canon_shoot_menu_active==0)) { 1406 1407 1397 if (kbd_is_key_pressed(KEY_DOWN) && ((m&MODE_SHOOTING_MASK) != MODE_M) && !mode_video) { 1408 1398 if (conf.fast_ev && key_pressed == 0) { 1409 1399 kbd_key_release_all(); 1410 #if (CAM_PROPSET == 1) 1411 shooting_set_prop(25,shooting_get_prop(25)-(conf.fast_ev_step+1)*16); 1412 shooting_set_prop(26,shooting_get_prop(26)-(conf.fast_ev_step+1)*16); 1413 #elif (CAM_PROPSET == 2) 1414 shooting_set_prop(107,shooting_get_prop(107)-(conf.fast_ev_step+1)*16); 1415 shooting_set_prop(207,shooting_get_prop(207)-(conf.fast_ev_step+1)*16); 1416 #endif 1400 shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_prop(PROPCASE_EV_CORRECTION_1)-(conf.fast_ev_step+1)*16); 1401 shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_prop(PROPCASE_EV_CORRECTION_2)-(conf.fast_ev_step+1)*16); 1417 1402 key_pressed = KEY_DOWN; 1418 1403 EnterToCompensationEVF(); 1419 1404 return 1; 1420 1405 } 1421 1422 1406 } 1423 1407 1424 if (kbd_is_key_pressed(KEY_DOWN) && (mode_get()&MODE_MASK) == MODE_REC && movie_status == 4 && (canon_shoot_menu_active==0)) { 1425 1426 1427 if (conf.fast_movie_quality_control && key_pressed == 0) { 1428 1429 if (conf.video_mode==0) 1430 { 1431 conf.video_bitrate+=-1; 1432 if (conf.video_bitrate<0) 1433 conf.video_bitrate=0; 1434 1435 1436 shooting_video_bitrate_change(conf.video_bitrate); 1437 movie_reset = 1; 1438 } 1439 if (conf.video_mode==1) 1440 { 1441 conf.video_quality-=1; 1442 if (conf.video_quality<1) 1443 conf.video_quality=1; 1444 else if (conf.video_quality>99) 1445 conf.video_quality=99; 1446 movie_reset = 1; 1447 } 1448 1449 1450 1408 if (kbd_is_key_pressed(KEY_DOWN) && mode_video && movie_status == 4) { 1409 if (conf.fast_movie_quality_control && key_pressed == 0) { 1410 if (conf.video_mode==0) { 1411 conf.video_bitrate-=1; 1412 if (conf.video_bitrate<0) 1413 conf.video_bitrate=0; 1414 1415 shooting_video_bitrate_change(conf.video_bitrate); 1416 movie_reset = 1; 1417 } 1418 else if (conf.video_mode==1) { 1419 conf.video_quality-=1; 1420 if (conf.video_quality<1) 1421 conf.video_quality=1; 1422 movie_reset = 1; 1423 } 1451 1424 key_pressed = KEY_DOWN; 1452 1425 return 1; 1453 1426 } 1454 1455 1427 } 1456 1428 1457 if (kbd_is_key_pressed(KEY_LEFT) && (mode_get()&MODE_MASK) == MODE_REC && movie_status == 4 && (canon_shoot_menu_active==0)) { 1458 1459 1460 if (conf.fast_movie_control && key_pressed == 0) { 1461 1462 movie_status = 1; 1463 1464 1429 if (kbd_is_key_pressed(KEY_LEFT) && mode_video && movie_status == 4) { 1430 if (conf.fast_movie_control && key_pressed == 0) { 1431 movie_status = VIDEO_RECORD_STOPPED; 1465 1432 key_pressed = KEY_LEFT; 1466 1433 return 1; 1467 1434 } 1468 1469 1435 } 1470 1471 if (kbd_is_key_pressed(KEY_RIGHT) && (mode_get()&MODE_MASK) == MODE_REC && movie_status == 1 && (canon_shoot_menu_active==0)) { 1472 1473 1474 if (conf.fast_movie_control && key_pressed == 0) { 1475 1476 movie_status = 4; 1477 movie_reset = 1; 1478 1479 1436 // reyalp - HACK for cams that can do video in any mode 1437 // note that this means this will probably run whenever you press right 1438 if (kbd_is_key_pressed(KEY_RIGHT) && 1439 #ifndef CAM_HAS_VIDEO_BUTTON 1440 mode_video && 1441 #endif 1442 movie_status == 1) { 1443 // BUG this doesn't know whether recording was stopped or paused. 1444 if (conf.fast_movie_control && key_pressed == 0) { 1445 movie_status = VIDEO_RECORD_IN_PROGRESS; 1446 movie_reset = 1; 1480 1447 key_pressed = KEY_RIGHT; 1481 1448 return 1; 1482 1449 } 1483 1484 1450 } 1485 1451 1486 1452 return 0; 1487 1453 } branches/juciphox/core/luascript.c
r474 r479 214 214 int to = luaL_checknumber( L, 1 ); 215 215 int m=mode_get()&MODE_SHOOTING_MASK; 216 int mode_video=((m==MODE_VIDEO_STD) || 217 (m==MODE_VIDEO_SPEED) || 218 (m==MODE_VIDEO_COMPACT) || 219 (m==MODE_VIDEO_MY_COLORS) || 220 (m==MODE_VIDEO_COLOR_ACCENT)); 216 int mode_video=MODE_IS_VIDEO(m); 217 221 218 #if CAM_HAS_MANUAL_FOCUS 222 219 if (shooting_get_focus_mode() || (mode_video)) shooting_set_focus(to, SET_NOW); branches/juciphox/core/raw.c
r451 r479 9 9 #define RAW_TARGET_DIRECTORY "A/DCIM/%03dCANON" 10 10 //#define RAW_TMP_FILENAME "HDK_RAW.TMP" 11 #define RAW_TARGET_FILENAME "%s _%04d.%s"11 #define RAW_TARGET_FILENAME "%s%04d%s" 12 12 13 13 //------------------------------------------------------------------- 14 14 static char fn[64]; 15 15 static char dir[32]; 16 static char prefixes[][4] = { "IMG", "CRW", "SND" };17 static char exts[][4] = { "JPG", "CRW", "CR2", "THM", "WAV" };18 16 static int develop_raw=0; 19 17 //------------------------------------------------------------------- … … 68 66 69 67 sprintf(fn, "%s/", dir); 70 sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, prefixes[conf.raw_prefix], get_target_file_num(),exts[conf.raw_ext]);68 sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), img_exts[conf.raw_ext]); 71 69 72 70 fd = open(fn, O_WRONLY|O_CREAT, 0777); branches/juciphox/core/raw_merge.c
r324 r479 7 7 #include "gui_lang.h" 8 8 #include "lang.h" 9 9 #include "conf.h" 10 10 #define TEMP_FILE "raw16.tmp" 11 11 #define TEMP_FILE_NAME "A/raw16.tmp" … … 18 18 static char namebuf[100]; 19 19 20 // note: if processing with dcraw etc, zeros may get replaced with interpolated values 21 // this may or may not be what you want 22 static int raw_subtract_values(int from, int sub) { 23 if ( sub > conf.sub_in_dark_value ) { 24 int result = from - sub; 25 if ( result < conf.sub_out_dark_value ) { 26 return conf.sub_out_dark_value; 27 } 28 else { 29 return result; 30 } 31 } 32 else { 33 return from; 34 } 35 } 36 /* subtract "sub" from "from" and store the result in "dest"*/ 37 /* TODO allow replacing if dest == from or sub*/ 38 int raw_subtract(const char *from, const char *sub, const char *dest) { 39 unsigned req=(hook_raw_size()>>10) + 1; 40 unsigned avail=GetFreeCardSpaceKb(); 41 int ffrom = 0, fsub = 0, fdest = 0; 42 char *baccum = 0,*bsub = 0; 43 int status = 0; 44 unsigned short s,d; 45 int i,j; 46 47 static struct utimbuf t; 48 49 struct stat st; 50 51 if (stat((char *)from,&st) != 0 || st.st_size!=hook_raw_size()) 52 return 0; 53 54 if (stat((char *)sub,&st) != 0 || st.st_size!=hook_raw_size()) 55 return 0; 56 57 if( (baccum=malloc(RAW_ROWLEN)) && 58 (bsub=malloc(RAW_ROWLEN)) && 59 (ffrom=fopen(from, "rb")) && 60 (fsub=fopen(sub, "rb")) && 61 (fdest=fopen(dest, "wb")) && 62 avail > req) 63 { 64 started(); 65 for (j = 0; j < CAM_RAW_ROWS; j++) { 66 fread(baccum,1, RAW_ROWLEN,ffrom); 67 fread(bsub,1, RAW_ROWLEN,fsub); 68 for(i = 0;i<RAW_ROWLEN; i+=10) { 69 s =((0x3fc&(((unsigned short)bsub[i+1])<<2)) | (bsub[i+0] >> 6)); 70 d =((0x3fc&(((unsigned short)baccum[i+1])<<2)) | (baccum[i+0] >> 6)); 71 d = raw_subtract_values(d,s); 72 baccum[i]=(baccum[i]&0x3F)|(d<<6); 73 baccum[i+1]=d>>2; 74 75 s =((0x3f0&(((unsigned short)bsub[i+0])<<4)) | (bsub[i+3] >> 4)); 76 d =((0x3f0&(((unsigned short)baccum[i+0])<<4)) | (baccum[i+3] >> 4)); 77 d = raw_subtract_values(d,s); 78 baccum[i]=(baccum[i]&0xC0)|(d>>4); 79 baccum[i+3]=(baccum[i+3]&0x0F)|(d<<4); 80 81 s =((0x3c0&(((unsigned short)bsub[i+3])<<6)) | (bsub[i+2] >> 2)); 82 d =((0x3c0&(((unsigned short)baccum[i+3])<<6)) | (baccum[i+2] >> 2)); 83 d = raw_subtract_values(d,s); 84 baccum[i+2]=(baccum[i+2]&0x03)|(d<<2); 85 baccum[i+3]=(baccum[i+3]&0xF0)|(d>>6); 86 87 s =((0x300&(((unsigned short)bsub[i+2])<<8)) | (bsub[i+5])); 88 d =((0x300&(((unsigned short)baccum[i+2])<<8)) | (baccum[i+5])); 89 d = raw_subtract_values(d,s); 90 baccum[i+2]=(baccum[i+2]&0xFC)|(d>>8); 91 baccum[i+5]=d; 92 93 94 s =((0x3fc&(((unsigned short)bsub[i+4])<<2)) | (bsub[i+7] >> 6)); 95 d =((0x3fc&(((unsigned short)baccum[i+4])<<2)) | (baccum[i+7] >> 6)); 96 d = raw_subtract_values(d,s); 97 baccum[i+4]=d>>2; 98 baccum[i+7]=(baccum[i+7]&0x3F)|(d<<6); 99 100 101 s =((0x3f0&(((unsigned short)bsub[i+7])<<4)) | (bsub[i+6] >> 4)); 102 d =((0x3f0&(((unsigned short)baccum[i+7])<<4)) | (baccum[i+6] >> 4)); 103 d = raw_subtract_values(d,s); 104 baccum[i+6]=(baccum[i+6]&0x0F)|(d<<4); 105 baccum[i+7]=(baccum[i+7]&0xC0)|(d>>4); 106 107 s =((0x3c0&(((unsigned short)bsub[i+6])<<6)) | (bsub[i+9] >> 2)); 108 d =((0x3c0&(((unsigned short)baccum[i+6])<<6)) | (baccum[i+9] >> 2)); 109 d = raw_subtract_values(d,s); 110 baccum[i+6]=(baccum[i+6]&0xF0)|(d>>6); 111 baccum[i+9]=(baccum[i+9]&0x03)|(d<<2); 112 113 114 s =((0x300&(((unsigned short)bsub[i+9])<<8)) | (bsub[i+8])); 115 d =((0x300&(((unsigned short)baccum[i+9])<<8)) | (baccum[i+8])); 116 d = raw_subtract_values(d,s); 117 baccum[i+8]=d; 118 baccum[i+9]=(baccum[i+9]&0xFC)|(d>>8); 119 } 120 fwrite(baccum,1,RAW_ROWLEN,fdest); 121 if ( (j & 0x1F) == 0 ) { 122 gui_browser_progress_show((char *)dest, j*100/CAM_RAW_ROWS); 123 } 124 } 125 gui_browser_progress_show((char *)dest, 100); 126 finished(); 127 status = 1; 128 } 129 free(baccum); 130 free(bsub); 131 if(ffrom) fclose(ffrom); 132 if(fsub) fclose(fsub); 133 if(fdest) { 134 fclose(fdest); 135 t.actime = t.modtime = time(NULL); 136 utime((char *)dest, &t); 137 } 138 return status; 139 } 20 140 21 141 int raw_merge_start(int action){ branches/juciphox/core/raw_merge.h
r253 r479 8 8 void raw_merge_add_file(char * filename); 9 9 void raw_merge_end(void); 10 10 int raw_subtract(const char *from, const char *sub, const char *dest); 11 11 #endif branches/juciphox/doc/version.txt
r474 r479 5 5 6 6 log 7 8 479 / 0.3.0 9 PhyrePhoX (PP) 10 11 + added taskviewer by reyalp http://chdk.setepontos.com/index.php/topic,2110.msg19622.html#msg19622 12 + added Fishpeppers Boot Logo from here: http://chdk.setepontos.com/index.php/topic,2122.0.html 13 + raw subtract for filebrowser by reyalp - http://chdk.setepontos.com/index.php/topic,2099.msg19362.html#msg19362 14 * makefile changes: 15 added several docs in the /docs dir, these are "catted" together during compilation -> one big readme file's gonna be put into the zip. Also includes camera specific notes, if existing (placeholders for now) (thx for helping with this, Hacki). 16 * Ixus 860is / SD870 - fixed ubasic_set_led (diff provided by FE50) 17 * patched symboldmod and changed splashscreen a little (diff sent in by CHDKLover) 18 * added toggle in scripts menu: now the saving of script params can be turned on/off (default: off) 19 7 20 8 21 474 / 0.2.7 branches/juciphox/include/camera.h
r463 r479 43 43 44 44 #undef CAM_AF_SCAN_DURING_VIDEO_RECORD // CHDK can make single AF scan during video record 45 #undef CAM_HAS_VIDEO_BUTTON // Camera can take stills in video mode, and vice versa 45 46 46 47 //---------------------------------------------------------- … … 533 534 #define CAM_ADJUSTABLE_ALT_BUTTON 1 534 535 #undef CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 536 #define CAM_HAS_VIDEO_BUTTON 1 535 537 536 538 … … 548 550 #undef CAM_CAN_SD_OVER_NOT_IN_MF 549 551 #undef CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 552 #define CAM_HAS_VIDEO_BUTTON 1 550 553 551 554 … … 563 566 #undef CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 564 567 #undef CAM_CHDK_HAS_EXT_VIDEO_MENU 568 #define CAM_HAS_VIDEO_BUTTON 1 565 569 566 570 branches/juciphox/include/conf.h
r473 r479 24 24 int raw_save_first_only; //for series shooting 25 25 int raw_nr; 26 int sub_batch_prefix; // output of batch subtracts 27 int sub_batch_ext; 28 int sub_in_dark_value; // values <= to this are not subtracted, i.e. the dark value of your darkframe 29 int sub_out_dark_value; // minimum value to output from subtract, i.e. dark value of your final image 26 30 27 31 int show_osd; … … 216 220 int values_show_luminance; 217 221 218 int ns_enable_memdump; 222 int debug_shortcut_action; // 0=none, 1=dump, 2=page display 223 int debug_display; // 0=none, 1=props, 2=flash param, 3=tasks 224 219 225 int script_startup; // remote autostart 220 226 int remote_enable; // remote enable … … 244 250 245 251 int script_param_set; 252 int script_param_save; 246 253 247 254 long mem_view_addr_init; … … 258 265 #define SHOOTING_PROGRESS_PROCESSING 2 259 266 #define SHOOTING_PROGRESS_DONE 3 267 268 // video quality defaults. Ideally, these should match the camera default settings 269 #define VIDEO_DEFAULT_QUALITY 84 // ? where does 84 come from 270 #define VIDEO_MAX_QUALITY 99 271 #define VIDEO_DEFAULT_BITRATE 3 // should be 1 for all cams 260 272 261 273 extern int state_kbd_script_run; … … 277 289 extern int shutter_int; 278 290 291 // reyalp: putting these in conf, since the conf values are lookups for them 292 // prefixes and extentions available for raw images (index with conf.raw_prefix etc) 293 #define NUM_IMG_PREFIXES 3 // IMG_ CRW_ SND_ (could add ETC_ SDR_ AUT_ MVI_ MRK_) 294 #define NUM_IMG_EXTS 5 // .JPG .CRW .CR2 .THM .WAV (could add .AVI .MRK) 295 extern const char* img_prefixes[NUM_IMG_PREFIXES]; 296 extern const char* img_exts[NUM_IMG_EXTS]; 297 // ugh, but various things need it 298 #define VIDEO_BITRATE_STEPS 10 299 extern const char *video_bitrate_strings[VIDEO_BITRATE_STEPS]; 279 300 #endif branches/juciphox/include/lolevel.h
r473 r479 43 43 extern void __attribute__((noreturn)) _ExitTask(); 44 44 extern int _taskNameToId(char* taskName); // VxWorks only, task's name first letter must be 't', maximum 10 chars total 45 extern const char *_taskName(int taskID); // VxWorks only for now 46 extern int _taskIdListGet(int *idlist,int max); // VxWorks only for now 45 47 extern void _taskSuspend(int taskId); 46 48 extern void _taskResume(int taskId); extern long _GetPropertyCase(long opt_id, void *buf, long bufsize); branches/juciphox/include/platform.h
r474 r479 66 66 MODE_VIDEO_STITCH , 67 67 MODE_VIDEO_MANUAL , 68 MODE_SPORTS ,68 MODE_SPORTS , 69 69 }; 70 70 71 // this is nasty, but not as nasty as checking each of the flags all over the place 72 #define MODE_IS_VIDEO(m) (((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_STD || \ 73 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_SPEED || \ 74 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_COMPACT || \ 75 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_MY_COLORS || \ 76 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_COLOR_ACCENT || \ 77 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_COLOR_SWAP || \ 78 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_TIME_LAPSE || \ 79 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_PORTRAIT || \ 80 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_NIGHT || \ 81 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_INDOOR || \ 82 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_FOLIAGE || \ 83 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_SNOW || \ 84 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_BEACH || \ 85 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_AQUARIUM || \ 86 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_SUPER_MACRO || \ 87 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_STITCH || \ 88 ((m)&MODE_SHOOTING_MASK)==MODE_VIDEO_MANUAL) 71 89 #if CAM_PROPSET == 2 // most digic3 cameras 72 90 #define PROPCASE_DRIVE_MODE 102 … … 144 162 #define MODE_SCREEN_OPENED 0x0400 145 163 #define MODE_SCREEN_ROTATED 0x0800 146 147 164 #define AS_SIZE (sizeof(aperture_sizes_table)/sizeof(aperture_sizes_table[0])) 148 165 #define ASID_MIN (aperture_sizes_table[0].id) … … 456 473 long get_vbatt_min(); 457 474 long get_vbatt_max(); 458 void play_sound( shortsound);475 void play_sound(unsigned sound); 459 476 void ubasic_camera_set_raw(int mode); 460 477 void ubasic_camera_set_nr(int mode); branches/juciphox/include/stdlib.h
r463 r479 153 153 extern long task_lock(); 154 154 extern long task_unlock(); 155 extern const char *task_name(int id); 156 int task_id_list_get(int *idlist,int size); 155 157 156 158 #define DOS_ATTR_RDONLY 0x01 /* read-only file */ branches/juciphox/lib/font/rbf_font.c
r473 r479 112 112 113 113 close(fd); 114 conf.menu_symbol_enable=(rbf_font.height>=rbf_symbol_font.height); 114 115 return 1; 115 116 } … … 168 169 169 170 close(fd); 171 conf.menu_symbol_enable=(rbf_font.height>=rbf_symbol_font.height); 170 172 return 1; 171 173 } branches/juciphox/lib/ubasic/ubasic.c
r464 r479 433 433 r = get_battery_temp(); 434 434 break; 435 default: // do something sane if given a bad index 436 r = 0; 435 437 } 436 438 break; … … 1695 1697 to = expr(); 1696 1698 int m=mode_get()&MODE_SHOOTING_MASK; 1697 int mode_video=((m==MODE_VIDEO_STD) || 1698 (m==MODE_VIDEO_SPEED) || 1699 (m==MODE_VIDEO_COMPACT) || 1700 (m==MODE_VIDEO_MY_COLORS) || 1701 (m==MODE_VIDEO_COLOR_ACCENT)); 1699 int mode_video=MODE_IS_VIDEO(m); 1702 1700 #if CAM_HAS_MANUAL_FOCUS 1703 1701 if (shooting_get_focus_mode() || (mode_video)) shooting_set_focus(to, SET_NOW); branches/juciphox/makefile.inc
r464 r479 4 4 PLATFORMSUB=100a 5 5 6 #PLATFORM=a620 7 #PLATFORMSUB=100f 8 9 #PLATFORM=ixus40_sd300 10 #PLATFORMSUB=100k 11 6 12 #PLATFORM=sx100is 7 13 #PLATFORMSUB=100c … … 18 24 #PLATFORM=ixus750_sd550 19 25 #PLATFORMSUB=100g 20 21 #PLATFORM=a62022 #PLATFORMSUB=100f23 26 24 27 #PLATFORM=a640 branches/juciphox/platform/generic/wrappers.c
r473 r479 55 55 } 56 56 57 #ifndef CAM_DRYOS 58 const char *task_name(int id) 59 { 60 return _taskName(id); 61 } 62 63 int task_id_list_get(int *idlist,int size) 64 { 65 return _taskIdListGet(idlist,size); 66 } 67 #endif 68 57 69 long get_property_case(long id, void *buf, long bufsize) 58 70 { … … 138 150 } 139 151 140 void play_sound(short sound) 141 { 142 short tmp; 143 switch (sound) 144 { 145 case 0: 146 tmp = 0x2001; //startup sound 147 break; 148 case 1: 149 tmp = 0x2002; //shutter sound 150 break; 151 case 2: 152 tmp = 0x2003; //button press sound 153 break; 154 case 3: 155 tmp = 0x2004; //self-timer sound 156 break; 157 case 4: 158 tmp = 0xC211; //short beep 159 break; 160 case 5: 161 tmp = 50000; // AF confirmation 162 break; 163 case 6: 164 tmp = 0xC507; // error beep imo 165 break; 166 case 7: 167 tmp = 0x400D; // LONG ERROR BEEP CONTINIUOUS- warning, cannot be stopped (yet) 168 break; 169 } 170 _PT_PlaySound(tmp, 0); 152 void play_sound(unsigned sound) 153 { 154 static const int sounds[]={ 0x2001, //startup sound 155 0x2002, //shutter sound 156 0x2003, //button press sound 157 0x2004, //self-timer sound 158 0xC211, //short beep 159 50000, // AF confirmation 160 0xC507, // error beep imo 161 0x400D, // LONG ERROR BEEP CONTINIUOUS- warning, cannot be stopped (yet) 162 }; 163 if(sound >= sizeof(sounds)/sizeof(sounds[0])) 164 return; 165 166 _PT_PlaySound(sounds[sound], 0); 171 167 } 172 168 branches/juciphox/platform/ixus860_sd870/lib.c
r341 r479 17 17 } 18 18 19 20 #define LED_PR 0xC02200CC 19 // fe50 10-Aug-2008: LED adresses on SD870: 20 #define LED_PR 0xC02200CC //0 21 #define LED_YELLOW 0xc02200D8 //+12 (???) 22 #define LED_ORANGE 0xc0220133 //+103 23 #define LED_GREEN 0xc0220136 //+106 24 #define LED_AF 0xc0223030 //+12132 21 25 22 26 void debug_led(int state) … … 29 33 } 30 34 31 #define LED_AF 0xc0223030 32 35 // fe50 10-Aug-2008 33 36 void ubasic_set_led(int led, int state, int bright) 34 37 { 35 /* ??? 36 int leds[] = {12,16,4,8,4,0,4}; 37 if(led < 4 || led > 10 || led == 6) return; 38 volatile long *p=(void*)LED_AF + leds[led-4]; 39 if (state) 40 p[0]=0x46; 41 else 42 p[0]=0x44; 43 */ 38 // "brigth" not implemented 39 // YELLOW not available 40 // TIMER -> LED_AF 41 int leds[] = {106,12,0,103,0,12132,12132}; // green | yellow | not used | orange | blue | af beam | timer 42 if(led < 4 || led > 10 || led == 6) return; // return on invalid params; no extra TIMER LED (is same as AF) 43 volatile long *p=(void*)LED_PR + leds[led-4]; 44 if (state) 45 p[0]=0x46; 46 else 47 p[0]=0x44; 44 48 } 45 46 49 47 50 int get_flash_params_count(void){ branches/juciphox/version.inc
r474 r479 1 BUILD_NUMBER := 0. 2.71 BUILD_NUMBER := 0.3.0