pointercalibration
The pointercalibration object allows you to calibrate a touchscreen connected to the player.
pointercalibration IDL
interface PointerCalibration {
Promise<void> startCalibration();
Promise<int> getCalibrationStatus();
Promise<void> setCalibrationRanges(int XMin, int XMax, int YMin, int YMax);
Promise<bool> clearStoredCalibration();
Promise<bool> isCalibrated();
Promise<String> getDiagnosticInfoHTML(bool deviceInfo = true, bool events = true);
Promise<void> startEventLogging();
Promise<void> stopEventLogging();
};
Object Creation
To create a pointcalibration object, first load the brightsign/pointercalibration
 module using the require()
 method. Then create an instance of the pointcalibration class.
var pointerCalibrationClass = require("@brightsign/pointercalibration");
var pointerCalibration = new pointerCalibrationClass();
PointerCalibration
startCalibration()
Promise<void> startCalibration()
Begins touchscreen calibration. This method may fail if no suitable devices are present.
getCalibrationStatus()
Returns the current touchscreen calibration status as an integer. This method may fail if no suitable devices are present. The following are possible return values:
0: Calibrating the top-left point
1: Calibrating the top-right point
2: Calibrating the bottom-right point
100: Calibration complete
setCalibrationRanges()
Overrides the screen range values provided by the touchscreen. This method is useful when the entirety of the video output is not being displayed on the touch surface. Practical use of this method usually requires a custom calibration script, appropriate images, and a calibration setting matched to a particular setup.
clearStoredCalibration()
Clears the stored calibration setting for a touch screen. This method may fail if no suitable devices are present.Â
isCalibrated()
Returns true
if calbration data is present in system software.
getDiagnosticInfoHTML()
Returns touch-screen diagnostics. If deviceInfo
is true
, this method will return hardware and kernel-configuration information; if events
 is true
, this method will return a log of events (the event log is then deleted up to that point).
startEventLogging()
Begins logging for touchscreen events.
stopEventLogging()
Stops logging for touchscreen events.