16 #ifndef PSEN_SCAN_V2_STANDALONE_SCAN_RANGE_H
17 #define PSEN_SCAN_V2_STANDALONE_SCAN_RANGE_H
30 template <
int16_t min_allowed_angle,
int16_t max_allowed_angle>
33 static_assert(min_allowed_angle < max_allowed_angle,
"MIN-angle limit smaller than MAX-angle limit.");
63 template <
int16_t min_angle_raw,
int16_t max_angle_raw>
66 : start_angle_(start_angle), end_angle_(end_angle)
71 if (start_angle < min_angle || start_angle > max_angle)
73 throw std::out_of_range(
"Start angle out of range");
76 if (end_angle < min_angle || end_angle > max_angle)
78 throw std::out_of_range(
"End angle out of range");
81 if (start_angle >= end_angle)
83 throw std::invalid_argument(
"Start angle must be smaller than end angle");
87 template <
int16_t min_angle,
int16_t max_angle>
93 template <
int16_t min_angle,
int16_t max_angle>
99 template <
int16_t min_angle,
int16_t max_angle>
105 template <
int16_t min_angle,
int16_t max_angle>
108 return this->
start();
111 template <
int16_t min_angle,
int16_t max_angle>
121 #endif // PSEN_SCAN_V2_STANDALONE_SCAN_RANGE_H