Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a roundup of small fixes/adjustments in the testing round.
Primary / Secondary Fiducial Diameter Null Pointer
In case a primary/secondary fiducial location X, Y was set manually, but the diameter was not (still null), it resulted in a NullPointerException (see user report in the Justification).
Note, this never happens when these are setup through Issues & Solutions (as is recommended).
Add Fast Baud-Rates for Serial Connections
Adds missing (high) baud-rates for serial connections (drivers). The missing baud-rates were taken from the jSerial "posix" implementation.
Note: some baud-rates were already in there that are not in the "posix" list, i.e. those will (still) not work on *ix OSes, but may work on Windows, these are:
SwitcherCameras Revisited
Due to problems still reported after #1500 and #1503, a new approach to the SwitcherCamera was implemented:
synchronized
on theswitcher
map, which will always at least potentially be prone to deadlocks, we use aReentrantLock
and defensivetryLock()
.tryLock()
and back down immediately (preview frames may be dropped, but deadlocks prevented).tryLock()
with a timeout, so deadlock should be excluded even there. The timeout is four times the Actuator Delay, so any normal congestion should be covered, but the deadlock then resolved. The capture will then fail and deliver a "red x" frame.Camera Exposure Device Settings
It seems that ELP cameras have difficulty reporting the exposure setting right on Linux. Consequently, OpenPnpCaptureCamera reports a 1 to 5000 range. The range behaves non-linear, exposure is all over the place. When the Issues & Solutions static exposure calibration is run, it therefore "never" finishes. This fixes it by just spacing out a maximum of 32 probes. Tests show it still finds a reasonable value.
Justification
Related user group discussions:
Instructions for Use
A SwitcherCamera may now have a Preview FPS > 0 so it can remain live when switched-to.
Conversely, it is recommended to set the Preview FPS of the capture device to a very low value or 0, as those preview frames are snatched away from the SwitcherCamera.
Implementation Details
org.openpnp.spi
ororg.openpnp.model
packages.mvn test
before submitting the Pull Request.