Fix NUM_LEDS=10, NUM_BUTTONS=16 for 2 daisy-chained MUX boards. Fix pixel7 stuck blue (was only sending 8 LED data to 10-LED chain)
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ class PixelStompMux;
|
||||
|
||||
class DefaultLedStub : public LedStub {
|
||||
private:
|
||||
static const uint8_t NUM_LEDS = 8;
|
||||
static const uint8_t NUM_LEDS = 10;
|
||||
LedState led_states[NUM_LEDS];
|
||||
bool initialized;
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
class PixelStompMux {
|
||||
public:
|
||||
static const uint8_t NUM_BUTTONS = 8;
|
||||
static const uint8_t NUM_LEDS = 8;
|
||||
static const uint8_t NUM_BUTTONS = 16;
|
||||
static const uint8_t NUM_LEDS = 10;
|
||||
|
||||
PixelStompMux(uint8_t dat_pin, uint8_t ld_pin, uint8_t clk_pin, uint8_t di_pin);
|
||||
|
||||
void begin();
|
||||
|
||||
uint8_t read_buttons();
|
||||
uint16_t read_buttons();
|
||||
bool is_button_pressed(uint8_t index);
|
||||
|
||||
void set_led_color(uint8_t index, uint8_t r, uint8_t g, uint8_t b);
|
||||
@@ -29,5 +29,5 @@ public:
|
||||
uint8_t pin_di;
|
||||
|
||||
CRGB leds[NUM_LEDS];
|
||||
uint8_t last_button_state;
|
||||
uint16_t last_button_state;
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ class PixelStompMux;
|
||||
|
||||
class DefaultSwitchStub : public SwitchStub {
|
||||
private:
|
||||
static const uint8_t NUM_SWITCHES = 8;
|
||||
static const uint8_t NUM_SWITCHES = 16;
|
||||
SwitchState switch_states[NUM_SWITCHES];
|
||||
bool initialized;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user