feat: More flexible ADC inputs (#3870)
Co-authored-by: 3djc <lesitewebdejc@hotmail.com> Co-authored-by: Peter Feerick <peter.feerick@gmail.com> Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
co-authored by
3djc
Peter Feerick
philmoz
parent
f5593c44e8
commit
b48e07026d
@@ -183,8 +183,8 @@ static const coord_t _pot_slots[] = {
|
||||
void drawSliders()
|
||||
{
|
||||
uint8_t slot_idx = 0;
|
||||
uint8_t max_pots = adcGetMaxInputs(ADC_INPUT_POT);
|
||||
uint8_t offset = adcGetInputOffset(ADC_INPUT_POT);
|
||||
uint8_t max_pots = adcGetMaxInputs(ADC_INPUT_FLEX);
|
||||
uint8_t offset = adcGetInputOffset(ADC_INPUT_FLEX);
|
||||
|
||||
for (uint8_t i = 0; i < max_pots; i++) {
|
||||
|
||||
@@ -534,7 +534,7 @@ void menuMainView(event_t event)
|
||||
uint8_t switches = switchGetMaxSwitches();
|
||||
if (getSwitchCount() > 16) { // beware, there is a desired col/row swap in this special mode
|
||||
for (int i = 0; i < switches; ++i) {
|
||||
if (SWITCH_EXISTS(i)) {
|
||||
if (SWITCH_EXISTS(i) && !switchIsFlex(i)) {
|
||||
auto switch_display = switchGetDisplayPosition(i);
|
||||
if (g_model.view == VIEW_INPUTS) {
|
||||
coord_t x = 50 + (switch_display.row % 5) * 4 +
|
||||
@@ -552,7 +552,7 @@ void menuMainView(event_t event)
|
||||
else {
|
||||
coord_t shiftright = switchGetMaxRow(1) < 4 ? 20 : 0;
|
||||
for (int i = 0; i < switches; ++i) {
|
||||
if (SWITCH_EXISTS(i)) {
|
||||
if (SWITCH_EXISTS(i) && !switchIsFlex(i)) {
|
||||
auto switch_display = switchGetDisplayPosition(i);
|
||||
if (g_model.view == VIEW_INPUTS) {
|
||||
coord_t x = (switch_display.col == 0 ? 50 : 125) +
|
||||
|
||||
Reference in New Issue
Block a user