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

Powershot SX150 IS Porting Thread

  • 279 Replies
  • 123774 Views
Re: Powershot SX150 IS Porting Thread
« Reply #250 on: 02 / February / 2015, 08:14:59 »
Advertisements
MD Update:

AF Assist LED -

With a script. If you are using ptp, you can do something like
Code: [Select]
=set_led(0,1)
=set_led(0,0)
=set_led(1,1)
=set_led(1,0)
This works (on/off):

Code: [Select]
=set_led(2,1)
=set_led(2,0)
I need a new test build to retest - right?



Palette Update:

Post screenshots of the record and playback mode palettes and I'll see if it can be easily fixed (or improved).
This port does not have custom colors implemented so it won't be ideal.
Hope these help?

Record:

Playback:




Re: Powershot SX150 IS Porting Thread
« Reply #251 on: 02 / February / 2015, 11:44:42 »
Dark Frame Update:

Apologies. If i'd known the test was so short i'd have included  the update (along with the other two items) in a single post:

For reference:
If the CHDK option is set to "Auto", the canon firmware should take a dark frame if the shutter speed is set >= 1.3 seconds in the Canon UI. The display will probably show "busy" for roughly the same time as the exposure time.
Pass: Test in M mode at 10s & F3.4, iso=80
Black screen (after 1/2 press) for 10 secs followed by busy for 10 secs (I initially thought this had failed when 2 files did not appear on SD card  ::)).

If the CHDK option is set to "Off", no dark frame should be taken.
Fail: Test in M mode at 10s & F3.4, iso=80
Black screen for 10 secs followed by busy for 10 secs

If the CHDK option is set to "On" the dark frame should be taken with a Canon UI shutter speed < 1.3 seconds.
Pass (I think) ? Test in M mode at 1s & F8.0, iso=100
Black screen for (approx) 2 secs - but busy not shown?

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Powershot SX150 IS Porting Thread
« Reply #252 on: 02 / February / 2015, 16:02:59 »
Hope these help?

Record:

Playback:


Thanks, attached patch should improve colors for 1.4.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14117
Re: Powershot SX150 IS Porting Thread
« Reply #253 on: 02 / February / 2015, 16:16:34 »
Thanks for testing.

Here's a test build with Phils palette patch applied and the AF led updated for the MD test.

The dark frame stuff will need a little more digging before I can have test build. Just to confirm, were the dark frame tests you did using my earlier test build?

Also, which LEDs (if any) did the other two set_led options control?
Don't forget what the H stands for.


Re: Powershot SX150 IS Porting Thread
« Reply #254 on: 03 / February / 2015, 09:36:54 »
Here's a test build with Phils palette patch applied
Thanks Phil - I can see :)

Here's a test build with Phils palette patch applied and the AF led updated for the MD test.
MD_tune.bas results: 100 triggers -> min 40 max 1030 Av 228 (darkish room pointed at a phone 10cm distance)

Just to confirm, were the dark frame tests you did using my earlier test build?
Yes.

Also, which LEDs (if any) did the other two set_led options control?
nothing.

For the record - the cam was connected to chdkptp via a 7 port hub - I had an SD card reader in another port. These:
Code: [Select]
lua set_led(5,1)
lua set_led(5,0)
lua set_led(8,1)
lua set_led(8,0)
turned the led on/off within the SD card reader as though an SD card had been inserted/removed ???

*

Offline reyalp

  • ******
  • 14117
Re: Powershot SX150 IS Porting Thread
« Reply #255 on: 03 / February / 2015, 17:16:42 »
Thanks for testing, I've committed phil's patch.
MD_tune.bas results: 100 triggers -> min 40 max 1030 Av 228 (darkish room pointed at a phone 10cm distance)
For this test, you should point at a blank, non-moving subject like a blank wall, close enough to the camera so the AF led spot shows up clearly. The AF led is used to trigger MD, so any other source of movement will break the test.

The "max" and average are never reset, so if you get a value like 1000 from not detecting the LED, you need to reboot and start again.

You don't need a huge number of triggers, 10-20 should be fine.

A very dark environment might cause problems because the camera may reduce the live view frame rate.  This usually only happens for night shooting, normal indoor lighting should be fine.

Quote
Also, which LEDs (if any) did the other two set_led options control?
nothing.

For the record - the cam was connected to chdkptp via a 7 port hub - I had an SD card reader in another port. These:
Code: [Select]
lua set_led(5,1)
lua set_led(5,0)
lua set_led(8,1)
lua set_led(8,0)
turned the led on/off within the SD card reader as though an SD card had been inserted/removed ???
This must be coincidence, or just related to having USB traffic. There is no chance that sending Lua code to chdk on a camera would turn on/off the lights on your SD card reader.

FWIW, there is no need to try values other than 0,1,2, the code takes the LED number mod 3.

If 0 and 1 actually don't do anything, this is another bug. If you want, you can find the actual numbers using the LEDDrive eventproc. With native called enabled, use the following in chdkptp
Code: [Select]
=return call_event_proc('System.Create')
=return call_event_proc('Driver.Create')
These should both return zero. Then for every LED you want to try
Code: [Select]
=return call_event_proc('LEDDrive',0,0)
=return call_event_proc('LEDDrive',0,1)
The first number is the LED number.  This is NOT the same as the numbers used by CHDK, but will probably range from 0 to 9 or something like that, possibly with multiple values triggering the same LED.

The second value turns the LED on or off. 0 turns the LED on, 1 turns it off.

The function will probably return nonzero if the LED number is not valid.

Looking at the SX150 the activity LED on the back and the AF LED are probably the only ones.
Don't forget what the H stands for.

Re: Powershot SX150 IS Porting Thread
« Reply #256 on: 04 / February / 2015, 07:13:44 »
You don't need a huge number of triggers, 10-20 should be fine.

A very dark environment might cause problems because the camera may reduce the live view frame rate.  This usually only happens for night shooting, normal indoor lighting should be fine.

Understood.
retest -> 20 triggers min 40 max 70 Av 62 (normal lighting - pointed at a white paint wall)

If 0 and 1 actually don't do anything, this is another bug. If you want, you can find the actual numbers using the LEDDrive eventproc. With native called enabled, use the following in chdkptp
Code: [Select]
=return call_event_proc('System.Create')
=return call_event_proc('Driver.Create')
These should both return zero. Then for every LED you want to try
Code: [Select]
=return call_event_proc('LEDDrive',0,0)
=return call_event_proc('LEDDrive',0,1)
The first number is the LED number.  This is NOT the same as the numbers used by CHDK, but will probably range from 0 to 9 or something like that, possibly with multiple values triggering the same LED.

The second value turns the LED on or off. 0 turns the LED on, 1 turns it off.

The function will probably return nonzero if the LED number is not valid.

Looking at the SX150 the activity LED on the back and the AF LED are probably the only ones.

Correct - 2 led's only. Test results, both led's off to begin:
Code: [Select]
> =return call_event_proc('System.Create')
3:return:0
> =return call_event_proc('Driver.Create')
4:return:0
---
> =return call_event_proc('LEDDrive',7,1) ---> does nothing
14:return:0
> =return call_event_proc('LEDDrive',7,0) ---> turns back led ON !
15:return:0
> =return call_event_proc('LEDDrive',7,1) ---> turns back led OFF !
16:return:0
---
> =return call_event_proc('LEDDrive',9,1) ---> does nothing
19:return:0
> =return call_event_proc('LEDDrive',9,0) ---> turns AF assist ON !
20:return:0
> =return call_event_proc('LEDDrive',9,1) ---> turns AF assist OFF !
21:return:0
:blink:

Thanks.

*

Offline reyalp

  • ******
  • 14117
Re: Powershot SX150 IS Porting Thread
« Reply #257 on: 07 / February / 2015, 18:37:18 »
retest -> 20 triggers min 40 max 70 Av 62 (normal lighting - pointed at a white paint wall)
Thanks for testing.  This looks like typical values for cameras of this era, so I've checked it in.

Quote
> =return call_event_proc('LEDDrive',7,0) ---> turns back led ON !
15:return:0
> =return call_event_proc('LEDDrive',7,1) ---> turns back led OFF !
16:return:0
 :blink:

Yes, as I said "The second value turns the LED on or off. 0 turns the LED on, 1 turns it off." ;)

I've updated the set_led function so no set_led(0) is the green status LED, and set_led(1) is the AF led.

If you can check one more thing:
In platform/sx150is/lib.c, remove the #if defined(CAM_CHDK_PTP_LIVE_VIEW) and the #endif at the bottom of the file (leaving the code in between). Then check the if the Canon and CHDK OSD looks reasonably correct in chdkptp live view with UI overlay enabled.

Thanks again :)
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 14117
Re: Powershot SX150 IS Porting Thread
« Reply #258 on: 07 / February / 2015, 21:08:38 »
Here's a test build with the PTP related change mentioned above, plus ARAM enabled and the amount of exmem taken from the canon firmware reduced.

If you can post the output of
=return get_meminfo(),get_meminfo('system'),get_meminfo('aram'),get_meminfo('exmem')

and verify that it runs and is able to shoot correctly, that would be appreciated.
« Last Edit: 07 / February / 2015, 21:13:12 by reyalp »
Don't forget what the H stands for.

Re: Powershot SX150 IS Porting Thread
« Reply #259 on: 08 / February / 2015, 16:57:34 »
Yes, as I said "The second value turns the LED on or off. 0 turns the LED on, 1 turns it off." ;)
oops - a form of dyslexia perhaps  ::)

I've updated the set_led function so no set_led(0) is the green status LED, and set_led(1) is the AF led.
Confirmed:
Code: [Select]
> =set_led(0,1) -> status led ON
> =set_led(0,0) -> status led OFF
> =set_led(1,1) ->AF assist led ON
> =set_led(1,0) ->AF assist led OFF

check the if the Canon and CHDK OSD looks reasonably correct in chdkptp live view with UI overlay enabled.
osd attached.

If you can post the output of
=return get_meminfo(),get_meminfo('system'),get_meminfo('aram'),get_meminfo('exmem')
Result:
Code: [Select]
> =return get_meminfo(),get_meminfo('system'),get_meminfo('aram'),get_meminfo('exmem')
10:return:table:{chdk_start=63589344,free_size=719952,chdk_size=135120,allocated_size=1347480,free_block_count=9,name="combined",allocated_count=1805,chdk_malloc=true,free_block_max_size=373752,allocated_peak=1412760,total_size=2067576,}
10:return:table:{start_address=1531112,chdk_start=63589344,free_size=373752,chdk_size=135120,allocated_size=1165392,free_block_count=1,allocated_count=860,name="system",end_address=3070256,chdk_malloc=true,free_block_max_size=373752,allocated_peak=1191312,total_size=1539144,}
10:return:table:{start_address=3530752,chdk_start=63589344,free_size=24,chdk_size=135120,allocated_size=139192,free_block_count=1,allocated_count=349,name="aram",end_address=3670016,chdk_malloc=true,free_block_max_size=24,allocated_peak=139200,total_size=139264,}
10:return:table:{start_address=63724464,chdk_start=63589344,free_size=344520,chdk_size=135120,allocated_size=44568,free_block_count=5,allocated_count=616,name="exmem",end_address=64113632,chdk_malloc=true,free_block_max_size=344456,allocated_peak=82248,total_size=389168,}

and verify that it runs and is able to shoot correctly
seems to shoot just fine  :)
« Last Edit: 08 / February / 2015, 16:59:54 by andrew.stephens.754365 »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal