A490 Porting - page 9 - DryOS Development - CHDK Forum

A490 Porting

  • 224 Replies
  • 94328 Views
Re: A490 Porting
« Reply #80 on: 27 / October / 2011, 12:49:01 »
Advertisements
several of us have done our share on the "act" front so its not all bad.

I am referring to the relatively few users with some programming knowledge who have commented in the past, not the main developers.

« Last Edit: 27 / October / 2011, 13:27:42 by Microfunguy »

*

Offline reyalp

  • ******
  • 14128
Re: A490 Porting
« Reply #81 on: 29 / October / 2011, 03:20:50 »
End users are blissfully unaware of the lack of elegance in the code and could not care less, they just want to take photos.
They are unaware, but they still suffer from it: When the feature they want, which should take 5 minutes to implement ends up taking days. Or is not implemented because no one wants to upset the teetering pile of **** that happens to be in that area of the code. Or mysteriously doesn't work because their camera is different in some way that involves undocumented magic...
I'm discovering fun things like hard coded timing loops (for the sync delay function) that will change in duration if the ARM processor has a different clock speed from one camera model to another.
In fact, Digic 4 are notably faster than Digic II for general purpose processing http://chdk.setepontos.com/index.php?topic=6729.msg71456#msg71456 (digic III ? no idea!)

/rant  :haha
Don't forget what the H stands for.

Re: A490 Porting
« Reply #82 on: 31 / October / 2011, 22:47:48 »
Hi all, I come to help, I installed the CHDK for the 100f in my A490. so while I read the developer documentation I want to ask if it is normal to see ugly colors on the osd (because it is still in beta), for example in the logo  i do not see red anywhere, only shades of gray and some oranges.

Does everyone have the same problem or it's just me?

(i natively speak Spanish, so forgive me if some sentences do not make sense, just blame google translator.)

Re: A490 Porting
« Reply #83 on: 31 / October / 2011, 22:58:29 »
Hi all, I come to help, I installed the CHDK for the 100f in my A490. so while I read the developer documentation I want to ask if it is normal to see ugly colors on the osd (because it is still in beta), for example in the logo  i do not see red anywhere, only shades of gray and some oranges.
The colors displayed in CHDK are specified by the parameter CAM_BITMAP_PALETTE in the file platform_camera.h for each camera.   That points to a color palette file in the file gui_draw.h.   In the case of the A490,  palette 8 is selected.

In some cases,  the developer for a particular camera has many things to adjust and get correct and sometime the color scheme is not a big issue for them compared to other problems. So if the logo and menus display at all,  they are not particular about the exact color.

If you can setup a build environment,  you could quickly try the other color palettes.  If that does not work,  you can add your own.  Check back here if you need help with that.

Also,  CHDK is a international project.  We are all used to working with people who speak different languages and adjust to make it work.






« Last Edit: 31 / October / 2011, 23:00:26 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A490 Porting
« Reply #84 on: 03 / November / 2011, 22:07:17 »

The colors displayed in CHDK are specified by the parameter CAM_BITMAP_PALETTE in the file platform_camera.h for each camera.   That points to a color palette file in the file gui_draw.h.   In the case of the A490,  palette 8 is selected.

I test 9,10,11,12 and i think 13 also, the best for now is 13 or 12 (because i lost the card and i cannot confirm what number was, it was a MinisSD.) I need to find another card, but for now the last i test (¿13?) is not the optional but it is more easy to the eye. the red is no red yet but it is a orange-red.

I will stick around while i find another SD.


*

Offline tpont

  • **
  • 81
Re: A490 Porting
« Reply #85 on: 05 / December / 2011, 19:49:31 »
I have the script running (thanks!) but I still get the long lag before the shot fires.
Update :  I've traced source of the long lag before the shot fires when using a USB remote script.   Or at least I've figured it out on my two cameras. 

In the Remote parameters menu,  you need to have Enable Remote at the top of the menu selected but syncable remote : Enable Syncable Remote down below that not selected.   Once I setup things that way,  the script referenced above works properly with no delay when the USB power is applied and removed.

I finally got around to troubleshoot this more and you're absolutely right - with that setting the lag is gone. Great!

Another question: This page http://chdk.wikia.com/wiki/PTP_Extension says PTP Extension has been enabled "for all cameras". Does that mean that A490 should also work with the PTP Extension? Because I'm having trouble getting it to work.

I have done these steps:
- follow "LibUSB driver for windows" instructions at  http://chdk.wikia.com/wiki/PTP_Extension .
- make CHDK autoload , http://chdk.wikia.com/wiki/FAQ#Q._What_is_the_procedure_of_loading_the_CHDK_firmware_into_my_camera.3F
- unzip ptpCamGui2.0.113.zip and run ptpCamGui.exe

The camera is on in play mode and connected and I see the CHDK gui on the screen.
But ptpCamGui only says "wait for camera" ... "disconnect" . And nothing happens.

Re: A490 Porting
« Reply #86 on: 05 / December / 2011, 20:02:21 »
The camera is on in play mode and connected and I see the CHDK gui on the screen.
But ptpCamGui only says "wait for camera" ... "disconnect" . And nothing happens.
Lots of forum threads about this - it seem like there was a need in Windows to set things up so that USB does not "autoload" when the camera is plugged in.  Can't find it now quickly .. but I'm sure you could with a little searching.

However,  the obvious question first ?  You did disable USB Remote prior to trying to do PTP, right ?

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline tpont

  • **
  • 81
Re: A490 Porting
« Reply #87 on: 06 / December / 2011, 05:50:11 »
However,  the obvious question first ?  You did disable USB Remote prior to trying to do PTP, right ?
No I didn't. Disabling that before making CHDK load on boot of SD-card made the trick. I have PTP running and working now. Thank you!

edit:
http://chdk.wikia.com/wiki/PTP_Extension
http://chdk.wikia.com/wiki/Lua/Lua_syntax
http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad
http://chdk.setepontos.com/index.php?topic=6872.0
I have read all the above but I still can't figure out how to send a LUA command (in the LUA box in ptpcam) to download the last image. (Or to download all images and then delete all images, which would have the same functionality when repeated.) I know this is getting off topic and I will not add on any further question on that here. But a quick pointer would be helpful, the site information is a bit overwhelming.

set_focus=500
set_aflock(1)
shoot()
_________________  <---- this is where I want to add a download command

edit: no worries, I sorted it out using chdkptp instead of chdkcam, both from the first link above.
« Last Edit: 06 / December / 2011, 13:28:19 by tpont »

*

nosebleed

Re: A490 Porting
« Reply #88 on: 11 / December / 2011, 08:29:25 »
Hello everyone!
I got a new A490 and I'm trying CHDK. Fortunately latest 100F firmware works very nice.
I use a lua script to take pictures and videos at certain times. I used this script on my old A480 with 100% success.
However, on A490 something is failing. Here is the whole script:

Code: [Select]
--[[
@title My intervalometer
@param v Video length (secs)
@default v 30
@param p Pics between videos
@default p 10
--]]

capmode=require("capmode")
props=require("propcase")

-- convert parameters into readable variable names
param_video_length = v
param_num_pics = p

function printf(...)
  print(string.format(...))
end

function mode_photo()
  printf("Switching to Photo Mode")
  capmode.set(capmode.name_to_mode["SCN_KIDS_PETS"])
  sleep(1000)

  -- Flash off
  set_prop(props.FLASH_MODE, 2)

  -- Focus Mode (0,1,3,4,5 = Normal, Macro, Infinity, Manual, Super Macro)
  set_prop(6, 3)
end 

function take_photo(n)
  for i = 1,n do
    printf("photo #%3d", i)
shoot()
sleep(30000)
  end
end

function mode_video()
  printf("Switching to Video Mode")
  capmode.set(capmode.name_to_mode["VIDEO_STD"])
  sleep(500)
end

function take_video (secs)
  -- start recording
  press("shoot_half")
  press("shoot_full")

  printf("Recording for %d secs", secs)
  sleep(secs*1000)

  -- stop recording
  release("shoot_full")
  press("shoot_full")
  sleep(1000)
  release("shoot_full")

  -- wait for SD. If video size is big it takes more than 1sec to get ready.
  printf("Waiting for SD..")
  while get_movie_status() > 1 do
    sleep(1000)
  end
  printf("Ready")
end

--[[ main program ]]

printf("Autonomous Camera Started")

while true do
-- Take photos
mode_photo()
take_photo(param_num_pics)

-- Take video
mode_video()
take_video(param_video_length)
end

One thing that doesn't work for sure is capmode.set(capmode.name_to_mode["SCN_KIDS_PETS"])
Second thing is that video recording is started but it never stops !
Other things should possible fail too. But I'm not sure which.

Any help would be appreciated.

*

Offline reyalp

  • ******
  • 14128
Re: A490 Porting
« Reply #89 on: 11 / December / 2011, 14:09:24 »
One thing that doesn't work for sure is capmode.set(capmode.name_to_mode["SCN_KIDS_PETS"])
According to phils new sig finder, the modemap on this camera is wrong:
Code: [Select]
// Mode 16417 in firmware but not in current modemap
// Mode 16399 in firmware but not in current modemap
// Mode 16407 in firmware but not in current modemap
// Mode  2609 in firmware but not in current modemap
// Current modemap entry not found in firmware - MODE_SUPER_MACRO         16905
// Current modemap entry not found in firmware - MODE_SCN_INDOOR          16401
// Current modemap entry not found in firmware - MODE_SCN_KIDS_PETS       16400
// Current modemap entry not found in firmware - MODE_SCN_NIGHT_SCENE     16395
// Current modemap entry not found in firmware - MODE_VIDEO_STD            2598
If you wan to help us correct it, do the following:
Go in to misc menu, debug, set debug data display to "props"
set PropCase ParamsData page to 4
exit the menu.

You should see a list of numer:number values on the OSD. Watch #49 while you set each possible shooting mode, and write down the number that corresponds to the shooting mode.

The shooting modes supported by your camera are listed at http://www.usa.canon.com/cusa/support/consumer/digital_cameras/powershot_a_series/powershot_a490#Specifications

Note that if there are different video frame rates or resolutions they may have different modes values. Sometimes modes like "long shutter" are accessed in a different way then the regular mode menu (e.g. the func menu or something like that).

When you are done, all of the following values (and no others) should be on your list:
Code: [Select]
16390
32772
16417
32768
16405
16404
16399
16397
16406
16407
16403
16402
16408
2609
Note: if you like scripting, you can use set_capture_mode_canon  ( http://chdk.wikia.com/wiki/Script_commands#set_capture_mode_canon.28value.29 ) to set each of these in turn instead of manually setting the mode.
Quote
Second thing is that video recording is started but it never stops !
On most cameras, you click shoot to start recording, and click again to stop. It looks you your script tries to hold the button down for the entire video.

You should able to change take_video to something like
Code: [Select]
press("shoot_half")
sleep(500) -- give AF a chance
press("shoot_full")
release("shoot_full")
release("shoot_half")
sleep(secs*1000)
click("shoot_full")
Note the sleep(500) isn't strictly required, but it's usually a good idea to have some delay between the half press and full press so the camera can do autofocus.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal