Pages: [1] 2 3 ... 5 Next   Go Down
  Print  
Author Topic: CHDK Control of the Mode Dial for A570IS  (Read 5865 times)
0 Members and 1 Guest are viewing this topic.
Jim
Newbie
*

Karma: +1/-1
Offline Offline

Posts: 22


« on: 08 / February / 2008, 04:15:43 »

Is there any way for CHDK to control the "Dial Mode"? ..... with set prop command?

This is the general need (based on my past KAP scripts posted on this forum)  ..   taking pictures from a kite....

 - have CHDK script running with Mode Dial in Tv or Av mode
 - take a series of pictures - .....no problem doing all of this now
.
. - have CHDK force (via set prop?) the Mode Dial into Movie mode (or any other mode) (without turning the dial!)
  - take a series of pictures (or video - this is what I am looking for)
  - swtich back to Tv or Av Dial Mode and take series of still pictures
  - run loop

I can run a script for doing either stills or video but not swtich between the two in one script (i.e. kite 500' up in the air and I can not reach the dial :-)   

I suspect this is possible ...with set prop command? 

Does any one have the list of properties for the A570IS camera?

Any other approaches?

Jim (a.k.a Wind Watcher)
Logged
staylo
Newbie
*

Karma: +4/-1
Offline Offline

Posts: 41


« Reply #1 on: 08 / February / 2008, 16:50:05 »

I agree, this would be extremely useful.

As for other approaches, I've never been fond of hardware mods to digital cameras, but I have taken a few apart for repairs in the past. The mode dial in the Powershot A70 is a very simple arrangement; a set of electrical contacts are fixed beneath the dial, and brushes on the bottom of the dial bridge a different pair of contacts for each position. Probably the only part of the camera that's easy to hardware mod Smiley
Logged
jeff666
Developers
Full Member
****

Karma: +42/-8
Offline Offline

Posts: 181


A720IS


« Reply #2 on: 10 / February / 2008, 17:29:06 »

Quote from: Jim
Is there any way for CHDK to control the "Dial Mode"? ..... with set prop command?

There isn't (at least yet), but it should be possible to implement.

The mode-dial is registered as a button or switch just like the other switches are. We are able to override the state of the switches and on my A720 a quick hack proved that the dial-mode can be set in software.

Unfortunately I'm pretty much out of time right now, so I can't implement it.

If someone else wants to, these are my thoughts about the function:
* create a dialmode-mask to clear the bits in physw.
* read original dial-mode position and keep it in a variable
* extend uBasic keyboard-commands to set the dial-position (incl. reset to manual).  The dial-position would be indicated by a number that has to be equal on all models. We would remap this to the device-dependent number somewhere else.
* in my_kbd_read_keys() set dial-mode in physw accordingly

Two bad things, though:
1. It would only work in alt-mode (i.e. scripts) or otherwise require a design break in the keybaord-handling as it is done right now (i.e. override keyboard only in alt-mode).
2. It has to be implemented for each camera since it is platform-dependent.

Cheers.
Logged
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +121/-27
Offline Offline

Posts: 1624


Coders Humiliate DSLR Kiddies


« Reply #3 on: 10 / February / 2008, 22:26:14 »

would enhance chdk big time. imagine the possibilities!
* phyrephox votes for all efforts put into that feature Big Grin
Logged

Jim
Newbie
*

Karma: +1/-1
Offline Offline

Posts: 22


« Reply #4 on: 12 / February / 2008, 03:38:40 »

All, I agree.  This would be a BIG JUMP in CHDK capability.   I am not certain how changes in the mode dial impact other functions.   Definiately worth exploring. 
Logged
jeff666
Developers
Full Member
****

Karma: +42/-8
Offline Offline

Posts: 181


A720IS


« Reply #5 on: 12 / February / 2008, 12:51:10 »

Quote from: PhyrePhoX
imagine the possibilities!

Like switching the dial in a loop and watch the funny animations on the display? Big Grin

Well, since there is some demand and I would like to override the dial-mode myself, I will give it a shot, this evening.

I think it could work like this:
* we force a dialmode with a press DM_<num> and switch back to normal with release DM_<num>.
* <num> would be:
  0 - M
  1 - Av
  2 - Tv
  3 - P
  4 - Auto
Do we need the others? I wouldn't miss them.
Note: The numbers are in this case equal to the order of the dial, but this is only by accident. Even if a camera lacked one mode, the others would still have the same numbers. That makes scripts portable.

I think this could be fairly easy to implement, since it would work like any other keyboard-interaction.

Since I have an A720, I will test it on this model first, but A570-owners can help, anyway.

To support the A570 (or any camera), I need the keyboard-bits that are modified by the dial-mode. They are shown if Debug parameters->Show misc. values is switched on. The main screen now shows 4 lines with values. The first three show the keyboard-state (and a few other switches).

Turn on the camera in playback-mode, set 'Show misc. values', turn the dial and observe the numbers that change on each dial switch. Some numbers will change when the dial is not turned, don't care about them.

On my A720 it looks like:
1: oooooooo
2: oXoooooo
3: ooooXooo

The X-marked digits change when I turn the dial. Now I need to know which digits change and what their values are in each mode.

These are the values on my A720. First value is the X in line 2, second value is the X in line 3, third value is the dialposition.

Code:
d 9 - M
d 8 - Av
d a - Tv
d e - P
d f - Auto
d b - portrait
9 b - landscape
9 f - night
9 c - kids&pets
1 e - indoor
5 e - SCN
5 f - stitch assist
5 d - movie


Additonal note:
I just noticed that it should be possible to set the playback-switch. Any request on this one?

Cheers.
« Last Edit: 12 / February / 2008, 12:55:46 by jeff666 » Logged
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +121/-27
Offline Offline

Posts: 1624


Coders Humiliate DSLR Kiddies


« Reply #6 on: 12 / February / 2008, 13:10:51 »

well in the end setting all switches via script is a good idea!
for example you can make a script that shoots pics all the time, but once in a while it starts a slideshow.

On my A620 it looks like:
2: Xoooooo (only this line changes)


here are my output numbers:
Code:
1 - mycolors
2 - C
3 - stitch assist
4 - Av
5 - TV
6 - M
7 - P
9 - SCN
b - movie
c - landscape
d - night
e - portrait
f - Auto

good luck!
Logged

jeff666
Developers
Full Member
****

Karma: +42/-8
Offline Offline

Posts: 181


A720IS


« Reply #7 on: 12 / February / 2008, 13:28:35 »

Quote from: PhyrePhoX
Code:
1 - mycolors
2 - C

Is 'mycolors' identical to the setting of the same name in the menu of my A720?
What about 'C'? Do we need it?

I think about reordering the numbers for the 'press DM_<x>' command to:
0 - Auto
1 - Manual
2 - Av
3 - Tv
4 - P
5 - C

I think, I read about 'Sv' somewhere. Does such a mode exist on canon cameras? Do we have to take care about it?

Cheers.
Logged
A570is
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10


« Reply #8 on: 12 / February / 2008, 14:41:01 »

Hi Jeff666,

For the A570is I found the same output numbers as you for the A720is.

Quote
1: oooooooo
2: oXoooooo
3: ooooXooo

The X-marked digits change when I turn the dial. Now I need to know which digits change and what their values are in each mode.

These are the values on my A720. First value is the X in line 2, second value is the X in line 3, third value is the dialposition.

Code:
d 9 - M
d 8 - Av
d a - Tv
d e - P
d f - Auto
d b - portrait
9 b - landscape
9 f - night
9 c - kids&pets
1 e - indoor
5 e - SCN
5 f - stitch assist
5 d - movie

Good luck!
Logged
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +121/-27
Offline Offline

Posts: 1624


Coders Humiliate DSLR Kiddies


« Reply #9 on: 12 / February / 2008, 14:54:16 »

Quote from: PhyrePhoX
Code:
1 - mycolors
2 - C

Is 'mycolors' identical to the setting of the same name in the menu of my A720?
What about 'C'? Do we need it?
probably we won't need C. mycolors might come in handy regarding face/color detection (see the motiondetection thread somewhere). i dont know what you mean by your question if mycolours is identical to your setting of your a720.?
anyways, most important would be to be able to switch to MOVIE mode (and back), imho.
Logged

Barney Fife
Hero Member
*****

Karma: +70/-219
Offline Offline

Posts: 1159



« Reply #10 on: 12 / February / 2008, 16:19:51 »

Deleted
« Last Edit: 22 / April / 2008, 16:48:42 by Barney Fife » Logged

[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
fudgey
Global Moderator
Hero Member
*****

Karma: +64/-1
Offline Offline

Posts: 699

a570is


« Reply #11 on: 12 / February / 2008, 16:32:21 »

I just noticed that it should be possible to set the playback-switch. Any request on this one?

I wonder if this would make remote webcam operation possible even for cameras without remote capture support, by having a script sit in play mode waiting for PTP download (and upload for commands if suitable code would be implemented) commands for most of the time, and periodically switch to rec mode to shoot?
Logged
jeff666
Developers
Full Member
****

Karma: +42/-8
Offline Offline

Posts: 181


A720IS


« Reply #12 on: 12 / February / 2008, 20:23:59 »

Here's a test for dialmode-support. It works on
* A720, 1.00c
* A570, 1.00e + 1.01a
(out of time for today, so no a620 or s3, sorry).

download: (bin & src) zSHARE - dialmode-test.zip

Code is not in SVN, yet. Testers and Developers are invited to review before I submit experimental code.

This is what I did:
  • in include/keyboard.h: add new key-definitions for the dm-positions. I added DM_M, DM_AV, DM_TV, DM_P, DM_AUTO and DM_MOVIE. Each definition is represented by a number. I started by 50 to identify the dialmode-"keys" and treat them specially in the platform-dependent code.
  • in core/kbd.c: add textual descriptions for those definitions for use in scripts. In a script you just call press "dm_auto" and the dial is set. No further modification needed.
  • in platform/a720/kbd.c (and a570/kbd.c) declare a new struct for the dial (and switches in general), since the old keyboard-struct could only hold a bitmask for one physw-value but we need at least two.
    I modified kbd_key_press and kbd_key_release to test for keys with number >= 50 (see pt.1), get their bits from the new struct and set a flag to indicate dm_override.
    This flag is read in alt-mode and applies the new dial mode.

There's an example in bin/dm-test.bas which changes to each of the supported modes.

Important: If you change the dial position using press "dm_XXX", you must reset to default using release "dm_XXX" or you will probably get the wrong mode on the next press "dm... command (reason: dialmode-bitmask isn't cleared correctly, then).

Quote from: Barney Fife
Huh, I wonder what that is. A secret setting on the mode dial that I never knew was there.

Probably this called the aliens, which will arrive tomorrow and destroy earth. Thank You! Well done!  Angry

Quote
For going to playback mode from record, only line 3 changes when the playback switch is momentarily pressed.

This is great. More confusing stuff. Setting a value to a or b is barely acceptable but setting a value to a then to 0 or to b then to 0 is way to much. Tell your aliens to do it. Big Grin

Quote
For cross-camera compatibility, wouldn't it be best to allow any input number for the command, then each camera could use the full range of what was available. Each series would only need its own little reference list (like these) of what number means what.

Well, partly. Using the original dial and giving each position an ascending number is ok as a method to access every dial-position but it's not platform-independent and scripts will only work on a particular series or even model.

To achieve platform-independency we would either use particular numbers (as planned first) or describing names (as it is now). It's still possible to add device-dependent dial-mode positions called DM_1, DM_2 and so on in addition to the names.

Quote
click "mode_dial" x
press "mode_dial" x
release "mode_dial" x

click wouldn't work unless we create a dummy-position that uses the original dial. This method would be as easy or difficult as any other, so if there's more demand for the click-method just tell and I'll do it this way.

What definitely would not work (without major changes) is click "mode_dial" x because the additional parameter would have to be evaluated. To make this we would need to change uBasic and take the risk on introducing (new) errors.

Overview:
This would work:
* click "dm_auto"
* click "dm_reset"

This does work now:
* press "dm_auto"
* release "dm_auto"

This would not work (without changing uBasic)
* click "mode_dial" "auto"
* click "mode_dial" "reset"

All would have a problem about interference between different switches/dials (which one is active). Further thoughts have to be made on this problem.

Cheers.
Logged
ewavr
Developers
Hero Member
****

Karma: +125/-1
Offline Offline

Posts: 509

A710IS


« Reply #13 on: 12 / February / 2008, 21:02:30 »

A710: (parameter#2): XXYYYYYY, where XX:
auto: FC
P: AC
Tv: 8C
Av: 9C
M: 5C
video: F4
stitch: 64 or E4 (dial bounce, but no real mode change)
SCN: 6C
night scene: 7C
landscape: 3C
portrait: BC
Logged
Barney Fife
Hero Member
*****

Karma: +70/-219
Offline Offline

Posts: 1159



« Reply #14 on: 12 / February / 2008, 21:33:52 »

Deleted
« Last Edit: 22 / April / 2008, 16:49:07 by Barney Fife » Logged

[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
Pages: [1] 2 3 ... 5 Next   Go Up
  Print  
 
Jump to: