CHDK Control of the Mode Dial for A570IS - page 4 - General Discussion and Assistance - CHDK Forum  

CHDK Control of the Mode Dial for A570IS

  • 76 Replies
  • 33251 Views
*

Offline whim

  • ******
  • 2041
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: CHDK Control of the Mode Dial for A570IS
« Reply #30 on: 14 / April / 2008, 14:10:46 »
Advertisements
Excellent example of a good bump  :D

wim

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: CHDK Control of the Mode Dial for A570IS
« Reply #31 on: 14 / April / 2008, 14:59:56 »
Yes indeed. And to wishfully speed things up I hereby promise I'll find the time to try and add a video option to that MD script of mine once at least the a570is one gets added to trunk :)

I think the KAP dialmode patch would be useful even if it's not a full featured one. There was some discussion about this earlier. To cleanly and efficiently script dialmode changes, we should have a standardized numerical names for each position so that functions such as set_dialmode_pos and get_dialmode_pos would both use (these numbers would be decided by us and would just need to be found and listed for each camera model from their propcases and whatever it was that was found to control the mode; ideally ubasic would allow syntax like set_dialmode_pos DIALMODE_Av where DIALMODE_Av would be #defined in CHDK sources for each camera but that's wishful thinking I suppose).

Then a script could safely read the current position, do what it wants to do and return to the old position after the script's finishes. Otherwise the script will leave the camera in a state where it's in a different mode than the physical dialmode position, which is not desireable.

As I understand it, the current KAP patch allows me to write a proper script for a570is if I find all the position read-only propcase for that camera and write a bunch of ifs tying the dm commands and these propcases. Kind of kludgy and inefficient and a different script is needed for each camera (or at least each digic platform).


edit: hmm... actually, does the current patch work so that when you press one of the dm_* buttons and then release it, it will return to the original mode? If it does it's pretty good as is...

edit 2: Couldn't resist so modified the script to run on Dave's build already 8), see here: http://chdk.setepontos.com/index.php/topic,471.msg9504.html#msg9504
« Last Edit: 14 / April / 2008, 17:09:11 by fudgey »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: CHDK Control of the Mode Dial for A570IS
« Reply #32 on: 14 / April / 2008, 18:26:13 »
one thing that definitly should be added: IF dial is overriden, draw a huge icon on screen telling you that. other than that, i think the way jeff666 added the commands is pretty straightforward a very good way. by using "virtual buttons" he didnt even have to touch ubasic parser. he just added the new buttons to the kbd of each camera (well, the two he did touch).
this way this should stay compatible to/with all other cams, as soon as those buttonvalues can be found. i guess this is the reason jeff made us report all those values for (in the beginning of the thread :D).

Re: CHDK Control of the Mode Dial for A570IS
« Reply #33 on: 14 / April / 2008, 18:39:59 »
Deleted
« Last Edit: 22 / April / 2008, 11:50:45 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: CHDK Control of the Mode Dial for A570IS
« Reply #34 on: 20 / April / 2008, 16:14:14 »
I wasn't sure if these were out there for A570IS yet (the patch&build that exists only has the important modes implemented) so wrote them down:

Debug parameters -> show misc. values digits which change when turning the mode dial are:
Code: [Select]
1: oooooooo
2: oXoooooo
3: ____Yooo
4: _______o

Code: [Select]
In REC mode: (counter clockwise)
============

X Y mode
-- --------
f f AUTO
f e P
f a Tv
f 8 Av
f 9 M
*****
7 d Movie
7 f Stitch Assist
7 e SCN
3 e Indoor
b c Kids&Pets
b f Night Snapshot
b b Landscape
f b Portrait
***** During the long "dead zone" between M mode and Movie mode the digits change several times in this order: fd -> bd -> fb. The camera is in video mode in all of these modes.


Code: [Select]
In PLAY mode: (X=2+recmode_X and Y=recmode_Y)
=============

X Y mode
----------
d f AUTO
d e P
d a Tv
d 8 Av
d 9 M
*****
5 d Movie
5 f Stitch Assist
5 e SCN
1 e Indoor
9 c Kids&Pets
9 f Night Snapshot
9 b Landscape
d b Portrait
***** Dead zone from M mode to Movie: dd -> 9d -> dd


I also added a page to the wiki: http://chdk.wikia.com/wiki/Mode_dial_propcase_values. It has a list of the A570IS mode propcase values as currently accessible by ubasic (including SCN and movie submodes). If we had a similar list for all models it would be easier for developers to map them under generic names in ubasic for widely compatible scripting...
« Last Edit: 20 / April / 2008, 16:17:55 by fudgey »

*

Offline jeff666

  • ****
  • 181
  • A720IS
Re: CHDK Control of the Mode Dial for A570IS
« Reply #35 on: 21 / April / 2008, 08:37:31 »
I wasn't sure if these were out there for A570IS yet (the patch&build that exists only has the important modes implemented) so wrote them down:

The keymap for the A570 is identical to the A720 and it is known.

I didn't continue because I dont' have time to figure out how to handle the dialmodes in a device-independent way.

The syntax for the command was suggested in an earlier post. It should be

mode <dialname> <modeno>

There are some problems that need solving.
1. We want to control several dials/switches with one command. Each dial/switch sets specific bits in the keymap. We need to write in an array which dials/switches exist, which bits it controls and (somewhere else) whether we override them.
2. Some values need continous override (dial-mode), others just need to be triggered once and left alone afterwards (rec/playback-switch on S-series). So we need to become active, twice (1st: set override, 2nd: nevermind).
3. A uBasic commands has to be introduced. That's actually easy but I'm not very familiar with that code.

We also need to remember if an override has to be reset (dialmode) or if our change was only temporary anyway (triggered rec/playback on S-series).

In case the override needs to be reset, we may do this if a script ends or if alt-mode is left, but I can also live happily with a method that always overrides the dialmode. The mode would be changed in alt-menu, then. I had several occations where the dialmode was accidentially turned when I put the cam in the pockes of my pants. Generic dial-mode override in alt-menu would be useful in such cases.

Cheers.

Re: CHDK Control of the Mode Dial for A570IS
« Reply #36 on: 08 / May / 2008, 00:55:43 »
Hi,

Has this feature been committed yet?  If so, what is the official, proper syntax?  I'm sending up my A720 on a high altitude weather balloon and this would be so cool to have!

Thanks for your hard work on this.

Chris
NW5W High Altitude Balloon Project
http://nw5w.com/journal/

*

Offline zeno

  • *****
  • 889
Re: CHDK Control of the Mode Dial for A570IS
« Reply #37 on: 08 / May / 2008, 05:17:31 »
I have been updating the code that jeff666 originally wrote for the A570 for more recent builds (Allbest 49 currently). You can find binary and source code changes (just 3 files need altering) at:

CHDK Mode Dial Support

If as jeff666 says the A720 codes are the same as the A570 then I should be able to produce a build for that too. I'll post here if and when I do.

Note that the script commands are not as jeff666 outlines above but involve pressing and releasing "buttons".
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit


*

Offline zeno

  • *****
  • 889
Re: CHDK Control of the Mode Dial for A570IS
« Reply #38 on: 08 / May / 2008, 06:28:06 »
Chris - there's now a test version for the A720 on my web page at CHDK Mode Dial Support

Let me know if it works.

Here's a simple script that puts the camera into each mode in turn - watch the LCD while the script runs and you should see the mode changing.
Code: [Select]
@title switch-mode test
@param a dummy
@default a 0

sleep 1000

print "auto"
press "dm_auto"
sleep 3000
release "dm_auto"

print "manual"
press "dm_m"
sleep 3000
release "dm_m"

print "Program"
press "dm_p"
sleep 3000
release "dm_p"

print "Av"
press "dm_av"
sleep 3000
release "dm_av"

print "Tv"
press "dm_tv"
sleep 3000
release "dm_tv"

print "Movie"
press "dm_movie"
sleep 3000
release "dm_movie"

print "default"
sleep 3000

end
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline vine

  • ***
  • 124
  • A560
    • my chdk page
Re: CHDK Control of the Mode Dial for A570IS
« Reply #39 on: 10 / May / 2008, 13:48:51 »
Could we add this for the A560 as well please? I am going on vacation in two weeks and would like to have that feature for mixed photo/video KAP scripts. I'll supply the MISC values for the A560 as soon as my batteries are recharged.
my photo map

my chdk page with tutorials, scripts and more

>> finally back from vacation (was a bit longer than intended) <<

 

Related Topics