Skip to content

Commit

Permalink
ptp2: rename PTPParams::uilocked -> eos_uilocked to make scope clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
axxel authored and msmeissn committed Oct 8, 2024
1 parent 2eed98a commit 0720269
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions camlibs/ptp2/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,20 +334,20 @@ camera_canon_eos_update_capture_target(Camera *camera, GPContext *context, int v
if (ct_val.u32 == PTP_CANON_EOS_CAPTUREDEST_HD) {
uint16_t ret;
#if 0
int uilocked = params->uilocked;
int eos_uilocked = params->eos_uilocked;

/* if we want to download the image from the device, we need to tell the camera
* that we have enough space left. */
/* this might be a trigger value for "no space" -Marcus
ret = ptp_canon_eos_pchddcapacity(params, 0x7fffffff, 0x00001000, 0x00000001);
*/

if (!uilocked)
if (!eos_uilocked)
LOG_ON_PTP_E (ptp_canon_eos_setuilock (params));
#endif
ret = ptp_canon_eos_pchddcapacity(params, 0x0fffffff, 0x00001000, 0x00000001);
#if 0
if (!uilocked)
if (!eos_uilocked)
LOG_ON_PTP_E (ptp_canon_eos_resetuilock (params));
#endif
/* not so bad if its just busy, would also fail later. */
Expand Down Expand Up @@ -584,9 +584,9 @@ camera_unprepare_canon_eos_capture(Camera *camera, GPContext *context) {
CR (camera_canon_eos_update_capture_target(camera, context, 1));

if (ptp_operation_issupported(&camera->pl->params, PTP_OC_CANON_EOS_ResetUILock)) {
if (params->uilocked) {
if (params->eos_uilocked) {
LOG_ON_PTP_E (ptp_canon_eos_resetuilock (params));
params->uilocked = 0;
params->eos_uilocked = 0;
}
}

Expand Down Expand Up @@ -10053,13 +10053,13 @@ _put_Canon_EOS_UILock(CONFIG_PUT_ARGS)
CR (gp_widget_get_value(widget, &val));

if (val) {
if (!params->uilocked)
if (!params->eos_uilocked)
C_PTP_REP (ptp_canon_eos_setuilock (params));
params->uilocked = 1;
params->eos_uilocked = 1;
} else {
if (params->uilocked)
if (params->eos_uilocked)
C_PTP_REP (ptp_canon_eos_resetuilock (params));
params->uilocked = 0;
params->eos_uilocked = 0;
}
return GP_OK;
}
Expand Down
4 changes: 2 additions & 2 deletions camlibs/ptp2/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -6017,12 +6017,12 @@ camera_trigger_canon_eos_capture (Camera *camera, GPContext *context)
if (dpd.CurrentValue.u32 < 100) {
/* Tell the camera we have enough free space on the PC */
#if 0
if (!params->uilocked)
if (!params->eos_uilocked)
ptp_canon_eos_setuilock(params);
#endif
LOG_ON_PTP_E (ptp_canon_eos_pchddcapacity(params, 0x0fffffff, 0x00001000, 0x00000001));
#if 0
if (!params->uilocked)
if (!params->eos_uilocked)
ptp_canon_eos_resetuilock(params);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion camlibs/ptp2/ptp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3922,13 +3922,13 @@ struct _PTPParams {
unsigned int canon_props_len;
int canon_viewfinder_on;
int canon_event_mode;
int uilocked;

/* PTP: Canon EOS event queue */
PTPCanonEOSEvent *eos_events;
unsigned int eos_events_len;
int eos_captureenabled;
int eos_camerastatus;
int eos_uilocked;

/* PTP: Nikon specifics */
int controlmode;
Expand Down

0 comments on commit 0720269

Please sign in to comment.