Skip to content

Commit 91561be

Browse files
committed
Minor
1 parent c3b0383 commit 91561be

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase_Connection.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ void SerialPABotBase_Connection::update_with_capabilities(const ControllerFeatur
112112
break;
113113
}
114114

115-
// Program Version
116-
logger.log("Checking Firmware Version...");
117-
uint32_t version = program_version(*m_botbase);
118-
logger.log("Checking Firmware Version... Version = " + std::to_string(version));
115+
// // Program Version
116+
// logger.log("Checking Firmware Version...");
117+
// uint32_t version = program_version(*m_botbase);
118+
// logger.log("Checking Firmware Version... Version = " + std::to_string(version));
119119

120120
// REMOVE: Temporary for migration.
121-
if (m_protocol / 100 == 20210526 && version == 2023121900){
121+
if (m_protocol / 100 == 20210526 && m_version == 2023121900){
122122
break;
123123
}
124124

@@ -196,6 +196,9 @@ ControllerModeStatus SerialPABotBase_Connection::read_device_specs(
196196
);
197197
}
198198

199+
logger.log("Checking Firmware Version...");
200+
m_version = program_version(*m_botbase);
201+
logger.log("Checking Firmware Version... Version = " + std::to_string(m_version));
199202

200203
// Controller Type
201204
logger.log("Reading Controller Mode...");
@@ -327,8 +330,8 @@ void SerialPABotBase_Connection::thread_body(
327330
error = e.message();
328331
}
329332
if (error.empty()){
330-
// std::string text = "Program: " + program_name(m_program_id) + " (" + std::to_string(m_protocol) + ")";
331-
std::string text = program_name(m_program_id) + " (" + std::to_string(m_protocol) + ")";
333+
// std::string text = "Program: " + program_name(m_program_id) + " (" + std::to_string(m_version) + ")";
334+
std::string text = program_name(m_program_id) + " (" + std::to_string(m_version) + ")";
332335
set_status_line0(text, theme_friendly_darkblue());
333336
declare_ready(mode_status);
334337
}else{

SerialPrograms/Source/Controllers/SerialPABotBase/SerialPABotBase_Connection.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class SerialPABotBase_Connection : public ControllerConnection{
5757
std::string m_device_name;
5858

5959
uint32_t m_protocol = 0;
60+
uint32_t m_version = 0;
6061
uint8_t m_program_id = 0;
6162
ControllerModeStatus m_mode_status;
6263

SerialPrograms/Source/NintendoSwitch/Controllers/NintendoSwitch_ControllerWithScheduler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void ControllerWithScheduler::issue_mash_AZs(
300300
if (duration <= Milliseconds::zero()){
301301
break;
302302
}
303-
issue_buttons(cancellable, BUTTON_A, 3*8ms, 5*8ms, 3*8ms);
303+
issue_buttons(cancellable, BUTTON_A, 3*8ms, 6*8ms, 3*8ms);
304304
duration -= std::min(3*8ms, duration);
305305

306306
// We never log before the first issue to avoid delaying the critical path.
@@ -317,13 +317,13 @@ void ControllerWithScheduler::issue_mash_AZs(
317317
if (duration <= Milliseconds::zero()){
318318
break;
319319
}
320-
issue_buttons(cancellable, BUTTON_ZL, 3*8ms, 5*8ms, 3*8ms);
320+
issue_buttons(cancellable, BUTTON_ZL, 3*8ms, 6*8ms, 3*8ms);
321321
duration -= std::min(3*8ms, duration);
322322

323323
if (duration <= Milliseconds::zero()){
324324
break;
325325
}
326-
issue_buttons(cancellable, BUTTON_ZR, 3*8ms, 5*8ms, 3*8ms);
326+
issue_buttons(cancellable, BUTTON_ZR, 3*8ms, 6*8ms, 3*8ms);
327327
duration -= std::min(3*8ms, duration);
328328
}
329329
}

SerialPrograms/Source/NintendoSwitch/Controllers/NintendoSwitch_ProController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ constexpr Button VALID_PRO_CONTROLLER_BUTTONS =
4949

5050

5151
//
52-
// This is the generic interface a Switch pro controller.
52+
// This is the generic interface to a Switch pro controller.
5353
//
5454
class ProController : public AbstractController{
5555
public:

SerialPrograms/Source/NintendoSwitch/Controllers/SysbotBase/SysbotBase_ProController.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ namespace NintendoSwitch{
2222

2323
class ProController_SysbotBase final :
2424
public ProController,
25-
public ControllerWithScheduler{
25+
public ControllerWithScheduler
26+
{
2627
public:
2728
using ContextType = ProControllerContext;
2829

0 commit comments

Comments
 (0)