Package crackers.kobots.devices
        Class DeviceUtilsKt
- 
                    
                    
- All Implemented Interfaces:
 
public final class DeviceUtilsKt 
- 
                
                    
                    
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description final static FloatasDegreesF(Float $self)Convert a float representing degrees C to F. final static IntegerinRange(Integer $self, String name, IntRange range)Checks to see if an Int is in the specified range final static IntegertoInt(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 ByteArraytwoBytesAndBuffer(Byte first, Byte second, ByteArray buffer)Common I2C pattern: two bytes and a buffer (register, offset, payload) final static Unitrotate(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. - 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
asDegreesF
final static Float asDegreesF(Float $self)
Convert a float representing degrees C to F.
 
- 
                                        
inRange
final static Integer inRange(Integer $self, String name, IntRange range)
Checks to see if an Int is in the specified range
 
- 
                                        
twoBytesAndBuffer
final static ByteArray twoBytesAndBuffer(Byte first, Byte second, ByteArray buffer)
Common I2C pattern: two bytes and a buffer (register, offset, payload)
 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -