Skip to content

Commit 5f60c2e

Browse files
authored
Merge branch 'PokemonAutomation:main' into main
2 parents 95b7f32 + 863da06 commit 5f60c2e

File tree

259 files changed

+3331
-1444
lines changed

Some content is hidden

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

259 files changed

+3331
-1444
lines changed

.github/workflows/cpp-ci-serial-programs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
matrix:
1212
os: [windows-2025, macos-15, macos-15-intel, ubuntu-24.04]
1313
compiler: ['default', 'clang']
14-
qt_version: ['6.10.0']
14+
qt_version: ['6.10.1']
1515
include:
16-
- qt_version: '6.10.0'
16+
- qt_version: '6.10.1'
1717
qt_version_major: '6'
1818
qt_modules: 'qtmultimedia qtserialport'
1919

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ __pycache__
6161
# Jupyter Notebooks
6262
*.ipynb
6363

64+
vcpkg/
65+
6466
CLAUDE.md
6567

6668
build_*/

Common/ControllerStates/NintendoSwitch2_WiredController_State.c

Lines changed: 0 additions & 26 deletions
This file was deleted.

Common/ControllerStates/NintendoSwitch2_WiredController_State.h

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/* Nintendo Switch - OEM Controller State
2+
*
3+
* From: https://github.com/PokemonAutomation/
4+
*
5+
*/
6+
7+
8+
#include <string.h>
9+
#include "NintendoSwitch_OemController_State.h"
10+
11+
12+
const pabb_NintendoSwitch_Rumble pabb_NintendoSwitch_Rumble_NEUTRAL_STATE = {
13+
.left = {0x00, 0x01, 0x40, 0x40},
14+
.right = {0x00, 0x01, 0x40, 0x40},
15+
};
16+
17+
18+
const pabb_NintendoSwitch_OemController_State0x30 pabb_NintendoSwitch_OemController_State0x30_NEUTRAL_STATE = {
19+
.buttons = {
20+
.button3 = 0,
21+
.button4 = 0,
22+
.button5 = 0,
23+
.left_joystick = {0x00, 0x08, 0x80},
24+
.right_joystick = {0x00, 0x08, 0x80},
25+
.vibrator = 0x00,
26+
},
27+
};
28+
29+
bool pabb_NintendoSwitch_OemController_State0x30_equals(
30+
const pabb_NintendoSwitch_OemController_State0x30* state0,
31+
const pabb_NintendoSwitch_OemController_State0x30* state1
32+
){
33+
return memcmp(state0, state1, sizeof(pabb_NintendoSwitch_OemController_State0x30)) == 0;
34+
}
35+
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/* Nintendo Switch - OEM Controller State
2+
*
3+
* From: https://github.com/PokemonAutomation/
4+
*
5+
*/
6+
7+
#ifndef PokemonAutomation_NintendoSwitch_OemController_State_H
8+
#define PokemonAutomation_NintendoSwitch_OemController_State_H
9+
10+
#include <stdbool.h>
11+
#include <stdint.h>
12+
13+
#ifdef __cplusplus
14+
extern "C" {
15+
#endif
16+
17+
18+
typedef struct{
19+
uint8_t left[4];
20+
uint8_t right[4];
21+
} pabb_NintendoSwitch_Rumble;
22+
23+
extern const pabb_NintendoSwitch_Rumble pabb_NintendoSwitch_Rumble_NEUTRAL_STATE;
24+
25+
26+
27+
typedef struct{
28+
uint8_t button3;
29+
uint8_t button4;
30+
uint8_t button5;
31+
uint8_t left_joystick[3];
32+
uint8_t right_joystick[3];
33+
uint8_t vibrator;
34+
} pabb_NintendoSwitch_OemController_State0x30_Buttons;
35+
36+
typedef struct{
37+
int16_t accel_x;
38+
int16_t accel_y;
39+
int16_t accel_z;
40+
int16_t rotation_x;
41+
int16_t rotation_y;
42+
int16_t rotation_z;
43+
} pabb_NintendoSwitch_OemController_State0x30_Gyro;
44+
45+
typedef struct{
46+
pabb_NintendoSwitch_OemController_State0x30_Gyro time0;
47+
pabb_NintendoSwitch_OemController_State0x30_Gyro time1;
48+
pabb_NintendoSwitch_OemController_State0x30_Gyro time2;
49+
} pabb_NintendoSwitch_OemController_State0x30_GyroX3;
50+
51+
typedef struct{
52+
pabb_NintendoSwitch_OemController_State0x30_Buttons buttons;
53+
pabb_NintendoSwitch_OemController_State0x30_GyroX3 gyro;
54+
} pabb_NintendoSwitch_OemController_State0x30;
55+
56+
57+
58+
59+
extern const pabb_NintendoSwitch_OemController_State0x30 pabb_NintendoSwitch_OemController_State0x30_NEUTRAL_STATE;
60+
61+
bool pabb_NintendoSwitch_OemController_State0x30_equals(
62+
const pabb_NintendoSwitch_OemController_State0x30* state0,
63+
const pabb_NintendoSwitch_OemController_State0x30* state1
64+
);
65+
66+
67+
68+
#ifdef __cplusplus
69+
}
70+
#endif
71+
#endif
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* Nintendo Switch - Wired Controller State
2+
*
3+
* From: https://github.com/PokemonAutomation/
4+
*
5+
*/
6+
7+
#include <string.h>
8+
#include "NintendoSwitch_WiredController_State.h"
9+
10+
11+
const pabb_NintendoSwitch_WiredController_State pabb_NintendoSwitch_WiredController_State_NEUTRAL_STATE = {
12+
.buttons0 = 0,
13+
.buttons1 = 0,
14+
.dpad_byte = 8,
15+
.left_joystick_x = 128,
16+
.left_joystick_y = 128,
17+
.right_joystick_x = 128,
18+
.right_joystick_y = 128,
19+
};
20+
21+
bool pabb_NintendoSwitch_WiredController_State_equals(
22+
const pabb_NintendoSwitch_WiredController_State* state0,
23+
const pabb_NintendoSwitch_WiredController_State* state1
24+
){
25+
return memcmp(state0, state1, sizeof(pabb_NintendoSwitch_WiredController_State)) == 0;
26+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* Nintendo Switch - Wired Controller State
2+
*
3+
* From: https://github.com/PokemonAutomation/
4+
*
5+
*/
6+
7+
#ifndef PokemonAutomation_NintendoSwitch_WiredController_State_H
8+
#define PokemonAutomation_NintendoSwitch_WiredController_State_H
9+
10+
#include <stdbool.h>
11+
#include <stdint.h>
12+
13+
#ifdef __cplusplus
14+
extern "C" {
15+
#endif
16+
17+
18+
19+
typedef struct{
20+
uint8_t buttons0;
21+
uint8_t buttons1;
22+
uint8_t dpad_byte;
23+
uint8_t left_joystick_x;
24+
uint8_t left_joystick_y;
25+
uint8_t right_joystick_x;
26+
uint8_t right_joystick_y;
27+
} pabb_NintendoSwitch_WiredController_State;
28+
29+
extern const pabb_NintendoSwitch_WiredController_State pabb_NintendoSwitch_WiredController_State_NEUTRAL_STATE;
30+
31+
bool pabb_NintendoSwitch_WiredController_State_equals(
32+
const pabb_NintendoSwitch_WiredController_State* state0,
33+
const pabb_NintendoSwitch_WiredController_State* state1
34+
);
35+
36+
37+
38+
#ifdef __cplusplus
39+
}
40+
#endif
41+
#endif

Common/ControllerStates/NintendoSwitch_WirelessController_State.c

Lines changed: 0 additions & 35 deletions
This file was deleted.

Common/ControllerStates/NintendoSwitch_WirelessController_State.h

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)