Skip to content

Commit

Permalink
Merge branch 'main' into format-all-web-code
Browse files Browse the repository at this point in the history
# Conflicts:
#	www/src/Pages/AddonsConfigPage.jsx
#	www/src/Pages/SettingsPage.jsx
  • Loading branch information
Pelsin committed Aug 16, 2023
2 parents 92708ea + 6c0ab4b commit 96246d5
Show file tree
Hide file tree
Showing 54 changed files with 1,737 additions and 1,665 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
GP2040_BOARDCONFIG: [Pico, AlpacaOwO, BentoBox, DURAL, FightboardV3, FightboardV3Mirrored, FlatboxRev4, FlatboxRev5, FlatboxRev5RGB, KB2040, KeyboardConverter, MavercadeKeebfighter, PicoAnn, PicoFightingBoard, ReflexEncoder, RP2040AdvancedBreakoutBoard, RP2040MiniBreakoutBoard, SparkFunProMicro, WaveshareZero, Stress, SGFDevices ]

GP2040_BOARDCONFIG: [Pico, AlpacaOwO, BentoBox, DURAL, FightboardV3, FightboardV3Mirrored, FlatboxRev4, FlatboxRev5, FlatboxRev5RGB, KB2040, KeyboardConverter, MavercadeKeebfighter, PicoAnn, PicoFightingBoard, ReflexCtrlSNES, ReflexEncoder, RP2040AdvancedBreakoutBoard, RP2040MiniBreakoutBoard, SparkFunProMicro, WaveshareZero, Stress, SGFDevices ]
steps:
#Global Setup
- name: Checkout GP2040-CE
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ src/addonmanager.cpp
src/configmanager.cpp
src/storagemanager.cpp
src/system.cpp
src/usbhostmanager.cpp
src/config_legacy.cpp
src/config_utils.cpp
src/configs/webconfig.cpp
Expand All @@ -143,6 +144,7 @@ src/addons/neopicoleds.cpp
src/addons/playernum.cpp
src/addons/playerleds.cpp
src/addons/ps4mode.cpp
src/addons/pspassthrough.cpp
src/addons/reverse.cpp
src/addons/turbo.cpp
src/addons/slider_socd.cpp
Expand Down
2 changes: 2 additions & 0 deletions configs/AlpacaOwO/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
#define DEFAULT_INPUT_MODE INPUT_MODE_XINPUT //INPUT_MODE_XINPUT (XInput), INPUT_MODE_SWITCH (Nintendo Switch), INPUT_MODE_HID (D-Input), INPUT_MODE_KEYBOARD (Keyboard)
#define DEFAULT_DPAD_MODE DPAD_MODE_DIGITAL //DPAD_MODE_DIGITAL, DPAD_MODE_LEFT_ANALOG, DPAD_MODE_RIGHT_ANALOG,

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
2 changes: 2 additions & 0 deletions configs/BentoBox/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
4 changes: 3 additions & 1 deletion configs/DURAL/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down Expand Up @@ -185,7 +187,7 @@
// 4 - `NOSPLASH` - This will not display a splash screen on boot
// Special note - All of the splash screen images can be changed via `include/bitmaps.h`

#define HAS_I2C_DISPLAY -1
#define HAS_I2C_DISPLAY 0
#define I2C_SDA_PIN 0
#define I2C_SCL_PIN 1
#define I2C_BLOCK i2c0
Expand Down
2 changes: 2 additions & 0 deletions configs/FightboardV3/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
2 changes: 2 additions & 0 deletions configs/FightboardV3Mirrored/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
2 changes: 2 additions & 0 deletions configs/FlatboxRev4/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
2 changes: 2 additions & 0 deletions configs/FlatboxRev5/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
2 changes: 2 additions & 0 deletions configs/FlatboxRev5RGB/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
2 changes: 2 additions & 0 deletions configs/KB2040/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
#define DEFAULT_INPUT_MODE INPUT_MODE_XINPUT //INPUT_MODE_XINPUT (XInput), INPUT_MODE_SWITCH (Nintendo Switch), INPUT_MODE_HID (D-Input), INPUT_MODE_KEYBOARD (Keyboard)
#define DEFAULT_DPAD_MODE DPAD_MODE_DIGITAL //DPAD_MODE_DIGITAL, DPAD_MODE_LEFT_ANALOG, DPAD_MODE_RIGHT_ANALOG,

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF
#define DEFAULT_LOCK_HOTKEYS false// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
Expand Down
4 changes: 3 additions & 1 deletion configs/KeyboardConverter/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down Expand Up @@ -188,7 +190,7 @@
// 4 - `NOSPLASH` - This will not display a splash screen on boot
// Special note - All of the splash screen images can be changed via `include/bitmaps.h`

#define HAS_I2C_DISPLAY -1
#define HAS_I2C_DISPLAY 0
#define I2C_SDA_PIN -1
#define I2C_SCL_PIN -1
#define I2C_BLOCK i2c0
Expand Down
2 changes: 2 additions & 0 deletions configs/MavercadeKeebfighter/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
11 changes: 9 additions & 2 deletions configs/Pico/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
#define DEFAULT_INPUT_MODE INPUT_MODE_XINPUT //INPUT_MODE_XINPUT (XInput), INPUT_MODE_SWITCH (Nintendo Switch), INPUT_MODE_HID (D-Input), INPUT_MODE_KEYBOARD (Keyboard)
#define DEFAULT_DPAD_MODE DPAD_MODE_DIGITAL //DPAD_MODE_DIGITAL, DPAD_MODE_LEFT_ANALOG, DPAD_MODE_RIGHT_ANALOG,

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand All @@ -86,7 +88,7 @@

#define TURBO_LED_PIN -1

#define BOARD_LEDS_PIN 28
#define BOARD_LEDS_PIN -1

#define LED_BRIGHTNESS_MAXIMUM 50
#define LED_BRIGHTNESS_STEPS 5
Expand Down Expand Up @@ -184,7 +186,7 @@
// 4 - `NOSPLASH` - This will not display a splash screen on boot
// Special note - All of the splash screen images can be changed via `include/bitmaps.h`

#define HAS_I2C_DISPLAY 1
#define HAS_I2C_DISPLAY 0
#define I2C_SDA_PIN 0
#define I2C_SCL_PIN 1
#define I2C_BLOCK i2c0
Expand Down Expand Up @@ -296,6 +298,11 @@
#define KEYBOARD_HOST_PIN_DPLUS -1
#define KEYBOARD_HOST_PIN_5V -1

// PS Passthrough Host Addon defaults
#define PSPASSTHROUGH_HOST_ENABLED 0
#define PSPASSTHROUGH_HOST_PIN_DPLUS -1
#define PSPASSTHROUGH_HOST_PIN_5V -1

// For details on this, see: https://gp2040-ce.info/#/development?id=i2c-display-splash
#define DEFAULT_SPLASH \
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \
Expand Down
6 changes: 4 additions & 2 deletions configs/PicoAnn/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand All @@ -84,7 +86,7 @@

#define TURBO_LED_PIN -1

#define BOARD_LEDS_PIN 15
#define BOARD_LEDS_PIN -1

#define LED_BRIGHTNESS_MAXIMUM 50
#define LED_BRIGHTNESS_STEPS 5
Expand Down Expand Up @@ -185,7 +187,7 @@
// 4 - `NOSPLASH` - This will not display a splash screen on boot
// Special note - All of the splash screen images can be changed via `include/bitmaps.h`

#define HAS_I2C_DISPLAY 1
#define HAS_I2C_DISPLAY 0
#define I2C_SDA_PIN 26
#define I2C_SCL_PIN 27
#define I2C_BLOCK i2c1
Expand Down
2 changes: 2 additions & 0 deletions configs/PicoFightingBoard/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
2 changes: 2 additions & 0 deletions configs/RP2040AdvancedBreakoutBoard/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
2 changes: 2 additions & 0 deletions configs/RP2040MiniBreakoutBoard/BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
#define DEFAULT_FORCED_SETUP_MODE FORCED_SETUP_MODE_OFF // FORCED_SETUP_MODE_OFF, FORCED_SETUP_MODE_LOCK_MODE_SWITCH, FORCED_SETUP_MODE_LOCK_WEB_CONFIG, FORCED_SETUP_MODE_LOCK_BOTH
#define DEFAULT_LOCK_HOTKEYS false // or true

#define DEFAULT_PS4CONTROLLER_TYPE PS4_CONTROLLER

// This is the LEDs section.
// The default `TURBO_LED_PIN` pin is set to `15` ( it is recommended to run through 3V3(OUT) with a resistor)
// The Turbo LED will flash at a speed consistant with the set speed of the Turbo when a Turbo button is active.
Expand Down
Empty file.
Loading

0 comments on commit 96246d5

Please sign in to comment.