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

Fix Pentax shutter speed calculations for older cameras #141

Merged
merged 2 commits into from Jun 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions indi-pentax/pktriggercord_ccd.cpp
Expand Up @@ -301,11 +301,22 @@ bool PkTriggerCordCCD::StartExposure(float duration)
}
PrimaryCCD.setExposureDuration(duration);
ExposureRequest = duration;
pslr_rational_t shutter_speed = {(int)(duration*100),100};
float F = duration;
pslr_rational_t shutter_speed;
if (F < 5) {
F = F * 10;
shutter_speed.denom = 10;
shutter_speed.nom = F;
} else {
shutter_speed.denom = 1;
shutter_speed.nom = F;
}
//pslr_rational_t shutter_speed = {(int)(duration*100),100};
//Doesn't look like we need to actually set the shutter speed in bulb mode
if ( status.exposure_mode != PSLR_GUI_EXPOSURE_MODE_B ) {
if (duration != (float)status.current_shutter_speed.nom/status.current_shutter_speed.denom)
if (duration != (float)status.current_shutter_speed.nom/status.current_shutter_speed.denom) {
pslr_set_shutter(device, shutter_speed);
}
}

if (autoFocusS[0].s == ISS_ON) pslr_focus(device);
Expand Down