Adding new cameras, applying patches into trunk (with source code prepared) - page 131 - General Discussion and Assistance - CHDK Forum

Adding new cameras, applying patches into trunk (with source code prepared)

  • 1685 Replies
  • 848170 Views
*

Offline c10ud

  • ***
  • 245
Advertisements
Also removed KEY_PRINT entry since I see a number of ports deprecated it.
KEY_PRINT alias has been removed from some ports, it was discussed here, but KEY_PLAYBACK is the "standard" button used for ALT mode in several models:
Code: [Select]
#define CAM_ALT_BUTTON_NAMES                { "Playback", "Video", "Display" }
#define CAM_ALT_BUTTON_OPTIONS              { KEY_PLAYBACK, KEY_VIDEO, KEY_DISPLAY }
whoops sorry, I always think playback=disp (and I know it's wrong!)
If you want you can add the right key to the define, otherwise I'll post an updated patch in the next days (the important part was the key_power one though)

A patch for 1.3.0 to reset the behavior of the set_mf and set_focus uBASIC commands for backwards compatibility.  Currently they try to return a status value which needs to be used somehow.  This patch reverts them to no longer returning status.  See :  http://chdk.setepontos.com/index.php?topic=11373.msg111673#msg111673

The Lua equivalent functions are not affected by this patch and will continue to return status.
 
There may very well be a better way to do this.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
A patch for 1.3.0 to reset the behavior of the set_mf and set_focus uBASIC commands for backwards compatibility.  Currently they try to return a status value which needs to be used somehow.  This patch reverts them to no longer returning status.  See :  http://chdk.setepontos.com/index.php?topic=11373.msg111673#msg111673

The Lua equivalent functions are not affected by this patch and will continue to return status.
 
There may very well be a better way to do this.
Added, trunk changeset 3403

Further comments in the MF thread.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14126
This patch adjusts S110's kbd so it doesn't interfere with shooting (ptp) when keeping the KEY_POWER phisically pressed.
Also removed KEY_PRINT entry since I see a number of ports deprecated it.
Added (adjusted per later comments) in trunk changeset 3404 release 3405

For the power problem, is removing KEY_POWER from the key map necessary? I may have misunderstood the problem, but I would expect that just removing it from the mask would be enough.

The reason I ask is that quite a few ports have KEY_POWER in the key map. We should be consistent about how this is handled.

I would say this key should NOT ever be in the key mask. Pressing the power button should shut down whether you are in alt mode or not. I don't think it needs to be in the keymap either, since there are other ways to shut down, but if there is a reason to have it, that's OK with me.

edit:
Discussion split to http://chdk.setepontos.com/index.php?topic=11384
« Last Edit: 30 / March / 2014, 15:05:35 by reyalp »
Don't forget what the H stands for.

I'd like to get the USB remote high precision timer code into the 1.3.0 trunk before its gets too far out of sync.   Some discussion is here :
and probably a few other places.

This patch adds all the functionality listed in the thread quoted above but does not enable actual operation for any camera (at least not yet).  Note that while the option is not enabled for any camera in the build,  almost all the code is included anyway (it's not a lot) to avoid adding camera specific stuff to core code.  Unless #define CAM_REMOTE_USB_HIGHSPEED 1 is enabled in platform_camera.h for a custom build, using the new enable_highspeed_usb() function simply results in nothing happening.  I know that's probably not desirable long term but I'd like to think the long term intention is to enable the option by default.

This does not address concerns about overloading the camera using the function, or trying to read the USB remote 5V status directly without going through kbd_read_keys_r2().  But it does capture something workable in the trunk - much like the precision sync code - for advanced users to experiment with.

Getting this in now will allow me to also test and submit a generic patch for "3rd battery terminal" triggering without stepping in my own changes.  The 3rd battery terminal trigger, in addition to freeing up the USB port for ptp,  let's you build remote switches that do not require a battery or other source of power.
« Last Edit: 04 / April / 2014, 18:35:05 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

This does not address concerns about overloading the camera using the function,
Updated patch file that adds a #define to camera.h for specifying the shortest interval to which a script can set the HP timer.   Defaults to 1000 uSec, which is a big speed-up from the standard USB remote timing and slower than the 500 uSec rate that my cameras all seemed to manage just fine with.
« Last Edit: 05 / April / 2014, 11:11:28 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
This does not address concerns about overloading the camera using the function,
Updated patch file that adds a #define to camera.h for specifying the shortest interval to which a script can set the HP timer.   Defaults to 1000 uSec, which is a big speed-up from the standard USB remote timing and slower than the 500 uSec rate that my cameras all seemed to manage just fine with.
Added in trunk changeset 3408

Note I think srsa_4c's concerns about calling kbd stuff inside the timer callback are probably valid, but I don't think it's any worse than a lot of other stuff CHDK does. The only way to know if it's really a problem is for people to try to use it. If there is an MMIO that can be polled directly to get USB power state, that would probably be better.
Don't forget what the H stands for.

My last patch broke the build.  Made "just one little change too many" between r15 and r16.  And didn't rebuild everything to test it.

I hate it when that happens.


Fix attached.

Sorry.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Don't forget what the H stands for.

Small patch to fix timing error in USB remote HP timer mode.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal