Skip to content

Commit ca94891

Browse files
committed
Log non-neutral rumble messages.
1 parent 2c8956f commit ca94891

File tree

7 files changed

+179
-137
lines changed

7 files changed

+179
-137
lines changed

Common/ControllerStates/NintendoSwitch_WirelessController_State.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@
99
#include "NintendoSwitch_WirelessController_State.h"
1010

1111

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+
1218
const pabb_NintendoSwitch_WirelessController_State0x30 pabb_NintendoSwitch_WirelessController_State0x30_NEUTRAL_STATE = {
1319
.buttons = {
1420
.button3 = 0,
1521
.button4 = 0,
1622
.button5 = 0,
1723
.left_joystick = {0x00, 0x08, 0x80},
1824
.right_joystick = {0x00, 0x08, 0x80},
19-
.vibrator = 0x80,
25+
.vibrator = 0x00,
2026
},
2127
.gyro = {},
2228
};

Common/ControllerStates/NintendoSwitch_WirelessController_State.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ extern "C" {
1515
#endif
1616

1717

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+
1825

1926

2027
typedef struct{

Common/SerialPABotBase/SerialPABotBase_Messages_NS1_WirelessControllers.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ typedef struct{
3737

3838

3939

40+
#define PABB_MSG_INFO_NS1_WIRELESS_CONTROLLER_RUMBLE 0x30
41+
typedef struct{
42+
pabb_NintendoSwitch_Rumble rumble;
43+
} PABB_PACK pabb_MsgInfo_NS1_WirelessController_Rumble;
44+
45+
46+
4047
#define PABB_MSG_REQUEST_NS1_WIRELESS_CONTROLLER_READ_SPI 0x60
4148
typedef struct{
4249
seqnum_t seqnum;

0 commit comments

Comments
 (0)