Skip to content

Commit

Permalink
merged with pktriggercord
Browse files Browse the repository at this point in the history
largely renames of functions

added K-3III
  • Loading branch information
msmeissn committed Sep 28, 2023
1 parent 0ae349c commit 3118a77
Show file tree
Hide file tree
Showing 15 changed files with 482 additions and 254 deletions.
8 changes: 6 additions & 2 deletions camlibs/pentax/Makefile-files
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@ camlibdoc_DATA += %reldir%/README.pentax
EXTRA_LTLIBRARIES += pentax.la

pentax_la_SOURCES =
pentax_la_SOURCES += %reldir%/pslr.c
pentax_la_SOURCES += %reldir%/library.c
pentax_la_SOURCES += %reldir%/pslr.c
pentax_la_SOURCES += %reldir%/pslr_enum.c
pentax_la_SOURCES += %reldir%/pslr_log.c
pentax_la_SOURCES += %reldir%/pslr_lens.c
pentax_la_SOURCES += %reldir%/pslr_model.c
pentax_la_SOURCES += %reldir%/pslr_enum.h
pentax_la_SOURCES += %reldir%/pslr_utils.c
pentax_la_SOURCES += %reldir%/pslr.h
pentax_la_SOURCES += %reldir%/pslr_enum.h
pentax_la_SOURCES += %reldir%/pslr_lens.h
pentax_la_SOURCES += %reldir%/pslr_log.h
pentax_la_SOURCES += %reldir%/pslr_model.h
pentax_la_SOURCES += %reldir%/pslr_scsi.h
pentax_la_SOURCES += %reldir%/pslr_utils.h
pentax_la_SOURCES += %reldir%/exiftool_pentax_lens.txt
pentax_la_SOURCES += %reldir%/js0n.c
pentax_la_SOURCES += %reldir%/js0n.h
Expand Down
50 changes: 25 additions & 25 deletions camlibs/pentax/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)

pslr_get_status (&camera->pl->pslr, &status);

statusinfo = collect_status_info( &camera->pl->pslr, status );
statusinfo = pslr_get_status_info( &camera->pl->pslr, status );

sprintf (summary->text, _(
"Pentax K DSLR capture driver.\n"
Expand Down Expand Up @@ -618,7 +618,7 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)

pslr_get_status (&camera->pl->pslr, &status);

model = pslr_camera_name (&camera->pl->pslr);
model = pslr_get_camera_name (&camera->pl->pslr);

available_resolutions = pslr_get_model_jpeg_resolutions (&camera->pl->pslr);

Expand Down Expand Up @@ -775,15 +775,15 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (t, _("B"));
gp_widget_add_choice (t, _("X"));
switch (status.exposure_mode) {
case PSLR_GUI_EXPOSURE_MODE_GREEN: gp_widget_set_value (t, _("GREEN"));break;
case PSLR_GUI_EXPOSURE_MODE_M: gp_widget_set_value (t, _("M"));break;
case PSLR_GUI_EXPOSURE_MODE_P: gp_widget_set_value (t, _("P"));break;
case PSLR_GUI_EXPOSURE_MODE_AV: gp_widget_set_value (t, _("AV"));break;
case PSLR_GUI_EXPOSURE_MODE_TV: gp_widget_set_value (t, _("TV"));break;
case PSLR_GUI_EXPOSURE_MODE_SV: gp_widget_set_value (t, _("SV"));break;
case PSLR_GUI_EXPOSURE_MODE_TAV: gp_widget_set_value (t, _("TAV"));break;
case PSLR_GUI_EXPOSURE_MODE_X: gp_widget_set_value (t, _("X"));break;
case PSLR_GUI_EXPOSURE_MODE_B: gp_widget_set_value (t, _("B"));break;
case PSLR_EXPOSURE_MODE_GREEN: gp_widget_set_value (t, _("GREEN"));break;
case PSLR_EXPOSURE_MODE_M: gp_widget_set_value (t, _("M"));break;
case PSLR_EXPOSURE_MODE_P: gp_widget_set_value (t, _("P"));break;
case PSLR_EXPOSURE_MODE_AV: gp_widget_set_value (t, _("AV"));break;
case PSLR_EXPOSURE_MODE_TV: gp_widget_set_value (t, _("TV"));break;
case PSLR_EXPOSURE_MODE_SV: gp_widget_set_value (t, _("SV"));break;
case PSLR_EXPOSURE_MODE_TAV: gp_widget_set_value (t, _("TAV"));break;
case PSLR_EXPOSURE_MODE_X: gp_widget_set_value (t, _("X"));break;
case PSLR_EXPOSURE_MODE_B: gp_widget_set_value (t, _("B"));break;
default:
sprintf(buf, _("Unknown mode %d"), status.exposure_mode);
gp_widget_set_value (t, buf);
Expand Down Expand Up @@ -839,22 +839,22 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)

ret = gp_widget_get_child_by_label (window, _("Shooting Mode"), &w);
if ((ret == GP_OK) && gp_widget_changed (w)) {
pslr_gui_exposure_mode_t exposuremode;
pslr_exposure_mode_t exposuremode;

gp_widget_set_changed (w, 0);
gp_widget_get_value (w, &sval);

exposuremode = PSLR_GUI_EXPOSURE_MODE_MAX;
if (!strcmp(sval,_("GREEN"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_GREEN;
if (!strcmp(sval,_("M"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_M;
if (!strcmp(sval,_("B"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_B;
if (!strcmp(sval,_("P"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_P;
if (!strcmp(sval,_("SV"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_SV;
if (!strcmp(sval,_("TV"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_TV;
if (!strcmp(sval,_("AV"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_AV;
if (!strcmp(sval,_("TAV"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_TAV;
if (!strcmp(sval,_("X"))) exposuremode = PSLR_GUI_EXPOSURE_MODE_TAV;
if (exposuremode != PSLR_GUI_EXPOSURE_MODE_MAX) {
exposuremode = PSLR_EXPOSURE_MODE_MAX;
if (!strcmp(sval,_("GREEN"))) exposuremode = PSLR_EXPOSURE_MODE_GREEN;
if (!strcmp(sval,_("M"))) exposuremode = PSLR_EXPOSURE_MODE_M;
if (!strcmp(sval,_("B"))) exposuremode = PSLR_EXPOSURE_MODE_B;
if (!strcmp(sval,_("P"))) exposuremode = PSLR_EXPOSURE_MODE_P;
if (!strcmp(sval,_("SV"))) exposuremode = PSLR_EXPOSURE_MODE_SV;
if (!strcmp(sval,_("TV"))) exposuremode = PSLR_EXPOSURE_MODE_TV;
if (!strcmp(sval,_("AV"))) exposuremode = PSLR_EXPOSURE_MODE_AV;
if (!strcmp(sval,_("TAV"))) exposuremode = PSLR_EXPOSURE_MODE_TAV;
if (!strcmp(sval,_("X"))) exposuremode = PSLR_EXPOSURE_MODE_TAV;
if (exposuremode != PSLR_EXPOSURE_MODE_MAX) {
pslr_set_exposure_mode(&camera->pl->pslr, exposuremode);
pslr_get_status(&camera->pl->pslr, &status);
} else {
Expand Down Expand Up @@ -886,7 +886,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
rational.denom = 10;
rational.nom = (int)(10 * fval);

pslr_set_ec (&camera->pl->pslr, rational);
pslr_set_expose_compensation (&camera->pl->pslr, rational);

}

Expand Down Expand Up @@ -965,7 +965,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
if ((ret == GP_OK) && gp_widget_changed (w)) {
int bulb;

if (status.exposure_mode != PSLR_GUI_EXPOSURE_MODE_B) {
if (status.exposure_mode != PSLR_EXPOSURE_MODE_B) {
gp_context_error (context, _("You need to switch the shooting mode or the camera to 'B' for bulb exposure."));
return GP_ERROR;
}
Expand Down
Loading

0 comments on commit 3118a77

Please sign in to comment.