Caching

class Caching(cacheTolerance: Double, whenSet: (Double?) -> Unit) : ReadWriteProperty<Any?, Double>

Constructors

Link copied to clipboard
constructor(cacheTolerance: Double, whenSet: (Double?) -> Unit)

Functions

Link copied to clipboard
open operator override fun getValue(thisRef: Any?, property: KProperty<*>): Double
Link copied to clipboard
fun reset()

Forgets the cached value so the next set is always written to the hardware. Call this whenever the underlying hardware object is re-created.

Link copied to clipboard
open operator override fun setValue(thisRef: Any?, property: KProperty<*>, value: Double)