Ignore:
Timestamp:
12/02/09 09:31:02 (3 years ago)
Author:
reyalp
Message:

Mode override support. See http://chdk.kernreaktor.org/mantis/view.php?id=64
All cameras except ixus40_sd400 should be supported

rec_mode_active (checks play_rec_mode, weak, can be overriden on cameras that need it)
screen_opened, screen_rotated: only defined on swivel screen cams, check phsw_ bits for screen pos

  • move old play/rec checking code to rec_switch_state. #ifdef'd out for now
  • move mode enum into it's own header file: modelist.h to allow easy lua generation.
  • use playrec_mode on tx1

+ add new generated lua file LUALIB/GEN/modelist.lua
+ add lua library LUALIB/capmode.lua see http://chdk.wikia.com/wiki/LUA/Scripts:Standard/Lualib/Capmode
+ add test scripts see

http://chdk.wikia.com/wiki/UBASIC/Scripts:Standard/Test/Setmode
http://chdk.wikia.com/wiki/LUA/Scripts:Standard/Test/Setmode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platform/a720/shooting.c

    r515 r847  
    8080};           
    8181 
     82static const CapturemodeMap modemap[] = { 
     83    { MODE_AUTO,               32768 }, 
     84    { MODE_P,                  32772 }, 
     85    { MODE_TV,                 32771 }, 
     86    { MODE_AV,                 32770 }, 
     87    { MODE_M,                  32769 }, 
     88    { MODE_VIDEO_STD,          2597  }, 
     89    { MODE_VIDEO_COMPACT,      2599  }, 
     90    { MODE_STITCH,             33290 }, 
     91    { MODE_SCN_WATER,          16406 },   
     92    { MODE_SCN_AQUARIUM,       16407 },   
     93    { MODE_SCN_NIGHT,          16398 },   
     94    { MODE_SCN_GRASS,          16402 },    
     95    { MODE_SCN_SNOW,           16403 },   
     96    { MODE_SCN_BEACH,          16404 },   
     97    { MODE_SCN_FIREWORK,       16405 },   
     98    { MODE_INDOOR,             32785 }, 
     99    { MODE_KIDS_PETS,          32784 },  
     100    { MODE_NIGHT_SNAPSHOT,     32779 }, 
     101    { MODE_LANDSCAPE,          32780 },  
     102    { MODE_PORTRAIT,           32781 }, 
     103}; 
     104 
    82105#include "../generic/shooting.c" 
    83106 
Note: See TracChangeset for help on using the changeset viewer.