File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Controllers/SerialPABotBase
NintendoSwitch/Controllers/SerialPABotBase Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1010#include " Common/Cpp/PrettyPrint.h"
1111#include " Common/Cpp/Exceptions.h"
1212#include " Common/Cpp/PanicDump.h"
13- #include " Common/Cpp/Options/TimeExpressionOption.h"
13+ // #include "Common/Cpp/Options/TimeExpressionOption.h"
1414#include " Common/Microcontroller/DeviceRoutines.h"
15- #include " Common/NintendoSwitch/NintendoSwitch_ControllerDefs.h"
15+ // #include "Common/NintendoSwitch/NintendoSwitch_ControllerDefs.h"
1616#include " ClientSource/Libraries/MessageConverter.h"
1717#include " ClientSource/Connection/SerialConnection.h"
1818// #include "ClientSource/Connection/BotBase.h"
@@ -328,7 +328,8 @@ void SerialPABotBase_Connection::thread_body(){
328328 if (wallclock == 0 ){
329329 str = " Unknown" ;
330330 }else {
331- str = ticks_to_time (NintendoSwitch::TICKS_PER_SECOND, wallclock);
331+ // str = ticks_to_time(NintendoSwitch::TICKS_PER_SECOND, wallclock);
332+ str = tostr_u_commas (wallclock);
332333 }
333334 }catch (InvalidConnectionStateException&){
334335 break ;
@@ -338,7 +339,7 @@ void SerialPABotBase_Connection::thread_body(){
338339 error = e.message ();
339340 }
340341 if (error.empty ()){
341- std::string text = " Up Time : " + str;
342+ std::string text = " State Reports : " + str;
342343 set_uptime_text (text, theme_friendly_darkblue ());
343344 }else {
344345 set_uptime_text (error, COLOR_RED);
Original file line number Diff line number Diff line change 44 *
55 */
66
7+ #include < iostream>
78#include " Common/Cpp/Concurrency/ReverseLockGuard.h"
89#include " Common/NintendoSwitch/NintendoSwitch_Protocol_ESP32.h"
910#include " ClientSource/Libraries/MessageConverter.h"
@@ -121,12 +122,12 @@ void SerialPABotBase_WirelessProController::push_state(const Cancellable* cancel
121122 // Left Joycon
122123 report.leftstick_x_lo = (m_left_joystick.x << 4 ) & 0xf0 ;
123124 report.leftstick_x_hi = (m_left_joystick.x & 0xf0 ) >> 4 ;
124- report.leftstick_y = m_left_joystick.y ;
125+ report.leftstick_y = 255 - m_left_joystick.y ;
125126
126127 // Right Joycon
127128 report.rightstick_x_lo = (m_right_joystick.x << 4 ) & 0xf0 ;
128129 report.rightstick_x_hi = (m_right_joystick.x & 0xf0 ) >> 4 ;
129- report.rightstick_y = m_right_joystick.y ;
130+ report.rightstick_y = 255 - m_right_joystick.y ;
130131
131132
132133 // Release the state lock since we are no longer touching state.
You can’t perform that action at this time.
0 commit comments