Skip to content

Commit 8be192a

Browse files
committed
Attempted to interpret @Liv-H vibes & interpolated middle voltage setpoints to match resistor value array
1 parent b8fe128 commit 8be192a

1 file changed

Lines changed: 18 additions & 15 deletions

File tree

include/LoadConfig.hpp

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -189,25 +189,28 @@ namespace LOAD {
189189
static_assert(NUM_COMBINATIONS == (1u << NUM_PINS),
190190
"NUM_COMBINATIONS must be 2^NUM_PINS");
191191

192-
constexpr uint_fast8_t VOLT_LIMIT_SIZE = 12; // CONFIG
192+
constexpr uint_fast8_t VOLT_LIMIT_SIZE = 21; // CONFIG
193193
etl::array<uint_fast16_t, VOLT_LIMIT_SIZE> VOLT_LIMITS_TABLE_mV = {
194-
2000, //
195-
1900, 1800, 1700, 1600, 1400, //
196-
1500, 1400, 1300, 1200, 1100, //
197-
1000};
194+
20'000, 19'500, 19'375, 19'250, 19'125, // 4
195+
19'000, 18'500, 18'000, 17'500, 17'000, // 3
196+
16'000, 00'000, 15'000, 14'600, 14'200, // 2
197+
13'800, 13'400, 13'000, 12'000, 11'000, // 1
198+
10'000 // 0
199+
};
198200

199201
constexpr uint_fast8_t RES_INDEX_SIZE = 46; // CONFIG
200202
etl::array<uint_fast8_t, RES_INDEX_SIZE> RES_INDEX_TABLE = {
201-
0, 1, 2, 4, 3, //
202-
8, 5, 6, 9, 12, //
203-
16, 11, 7, 14, 13, //
204-
15, 19, 24, 21, 22, //
205-
25, 23, 28, 29, 32, //
206-
31, 33, 35, 36, 40, //
207-
37, 41, 39, 44, 48, //
208-
45, 46, 50, 47, 51, //
209-
56, 53, 54, 57, 55, //
210-
60};
203+
0, 1, 2, 4, 3, // 9
204+
8, 5, 6, 9, 12, // 8
205+
16, 11, 7, 14, 13, // 7
206+
15, 19, 24, 21, 22, // 6
207+
25, 23, 28, 29, 32, // 5
208+
31, 33, 35, 36, 40, // 4
209+
37, 41, 39, 44, 48, // 3
210+
45, 46, 50, 47, 51, // 2
211+
56, 53, 54, 57, 55, // 1
212+
60 // 0
213+
};
211214
// constexpr uint_fast8_t RES_INDEX_SIZE = 46; // CONFIG
212215
// etl::array<uint_fast8_t, RES_INDEX_SIZE> RES_INDEX_TABLE = {
213216
// 0, 1, 2, 4, 3, 8, 5, 6, 9, 12, 16, 11, 7, 14, 13, 15,

0 commit comments

Comments
 (0)