18#include "sensorring/platform/SensorringExport.hpp"
42 if (max_brightness < 0 || max_brightness > 255) {
43 throw std::invalid_argument(
"LED max_brightness must be an integer in [0, 255].");
51 throw std::invalid_argument(
"LED distance_map_lower_m and distance_map_upper_m must be finite meters with 0 <= lower < upper, distinct and representable as float32.");
Parameter structure for a device.
Base parameter structure of a device. A device is one sensor or actuator on a sensor board.
Definition DeviceParams.hpp:28
Parameter structure of the Light.
Definition LightParams.hpp:30
double distance_map_lower_m
Lower DistanceMap saturation threshold in meters. Lights are red below this distance.
Definition LightParams.hpp:32
std::int64_t max_brightness
DistanceMap peak channel brightness on the LED's 0-255 scale (0 disables it).
Definition LightParams.hpp:38
virtual ~LightParams()=default
Destructor.
double distance_map_upper_m
Upper DistanceMap saturation threshold in meters. Lights are green above this distance.
Definition LightParams.hpp:35
void validateDistanceMapRange() const
Throws if the range cannot be represented by the firmware's float32 parameters.
Definition LightParams.hpp:48
void validateDistanceMapBrightness() const
Validates the distance map parameters.
Definition LightParams.hpp:41