Skip to content

Commit

Permalink
Merge pull request #10 from jwlodek/master
Browse files Browse the repository at this point in the history
R1-2
  • Loading branch information
jwlodek committed Jun 11, 2019
2 parents 0fe6a7d + e134efa commit 5d8995b
Show file tree
Hide file tree
Showing 13 changed files with 1,008 additions and 171 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
Author: Jakub Wlodek
Corresponding Author: Kazimierz Gofron
Created: July 19, 2018
Last Updated: January 18, 2018
Last Updated: January 18, 2019
Copyright (c): 2018-2019 Brookhaven National Laboratory

### An EPICS Driver for USB Video Class (UVC) devices

Release versions of this driver are available on Github. Release notes are available on https://jwlodek.github.io/ADUVC. Please report any problems or feature requests on the issues page on https://github.com/jwlodek/ADUVC.
Release versions of this driver are available on Github. Release notes are available on https://jwlodek.github.io/ADUVC. Please report any problems or feature requests on the issues page on https://github.com/epicsNSLS2-areaDetector/ADUVC.

### Installation

Prior to installing the ADUVC area detector driver, there are several dependencies that must be met. First, libusb, libjpeg, and cmake and their development packages must be installed. On a debian based linux machine, this can be done with the following command:

```
sudo apt install libusb-dev libjpeg-dev cmake
sudo apt install libusb-dev libusub-1.0-0-dev libjpeg-dev cmake
```
If you wish to use the libjpeg version included with ADSupport, it is important to specifiy that during the build of libuvc, because otherwise there will be a conflict when building ADUVC. The simplest solution is to set JPEG_EXTERNAL=YES in the CONFIG_SITE.local file in the configure directory at the top level of areaDetector.

Expand Down Expand Up @@ -61,7 +61,7 @@ sudo ./startEPICS.sh

Note that running as sudo is not required if connecting via product ID.

Further documentation is available at https://jwlodek.github.io/ADUVC
Further documentation, including CSS screenshots and usage information, is available at the driver's [website](https://jwlodek.github.io/ADUVC).

### Possible use cases

Expand Down Expand Up @@ -90,7 +90,7 @@ There are also several more traditional industrial cameras that use the UVC stan
* If using ADUVC with Virtualbox, you need to passthrough the hold of the camera to the guest OS. Instructions for doing so can be found on this website: https://scribles.net/using-webcam-in-virtualbox-guest-os-on-windows-host/


### USB Camera IOC Issues
### Fixing issues with root ownership of UVC devices

* The USB camera device is typically owned by root, which prevents EPICS IOC from running as softioc user, and automatic startup using procServer. To grant access to USB camera device by other users, such as softioc, we wrote udev rules.

Expand Down
19 changes: 19 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,28 @@ Author: Jakub Wlodek

ADUVC requires libusb, libuvc, epics-base, epics-modules, ADCore, and ADSupport. Further installation information can be found in the README file.

<!--RELEASE START-->
Release Notes
=============

R1-2 (11-June-2019)
-----
* Key detector features implemented:
* Camera modes now read into structs at startup
* Valid camera mode structs selectable from dropdown in CSS - improves usability
* Autosave functionality tested and working.
* More extensive status messages/detector feedback

* Key fixes and improvements
* Removed unused PVs (ADUVC_VendorID, ADUVC_ProductID)
* Fixed memory leak caused by early return from frame conversion function on error
* Added Makefiles to the support modules
* Documentation updates
* Added information on using camera with Virtual Box
* Removed newlines from status messages for better readability.
* CSS screen updated


R1-1 (28-January-2019)
-----
* Key detector features implemented:
Expand Down
75 changes: 74 additions & 1 deletion adUVCApp/Db/ADUVC.template
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,81 @@ record(mbbi, "$(P)$(R)UVCImageFormat_RBV"){
field(SCAN, "I/O Intr")
}

##############################################
# Stores supported camera modes for easier switching
################################################
record(mbbo, "$(P)$(R)UVCCameraFormat"){
field(PINI, "YES")
field(DTYP, "asynInt32")
field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))UVC_CAMERA_FORMAT")
field(ZRST, "Supported Mode 1")
field(ZRVL, "0")
field(ONST, "Supported Mode 2")
field(ONVL, "1")
field(TWST, "Supported Mode 3")
field(TWVL, "2")
field(THST, "Supported Mode 4")
field(THVL, "3")
field(FRST, "Supported Mode 5")
field(FRVL, "4")
field(FVST, "Supported Mode 6")
field(FVVL, "5")
field(SXST, "Supported Mode 7")
field(SXVL, "6")
field(VAL, "0")
info(autosaveFields, "VAL")
}

record(mbbi, "$(P)$(R)UVCCameraFormat_RBV"){
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))UVC_CAMERA_FORMAT")
field(ZRST, "Supported Mode 1")
field(ZRVL, "0")
field(ONST, "Supported Mode 2")
field(ONVL, "1")
field(TWST, "Supported Mode 3")
field(TWVL, "2")
field(THST, "Supported Mode 4")
field(THVL, "3")
field(FRST, "Supported Mode 5")
field(FRVL, "4")
field(FVST, "Supported Mode 6")
field(FVVL, "5")
field(SXST, "Supported Mode 7")
field(SXVL, "6")
field(SCAN, "I/O Intr")
}

##############################################
# Shows information regarding the currently selected supported format
################################################
record(waveform, "$(P)$(R)UVCFormatDescription_RBV"){
field(DTYP, "asynOctetRead")
field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))UVC_FORMAT_DESCRIPTION")
field(FTVL, "CHAR")
field(NELM, "256")
field(SCAN, "I/O Intr")
}

##############################################
# Applies the supported format to the IOC
################################################
record(ao, "$(P)$(R)UVCApplyFormat"){
field(PINI, "YES")
field(DTYP, "asynInt32")
field(OUT, "@asyn($(PORT),$(ADDR),$(TIMEOUT))UVC_APPLY_FORMAT")
field(VAL, "0")
field(autosaveFields, "VAL")
}

record(ai, "$(P)$(R)UVCApplyFormat_RBV"){
field(DTYP, "asynInt32")
field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))UVC_APPLY_FORMAT")
field(SCAN, "I/O Intr")
}

################################################################################################
# Additional Camera Functions (UNDER DEVELOPMENT -> Currently not in use)
# Additional Camera Functions -> used by getter and setter functions in the driver
################################################################################################

##################################################
Expand Down
13 changes: 11 additions & 2 deletions adUVCApp/Db/ADUVC_settings.req
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
$(P)$(R)UVCBrightness
file "ADBase_settings.req", P=$(P), R=$(R)
$(P)$(R)UVCComplianceLevel
$(P)$(R)UVCFramerate
$(P)$(R)UVCImageFormat
$(P)$(R)UVCGamma
$(P)$(R)UVCBacklightCompensation
$(P)$(R)UVCBrightness
$(P)$(R)UVCContrast
$(P)$(R)UVCPowerLine
$(P)$(R)UVCHue
$(P)$(R)UVCSaturation
$(P)$(R)UVCSaturation
$(P)$(R)UVCSharpness
$(P)$(R)UVCCameraFormat
$(P)$(R)UVCFormatDescription_RBV
$(P)$(R)UVCApplyFormat
Loading

0 comments on commit 5d8995b

Please sign in to comment.