Changeset 497
- Timestamp:
- 09/02/08 23:44:06 (2 years ago)
- Files:
-
- branches/juciphox/CHDK/LANG/dutch.lng (added)
- branches/juciphox/core/conf.c (modified) (1 diff)
- branches/juciphox/doc/version.txt (modified) (1 diff)
- branches/juciphox/include/platform.h (modified) (2 diffs)
- branches/juciphox/lib/ubasic/tokenizer.c (modified) (2 diffs)
- branches/juciphox/lib/ubasic/tokenizer.h (modified) (3 diffs)
- branches/juciphox/lib/ubasic/ubasic.c (modified) (5 diffs)
- branches/juciphox/platform/sx100is/sub/100c/movie_rec.c (modified) (1 diff)
- branches/juciphox/version.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/juciphox/core/conf.c
r493 r497 319 319 CONF_INFO(172, conf.override_disable, CONF_DEF_VALUE, i:2, NULL), 320 320 CONF_INFO(173, conf.override_disable_all, CONF_DEF_VALUE, i:1, NULL), 321 CONF_INFO(174, conf.hide_osd, CONF_DEF_VALUE, i: 0, NULL),322 CONF_INFO(175, conf.save_raw_in_video, CONF_DEF_VALUE, i: 0, NULL),321 CONF_INFO(174, conf.hide_osd, CONF_DEF_VALUE, i:1, NULL), 322 CONF_INFO(175, conf.save_raw_in_video, CONF_DEF_VALUE, i:1, NULL), 323 323 CONF_INFO(176, conf.show_movie_time, CONF_DEF_VALUE, i:3, NULL), 324 324 CONF_INFO(177, conf.show_movie_refresh, CONF_DEF_VALUE, i:1, NULL), branches/juciphox/doc/version.txt
r496 r497 5 5 6 6 log 7 8 0.5.0 / PP 9 10 + added dutch language file 11 + added ubasic command: get_time. can be fed with 0 (returns seconds), 1 (minute), 2 (hour),3 (day) 4 (month) 5 (year) - command also exists in lua, though must be fed with CHARS 12 + added ubasic command: get_mode - returns 0 in record mode, 1 in playback mode, it's that simple. useful for shutting of scripts that are meant to be run in a certain mode (like 99% of all available scripts). - someone needs to port that to lua, as i javent played around with that yet! 13 + added ubasic commands: get_quality, get_resolution (return quality and resolution regardless of OS) & set_quality,set_resolution - for possible values see http://chdk.wikia.com/wiki/PropertyCase (basically for quality you can 0-2, 2 being the worst, resolution can be set between 0 and 8, see the wiki) - needs porting to lua as well. 14 * changed 2 default settings in the conf: now "Hide OSD in playback" is enabled at default, also "disable saving raw while recording video" is enabled at default(S-eries) 15 * fixed some newline related warnings at compile time 16 17 Author's comment: Now everything should be at hand to be able to create true universal scripts. i'm thinking for example of fudgeys motion detection one, should run on digic II and III now, also on cams with and without moviebutton - all the commands are there. who is willing to write such a script? also please add the get_mode check in the beginning. 18 7 19 8 20 0.4.3 / PP branches/juciphox/include/platform.h
r479 r497 108 108 #define PROPCASE_SHOOTING_MODE 49 109 109 #define PROPCASE_IS_MODE 145 110 #define PROPCASE_QUALITY 57 111 #define PROPCASE_RESOLUTION 218 110 112 #define PROPCASE_EV_CORRECTION_1 107 111 113 #define PROPCASE_EV_CORRECTION_2 207 … … 141 143 #define PROPCASE_SHOOTING_MODE 0 142 144 #define PROPCASE_IS_MODE 229 145 #define PROPCASE_QUALITY 23 146 #define PROPCASE_RESOLUTION 24 143 147 #define PROPCASE_EV_CORRECTION_1 25 144 148 #define PROPCASE_EV_CORRECTION_2 26 branches/juciphox/lib/ubasic/tokenizer.c
r493 r497 119 119 {"get_jpg_count", TOKENIZER_GET_JPG_COUNT}, 120 120 {"get_movie_status", TOKENIZER_GET_MOVIE_STATUS}, 121 {"get_mode", TOKENIZER_GET_MODE}, // Returns 0 in recordmode, 1 in playmode 121 122 {"get_near_limit", TOKENIZER_GET_NEAR_LIMIT}, 122 123 {"get_propset", TOKENIZER_GET_PROPSET}, 123 124 {"get_prop", TOKENIZER_GET_PROP}, 125 {"get_quality", TOKENIZER_GET_QUALITY}, 124 126 {"get_raw_count", TOKENIZER_GET_RAW_COUNT}, 125 127 {"get_raw_nr", TOKENIZER_GET_RAW_NR}, 126 128 {"get_raw", TOKENIZER_GET_RAW}, 129 {"get_resolution", TOKENIZER_GET_RESOLUTION}, 127 130 {"get_sv96", TOKENIZER_GET_SV96}, 128 131 {"get_temperature", TOKENIZER_GET_TEMPERATURE}, 129 132 {"get_tick_count", TOKENIZER_GET_TICK_COUNT}, 133 {"get_time", TOKENIZER_GET_TIME}, 130 134 {"get_tv96", TOKENIZER_GET_TV96}, 131 135 {"get_user_av_id", TOKENIZER_GET_USER_AV_ID}, … … 154 158 {"set_nd_filter", TOKENIZER_SET_ND_FILTER}, 155 159 {"set_prop", TOKENIZER_SET_PROP}, 160 {"set_quality", TOKENIZER_SET_QUALITY}, 156 161 {"set_raw_nr", TOKENIZER_SET_RAW_NR}, 157 162 {"set_raw", TOKENIZER_SET_RAW}, 158 //{"set_shutter_speed", TOKENIZER_SET_SHUTTER_SPEED}, 163 {"set_resolution", TOKENIZER_SET_RESOLUTION}, 164 //{"set_shutter_speed", TOKENIZER_SET_SHUTTER_SPEED}, 159 165 {"set_sv96", TOKENIZER_SET_SV96}, 160 166 {"set_tv96_direct", TOKENIZER_SET_TV96_DIRECT}, branches/juciphox/lib/ubasic/tokenizer.h
r493 r497 110 110 TOKENIZER_GET_DAY_SECONDS, 111 111 TOKENIZER_GET_TICK_COUNT, 112 TOKENIZER_GET_TIME, 112 113 TOKENIZER_GET_ZOOM, 113 114 TOKENIZER_SET_ZOOM, … … 161 162 TOKENIZER_RANDOM, 162 163 TOKENIZER_GET_MOVIE_STATUS, 164 TOKENIZER_GET_MODE, 163 165 TOKENIZER_PLAY_SOUND, 164 166 TOKENIZER_GET_DISPLAY_MODE, … … 180 182 TOKENIZER_GET_TEMPERATURE, 181 183 TOKENIZER_SET_MOVIE_STATUS, 184 TOKENIZER_GET_RESOLUTION, 185 TOKENIZER_GET_QUALITY, 186 TOKENIZER_SET_RESOLUTION, 187 TOKENIZER_SET_QUALITY, 182 188 183 189 } ubasic_token; branches/juciphox/lib/ubasic/ubasic.c
r493 r497 217 217 accept(TOKENIZER_GET_TICK_COUNT); 218 218 r = shooting_get_tick_count(); 219 break; 220 case TOKENIZER_GET_MODE: 221 accept(TOKENIZER_GET_MODE); 222 r = ((mode_get()&MODE_MASK) == MODE_PLAY)?1:0; 219 223 break; 220 224 case TOKENIZER_GET_RAW_NR: … … 294 298 r = shooting_get_prop(PROPCASE_EV_CORRECTION_1); 295 299 break; 300 case TOKENIZER_GET_RESOLUTION: 301 accept(TOKENIZER_GET_RESOLUTION); 302 r = shooting_get_prop(PROPCASE_RESOLUTION); 303 break; 304 case TOKENIZER_GET_QUALITY: 305 accept(TOKENIZER_GET_QUALITY); 306 r = shooting_get_prop(PROPCASE_QUALITY); 307 break; 296 308 case TOKENIZER_GET_ORIENTATION_SENSOR: 297 309 accept(TOKENIZER_GET_ORIENTATION_SENSOR); … … 445 457 } 446 458 break; 459 case TOKENIZER_GET_TIME: 460 accept(TOKENIZER_GET_TIME); 461 unsigned long t2 = time(NULL); 462 int time = expr(); 463 static struct tm *ttm; 464 ttm = localtime(&t2); 465 if (time==0) r = ttm->tm_sec; 466 else if (time==1) r = ttm->tm_min; 467 else if (time==2) r = ttm->tm_hour; 468 else if (time==3) r = ttm->tm_mday; 469 else if (time==4) r = ttm->tm_mon+1; 470 else if (time==5) r = 1900+ttm->tm_year; 471 break; 447 472 case TOKENIZER_GET_RAW: 448 473 accept(TOKENIZER_GET_RAW); … … 1699 1724 } 1700 1725 1726 static void set_resolution_statement() 1727 { 1728 int to; 1729 accept(TOKENIZER_SET_RESOLUTION); 1730 to = expr(); 1731 shooting_set_prop(PROPCASE_RESOLUTION, to); 1732 accept_cr(); 1733 } 1734 1735 static void set_quality_statement() 1736 { 1737 int to; 1738 accept(TOKENIZER_SET_QUALITY); 1739 to = expr(); 1740 shooting_set_prop(PROPCASE_QUALITY, to); 1741 accept_cr(); 1742 } 1743 1744 1701 1745 static void set_focus_statement() 1702 1746 { … … 2216 2260 set_movie_status_statement(); 2217 2261 break; 2262 case TOKENIZER_SET_RESOLUTION: 2263 set_resolution_statement(); 2264 break; 2265 case TOKENIZER_SET_QUALITY: 2266 set_quality_statement(); 2267 break; 2218 2268 2219 2269 case TOKENIZER_WAIT_CLICK: branches/juciphox/platform/sx100is/sub/100c/movie_rec.c
r445 r497 1959 1959 1960 1960 long CompressionRateTable[]={0x60, 0x5D, 0x5A, 0x57, 0x54, 0x51, 0x4D, 0x48, 0x42, 0x3B, 0x32, 0x29, 0x22, 0x1D, 0x17, 0x14, 0x10, 0xE, 0xB, 9, 7, 6, 5, 4, 3, 2, 1}; 1961 1961 1962 branches/juciphox/version.inc
r496 r497 1 BUILD_NUMBER := 0. 4.31 BUILD_NUMBER := 0.5.0