We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2592a36 commit 312b841Copy full SHA for 312b841
1 file changed
include/CommonConfig.hpp
@@ -58,6 +58,7 @@ namespace LOAD {
58
* @brief Number of load pins available.
59
*/
60
constexpr uint_fast8_t NUM_PINS = 6;
61
+ static_assert(NUM_PINS <= 8, "We only have 8 pins available");
62
63
/**
64
* @brief Total number of possible pin combinations (2^NUM_PINS).
@@ -264,6 +265,11 @@ namespace LOAD {
264
265
detail::deduplicateSortedArray<NUM_COMBINATIONS,
266
NUM_UNIQUE_COMBINATIONS>(
267
ALL_COMBINATIONS_mOhms);
268
+ static_assert(NUM_UNIQUE_COMBINATIONS > 0,
269
+ "There must be at least one unique combination");
270
+ static_assert(UNIQUE_COMBINATIONS_mOhms[0] == 0,
271
+ "Zero-resistance combination (mask 0) must be present "
272
+ "and the minimum value");
273
274
275
* @brief Index of the pin that is connected (logical 1) by default.
0 commit comments