-
Notifications
You must be signed in to change notification settings - Fork 39
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
K30, Software shuts down when switched to BULB mode. #52
Comments
made some progress was able to get it to allow bulb mode by setting plsr_model.c line 981 to How ever when I take a picture the shutter fires and closes and then the countdown starts so its like it dosent know to hold the shutter open
|
Exposure mode reading That boolean field was added specially for K-30 because it was the only camera model when the value Can you please send me the output of the following command (with the original code) when you set the camera to M, Av, B:
Bulb mode pictures Can you please try to take a picture with the cli using |
Attached are the logs you requested, Manual mode finished at 30 seconds and Bulb mode shutter fired for a split second and failed to remain open. |
There are some weird things going on with `pslr_exposure_mode_t` and `pslr_gui_exposure_mode_t`. My understanding is that there was a commit `582e03f7926314ee6fbec4f1b053e222d96cb6e0` (Wed May 29 18:04:27 2013 +0000) which added separate GUI exposure mode enum `pslr_gui_exposure_mode_t`, but the conversion between enums was forgotten in `user_mode_combo_changed_cb` and/or `pslr_set_exposure_mode`. Then recently this issue was discovered and commit `f9e23edcf88bfc5ca356bbfce91ca085aef56e54` (Sun Mar 22 14:03:39 2020 +0100) tried to fix it by adding enum conversion to `pslr_set_exposure_mode`. However the conversion is done in the wrong direction. To try to summarize, currently: * `pktriggercord.c` calls `pslr_set_exposure_mode` with `pslr_gui_exposure_mode_t` argument. * `pktriggercord-cli.c` calls `pslr_set_exposure_mode` with `pslr_exposure_mode_t` argument. * `pslr.c` function `pslr_set_exposure_mode` incorrectly converts `pslr_exposure_mode_t` to `pslr_gui_exposure_mode_t`. In CLI case this is incorrect as the enum should be left to `pslr_exposure_mode_t` and in GUI case the mode is already in `pslr_gui_exposure_mode_t` type so it does the conversion twice. I think the whole mode switching code was buggy before `need_exposure_mode_conversion` flag was added for K-30 camera. This can also be seen from the issue asalamon74#52 that something is wrong. So I think that the K-30 handling was probably not needed in the first place. My experimental fix is as follows: * `pslr.c` keeps track of camera mode only using `pslr_exposure_mode_t` type. This is preferred over `pslr_gui_exposure_mode_t` as it has more entries and is more accurate. * CLI `pktriggercord-cli.c` code mostly operates with `pslr_exposure_mode_t` type except few `PSLR_GUI_EXPOSURE_MODE_B` compares which were changed. * GUI `pktriggercord.c` now converts between `pslr_gui_exposure_mode_t` and `pslr_exposure_mode_t` as needed. * `pslr.c` has new functions `pslr_convert_exposure_mode_to_gui` and `pslr_convert_exposure_mode_from_gui` instead of single `exposure_mode_conversion` function. * `need_exposure_mode_conversion` structure entry and `pslr_get_model_need_exposure_conversion` function are removed.
There are some weird things going on with `pslr_exposure_mode_t` and `pslr_gui_exposure_mode_t`. My understanding is that there was a commit `582e03f7926314ee6fbec4f1b053e222d96cb6e0` (Wed May 29 18:04:27 2013 +0000) which added separate GUI exposure mode enum `pslr_gui_exposure_mode_t`, but the conversion between enums was forgotten in `user_mode_combo_changed_cb` and/or `pslr_set_exposure_mode`. Then recently this issue was discovered and commit `f9e23edcf88bfc5ca356bbfce91ca085aef56e54` (Sun Mar 22 14:03:39 2020 +0100) tried to fix it by adding enum conversion to `pslr_set_exposure_mode`. However the conversion is done in the wrong direction. To try to summarize, currently: * `pktriggercord.c` calls `pslr_set_exposure_mode` with `pslr_gui_exposure_mode_t` argument. * `pktriggercord-cli.c` calls `pslr_set_exposure_mode` with `pslr_exposure_mode_t` argument. * `pslr.c` function `pslr_set_exposure_mode` incorrectly converts `pslr_exposure_mode_t` to `pslr_gui_exposure_mode_t`. In CLI case this is incorrect as the enum should be left to `pslr_exposure_mode_t` and in GUI case the mode is already in `pslr_gui_exposure_mode_t` type so it does the conversion twice. I think the whole mode switching code was buggy before `need_exposure_mode_conversion` flag was added for K-30 camera. This can also be seen from the issue asalamon74#52 that something is wrong. So I think that the K-30 handling was probably not needed in the first place. My experimental fix is as follows: * `pslr.c` keeps track of camera mode only using `pslr_exposure_mode_t` type. This is preferred over `pslr_gui_exposure_mode_t` as it has more entries and is more accurate. * CLI `pktriggercord-cli.c` code mostly operates with `pslr_exposure_mode_t` type except few `PSLR_GUI_EXPOSURE_MODE_B` compares which were changed. * GUI `pktriggercord.c` now converts between `pslr_gui_exposure_mode_t` and `pslr_exposure_mode_t` as needed. * `pslr.c` has new functions `pslr_convert_exposure_mode_to_gui` and `pslr_convert_exposure_mode_from_gui` instead of single `exposure_mode_conversion` function. * `need_exposure_mode_conversion` structure entry and `pslr_get_model_need_exposure_conversion` function are removed.
Hi I have tested it and there is a positive and a negative result. The positive is that it recognizes the camera is in Bulb mode and allows me to take a picture both in GUI and CLI mode. The negative is that I still have the same issue where the shutter fails to stay open it fires and closes immediately and downloads the image then after the specified time it completes as if it worked fine. so it has always had the issue in the attached image where it cannot get the status. If we can get the shutter to remain open during the exposure then i believe it will be a workable solution. |
@lkiersey Thank you for testing. My changes were mostly about switching to different exposure modes and reading what exposure mode the camera is using. In this sense I guess the patch works to some degree. Can you also tell if the pktriggercord recognizes other exposure modes (Tv, Av, M etc) accurately and if you change modes from pktriggercord then the mode is also correctly changed in camera? I would suspect that there is also another issue setting camera shutter time. E.g. in bulb mode there needs to be some generic (or maybe special) exposure time setting changed which is currently not done. |
Yes I can confirm that the camera correctly switches between all the different modes. And I can select them from the drop down in User mode. |
Thanks. So the mode setting works nicely. The log lines One quick hack to try is to change camera info flags in
to
This makes bulb mode use newer commands. However I would suspect that there is a low chance of this patch working as the cameras from this era seem to use older bulb commands. |
As you suspected this didnt work as it reports camera cannot work in new bulb mode. Its so close to working :) I can feel it! |
When I switch my K30 to BULB mode the attached message appears and the SW shuts down, If i try to start up in bulb mode, I get the same issue. Its like it cant determine what mode its in. If I start up in U1 mode I can set it to what ever mode I like except bulb, if I set it to bulb the same issue occurs. Other than that functionality is perfect, but I really want to be able to use bulb mode :) Would really appreciate you taking a look.
Thanks!!
Lenny
The text was updated successfully, but these errors were encountered: