Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent type-value pairs for eosmoviemode, liveviewsize, popupflash, and uilock #600

Open
erdmann opened this issue Aug 27, 2023 · 1 comment

Comments

@erdmann
Copy link

erdmann commented Aug 27, 2023

Describe the bug

The types reported by gphoto2 for the properties named in the subject seem to be inconsistent with their reported values.

Specifically, eosmoviemode, popupflash, and uilock all report as type TOGGLE but currently have values of 2 for me, suggesting that they're not just toggles since all the other toggles have values of 0 or 1. Additionally, the reported current value of liveviewsize (the string "val 0") isn't equal to any of the listed choices ("Large", "Medium", and "Small"). See below for details.

Name the camera
If this is camera specific, include the camera name as shown by gphoto2 --auto-detect or USB IDs

$ gphoto2 --auto-detect 
Model                          Port                                            
----------------------------------------------------------
Canon EOS 5DS R                usb:020,011     

libgphoto2 and gphoto2 version

$ gphoto2 --version
gphoto2 2.5.28

Copyright (c) 2000-2021 Marcus Meissner and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.28         clang, popt(m), exif, no cdk, no aa, jpeg, readline
libgphoto2      2.5.30         standard camlibs, clang, no ltdl, EXIF
libgphoto2_port 0.12.1         iolibs: disk ptpip serial usb1, clang, no ltdl, EXIF, USB, serial without locking

To Reproduce

The following one-liner illustrates the issue. these four properties are anomalous; they're the only ones that don't match any of the values that are nominally associated with their types; I'm expecting that TOGGLE variables will always have values of 0 or 1 and that RADIO values will always have a current value that is among the listed choices.

$ gphoto2 --list-config | grep -E 'eosmoviemode|popupflash|uilock|liveviewsize' | parallel -j 1 "echo {} && gphoto2 --get-config {} && echo"
/main/actions/uilock
Label: UI Lock
Readonly: 0
Type: TOGGLE
Current: 2
END

/main/actions/popupflash
Label: Popup Flash
Readonly: 0
Type: TOGGLE
Current: 2
END

/main/actions/eosmoviemode
Label: Movie Mode
Readonly: 0
Type: TOGGLE
Current: 2
END

/main/capturesettings/liveviewsize
Label: Live View Size
Readonly: 0
Type: RADIO
Current: val 0
Choice: 0 Large
Choice: 1 Medium
Choice: 2 Small
END

Thank you very much for an excellent library, and many thanks in advance for your help!

@erdmann
Copy link
Author

erdmann commented Aug 27, 2023

For additional information, see the following to illustrate the TOGGLE and RADIO cases. In both cases, I can't set a value equal to the "Current" value, and in both cases, if I do provide a setting that doesn't error out, the reported value doesn't change to reflect the newly-set value.

  • TOGGLE
$ gphoto2 --get-config uilock
Label: UI Lock                                                                 
Readonly: 0
Type: TOGGLE
Current: 2
END

$ gphoto2 --set-config uilock=2
                                                                               
*** Error ***              
The passed value 2 is not a valid toggle value.
*** Error (-2: 'Bad parameters') ***       

...

$ gphoto2 --set-config uilock=0  # the UI Lock icon on the TFT momentarily disappears, then returns

$ gphoto2 --get-config uilock # but the value stays at 2
Label: UI Lock                                                                 
Readonly: 0
Type: TOGGLE
Current: 2
END
  • RADIO
$ gphoto2 --get-config liveviewsize
Label: Live View Size                                                          
Readonly: 0
Type: RADIO
Current: val 0
Choice: 0 Large
Choice: 1 Medium
Choice: 2 Small
END

$ gphoto2 --set-config liveviewsize="val 0"
                                                                               
*** Error ***              
Parsing the value of widget 'Live View Size' / 0xd1b0 failed with -2.

*** Error ***              
Failed to set new configuration value val 0 for configuration entry liveviewsize.
*** Error (-2: 'Bad parameters') ***       

...

Note that the following all work, insofar as they don't cause errors (unexpectedly, they raise and lower the mirror, which doesn't seem right). However, note that the setting's reported value doesn't change after these:

$ gphoto2 --set-config liveviewsize="0"         # no error, but camera mirror flips up and back down
$ gphoto2 --set-config liveviewsize="Large"     # same
$ gphoto2 --set-config liveviewsize="1"         # same
$ gphoto2 --set-config liveviewsize="Medium"    # same
$ gphoto2 --set-config liveviewsize="2"         # same
$ gphoto2 --set-config liveviewsize="Small"     # same

$ gphoto2 --get-config liveviewsize # despite no errors, the setting value doesn't change
Label: Live View Size                                                          
Readonly: 0
Type: RADIO
Current: val 0
Choice: 0 Large
Choice: 1 Medium
Choice: 2 Small
END

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant