Skip to content

Commit 6ba7562

Browse files
arntsonlMM-WorkshopmikepparksmizmaPelsin
authored
Pulling main into mayflash s5 (#1627)
* 🇫🇷 Add French translation of the web interface. (#1518) * Ajout de la traduction française * Maj Traductions * MAJ language ko-KR * Corrections mineures et màj v.0.7.12 * Mise à jour de la traduction avant import de la traduction Turque * Updated after the integration of the Turkish translation --------- Co-authored-by: Luke A <arntsonl@gmail.com> * Simplify build process for alternate configs (#1551) * Updated CMakeLists.txt to include PICO_BOARD specific configs into the build process. * Removed PicoW and RP2350 rule exceptions from CMake actions. Introduced cmake files for PicoW and FlatboxRev8 configs. * Changed PicoW build not use Pico2 config. * Add new languages to checklocale (#1550) * add tr-TR to checklocale * add fr-FR to checklocale * Make profile label render consistently when enabled switch is present (#1568) Make profile render consistently when enabled switch is present * Bump actions, inline pico-sdk build step, fix GCC MD5 mismatch issue (#1563) * Add keyboard mappings to export/import (#1564) * add more display macros (#1570) Add more display macros for board configs. * add display settings for osumgp-rp2040 (#1574) * add more display macros Add more display macros for board configs. * add display settings for osumgp-rp2040 Add display settings for osumgp-rp2040 for use with SparkFun LCD-22495 which is non-standard size * Add manual calibration feature for analog sticks (#1528) feat: Add manual calibration feature for analog sticks Features: - Add independent manual calibration for analog sticks 1 and 2 - Implement 4-step calibration process (top-left, top-right, bottom-left, bottom-right) - Add complete i18n support (English/Chinese) for calibration messages - Support parameterized messages for dynamic content Technical changes: - Add joystick_center_x/y/x2/y2 fields to config proto - Add manual calibration API endpoints (/api/getJoystickCenter, /api/getJoystickCenter2) - Update analog input logic to support manual calibration values - Add comprehensive frontend calibration interface with step-by-step guidance - All code comments written in English as per project standards - Clean code without duplicate comments or code blocks Co-authored-by: Leonxis <leonxis@example.com> * Change lock hotkeys switch to just be enabled similar to other toggles (#1558) * Update PXPGamepad BoardConfig.h (#1567) This fixes the default config for the second analog stick. This is needed because of this change: #1401 * Add config for Haute42}COSMOX C-AT (#1579) This PR adds a config for the Haute42}COSMOX C-AT * update osumgp board config (#1582) add FN button * Add Switch Pro and XInput (Xbox 360) support to Gamepad USB Host add-on (#1573) * Switch Pro USB Host implementation Add support for the Switch Pro controller in the Gamepad USB host add-on. Rumble, player LEDs work. * Improve analog trigger driver consistency Treat analog triggers >0 as digital enabled everywhere. * Fix xinput host driver endpoint detection Previously it did not indentify endpoint buffer sizes correctly. Refactor the endpoint detection logic. Add `tuh_xinput_wait_for_tx` function for blocking until report is sent off completely. * XInput (Xbox 360) USB Host implementation Add support for generic XInput controllers in the gamepad usb host add-on. Rumble and player LED works. * Move driver reports to appropriate descriptor files Move rumble, LED, init reports to descriptor headers. * TinyUSB host include hot-fix for main * sdk 2.2.0 fixes (#1587) * sdk 2.2.0 fixes Update mbedtls functions and defines from v2 to v3 for pico sdk 2.2.0 support * update github workflow * update cmakelists version * bump cmake version incompatible cmake version - https://forums.raspberrypi.com/viewtopic.php?t=391251#p2334074 * issue 1086 (#1589) add stick directions as hotkeys from issue #1086 * GCC fix for USB host + Vite update (#1602) Fix for newer GCC's and switch struct. Fix for npx vite rather than vite (Windows compatible) * update osumgp screen alignments (#1600) * add brightness control (#1591) * add brightness control add display brightness control via webconfig, resolves issue 1536 * Change display brightness setting to be a slider * fix narrowing warning * Reverting package-lock.json changes * add vcomh, rename brightness Added option to adjust vcomh, setting the default value to 0x30. While previously default was 0x40, the datasheet does not show that as an available choice. Renamed brightness to contrast to match datasheet as well. * revert vcomh, fix contrast reverted all the vcomh adjustments fixed the contrast adjustment and lower limited to 15% --------- Co-authored-by: Ian <ian@vidales.se> * Add support for GP2040-CE as a PS4 auth provider (#1586) Increases the size of the buffer used for storing the report descriptor of the connected device and fixes the request length for 0xF3 GET_REPORT. This lets us daisy chain controllers, plugging the auth dongle into the last one in the chain. * screen saver fixes (#1590) have screen saver exit match entry * issue 1373 (#1593) fix for issue 1373 * fixes for 1496 & 1503, webconfig cleaning (#1601) * fixes for 1496 & 1503, webconfig cleaning fixes #1496 fixes #1503 and then some webconfig cleaning * comment fixes * Add display layouts for Haute42|COSMOX X-Move (#1595) This PR adds three new board defined display layouts to the Haute42|COSMOX M Ultra config. Those layouts are used for the new Haute42|COSMOX X-Move. It will allow for all current combinations of modules for the X-Move: 1 - Stock config 2 - WASD module installed 3 - Joystick module installed * Feature: Support For Reversed Polarity HE Trigger Add-on (#1609) * change HE Trigger input to match HE Breakout Board layout * support for flipped polarity HE Triggers * fix modal title for calibrating switches * fix polarity check * upgrade to HE Trigger ui, to support configuration for Flipped Polarity * renaming max to pressed, to make more sense with polarity * fix headers and configs for polarity changes * auto set polarity during simple calibration * refactoring api and function names to better match what they are actually used for * renaming methods used for progress bar component * remove (not supported) from other locales * rapid trigger support, todo: rebase * fixing the voltage table, adding locales for english * fix overwrite all, rename variable to release * deprecate old polarity value, (previous value was set incorrectly) rename sensitivity to noise, better describe how it's used. * fix for calibrate all, should pull current state for entire trigger, incase they want to use manual calibration * Fix web server response corruption (#1614) Fix web server response corruption by managing dynamic memory for return data * Adding flip polarity to the "Calibrate All" (#1615) Adding flip polarity to the "Calibrate All" feature to make it easier to configure a mixed set of switches * Fix Protobuf and GCC actions (#1622) * Fixes an issue with setuptools >= 82.0.0 breaking pkg_resources in protobuf * Also fixing arm-non-eabi-gcc-action while we're at it * small keyboard fixes (#1613) reordered keycodes by value to make searching easier fixed and added some keycodes small bug in driver * bump sys clock to max supported (#1592) verified working - usb keyboard host - xbox dongle auth - oled display * clean-up build warnings (#1594) * clean-up build warnings Went from 191->84 * removed too much in initial commit * Update PS4Auth.cpp * add debug compile options, fix warnings * Fixed issues found by PVS-Studio mostly initializing class members * clean redefines * xsm3 fixes mostly swapping for memcpy to fix alignment warnings validated nothing broke with 360 auth * fix redefine warnings * Fixes dpad to analog being interrupted by mouse movement input to resolve #1515 (#1529) fixes dpad reset on mouse input, by moving the reset code to kbd report function. * Add GPIO28 and 29 to I2C block 0 (#1625) Waveshare Pico Zero specific change, making it easier to connect I2C peripherials assuming said pins are unused --------- Co-authored-by: MM Workshop <mikael@mmwork.shop> Co-authored-by: Mike Parks <mikepparks@gmail.com> Co-authored-by: mizma <omoikane@path-works.net> Co-authored-by: Pelsin <ian@vidales.se> Co-authored-by: NickGuyver <akaguy@gmail.com> Co-authored-by: leonxis <31850137+leonxis@users.noreply.github.com> Co-authored-by: Leonxis <leonxis@example.com> Co-authored-by: MegaBitmap <93689649+MegaBitmap@users.noreply.github.com> Co-authored-by: TheTrain <32771064+TheTrainGoes@users.noreply.github.com> Co-authored-by: grialion <48643945+grialion@users.noreply.github.com> Co-authored-by: Jacek Fedoryński <jfedor@jfedor.org> Co-authored-by: Jam <jwut@jwut.dev> Co-authored-by: mattaaron79 <mattaaron79@gmail.com> Co-authored-by: Francisco <Fran89@users.noreply.github.com> Co-authored-by: Vixima <18316313+Vixima@users.noreply.github.com>
1 parent 7f2e78c commit 6ba7562

60 files changed

Lines changed: 317 additions & 271 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ compile_proto()
169169
#pull in tinyUSB
170170
set(PICO_TINYUSB_PATH "${CMAKE_CURRENT_LIST_DIR}/lib/tinyusb")
171171

172+
set(PICO_USE_FASTEST_SUPPORTED_CLOCK 1)
173+
172174
# initialize the Raspberry Pi Pico SDK
173175
pico_sdk_init()
174176

@@ -180,7 +182,7 @@ add_subdirectory(lib)
180182

181183
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
182184
# Activate some compiler / linker options to aid us with diagnosing stack space issues in Debug builds
183-
add_compile_options(-fstack-usage -Wstack-usage=500)
185+
add_compile_options(-fstack-usage -Wstack-usage=500 -Wnull-dereference -Wcast-align -Wimplicit-fallthrough)
184186
add_compile_definitions(PICO_USE_STACK_GUARDS=1)
185187
endif()
186188

headers/display/GPGFX_UI.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class GPGFX_UI {
2323
DisplayOptions getDisplayOptions();
2424
private:
2525
GPGFX* _renderer;
26-
DisplayOptions _displayOptions;
27-
bool _configMode;
26+
DisplayOptions _displayOptions{};
27+
bool _configMode = false;
2828
};
2929

3030
#endif

headers/display/GPGFX_UI_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
typedef struct MenuEntry {
99
std::string label;
10-
uint8_t* icon;
11-
std::vector<MenuEntry>* submenu;
10+
uint8_t* icon = nullptr;
11+
std::vector<MenuEntry>* submenu = nullptr;
1212
std::function<int32_t()> currentValue;
1313
std::function<void()> action;
1414
int32_t optionValue = -1;

headers/display/ui/elements/GPWidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class GPWidget : public GPGFX_UI {
3838

3939
uint16_t strokeColor = 0;
4040
uint16_t fillColor = 0;
41-
uint16_t _ID;
41+
uint16_t _ID = 0;
4242
uint16_t _priority = 0;
4343
bool _visibility = true;
4444

headers/display/ui/screens/ButtonLayoutScreen.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define INPUT_HISTORY_MAX_MODES 12
1919

2020
// Static to ensure memory is never doubled
21-
static const char * displayNames[INPUT_HISTORY_MAX_MODES][INPUT_HISTORY_MAX_INPUTS] = {
21+
static const char * displayNames[INPUT_HISTORY_MAX_MODES][INPUT_HISTORY_MAX_INPUTS] __attribute__((unused)) = {
2222
{ // PS3 - 0
2323
CHAR_UP, CHAR_DOWN, CHAR_LEFT, CHAR_RIGHT,
2424
CHAR_UL, CHAR_UR, CHAR_DL, CHAR_DR,
@@ -147,35 +147,35 @@ class ButtonLayoutScreen : public GPScreen {
147147
{INPUT_MODE_GENERIC, 11},
148148
};
149149

150-
Gamepad* gamepad;
151-
InputMode inputMode;
152-
std::string statusBar;
153-
std::string footer;
150+
Gamepad* gamepad = nullptr;
151+
InputMode inputMode = INPUT_MODE_XINPUT;
152+
std::string statusBar{};
153+
std::string footer{};
154154

155155
bool isInputHistoryEnabled = false;
156156
uint16_t inputHistoryX = 0;
157157
uint16_t inputHistoryY = 0;
158158
size_t inputHistoryLength = 0;
159-
std::string historyString;
160-
std::deque<std::string> inputHistory;
161-
std::array<bool, INPUT_HISTORY_MAX_INPUTS> lastInput;
159+
std::string historyString{};
160+
std::deque<std::string> inputHistory{};
161+
std::array<bool, INPUT_HISTORY_MAX_INPUTS> lastInput{};
162162

163-
bool bannerDisplay;
163+
bool bannerDisplay = false;
164164
uint8_t bannerDelay = 2;
165165
int bannerDelayStart = 0;
166-
std::string bannerMessage;
166+
std::string bannerMessage{};
167167
uint16_t prevButtonState = 0;
168168
uint8_t prevLayoutLeft = 0;
169169
uint8_t prevLayoutRight = 0;
170170
uint8_t profileNumber = 0;
171171
uint8_t prevProfileNumber = 0;
172-
ButtonLayoutParamsLeft prevLeftOptions;
173-
ButtonLayoutParamsRight prevRightOptions;
174-
ButtonLayoutOrientation prevOrientation;
172+
ButtonLayoutParamsLeft prevLeftOptions{};
173+
ButtonLayoutParamsRight prevRightOptions{};
174+
ButtonLayoutOrientation prevOrientation{};
175175

176176
bool hasTurboAssigned = false;
177177

178-
bool macroEnabled;
178+
bool macroEnabled = false;
179179

180180
bool showInputMode = true;
181181
bool showTurboMode = true;

headers/display/ui/screens/DisplaySaverScreen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DisplaySaverScreen : public GPScreen {
1818
protected:
1919
virtual void drawScreen();
2020
uint16_t prevButtonState = 0;
21-
DisplaySaverMode displaySaverMode;
21+
DisplaySaverMode displaySaverMode{};
2222

2323
// snow screen
2424
uint8_t snowflakeSpeeds[SCREEN_WIDTH][SCREEN_HEIGHT] = {};

headers/display/ui/screens/MainMenuScreen.h

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ class MainMenuScreen : public GPScreen {
8080
virtual void drawScreen();
8181
private:
8282
bool isPressed = false;
83-
uint32_t checkDebounce;
84-
std::vector<MenuEntry>* currentMenu;
85-
std::vector<MenuEntry>* previousMenu;
83+
uint32_t checkDebounce = 0;
84+
std::vector<MenuEntry>* currentMenu = nullptr;
85+
std::vector<MenuEntry>* previousMenu = nullptr;
8686
uint16_t prevButtonState = 0;
8787
uint8_t prevDpadState = 0;
88-
Mask_t prevValues;
88+
Mask_t prevValues = 0;
8989
GPMenu* gpMenu = nullptr;
9090
const uint8_t menuLineSize = 4;
9191

92-
GpioAction eventAction;
92+
GpioAction eventAction = GpioAction::NONE;
9393

9494
bool screenIsPrompting = false;
9595
bool promptChoice = false;
@@ -98,13 +98,13 @@ class MainMenuScreen : public GPScreen {
9898
int8_t exitToScreenBeforePrompt = -1;
9999
int8_t exitToScreen = -1;
100100

101-
GamepadButtonMapping *mapMenuUp;
102-
GamepadButtonMapping *mapMenuDown;
103-
GamepadButtonMapping *mapMenuLeft;
104-
GamepadButtonMapping *mapMenuRight;
105-
GamepadButtonMapping *mapMenuSelect;
106-
GamepadButtonMapping *mapMenuBack;
107-
GamepadButtonMapping *mapMenuToggle;
101+
GamepadButtonMapping *mapMenuUp = nullptr;
102+
GamepadButtonMapping *mapMenuDown = nullptr;
103+
GamepadButtonMapping *mapMenuLeft = nullptr;
104+
GamepadButtonMapping *mapMenuRight = nullptr;
105+
GamepadButtonMapping *mapMenuSelect = nullptr;
106+
GamepadButtonMapping *mapMenuBack = nullptr;
107+
GamepadButtonMapping *mapMenuToggle = nullptr;
108108

109109
void saveOptions();
110110
void resetOptions();
@@ -118,39 +118,44 @@ class MainMenuScreen : public GPScreen {
118118
std::vector<MenuEntry> inputModeMenu = {
119119
InputMode_VALUELIST(INPUT_MODE_ENTRIES)
120120
};
121-
InputMode prevInputMode;
122-
InputMode updateInputMode;
121+
InputMode prevInputMode{};
122+
InputMode updateInputMode{};
123123

124124
std::vector<MenuEntry> dpadModeMenu = {
125125
DpadMode_VALUELIST(DPAD_MODE_ENTRIES)
126126
};
127-
DpadMode prevDpadMode;
128-
DpadMode updateDpadMode;
127+
DpadMode prevDpadMode{};
128+
DpadMode updateDpadMode{};
129129

130130
std::vector<MenuEntry> socdModeMenu = {
131131
SOCDMode_VALUELIST(SOCD_MODE_ENTRIES)
132132
};
133-
SOCDMode prevSocdMode;
134-
SOCDMode updateSocdMode;
133+
SOCDMode prevSocdMode{};
134+
SOCDMode updateSocdMode{};
135135

136136
std::vector<MenuEntry> profilesMenu = {};
137-
uint8_t prevProfile;
138-
uint8_t updateProfile;
137+
uint8_t prevProfile{};
138+
uint8_t updateProfile{};
139139

140140
std::vector<MenuEntry> focusModeMenu = {
141141
{"Off", NULL, nullptr, std::bind(&MainMenuScreen::currentFocusMode, this), std::bind(&MainMenuScreen::selectFocusMode, this), 0},
142142
{"On", NULL, nullptr, std::bind(&MainMenuScreen::currentFocusMode, this), std::bind(&MainMenuScreen::selectFocusMode, this), 1},
143143
};
144-
bool prevFocus;
145-
bool updateFocus;
144+
bool prevFocus = false;
145+
bool updateFocus = false;
146146

147147
std::vector<MenuEntry> turboModeMenu = {
148148
{"Off", NULL, nullptr, std::bind(&MainMenuScreen::currentTurboMode, this), std::bind(&MainMenuScreen::selectTurboMode, this), 0},
149149
{"On", NULL, nullptr, std::bind(&MainMenuScreen::currentTurboMode, this), std::bind(&MainMenuScreen::selectTurboMode, this), 1},
150150
};
151-
bool prevTurbo;
152-
bool updateTurbo;
151+
bool prevTurbo = false;
152+
bool updateTurbo = false;
153153

154+
std::vector<MenuEntry> saveMenu = {
155+
{"Save & Exit",NULL, nullptr, std::bind(&MainMenuScreen::modeValue, this), std::bind(&MainMenuScreen::saveAndExit, this), 1},
156+
{"Exit", NULL, nullptr, std::bind(&MainMenuScreen::modeValue, this), std::bind(&MainMenuScreen::exitOnly, this), 0},
157+
};
158+
154159
std::vector<MenuEntry> mainMenu = {
155160
{"Input Mode", NULL, &inputModeMenu, std::bind(&MainMenuScreen::modeValue, this), std::bind(&MainMenuScreen::testMenu, this)},
156161
{"D-Pad Mode", NULL, &dpadModeMenu, std::bind(&MainMenuScreen::modeValue, this), std::bind(&MainMenuScreen::testMenu, this)},
@@ -161,10 +166,7 @@ class MainMenuScreen : public GPScreen {
161166
{"Exit", NULL, &saveMenu, std::bind(&MainMenuScreen::modeValue, this), std::bind(&MainMenuScreen::testMenu, this)},
162167
};
163168

164-
std::vector<MenuEntry> saveMenu = {
165-
{"Save & Exit",NULL, nullptr, std::bind(&MainMenuScreen::modeValue, this), std::bind(&MainMenuScreen::saveAndExit, this), 1},
166-
{"Exit", NULL, nullptr, std::bind(&MainMenuScreen::modeValue, this), std::bind(&MainMenuScreen::exitOnly, this), 0},
167-
};
169+
168170
};
169171

170172
#endif

headers/display/ui/screens/RestartScreen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class RestartScreen : public GPScreen {
1515
void setBootMode(uint32_t mode);
1616
protected:
1717
virtual void drawScreen();
18-
uint32_t bootMode;
18+
uint32_t bootMode = 0;
1919
};
2020

2121
#endif

headers/display/ui/screens/SplashScreen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class SplashScreen : public GPScreen {
1515
virtual void drawScreen();
1616
uint16_t prevButtonState = 0;
1717
uint32_t splashStartTime = 0;
18-
bool configMode;
18+
bool configMode = false;
1919
};
2020

2121
#endif

headers/display/ui/screens/StatsScreen.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ class StatsScreen : public GPScreen {
1515
virtual void drawScreen();
1616
uint16_t prevButtonState = 0;
1717

18-
GPLabel* header;
19-
GPLabel* version;
20-
GPLabel* build;
21-
GPLabel* board;
22-
GPLabel* boardType;
23-
GPLabel* arch;
24-
GPLabel* exit;
18+
GPLabel* header = nullptr;
19+
GPLabel* version = nullptr;
20+
GPLabel* build = nullptr;
21+
GPLabel* board = nullptr;
22+
GPLabel* boardType = nullptr;
23+
GPLabel* arch = nullptr;
24+
GPLabel* exit = nullptr;
2525
};
2626

2727
#endif

0 commit comments

Comments
 (0)