Refactoring: Buttons - rename revert to swapButtonMenu

This commit is contained in:
Ivan Zorin
2025-02-17 19:50:03 +03:00
parent d78dcb471d
commit 768668d78b
2 changed files with 5 additions and 4 deletions

View File

@@ -11,7 +11,7 @@
#include <Buttons.hpp>
TickType_t lastButtonTime = 0;
ButtonState getButtonState(bool revert) {
ButtonState getButtonState(bool swapButtonMenu) {
/*
* Read in the buttons and then determine if a state change needs to occur
*/
@@ -28,8 +28,8 @@ ButtonState getButtonState(bool revert) {
static TickType_t previousStateChange = 0;
const TickType_t timeout = TICKS_100MS * 4;
uint8_t currentState;
currentState = (getButtonA()) << (0 xor revert);
currentState |= (getButtonB()) << (1 xor revert);
currentState = (getButtonA()) << (0 xor swapButtonMenu);
currentState |= (getButtonB()) << (1 xor swapButtonMenu);
if (currentState) {
lastButtonTime = xTaskGetTickCount();