Skip to content

Commit b29f20a

Browse files
committed
Adjust charge constants. Fix build for Mac.
1 parent 6647b1c commit b29f20a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

SerialPrograms/Source/NintendoSwitch/Controllers/SerialPABotBase/NintendoSwitch_SerialPABotBase_WirelessController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
*/
66

7-
#include <iostream>
7+
#include <sstream>
88
#include "Common/Cpp/PrettyPrint.h"
99
#include "Common/Cpp/Concurrency/ReverseLockGuard.h"
1010
#include "Common/NintendoSwitch/NintendoSwitch_Protocol_ESP32.h"

SerialPrograms/Source/NintendoSwitch/Controllers/SerialPABotBase/NintendoSwitch_SerialPABotBase_WirelessJoycon.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void SerialPABotBase_WirelessJoycon::push_state_left_joycon(const Cancellable* c
136136
ESP32Report0x30 report{
137137
.report_id = 0x30,
138138
.timer = 0, // Populate on controller.
139-
.byte2 = 0x96, // Full + charging : Pro controller + USB powered
139+
.byte2 = 0x8d, // Full + battery : Joycon
140140
.button3 = 0,
141141
.button4 = 0,
142142
.button5 = 0,
@@ -146,7 +146,7 @@ void SerialPABotBase_WirelessJoycon::push_state_left_joycon(const Cancellable* c
146146
.rightstick_x_lo = 0x00,
147147
.rightstick_x_hi = 0x08,
148148
.rightstick_y = 0x80,
149-
.vibrator = 0x80,
149+
.vibrator = 0x00,
150150
.gyro = {},
151151
};
152152

@@ -206,7 +206,7 @@ void SerialPABotBase_WirelessJoycon::push_state_right_joycon(const Cancellable*
206206
ESP32Report0x30 report{
207207
.report_id = 0x30,
208208
.timer = 0, // Populate on controller.
209-
.byte2 = 0x96, // Full + charging : Pro controller + USB powered
209+
.byte2 = 0x8d, // Full + battery : Joycon
210210
.button3 = 0,
211211
.button4 = 0,
212212
.button5 = 0,
@@ -216,7 +216,7 @@ void SerialPABotBase_WirelessJoycon::push_state_right_joycon(const Cancellable*
216216
.rightstick_x_lo = 0x00,
217217
.rightstick_x_hi = 0x08,
218218
.rightstick_y = 0x80,
219-
.vibrator = 0x80,
219+
.vibrator = 0x00,
220220
.gyro = {},
221221
};
222222

SerialPrograms/Source/NintendoSwitch/Controllers/SerialPABotBase/NintendoSwitch_SerialPABotBase_WirelessProController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void SerialPABotBase_WirelessProController::push_state(const Cancellable* cancel
4242
ESP32Report0x30 report{
4343
.report_id = 0x30,
4444
.timer = 0, // Populate on controller.
45-
.byte2 = 0x91, // Full + charging : Pro controller + USB powered
45+
.byte2 = 0x99, // Full + charging : Pro controller + USB powered
4646
.button3 = 0,
4747
.button4 = 0,
4848
.button5 = 0,
@@ -52,7 +52,7 @@ void SerialPABotBase_WirelessProController::push_state(const Cancellable* cancel
5252
.rightstick_x_lo = 0x00,
5353
.rightstick_x_hi = 0x08,
5454
.rightstick_y = 0x80,
55-
.vibrator = 0x80,
55+
.vibrator = 0x00,
5656
.gyro = {},
5757
};
5858

0 commit comments

Comments
 (0)