Skip to content

Commit

Permalink
Merge pull request #23 from daykin/master
Browse files Browse the repository at this point in the history
Fix: Relinquish channel control on reset
  • Loading branch information
MarkRivers authored Jul 20, 2023
2 parents 95d8836 + 59e73db commit 7975885
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions aravisApp/src/ADAravis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,20 @@ asynStatus ADAravis::makeCameraObject() {

GErrorHelper err;
/* remove old camera if it exists */
/* relinquish CCP before unreferencing it */
if (this->camera != NULL) {
if(arv_camera_is_gv_device(this->camera) && arv_gv_device_is_controller(ARV_GV_DEVICE(this->device))){
if (!(arv_gv_device_leave_control(ARV_GV_DEVICE(this->device),err.get()))){
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s: Current ArvGvDevice has control, but control couldn't be relinquished. err=%s\n",
driverName, functionName, err->message);
}
else {
asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW,
"%s:%s: Relinquished control of camera.\n",
driverName, functionName);
}
}
g_object_unref(this->camera);
this->camera = NULL;
}
Expand Down

0 comments on commit 7975885

Please sign in to comment.