Pixel value names map for usePixelValue function. Maps the value name with the corresponding data type.

interface UsePixelValueNamesMap {
    battery: BatteryEvent;
    name: string;
    roll: Pick<RollEvent, "face">;
    rollState: RollEvent;
    rssi: number;
    telemetry: Telemetry;
    temperature: {
        batteryTemperature: number;
        mcuTemperature: number;
    };
}

Properties

battery: BatteryEvent

Updates with the battery level and charging status.

name: string

Updated when the die is renamed.

roll: Pick<RollEvent, "face">

Updates with the result of a roll.

Remarks

  • The value is an object with the face number rather than just a number so rolling the same face will trigger a state change nonetheless.
  • No value is returned until a roll is made.
rollState: RollEvent

Updates with the roll state and face on any roll event but not more often than specified by the refresh interval argument, except when there is a roll result (i.e. state === 'onFace') in which case it updates immediately.

Remarks

No value is returned until a roll event occurs.

rssi: number

Updates with the RSSI value.

telemetry: Telemetry

Updates with the telemetry data.

temperature: {
    batteryTemperature: number;
    mcuTemperature: number;
}

Updates with the temperature in Celsius.

Type declaration

  • batteryTemperature: number
  • mcuTemperature: number

Generated using TypeDoc