Package com.studica.frc

## Class LidarMini.LidarHealth

- java.lang.Object
- - com.studica.frc.LidarMini.LidarHealth

Enclosing class:
  LidarMini

    public static class LidarMini.LidarHealth
    extends java.lang.Object

Device health status.

### Status byte bit map

Health status bit map
Bit | Module | 0 | 1
--- | --- | --- | ---
0 | Sensor (image sensor) | Normal | Abnormal
1 | Encoder (angle detection) | Normal | Abnormal
2 | Wireless power supply | Normal | Abnormal
3 | PD (laser feedback voltage) | Normal | Abnormal
4 | LD (laser drive current) | Normal | Abnormal
5 | Data (scan data validity) | Normal | Abnormal

Note: Bits 3 and 4 (PD/LD) are only sampled once at power-on. Bits 0, 1, and 5 are updated in real time during scanning.

### Field Summary

Fields
`int` `errorCode` Extended error code (consult the T-mini Plus development manual).
`int` `status` Raw status byte.

### Constructor Summary

Constructors
`LidarHealth()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `isDataOk()`
`boolean` `isEncoderOk()`
`boolean` `isHealthy()`
`boolean` `isLDOk()`
`boolean` `isPDOk()`
`boolean` `isSensorOk()`
`boolean` `isWirelessPowerOk()`
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

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

### Field Detail

#### status

    public int status

Raw status byte. Each bit represents a module; 0 = normal, 1 = abnormal.

#### errorCode

    public int errorCode

Extended error code (consult the T-mini Plus development manual).

### Constructor Detail

#### LidarHealth

    public LidarHealth()

### Method Detail

#### isSensorOk

    public boolean isSensorOk()

Returns:
  `true` if the image sensor is operating normally.

#### isEncoderOk

    public boolean isEncoderOk()

Returns:
  `true` if the angle-detection encoder is operating normally.

#### isWirelessPowerOk

    public boolean isWirelessPowerOk()

Returns:
  `true` if the wireless power supply is operating normally.

#### isPDOk

    public boolean isPDOk()

Returns:
  `true` if the laser feedback voltage (PD) is normal.

#### isLDOk

    public boolean isLDOk()

Returns:
  `true` if the laser drive current (LD) is normal.

#### isDataOk

    public boolean isDataOk()

Returns:
  `true` if the scan data output is normal.

#### isHealthy

    public boolean isHealthy()

Returns:
  `true` if all monitored modules report no abnormalities (status bits 0-5 are all 0).

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`