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.zipCode 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).
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! 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.
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.
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.