SX60HS Porting - page 79 - DryOS Development - CHDK Forum

SX60HS Porting

  • 915 Replies
  • 204663 Views
*

Offline srsa_4c

  • ******
  • 3921
Re: SX60HS Porting
« Reply #780 on: 17 / June / 2017, 13:18:47 »
Advertisements
@62ndidiot

You could try redefining CAM_DEFAULT_ALT_BUTTON in platform_camera.h . (The original is in include/camera.h)

*

Offline reyalp

  • ******
  • 11924
Re: SX60HS Porting
« Reply #781 on: 17 / June / 2017, 13:43:44 »
@62ndidiot

You could try redefining CAM_DEFAULT_ALT_BUTTON in platform_camera.h . (The original is in include/camera.h)
This should not be necessary if CAM_ADJUSTABLE_ALT_BUTTON is present.

@62ndidiot
If you use click('playback') and click('print') in CHDK script, do they produce the expected Canon firmware actions for those keys?
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #782 on: 17 / June / 2017, 17:17:50 »
Quote
You could try redefining CAM_DEFAULT_ALT_BUTTON in platform_camera.h . (The original is in include/camera.h)
Tried it....no luck.
Reduced the choices for ALT to just three, and eliminating the Shortcut key (KEY_PRINT), now things work as expected. I already tried reducing choices, but including the Key print and that didn't work....so eliminating that choice is what fixes it.

Code: [Select]
    #define CAM_ADJUSTABLE_ALT_BUTTON           1
    #define CAM_ALT_BUTTON_NAMES                {  "Playback", "Video", "WiFi"}
    #define CAM_ALT_BUTTON_OPTIONS              {  KEY_PLAYBACK,   KEY_VIDEO, KEY_WIFI }
  I wonder if this occurs in other ports  which define KEY_PRINT as the ALT key along with other keys. It could easily be missed since you won't see the problem unless you remove CCHDK4.CFG prior to booting the camera. Not even sure if you could remove it using the CHDK filemanager and reboot.
Is this testable on another platform like say G7X?

*

Offline reyalp

  • ******
  • 11924
Re: SX60HS Porting
« Reply #783 on: 17 / June / 2017, 18:19:40 »
  I wonder if this occurs in other ports  which define KEY_PRINT as the ALT key along with other keys. It could easily be missed since you won't see the problem unless you remove CCHDK4.CFG prior to booting the camera. Not even sure if you could remove it using the CHDK filemanager and reboot.
Is this testable on another platform like say G7X?
OK, this makes sense, it's a bug in CHDK.

The default is indeed KEY_PRINT:

Code: [Select]
    CONF_INFO(220, conf.alt_mode_button,                        CONF_DEF_VALUE, i:KEY_PRINT),
clear_values
Code: [Select]
    gui_alt_mode_button_enum(0,0); // will reset if not in list of valid alt buttons
If the camera has KEY_PRINT as a valid option, it will be left alone, otherwise it will be reset to the first.

I'll look into fixing this, but it needs some thought to ensure that people who load an older build don't end up with no alt key defined.

FWIW, once upon a time shortcut was the default button for cameras that had it, this is still mentioned in the manual (http://chdk.wikia.com/wiki/CHDK_User_Manual#.3CALT.3E_Mode) so we could just declare it the default for SX60. Or just remove the shortcut option for now.

edit:
The original logic sort of makes sense, since our normal practice was to make KEY_PRINT the default alt button if available. However, this is less clear when KEY_PRINT is not actually the direct print button.
« Last Edit: 17 / June / 2017, 18:21:19 by reyalp »
Don't forget what the H stands for.


Re: SX60HS Porting
« Reply #784 on: 17 / June / 2017, 18:29:39 »
FWIW, once upon a time shortcut was the default button for cameras that had it, this is still mentioned in the manual (http://chdk.wikia.com/wiki/CHDK_User_Manual#.3CALT.3E_Mode) so we could just declare it the default for SX60.
As PRINT (later transitioned to Shortcut) was a fairly standard button on many (most?) of the older Powershots,  and on the G series and SX series to this day,  I'm not in favor of "fixing" this.

The decision to standardize on the Playback button (using the short & long press mechanism) made several years ago was sub-optimal for many cameras but was supported in interest of standardizing on a button every camera has. Long vs short press is a hack that confuses people.  It's only necessary on cameras with a minimal number of buttons and nothing convenient to use as the ALT key.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 11924
Re: SX60HS Porting
« Reply #785 on: 17 / June / 2017, 18:46:49 »
As PRINT (later transitioned to Shortcut) was a fairly standard button on many (most?) of the older Powershots,  and on the G series and SX series to this day,  I'm not in favor of "fixing" this.
I'm totally fine with shortcut being the default for cameras that have it.

IMO, the standardization on playback was only really meant for cameras that didn't have a good alternative.

FWIW, I chose to keep playback on the g7x because the the "ring func" button is heavily used in the canon UI, and the wifi connect button is awkward to reach.
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #786 on: 17 / June / 2017, 18:51:09 »
Thanks, tomorrow I upload a CFG file to the SD card.

*

Offline reyalp

  • ******
  • 11924
Re: SX60HS Porting
« Reply #787 on: 17 / June / 2017, 18:53:07 »
Thanks, tomorrow I upload a CFG file to the SD card.
For now, you should be able to enter alt mode using the shortcut button, and then change it if you like.
Don't forget what the H stands for.


Re: SX60HS Porting
« Reply #788 on: 17 / June / 2017, 19:02:32 »
I think for now I'll just eliminate the shortcut key from the choices, reducing them to three.  In the future if the bug is fixed, I'll restore the choice. Anyone who really wants the shortcut key can ask me for a special version. 

Re: SX60HS Porting
« Reply #789 on: 17 / June / 2017, 19:07:29 »
I think for now I'll just eliminate the shortcut key from the choices, reducing them to three.  In the future if the bug is fixed, I'll restore the choice. Anyone who really wants the shortcut key can ask me for a special version.
As I posted earlier - shortcut (aka PRINT) is the default for many cameras. If you just leave it that way and make it the first choice in the platform_camera.h definitions, what's wrong with that?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics