feat(radio): refactor of switch handling to better support customisable switches (#6095)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com> Co-authored-by: 3djc <3djc@gh.com> Co-authored-by: elecpower <elecpower@users.noreply.github.com>
This commit is contained in:
co-authored by
philmoz
3djc
elecpower
parent
28833f42e6
commit
0c8c39b134
+5
-13
@@ -78,14 +78,8 @@ int switchLookupIdx(const char* name, size_t len);
|
||||
// note: no customizable switches
|
||||
char switchGetLetter(uint8_t idx);
|
||||
|
||||
// note: no customizable switches
|
||||
const char* switchGetCanonicalName(uint8_t idx);
|
||||
|
||||
// customizable switches supported
|
||||
const char* fsSwitchGroupGetCanonicalName(uint8_t idx);
|
||||
void switchSetCustomName(uint8_t idx, const char* str, size_t len);
|
||||
const char* switchGetCustomName(uint8_t idx);
|
||||
bool switchHasCustomName(uint8_t idx);
|
||||
uint8_t getSwitchCountInFSGroup(uint8_t index);
|
||||
|
||||
SwitchConfig switchGetMaxType(uint8_t idx);
|
||||
@@ -96,20 +90,18 @@ void logicalSwitchesInit(bool force);
|
||||
#if defined(FUNCTION_SWITCHES)
|
||||
void setFSStartupPosition();
|
||||
void evalFunctionSwitches();
|
||||
uint8_t getFSLogicalState(uint8_t index);
|
||||
void setFSLogicalState(uint8_t index, uint8_t value);
|
||||
bool groupHasSwitchOn(uint8_t group);
|
||||
int firstSwitchInGroup(uint8_t group);
|
||||
int groupDefaultSwitch(uint8_t group);
|
||||
void setGroupSwitchState(uint8_t group, int defaultSwitch = -1);
|
||||
uint8_t getFSPhysicalState(uint8_t index);
|
||||
extern uint8_t functionSwitchFunctionState;
|
||||
void setGroupSwitchState(uint8_t group);
|
||||
bool getFSPhysicalState(uint8_t index);
|
||||
|
||||
//led_driver.cpp
|
||||
void fsLedOff(uint8_t);
|
||||
void fsLedOn(uint8_t);
|
||||
void fsLedOff(uint8_t index);
|
||||
void fsLedOn(uint8_t index);
|
||||
bool fsLedState(uint8_t index);
|
||||
void fsLedRGB(uint8_t, uint32_t color);
|
||||
void fsLedRGB(uint8_t index, uint32_t color);
|
||||
uint32_t fsGetLedRGB(uint8_t index);
|
||||
uint8_t getRGBColorIndex(uint32_t color);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user