SD940 (IXUS120) porting thread - page 49 - DryOS Development - CHDK Forum supplierdeeply

SD940 (IXUS120) porting thread

  • 542 Replies
  • 202186 Views
*

Offline reyalp

  • ******
  • 14080
Re: SD940 (IXUS120) porting thread
« Reply #480 on: 31 / May / 2011, 23:08:16 »
Advertisements
So do you know if there is anything at all in stubs_entry.S, stubs_entry_2.S, stubs_min.S, lib.c,  boot.c, capt_seq.c or capture_seq.c that might be worth looking at to explain why manual flash control does not seem to work on 1 out of 5 firmware versions for the SD940.
Not offhand, I haven't played with the manual flash stuff. I'd start by looking through the functions is uses and looking for differences in the functions and variables it uses from stubs.

The other thing to look out for is whether it interacts with some other settings (canon or CHDK), maybe it works the same on all versions but something you didn't expect to be related affects it.
Don't forget what the H stands for.

Re: SD940 (IXUS120) porting thread
« Reply #481 on: 02 / June / 2011, 23:28:59 »
Hello all,

I just bought a SD940 from Sams Club and it's 1.00E.
I followed the instructions on the CHDK wiki and I had CHDK auto booting in no time flat.
My desire is to use exposure bracketing. I've tried with continuous drive and using the custom timer method - No luck. I get a bunch of pictures all with the same exposure.

Before I obsess and spend way to much time on this, Can someone verify bracketing actually works on the the SD940 with 1.00E
(Extra Photo Operations / Bracketing in continuous mode / TV bracketing value [] )

Thanks in advance.

Re: SD940 (IXUS120) porting thread
« Reply #482 on: 02 / June / 2011, 23:42:45 »
Before I obsess and spend way to much time on this, Can someone verify bracketing actually works on the the SD940 with 1.00E
(Extra Photo Operations / Bracketing in continuous mode / TV bracketing value [] )

Welcome to CHDK.  You might get a flood of responses to your post but I'm guessing probably not.  But then I've only been working on the SD940 port for the last 8 months so there is a lot I don't know.

Having said that, I do know it might not seem like a bit deal but the fact that you got CHDK loaded and mostly running is a big deal.  So many people fail before this point.  And quite frankly, there is a lot of CHDK that SD940 users have not tested.

So,  when I get a rare free minute,  I will try TV bracketing on my 1.03C port just to see what happens.  We can take it from there if you are up for it ?


Ported :   A1200    SD940   G10    Powershot N    G16

Re: SD940 (IXUS120) porting thread
« Reply #483 on: 03 / June / 2011, 00:32:50 »
the fact that you got CHDK loaded and mostly running is a big deal.
Waterwingz,
Thanks for the quick response. Reading through this thread beforehand was a big help. I've spent a lot of time with the AndroidOS and loading custom ROMS, so I was familiar with the basic concept of what was needed and why.

From what I've read in the past couple hours - I seems like it (TV bracketing) worked in 1.03C at some point  but not 1.00E. Maybe an address tweak is needed?

Let me know if I can do anything to help.


Re: SD940 (IXUS120) porting thread
« Reply #484 on: 03 / June / 2011, 07:45:49 »
Hi All,

A few friends and I are planning on launching a weather balloon to take some aerial shots and videos with our SD940.

I've been battling away writing a LUA script to automate the process and have finally (after many many hours) gotten it to work! It now alternates between periods of video, and periods of interval shots.... and even disables the screen to conserve battery life.

What I'm trying to do now is get it to use infinity focus mode (without CHDK, when the camera is in program mode, pressing 'right' will give you the option between macro, normal and infinity). But I can't seem to find any way of accessing this through script.

Any ideas?

Thanks!
Nathan

Re: SD940 (IXUS120) porting thread
« Reply #485 on: 03 / June / 2011, 08:30:50 »
Any updates on the manual flash not working on 1.01A?
@Maron :  Please post the exact steps you follow when setting this  up in CHDK and I will take a look.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SD940 (IXUS120) porting thread
« Reply #486 on: 03 / June / 2011, 08:35:42 »
What I'm trying to do now is get it to use infinity focus mode (without CHDK, when the camera is in program mode, pressing 'right' will give you the option between macro, normal and infinity). But I can't seem to find any way of accessing this through script.
I've wondered that myself but I have not found a way either.  However,  I did not look too hard.

How about posting the rest of your script - sounds like a really good one.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: SD940 (IXUS120) porting thread
« Reply #487 on: 03 / June / 2011, 20:21:48 »
Sure thing... It isn't great (so I'd appreciate any refinements, etc), but it is finally working!


Code: [Select]
--[[\
@title BalloonTimer - by Nathan White
@param k InitDelay --initial delay length
@default k 300
@param x InitVid -- launch video length (liftoff)
@default x 300
@param a LoopDelay -- Delay before moving into the loop
@default a 600
@param b Pduration --Duration of stills cycle
@default b 300
@param c Pinterval -- Time between stills
@default c 5
@param d Vduration -- Duration of video
@default d 120
@param e backlight: 0=Off 1=On
default e 0
@param p printf --toggle print to screen
@default p 0
@param l logf --toggle print to log file
@default l 1
@param n Pmode: 1=Auto 2=Program 8=Landscape
@default n 2
--]]

--This is a script designed for a near-space balloon launch using our SD940 IS
--It alternatives between video and stills, and turns the backlight off to conserver battery
--Would like to set it to infinity focus mode, but havent found a way yet
--Hopefully "landscape" mode will favour long focal distances.

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

logname = "A/BalloonTimer.log"
log = io.open(logname,"wb")
if not log then
error("Failed to Open Log\n")
end

function printf(...)
if (p == 1) then --if we're writing to the screen
print(string.format(...))
end
if (l == 1) then --if we're writing to the log
log:write(string.format(...))
log:close()
log = io.open(logname,"ab")
end
end

function log_rec_change(rec) --switch between shoot and playback mode
local status_str, sleep_count
if rec then
printf("Leaving Playback Mode\n")
else
printf("Entering Playback Mode\n")
end
set_record(rec)
sleep_count = 0
while sleep_count < 100 do -- wait up to 10 seconds for function change
if (rec and get_mode()) or not (rec or get_mode()) then
break
end
sleep(100)
sleep_count = sleep_count + 1
end
if (rec and get_mode()) or not (rec or get_mode()) then
printf("Left Playback Mode, Success!\n")
elseif not (rec or get_mode()) then
printf("Entered Playback Mode, Success!\n")
else
printf("Display Mode Not Set!\n")
end
end

function change_mode(mCode) --change shooting mode (auto/program/video/etc)
local status, sleep_count, id

if mCode == "Picture" then --translate mCode into id value
id = n --photo mode
else
id = 9 --video
end

if not get_mode() then
log_rec_change(true)
end

printf("Changing to " .. mCode .. " mode\n")
status = capmode.set(id)
if status then
sleep_count = 0
while sleep_count < 100 do --wait up to 10 seconds for mode to change
if (capmode.get() == id) then
printf("Changed to " .. mCode .. " mode\n")
break
end
sleep(100)
sleep_count = sleep_count + 1
end
if capmode.get() ~= id then
printf("Could not change to " .. mCode .. " mode\n")
end
else
printf("Error setting " .. mCode .. " mode\n")
end
end

function delay_cycle(duration) --delay
printf("Delaying for " .. duration .. " seconds\n")
if e == 0 then --if we're turning the backlight off
set_backlight(0)
end
sleep(duration*1000)
end

function pic_cycle(duration, interval) --take photos for a specified duration with a specified interval between each
local numShots = duration/interval
local i = 0
change_mode("Picture")
sleep(1000)
printf("Will now shoot " .. numShots .. " shots\n")
while i < numShots do
printf("Shot " .. i+1 .. " of " .. numShots .. " \n")
shoot()
i = i + 1
if e == 0 then --if we're turning the backlight off (after shoot, it automatically turns back on)
set_backlight(0)
end
sleep(interval*1000)
end
end

function vid_cycle(duration) --take video for a specified duration
local sleep_count, status
change_mode("Video")
printf("Will now shoot " .. duration .. " seconds of video\n")
if e == 0 then --if we're turning the backlight off
set_backlight(0)
end
press("shoot_full")
sleep(300)
release("shoot_full")
sleep(duration*1000)
press("shoot_full")
sleep(300)
release("shoot_full")
while (get_movie_status == 4) do --needed this because sometimes it wouldnt stop recording without pressing the button a few times (weird)
printf("Video Termination Required")
sleep(1000)
if (get_movie_status == 4) then
press("shoot_full")
sleep(300)
release("shoot_full")
end
end
printf("Video Done\n")
end

--program runs as follows:
-- delay initially (once we press the shutter button because we need a few more minutes to setup the launch)
-- take a video of the launch (lift-off!)
-- transition into a cycle of video and photos until the battery runs out.

printf("***\n")
printf("** BEGIN **\n")
log_rec_change(true)

printf("***\n")
printf("** INITIAL DELAY **\n")
delay_cycle(k)

printf("***\n")
printf("** INITIAL LAUNCH VIDEO **\n")
vid_cycle(x)

printf("***\n")
printf("** VID/STILL CYCLE **\n")
local t = 1
while 0 < 1 do --loop forever
printf("Cycle " .. t .. " and counting\n")
delay_cycle(a)
pic_cycle(b, c)
sleep(5000)
vid_cycle(d)
t = t + 1
printf(" \n")
end


*

Offline reyalp

  • ******
  • 14080
Re: SD940 (IXUS120) porting thread
« Reply #488 on: 04 / June / 2011, 01:54:00 »
What I'm trying to do now is get it to use infinity focus mode (without CHDK, when the camera is in program mode, pressing 'right' will give you the option between macro, normal and infinity). But I can't seem to find any way of accessing this through script.
I've wondered that myself but I have not found a way either.  However,  I did not look too hard.
You may be able to set the focus mode propcase.

Failing that (if setting it is ignored), you can send key presses and watch the propcase until it is in the right mode.

Assuming the propset is correct, props.FOCUS_MODE should be the right one.
Don't forget what the H stands for.

*

Offline Maron

  • *
  • 24
Re: SD940 (IXUS120) porting thread
« Reply #489 on: 04 / June / 2011, 05:08:26 »
Any updates on the manual flash not working on 1.01A?
@Maron :  Please post the exact steps you follow when setting this  up in CHDK and I will take a look.
Using build 1196.
Load CHDK manually (turn on in playback, firm update, etc)
Turn off canon flash.
Press DISP.
Press Menu.
Extra Photo Operations
Froce Manual Flash (check)
(Power of flash: 2)
Menu. (to exit the menu)
"Flash: Manual" is displayign in the override box.
Press DISP (to exit alt mode)
Press shutter halfway, (this might help:) the canon flash icon (zig-zag arrow) shows up as if the flash will fire even though the canon flash has been disabled
Depress shutter fully, takes a normal photo without flash.

The detaield camera veiw in palyback mode shows up with no flash symbol on it.

Hope you can help.
« Last Edit: 04 / June / 2011, 09:49:21 by Maron »

 

Related Topics