Option to use another button to toggle between chdk and camera menu - page 3 - Feature Requests - CHDK Forum supplierdeeply

Option to use another button to toggle between chdk and camera menu

  • 32 Replies
  • 9803 Views
*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Option to use another button to toggle between chdk and camera menu
« Reply #20 on: 03 / June / 2008, 15:21:08 »
Advertisements
ok i fixed the bug i'll tell tomorrow, got ot go
i love you ewavr, did i already mention this? and no, i aint drunk. well, perhaps maybe a bit. :D
Sorry, but I understand nothing...

*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: Option to use another button to toggle between chdk and camera menu
« Reply #21 on: 03 / June / 2008, 16:51:52 »
maybe he's drunk a bit more...
phyrephox falled in love with ewavr :haha  :lol...  the CHDK daily soap continues
« Last Edit: 03 / June / 2008, 17:06:53 by dzsemx »

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Option to use another button to toggle between chdk and camera menu
« Reply #22 on: 03 / June / 2008, 17:17:15 »
ok i fixed the bug i'll tell tomorrow, got ot go

And what the bug was?
CHDK Developer.

*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: Option to use another button to toggle between chdk and camera menu
« Reply #23 on: 04 / June / 2008, 02:28:34 »
wait until i make it work flawless...


*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: Option to use another button to toggle between chdk and camera menu
« Reply #24 on: 04 / June / 2008, 09:37:52 »
ok... so here are the changed sources(no diff file) and a build for only for a650 users for testing
the first bug was not really a bug a650is needs more time to register a keypress so i increased the keypress simulation time and i don't release all buttons like originally only the <alt> one
Code: [Select]
//core/kbd.c
                if (key_pressed==40) {
                    kbd_key_press(conf.alt_mode_button);
                } else if (key_pressed==50) {
                    kbd_key_release(conf.alt_mode_button);
.....................
and this is to enable original funtion when KEY_SHOOT_HALF
Code: [Select]
//core/kbd.c
   if (kbd_is_key_pressed(KEY_SHOOT_HALF)&&  kbd_is_key_pressed(conf.alt_mode_button)) return 0;

if (!key_pressed &&  kbd_is_key_pressed(conf.alt_mode_button)){
.....................

Code: [Select]
//platform/a650/kbd.c
if(!kbd_is_key_pressed(KEY_SHOOT_HALF)) physw_status[alt_mode_key_reg] |= alt_mode_key_mask;
and so on...
now you can set from menu as alt button ISO/PRINT (only for a650is)
the sources are not guaranteed to work with other cameras too (it works on A630)
and thanx for ewavr for help
« Last Edit: 05 / June / 2008, 12:45:17 by dzsemx »

*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: Option to use another button to toggle between chdk and camera menu
« Reply #25 on: 04 / June / 2008, 09:43:55 »
in the next days i'll give a try to make the <alt> on longpress ;)

*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: Option to use another button to toggle between chdk and camera menu
« Reply #26 on: 05 / June / 2008, 02:03:27 »
any feedback?

*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: Option to use another button to toggle between chdk and camera menu
« Reply #27 on: 05 / June / 2008, 02:28:55 »
@adama:
ixus 850 has few buttons...
only on [display] could be the <alt> button moved for ex
[display] is used in some of chdk menus, and it would make conflicts
maybe with some workaround this could be eliminated


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Option to use another button to toggle between chdk and camera menu
« Reply #28 on: 06 / June / 2008, 18:04:50 »
Quote
static long alt_mode_key_mask = 0x00001800;

But why 0x1800?
0x1000 mask has KEY_ISO in register #1  (setting 0x800 in register #1 may cause unpredicted behavoir )
0x800 mask has KEY_PRINT in register #2 (setting 0x1000 in register #2 may cause unpredicted behavoir )

because default register is #2, maybe default alt_mode_key_mask must be 0x800? (default=before config file is loaded)

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Option to use another button to toggle between chdk and camera menu
« Reply #29 on: 07 / June / 2008, 01:37:31 »
Quote
static long alt_mode_key_mask = 0x00001800;

But why 0x1800?

Actually, that does not matter. Because that values will be set to correct ones on config initialization/load while CHDK starts.
CHDK Developer.

 

Related Topics