Changeset 1785 for branches/release-1_0


Ignore:
Timestamp:
04/01/12 15:59:06 (14 months ago)
Author:
msl
Message:

ALT button SX220/230

+ Change default button for ALT mode: playback button [>]

  • Delete combination [DISP. + SET] for ALT button
Location:
branches/release-1_0
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/release-1_0/core/gui.c

    r1765 r1785  
    14931493        static const char* names[]={ "Print", "Display"}; 
    14941494        static const int keys[] = {KEY_PRINT, KEY_DISPLAY}; 
    1495     #elif defined(CAMERA_sx220hs) || defined(CAMERA_sx230hs) 
    1496         static const char* names[]={ "Disp+Set", "Display", "Playback", "Video"}; 
    1497         static const int keys[] = {KEY_PRINT, KEY_DISPLAY, KEY_PLAYBACK, KEY_VIDEO}; 
    1498     #elif defined(CAMERA_sx150is) 
     1495    #elif defined(CAMERA_sx150is) || (CAMERA_sx220hs) || defined(CAMERA_sx230hs) 
    14991496        static const char* names[]={ "Playback", "Video", "Display" }; 
    15001497        static const int keys[] = {KEY_PRINT, KEY_VIDEO, KEY_DISPLAY}; 
  • branches/release-1_0/platform/sx220hs/kbd.c

    r1344 r1785  
    1919static int remote_key, remote_count; 
    2020static int shoot_counter=0; 
    21 static long alt_mode_key_mask = 0x00010800; // disp + set 
    2221static int alt_mode_led=0; 
    2322extern void _GetKbdState(long*); 
     
    4342static KeyMap keymap[] = { 
    4443 
    45         /* tiny bug: key order matters. see kbd_get_pressed_key() 
    46          * for example*/ 
    47   
    48  
    49         { 0, KEY_ZOOM_OUT        , 0x00000001 }, 
    50         { 0, KEY_ZOOM_OUT1       , 0x00000001 }, 
    51         { 0, KEY_ZOOM_OUT        , 0x00000002 },         
    52         { 0, KEY_ZOOM_OUT3       , 0x00000002 },         
    53         { 0, KEY_ZOOM_OUT                , 0x00000003 }, 
    54         { 0, KEY_ZOOM_OUT2               , 0x00000003 }, 
    55         { 0, KEY_ZOOM_IN         , 0x00000004 }, 
    56         { 0, KEY_ZOOM_IN1        , 0x00000004 },         
    57         { 0, KEY_ZOOM_IN                 , 0x00000008 }, 
    58         { 0, KEY_ZOOM_IN3                , 0x00000008 }, 
    59         { 0, KEY_ZOOM_IN                 , 0x0000000C }, 
    60         { 0, KEY_ZOOM_IN2                , 0x0000000C }, 
    61         { 0, KEY_DISPLAY         , 0x00000800 }, 
    62         { 0, KEY_UP                      , 0x00001000 },  
    63         { 0, KEY_RIGHT               , 0x00006000 }, 
    64         { 0, KEY_SET                 , 0x00010000 }, 
    65         { 0, KEY_PRINT               , 0x00010800 },  //DISP+SET for ALT menu 
    66         { 0, KEY_DOWN                , 0x00020000 }, 
    67         { 0, KEY_MENU                , 0x00040000 }, 
    68         { 0, KEY_VIDEO               , 0x00080000 },     
    69         { 0, KEY_RIGHT_SOFT          , 0x00002000 }, 
    70         { 0, KEY_UP_SOFT             , 0x00000400 }, 
    71         { 0, KEY_DOWN_SOFT           , 0x00008000 },     
    72          
    73         { 2, KEY_LEFT_SOFT               , 0x00000080 }, 
    74         { 2, KEY_LEFT                    , 0x00000100 }, 
    75         { 2, KEY_SHOOT_FULL              , 0x00002002 },         
    76         { 2, KEY_SHOOT_FULL_ONLY , 0x00000002 },         
    77         { 2, KEY_SHOOT_HALF              , 0x00002000 }, 
    78  
    79         { 1, KEY_PLAYBACK            , 0x00200000 },     
    80  
    81         { 0, 0, 0 } 
     44    /* tiny bug: key order matters. see kbd_get_pressed_key() 
     45    * for example*/ 
     46 
     47    { 0, KEY_ZOOM_OUT        , 0x00000001 }, 
     48    { 0, KEY_ZOOM_OUT1       , 0x00000001 }, 
     49    { 0, KEY_ZOOM_OUT        , 0x00000002 }, 
     50    { 0, KEY_ZOOM_OUT3       , 0x00000002 }, 
     51    { 0, KEY_ZOOM_OUT        , 0x00000003 }, 
     52    { 0, KEY_ZOOM_OUT2       , 0x00000003 }, 
     53    { 0, KEY_ZOOM_IN         , 0x00000004 }, 
     54    { 0, KEY_ZOOM_IN1        , 0x00000004 }, 
     55    { 0, KEY_ZOOM_IN         , 0x00000008 }, 
     56    { 0, KEY_ZOOM_IN3        , 0x00000008 }, 
     57    { 0, KEY_ZOOM_IN         , 0x0000000C }, 
     58    { 0, KEY_ZOOM_IN2        , 0x0000000C }, 
     59    { 0, KEY_DISPLAY         , 0x00000800 }, 
     60    { 0, KEY_UP              , 0x00001000 },  
     61    { 0, KEY_RIGHT           , 0x00006000 }, 
     62    { 0, KEY_SET             , 0x00010000 }, 
     63    { 0, KEY_DOWN            , 0x00020000 }, 
     64    { 0, KEY_MENU            , 0x00040000 }, 
     65    { 0, KEY_VIDEO           , 0x00080000 }, 
     66    { 0, KEY_RIGHT_SOFT      , 0x00002000 }, 
     67    { 0, KEY_UP_SOFT         , 0x00000400 }, 
     68    { 0, KEY_DOWN_SOFT       , 0x00008000 }, 
     69 
     70    { 1, KEY_PRINT           , 0x00200000 }, // playback = alt button 
     71    { 1, KEY_PLAYBACK        , 0x00200000 }, 
     72 
     73    { 2, KEY_LEFT_SOFT       , 0x00000080 }, 
     74    { 2, KEY_LEFT            , 0x00000100 }, 
     75    { 2, KEY_SHOOT_FULL      , 0x00002002 }, 
     76    { 2, KEY_SHOOT_FULL_ONLY , 0x00000002 }, 
     77    { 2, KEY_SHOOT_HALF      , 0x00002000 }, 
     78 
     79    { 0, 0, 0 } 
    8280}; 
    8381 
     82// NOP 
    8483void kbd_set_alt_mode_key_mask(long key) 
    8584{ 
    86         int i; 
    87         for (i=0; keymap[i].hackkey; ++i) { 
    88                 if (keymap[i].hackkey == key) { 
    89                         alt_mode_key_mask = keymap[i].canonkey; 
    90                         return; 
    91                 } 
    92         } 
    9385} 
    9486 
  • branches/release-1_0/platform/sx220hs/notes.txt

    r1230 r1785  
    22SX220 HS Notes 
    33 
    4 To enter CHDK <Alt> mode use the DISP+SET button. 
     4To enter CHDK <Alt> mode use the playback button. 
    55 
    66Support for dual partition is not available. 
  • branches/release-1_0/platform/sx230hs/kbd.c

    r1712 r1785  
    2222static int remote_key, remote_count; 
    2323static int shoot_counter=0; 
    24 static long alt_mode_key_mask = 0x00010800; // disp + set 
    2524static int alt_mode_led=0; 
    2625extern void _GetKbdState(long*); 
     
    7372    { 0, KEY_DOWN_SOFT       , 0x00008000 }, 
    7473    { 0, KEY_SET             , 0x00010000 }, 
    75     { 0, KEY_PRINT           , 0x00010800 },  //DISP+SET for ALT menu 
    7674    { 0, KEY_DOWN            , 0x00020000 }, 
    7775    { 0, KEY_MENU            , 0x00040000 }, 
    7876    { 0, KEY_VIDEO           , 0x00080000 }, 
     77 
     78    { 1, KEY_PRINT           , 0x00200000 }, // playback = alt button 
    7979    { 1, KEY_PLAYBACK        , 0x00200000 }, 
     80 
    8081    { 2, KEY_LEFT_SOFT       , 0x00000080 }, 
    8182    { 2, KEY_LEFT            , 0x00000100 }, 
     
    8384    { 2, KEY_SHOOT_FULL_ONLY , 0x00000002 }, 
    8485    { 2, KEY_SHOOT_HALF      , 0x00002000 }, 
     86 
    8587    { 0, 0, 0 } 
    8688}; 
    8789 
     90// NOP 
    8891void kbd_set_alt_mode_key_mask(long key) 
    8992{ 
    90         int i; 
    91         for (i=0; keymap[i].hackkey; ++i) { 
    92                 if (keymap[i].hackkey == key) { 
    93                         alt_mode_key_mask = keymap[i].canonkey; 
    94                         return; 
    95                 } 
    96         } 
    97 } 
     93} 
     94 
    9895void my_blinkk(void) { 
    9996        int i; 
  • branches/release-1_0/platform/sx230hs/notes.txt

    r1326 r1785  
    22SX230 HS Notes 
    33 
    4 To enter CHDK <Alt> mode use the DISP+SET button. 
     4To enter CHDK <Alt> mode use the playback button. 
    55 
    66Support for dual partition is not available. 
Note: See TracChangeset for help on using the changeset viewer.