Class DeviceUtilsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final static ServoTrim MG90S_TRIM
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final ServoTrim getMG90S_TRIM() Defines the servo trim for an MG90S servo.
      final static Float asDegreesF(Float $self) Convert a float representing degrees C to F.
      final static Integer inRange(Integer $self, String name, IntRange range) Checks to see if an Int is in the specified range
      final static Integer toInt(Boolean $self) Convert a boolean to integer "equivalent"
      final static Pair<Byte, Byte> to2Bytes(Integer $self) Convert to two bytes
      final static Pair<Byte, Byte> toBytes(Short $self) Convert to two bytes
      final static ByteArray twoBytesAndBuffer(Byte first, Byte second, ByteArray buffer) Common I2C pattern: two bytes and a buffer (register, offset, payload)
      final static Unit rotate(StepperMotorInterface $self, Float degrees, StepperMotorInterface.Direction direction, Duration pause, Function0<Boolean> interruptus) Rotate with a simple interruption - note this can be bad if the interruption method is left as the default.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait