A430 porting started - histogram working - page 10 - General Discussion and Assistance - CHDK Forum

A430 porting started - histogram working

  • 115 Replies
  • 36533 Views
*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working
« Reply #90 on: 17 / February / 2011, 15:31:38 »
Advertisements
My A430 broke so I no longer can participate to the porting, sorry!

Re: A430 porting started - histogram working
« Reply #91 on: 07 / March / 2011, 18:16:07 »
Hey guys, hoping you could help me! Downloaded the firmware and have got it working but I am trying to set up a time lapse script to take a photo every 10 seconds for around 3 hours or so.

I've put the lua file (via http://chdk.wikia.com/wiki/UBASIC/Scripts:Time_Lapse_Photography) in the script folder on the SD card but can't get it to work. When I set it up and press the shutter, the text in the bottom left says:

"***Autostart***
:1: '=' expected near 'Time'
PRESS SHUTTER TO CLOSE"

Is this code that is not working or am I doing something wrong.

Any help is greatly appreciated, thanks!

Re: A430 porting started - histogram working
« Reply #92 on: 13 / March / 2011, 14:07:58 »
Ok, got it to work...

Re: A430 porting started - histogram working
« Reply #93 on: 20 / May / 2011, 20:54:24 »
Hi, can any help where can I download the diskboot v.3 a430 because link [1] http://github.com/shentok/chdk-a430/tree/master cannot use after I use show card locked and is the remote can use by this model? tq.


*

Offline srsa_4c

  • ******
  • 3979
Re: A430 porting started - histogram working
« Reply #94 on: 04 / January / 2012, 11:50:33 »
Attached is a patch for the stable branch of CHDK and a full binary release from the patched source (lua native calls disabled).
The changes are the following:
- histogram, zebra display now correct for play mode
- raw numbering fixed
- optical data copied from A460 (same 4x zoom optics), updated
- modemap corrected
- some corrections in capt_seq.c
- most of kbd.c thrown out, the generic one is used
- usb sensing identified, working (for usb remote)
- useless log disabled
- screen redraw fix enabled
- additional small fixes

@Gerhard:
To get a local copy of the CHDK stable branch, use this:
svn co https://tools.assembla.com/svn/chdk/branches/release-1_0
You can apply the changes by copying the attached .diff file to the root directory of the source and executing
patch -p0 <a430_patch_for_rel1_0_120104.diff

The patch can't be applied cleanly to the CHDK-DE sources.
Tried to run fnctest.lua (the one from the -DE forum), but it failed after a while on this build.

If you have some time, please confirm that the changes above actually work.


Some warning to the users:
- Do NOT assign the AF-scan function to the shutter in the video menu! AF-scan crashes the camera in 640x480 mode.
- Enabling both "video quality control" and "enable optical zoom" in the "video parameters" submenu is not recommended: pressing the up/down buttons would zoom AND change compression quality at the same time
« Last Edit: 04 / January / 2012, 20:33:50 by srsa_4c »

Re: A430 porting started - histogram working
« Reply #95 on: 04 / January / 2012, 18:48:24 »
Hello srsa_4c!

spent some time on testing; here are the results:

a) I was able to install the attached files without any problems; camera is working fine! 

b) histogram, zebra display now correct for play mode
  • there are some pictures on the sd card (pls. find the files @: http://ubuntuone.com/5CQMOdhLftTLxBxlA4cLKX )
  • I put the camera in play mode
  • pressed the shoot button half
  • histo + zebra are blinking and in the top right corner there is a second counter
  • pressed the right button to get the next pic.
Result:
  • histo + zebra where shown on the pic: 241, 243, 245, 246, 250, 255, 266, 257
  • histo + zebra where NOT shown on the pic: 242, 244,247,248, 249, 251, 252, 253, 254


c) raw numbering fixed
  • RAW was not enabled up to pic.# 246
  • first raw pic. should be:... 247 ==> wrong name!
  • from 248 on everything is o.k.

kind regards
Gerhard

ps: still have some strange behaviour with the fnctest.lua from the -DE forum! e.g: running the last test (=motion detection) direct on the camera will show some green squares on the display. Running the script from chdkptp doesn't show the green squares. ?!?
A430
chdk-de: a430-100b-1.1.0-full_BETA_rev_911 + Patch
chdk-internat: a430-100b-1.0.0-full rev. 1527-120104

*

Offline srsa_4c

  • ******
  • 3979
Re: A430 porting started - histogram working
« Reply #96 on: 04 / January / 2012, 20:20:59 »
spent some time on testing; here are the results:

a) I was able to install the attached files without any problems; camera is working fine! 
Which means the buttons work correctly
Quote
b) histogram, zebra display now correct for play mode
Saw your pictures, the ones you mentioned in the first row do have clipped highlights, the others not.
A wrong buffer address would result in
- either a mess on the screen which has nothing to do with the picture displayed
- or the zebra/histogram would display according to the previously viewed picture
Fortunately in our case, it always seems to be correct.
Quote
c) raw numbering fixed
  • RAW was not enabled up to pic.# 246
  • first raw pic. should be:... 247 ==> wrong name!
  • from 248 on everything is o.k.
Yes, I know, it's not perfect, don't know, why. The parameter is correct, the file number is computed the same way as in all other models from the same era.

Quote
ps: still have some strange behaviour with the fnctest.lua from the -DE forum! e.g: running the last test (=motion detection) direct on the camera will show some green squares on the display. Running the script from chdkptp doesn't show the green squares. ?!?

I couldn't run that script on the build I posted here (it stopped with a missing function or something).

I plan to submit this patch soon. If it's accepted, it will probably get into CHDK-DE too.

Thanks for testing!


Created a patch for CHDK-DE, see attachment.

Also did some testing with the patched (and unpatched) -DE build and fnctest.lua .
It reliably fails when its execution was initiated from the PC, the first time.
This part:
Code: [Select]
function mode_test()
    rec, vid, mode=get_mode()
    if rec == false then
        set_record(1)
        sleep(3000)
        set_record(0)
    end
end
causes the cam to switch to record mode. When started via ptp, the camera immediately starts to zoom in(!) after the modeswitch, and the script locks up in
Code: [Select]
function call_focus_test().
It seems like when started second time from PC (after halting the previous script), it works. It also works when started manually on cam.
(The script can be found here: http://forum.chdk-treff.de/viewtopic.php?f=7&t=2169 )

The green rectangles of MD don't appear (perhaps they're getting erased) when started from PC, but the detection works.

update2:
http://chdk.setepontos.com/index.php?topic=265.msg79397#msg79397
« Last Edit: 05 / January / 2012, 12:43:39 by srsa_4c »

Re: A430 porting started - histogram working
« Reply #97 on: 06 / January / 2012, 16:46:33 »
 :D WELL DONE srsa_4c !!!

fncTest.lua is running now without any problems; whatever you did with the patch (sorry - can't follow you with my level) improved the stability of chdk in my camera!

ad histogram & zebra:
Quote
Saw your pictures, the ones you mentioned in the first row do have clipped highlights, the others not.

..... Fortunately in our case, it always seems to be correct.
For the zebra I agree on you explanation - but shouldn't be a histogram on every picture, regardless if there is a clipped highlight or not?
Pls. consider this just as a comment rather than a claim.

Is there any other testing required - I would be happy to support you.

/Gerhard
A430
chdk-de: a430-100b-1.1.0-full_BETA_rev_911 + Patch
chdk-internat: a430-100b-1.0.0-full rev. 1527-120104


*

Offline srsa_4c

  • ******
  • 3979
Re: A430 porting started - histogram working
« Reply #98 on: 06 / January / 2012, 18:14:29 »
Hi, Gerhard.

fncTest.lua is running now without any problems; whatever you did with the patch
My patch in my previous post here doesn't contain the fix for that initialization problem (which turned out to be not A430 specific).
It currently has to be manually corrected in platform/generic/kbd.c, as written in my bugreport-post http://chdk.setepontos.com/index.php?topic=265.msg79397#msg79397
You may have already done that (which would explain why the script behaves correctly now).

As waterwingz explained in the followup post, that problem will soon be corrected "officially".

Quote
ad histogram & zebra:
For the zebra I agree on you explanation - but shouldn't be a histogram on every picture, regardless if there is a clipped highlight or not?
I hope there's no misunderstanding here. For me, the histogram behaves as it should (if I set it to be always visible, then it is always visible, if it's set to only appear on shoot (half-shoot to be precise) then it does that). This is not camera-dependent. Zebra, however, only appears on half-shoot, and only shows the clipped parts of the picture. If there's no clipping, no zebra is shown.

Before my patch, in play mode, zebra and histogram display was incorrect (just try the official CHDK-DE release, you'll see).
Quote
Is there any other testing required - I would be happy to support you.
Well, you could compare the "official" and the patched version (as a confirmation):
- histogram, zebra: as written above
- raw numbering fixed: without the fix it is always one less than the jpeg
- modemap corrected: setmode.lua crashes the camera without the fix
- usb remote: with enabled usb remote option, it should now react to a plugged in usb-cable
- some corrections in capt_seq.c: the only visible change is that without the fix, Tv override has no effect when the lcd display is turned off

Thanks for taking the time to do this!



update:

set_record() should be avoided when using ptp: http://chdk.wikia.com/wiki/Lua/PTP_Scripting

But in case of VxWorks, set_record() is the same as switch_mode_usb().
« Last Edit: 06 / January / 2012, 23:35:35 by srsa_4c »

Re: A430 porting started - histogram working
« Reply #99 on: 12 / January / 2012, 10:37:24 »
hope someone can help me out. i have tried installing CHDK onto my A430 but it refuses to work.
I've formatted a 1GB card on FAT16, made it bootable with the Linux command and copied the files needed to the root of my card.
I locked the card, stuck it into my camera and turned it on. But.... i just got the normal canon firmware and not the CHDK firmware :(
also, my camera doesn't have the "firmware update" option in the menu so i can't load it manually.
Has anyone ever heard of this, and if yes, how could it be fixed?

I want to shoot timelapse with this on my camera, because of the resolution and so on!

Hope someone can help me!

 

Related Topics