Powershot SX150 IS Porting Thread - page 24 - General Discussion and Assistance - CHDK Forum

Powershot SX150 IS Porting Thread

  • 279 Replies
  • 62342 Views
Re: Powershot SX150 IS Porting Thread
« Reply #230 on: 08 / January / 2015, 05:48:42 »
Advertisements
For the set_zoom crash, try adding
Code: [Select]
#define CAM_NEED_SET_ZOOM_DELAY             300to platform_camera.h
The delay is in milliseconds, some cameras may need more than 300.

That fixed it - thanks.

I haven't read detail of how the "add to the standard svn build" process works but i've attached the edited platform_camera.h  - if I can be of any assistance please let me know.

Of some interest - using chdkptp, I noticed the following:

> lua post_levent_to_ui('PressTeleButton') -> "12x" appears on LCD (i.e max zoom)
> lua post_levent_to_ui('UnpressTeleButton')
> =return get_zoom()
30:return:127
> =set_zoom(0)
> =return get_zoom()
32:return:0 -> "12x" still appears on lcd, which I don't fully understand.
>  lua post_levent_to_ui('PressWideButton') -> "12x" disappears from lcd
>  lua post_levent_to_ui('UnpressWideButton')
> =return get_zoom()
35:return:0

Maybe insignificant (haven't checked if EXIF updated correctly) but if anyone can comment on why "12x" remains on lcd after set_zoom(0) above whereas the levent clears it, it'd be appreciated...levent direct to canon firmware explain it?
« Last Edit: 08 / January / 2015, 06:30:31 by andrew.stephens.754365 »

*

Offline srsa_4c

  • ******
  • 4001
Re: Powershot SX150 IS Porting Thread
« Reply #231 on: 08 / January / 2015, 10:57:57 »
anyone can comment on why "12x" remains on lcd after set_zoom(0) above whereas the levent clears it
It's simple: CHDK is a hack. set_zoom() is implemented by using firmware functions which are not necessarily used in normal camera operation. In this case, some parts of the camera GUI are not notified about the zoom change. The logical event however does notify the GUI.

edit:
set_zoom fix committed: trunk and 1.3
« Last Edit: 08 / January / 2015, 12:17:43 by srsa_4c »

SX150IS keyboard error ?
« Reply #232 on: 18 / January / 2015, 12:55:07 »
In M Mode / record - on my SX150IS (100a / 1.3.0 / 3721 ) the following Basic script:

Code: [Select]
@title test
sleep 1000
:loop
press "erase"
sleep 1000
release "erase"
sleep 1000
goto "loop"
end

does not work as expected -> shutter period adjustment remains continuously selected.

Can anyone confirm this ?
« Last Edit: 18 / January / 2015, 13:10:42 by andrew.stephens.754365 »

*

Offline reyalp

  • ******
  • 12106
Re: SX150IS keyboard error ?
« Reply #233 on: 18 / January / 2015, 14:34:08 »
In M Mode / record - on my SX150IS (100a / 1.3.0 / 3721 ) the following Basic script:
...

does not work as expected -> shutter period adjustment remains continuously selected.

Can anyone confirm this ?
It looks like the key mask for this port is not set correctly for the keys that are defined.

If you can make your own build of CHDK, changing line 31 in in platform/sx150is/kbd.c to
#define KEYS_MASK2 (0x0000FF50)

If you aren't set up to build, let me know and I'll upload one.
Don't forget what the H stands for.


Re: Powershot SX150 IS Porting Thread
« Reply #234 on: 18 / January / 2015, 14:36:26 »
will attempt myself and report back.

Thanks.

Re: SX150IS keyboard error ?
« Reply #235 on: 19 / January / 2015, 17:37:10 »
In M Mode / record - on my SX150IS (100a / 1.3.0 / 3721 ) the following Basic script:
...

does not work as expected -> shutter period adjustment remains continuously selected.

Can anyone confirm this ?
It looks like the key mask for this port is not set correctly for the keys that are defined.

If you can make your own build of CHDK, changing line 31 in in platform/sx150is/kbd.c to
#define KEYS_MASK2 (0x0000FF50)

If you aren't set up to build, let me know and I'll upload one.

I made the change you suggested in line line 25 of sx150is-100a-1.3.0-r3756 (because I already had the concurrent usb/ptp hack in it - both those changes are in the attachment).

It works fine - I tested using chdkptp, the camera in M mode / record.

Using presses:

Code: [Select]
> luar press "erase" -> selection changes to aperture adjustment from shutter period
> luar release "erase"
> luar press "erase"-> selection changes to shutter period adjustment from aperture
> luar release "erase" -> ready for levent test

Using levent, with the same result:

Code: [Select]
> luar post_levent_to_ui('PressAvExpButton')
> luar post_levent_to_ui('UnpressAvExpButton')
> luar post_levent_to_ui('PressAvExpButton')
> luar post_levent_to_ui('UnpressAvExpButton') -> ready for next change

Thanks again.

*

Offline reyalp

  • ******
  • 12106
Re: Powershot SX150 IS Porting Thread
« Reply #236 on: 19 / January / 2015, 21:15:07 »
Thanks for verifying, I've added key mask fix in the trunk and stable branches.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 12106
Re: Powershot SX150 IS Porting Thread
« Reply #237 on: 29 / January / 2015, 22:58:25 »
Regarding the remote hook not working: I noticed the function where the remote hook is added can be called from two different places, but only one is hooked.

Try changing line 384 of capt_seq.c from
Code: [Select]
" BNE sub_FFAE3934 \n"
to
Code: [Select]
" BNE sub_FFAE3934_my \n"

It would be good to know if the dark frame subtraction control works on this camera, since the hook for that is in the same location as the remote hook. It also has some non-standard code that seems to have been copied from the sx130 port.
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 12106
Re: Powershot SX150 IS Porting Thread
« Reply #238 on: 30 / January / 2015, 00:26:26 »
Another outstanding problem with this port is that fast MD is not implemented: http://chdk.setepontos.com/index.php?topic=10864.msg115089#msg115089

I've attached a test build with the MD update, the remote hook change described in the previous post, and capt_seq converted to code gen.
Don't forget what the H stands for.

Re: Powershot SX150 IS Porting Thread
« Reply #239 on: 30 / January / 2015, 18:29:38 »
re #237/8:

will do asap and report back. Thanks.

 

Related Topics