SensorCalibrationView
Type: SensorCalibrationView
Extends ViewScript class of the Sensor Calibration view.
Properties
| Property | Description |
|---|---|
| Since version 4.04.23, Named properties may be accessed directly instead of requiring getViewProperty / setViewProperty. The property ID may be identified in the Properties view. |
enabled
| Enables/disables the view. |
View Properties
Properties defined by the view that are normally editable via properties editor.
| Property | Name | Description |
|---|---|---|
sensor_table |
Sensor Table | Sets the sensor table that is calibrated by this view. |
input_a2d_option |
Input A2D Option | Sets the option that selects the input to this table. For A2Ds this may mean that the pullup value can be automatically configured when offering conversion from resistance to voltage |
output_channel |
Output Channel | Indicates the output channel of this table for dependency checking purposes. |
output_channel2 |
Output Channel 2 | Indicates a secondary output channel of this table for dependency checking purposes. |
interpolate_output |
Interpolate Output | If set, user specified lookup table will be re-interpolated to match the site count of the underlying table. Otherwise the sites will be entered exactly and any remaining cells in the table will be filled with the last value. |
optimize_scaling |
Optimize Scaling | If set, and the table has associated scalar/offset options for scaling its output value, then optimize the scalar/offset options to give as close to full-scale resolution on table values as possible. |
lower_headroom |
Lower Headroom | When optimizing scaling, this provides some headroom at the lower end of the table output values. In some cases this is needed for detecting sensor errors. If the value is an integer, the headroom is expressed in raw units. If the value has a decimal point then this is a real value in the user defined output units for the calibration. If the value has a % postfix then this is a percentage of the total possible raw range of the table. |
upper_headroom |
Upper Headroom | When optimizing scaling, this provides some headroom at the upper end of the table output values. In some cases this is needed for detecting sensor errors. If the value is an integer, the headroom is expressed in raw units. If the value has a decimal point then this is a real value in the user defined output units for the calibration. If the value has a % postfix then this is a percentage of the total possible raw range of the table. |
show_resistance |
Show Resistance Conversion | For tables specified in voltage, options to convert from resistance values can be provided. |
acceptable_axis_error |
Acceptable Axis Error % | When applying the calibration, if the real value error (set on the axis table) is larger than this percentage then an error shall be raised |
acceptable_table_error |
Acceptable Table Error % | When applying the calibration, if the real value error (set on the sensor table itself) is larger than this percentage then an error shall be raised |
title |
Title | The title of the window. |
id |
Script ID | The scripting ID of the window. Can be used as an alternative to the title for searching for windows from scripts. |
tooltip |
Tool Tip | Window tool tip. |
Methods
| Method | Description |
|---|---|
callListener(eventName, [args])
| Calls all event listeners for the given event name, useful for testing. |
getParent()
| Get the parent window/view (if any) of this view. |
getViewProperties()
| Returns an array of objects containing the view properties. Each element has the fields 'name', 'id', 'value', 'hint'. If the property is a category then it will also have an array field 'properties'. These properties are the ones normally editable via the properties view. |
getViewProperty(id)
| Gets a property value from the view, given the property ID. Property IDs can be listed using getViewProperties. These properties are the ones normally editable via the properties view. |
on(eventName, callback)
| Adds an event listener for the given event name. e.g. view.on("click", function() { ... }); |
pxFromDimension(dimension)
| Convert a dimension string (e.g. "10em", "50dp", "100px") into pixel units, relative to the view object. Returns the size in pixels. |
removeAllListeners([eventName])
| Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed. |
removeListener(eventName, callback)
| Removes an event listener for the given event name. e.g. let callback = function() { ... }; view.on("click", callback); view.removeListener("click", callback); |
setViewProperty(id, value)
| Sets a property on the view, given the property ID and value. Property IDs can be listed using getViewProperties These properties are the ones normally editable via the properties view. |