fix(radio): treat trims as controls rather than keys for backlight timeout (#7515)

This commit is contained in:
3djc
2026-07-22 11:05:16 +10:00
committed by GitHub
parent 19708ce792
commit b706c40046
3 changed files with 21 additions and 4 deletions
+7 -2
View File
@@ -496,7 +496,7 @@ uint16_t keyMapping(uint16_t event)
return event;
}
bool keysPollingCycle()
uint8_t keysPollingCycle()
{
uint32_t trims_input;
pollKeys();
@@ -565,7 +565,12 @@ bool keysPollingCycle()
if (evt) pushTrimEvent(evt | i);
}
return keys_input || trims_input;
// Report trims separately so they count as controls, not keys, for the
// backlight. Nav hats (USE_HATS_AS_KEYS) are folded into keys_input.
uint8_t activity = 0;
if (keys_input) activity |= KEY_ACTIVITY_KEYS;
if (trims_input) activity |= KEY_ACTIVITY_TRIMS;
return activity;
}
#if !defined(COLORLCD)