fix: Use keysGetMaxTrims() instead of MAX_TRIMS (#3860)

* fix: use keysGetMaxTrims() instead of MAX_TRIMS

* feat: add support for virtual trims

This is necessary for radios like X-lite where half of the trims are simulated
This commit is contained in:
Raphael Coeffic
2023-07-30 14:18:58 +10:00
committed by GitHub
parent 76423370cd
commit 574369aca4
13 changed files with 55 additions and 36 deletions
+1 -1
View File
@@ -479,7 +479,7 @@ uint32_t readTrims()
{
uint32_t result = 0;
for (int i = 0; i < MAX_TRIMS * 2; i++) {
for (int i = 0; i < keysGetMaxTrims() * 2; i++) {
if (trimsStates[i]) {
// TRACE("trim pressed %d", i);
result |= 1 << i;