Assembla home | Assembla project page
 

Changeset 497

Show
Ignore:
Timestamp:
09/02/08 23:44:06 (2 years ago)
Author:
phyrephox
Message:

+ added dutch language file
+ 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
+ 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!
+ 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.
* 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)
* fixed some newline related warnings at compile time

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/juciphox/core/conf.c

    r493 r497  
    319319    CONF_INFO(172, conf.override_disable,       CONF_DEF_VALUE, i:2, NULL), 
    320320    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), 
    323323    CONF_INFO(176, conf.show_movie_time,        CONF_DEF_VALUE, i:3, NULL), 
    324324    CONF_INFO(177, conf.show_movie_refresh,     CONF_DEF_VALUE, i:1, NULL), 
  • branches/juciphox/doc/version.txt

    r496 r497  
    55 
    66log 
     7 
     80.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 
     17Author'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 
    719 
    8200.4.3 / PP 
  • branches/juciphox/include/platform.h

    r479 r497  
    108108 #define PROPCASE_SHOOTING_MODE                                 49 
    109109 #define PROPCASE_IS_MODE                                           145 
     110 #define PROPCASE_QUALITY                                       57 
     111 #define PROPCASE_RESOLUTION                                    218 
    110112 #define PROPCASE_EV_CORRECTION_1                               107 
    111113 #define PROPCASE_EV_CORRECTION_2                               207 
     
    141143 #define PROPCASE_SHOOTING_MODE                                 0 
    142144 #define PROPCASE_IS_MODE                                       229 
     145 #define PROPCASE_QUALITY                                       23 
     146 #define PROPCASE_RESOLUTION                                    24 
    143147 #define PROPCASE_EV_CORRECTION_1                               25 
    144148 #define PROPCASE_EV_CORRECTION_2                               26 
  • branches/juciphox/lib/ubasic/tokenizer.c

    r493 r497  
    119119  {"get_jpg_count",           TOKENIZER_GET_JPG_COUNT}, 
    120120  {"get_movie_status",        TOKENIZER_GET_MOVIE_STATUS}, 
     121  {"get_mode",                                  TOKENIZER_GET_MODE},  // Returns 0 in recordmode, 1 in playmode 
    121122  {"get_near_limit",          TOKENIZER_GET_NEAR_LIMIT}, 
    122123  {"get_propset",             TOKENIZER_GET_PROPSET}, 
    123124  {"get_prop",                TOKENIZER_GET_PROP}, 
     125  {"get_quality",             TOKENIZER_GET_QUALITY}, 
    124126  {"get_raw_count",           TOKENIZER_GET_RAW_COUNT}, 
    125127  {"get_raw_nr",              TOKENIZER_GET_RAW_NR}, 
    126128  {"get_raw",                 TOKENIZER_GET_RAW}, 
     129  {"get_resolution",          TOKENIZER_GET_RESOLUTION}, 
    127130  {"get_sv96",                TOKENIZER_GET_SV96}, 
    128131  {"get_temperature",         TOKENIZER_GET_TEMPERATURE}, 
    129132  {"get_tick_count",          TOKENIZER_GET_TICK_COUNT}, 
     133  {"get_time",                                  TOKENIZER_GET_TIME}, 
    130134  {"get_tv96",                TOKENIZER_GET_TV96}, 
    131135  {"get_user_av_id",          TOKENIZER_GET_USER_AV_ID}, 
     
    154158  {"set_nd_filter",           TOKENIZER_SET_ND_FILTER}, 
    155159  {"set_prop",                TOKENIZER_SET_PROP}, 
     160  {"set_quality",                TOKENIZER_SET_QUALITY}, 
    156161  {"set_raw_nr",              TOKENIZER_SET_RAW_NR}, 
    157162  {"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}, 
    159165  {"set_sv96",                    TOKENIZER_SET_SV96}, 
    160166  {"set_tv96_direct",         TOKENIZER_SET_TV96_DIRECT}, 
  • branches/juciphox/lib/ubasic/tokenizer.h

    r493 r497  
    110110  TOKENIZER_GET_DAY_SECONDS, 
    111111  TOKENIZER_GET_TICK_COUNT, 
     112  TOKENIZER_GET_TIME, 
    112113  TOKENIZER_GET_ZOOM, 
    113114  TOKENIZER_SET_ZOOM, 
     
    161162  TOKENIZER_RANDOM, 
    162163  TOKENIZER_GET_MOVIE_STATUS, 
     164  TOKENIZER_GET_MODE, 
    163165  TOKENIZER_PLAY_SOUND, 
    164166  TOKENIZER_GET_DISPLAY_MODE, 
     
    180182  TOKENIZER_GET_TEMPERATURE, 
    181183  TOKENIZER_SET_MOVIE_STATUS, 
     184  TOKENIZER_GET_RESOLUTION, 
     185  TOKENIZER_GET_QUALITY, 
     186  TOKENIZER_SET_RESOLUTION, 
     187  TOKENIZER_SET_QUALITY, 
    182188   
    183189} ubasic_token; 
  • branches/juciphox/lib/ubasic/ubasic.c

    r493 r497  
    217217    accept(TOKENIZER_GET_TICK_COUNT); 
    218218    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;     
    219223   break; 
    220224 case TOKENIZER_GET_RAW_NR: 
     
    294298    r = shooting_get_prop(PROPCASE_EV_CORRECTION_1); 
    295299   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; 
    296308  case TOKENIZER_GET_ORIENTATION_SENSOR: 
    297309    accept(TOKENIZER_GET_ORIENTATION_SENSOR); 
     
    445457  } 
    446458    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; 
    447472 case TOKENIZER_GET_RAW: 
    448473    accept(TOKENIZER_GET_RAW); 
     
    16991724} 
    17001725 
     1726static 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 
     1735static 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 
    17011745static void set_focus_statement() 
    17021746{ 
     
    22162260        set_movie_status_statement(); 
    22172261   break; 
     2262   case TOKENIZER_SET_RESOLUTION: 
     2263        set_resolution_statement(); 
     2264   break; 
     2265   case TOKENIZER_SET_QUALITY: 
     2266        set_quality_statement(); 
     2267   break; 
    22182268 
    22192269  case TOKENIZER_WAIT_CLICK: 
  • branches/juciphox/platform/sx100is/sub/100c/movie_rec.c

    r445 r497  
    19591959 
    19601960long 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 
    19611962                                                         
  • branches/juciphox/version.inc

    r496 r497  
    1 BUILD_NUMBER := 0.4.3 
     1BUILD_NUMBER := 0.5.0