12namespace Systemic::Pixels::Helpers
39 return DieType::D6Pipped;
42 return DieType::D6Fudge;
65 case DieType::D6Pipped:
66 case DieType::D6Fudge:
89 inline std::chrono::system_clock::time_point
getFirmwareDate(uint32_t buildTimestamp)
91 return std::chrono::system_clock::time_point{ std::chrono::seconds{ buildTimestamp } };
DieType getDieType(int ledCount)
Returns the die type based on the number of LEDs.
Definition: Helpers.h:19
bool isPixelChargingOrDone(PixelBatteryState batteryState)
Definition: Helpers.h:78
int getFaceCount(DieType dieType)
Returns the number of faces based on the die type.
Definition: Helpers.h:51
std::chrono::system_clock::time_point getFirmwareDate(uint32_t buildTimestamp)
Converts a UNIX timestamp in seconds to a time_point. Use this function to get the date of a Pixels f...
Definition: Helpers.h:89
Common types used across the Systemic::Pixel namespace.
PixelBatteryState
The different possible battery charging states.
Definition: PixelTypes.h:64
@ Charging
Battery is currently recharging.
@ Done
Battery is full and finished charging.
DieType
The different types of dice.
Definition: PixelTypes.h:87