InvertibleTouchSensor

open class InvertibleTouchSensor : TouchSensor

A TouchSensor where the readings can be inverted.

This is useful for sensors that are normally true, but are false when pressed, while various implementations expect the opposite to represent a sensor press.

Author

Lucas Bubner, 2024

Since

6.0.0

See also

TouchSensor

Constructors

Link copied to clipboard
constructor(@NonNull sensor: TouchSensor)
Creates a new InvertibleTouchSensor that inverts the readings of the given TouchSensor.

Functions

Link copied to clipboard
open fun close()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getManufacturer(): HardwareDevice.Manufacturer
Link copied to clipboard
open fun getValue(): Double
Link copied to clipboard
open fun getVersion(): Int
Link copied to clipboard
open fun isPressed(): Boolean
Link copied to clipboard
open fun setInverted(inverted: Boolean)
Sets the inversion state of the sensor.