File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
SerialPrograms/Source/NintendoSwitch/Controllers/SysbotBase Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -119,22 +119,35 @@ void ProController_SysbotBase3::on_message(const std::string& message){
119
119
120
120
std::lock_guard<std::mutex> lg (m_state_lock);
121
121
122
+ if (GlobalSettings::instance ().LOG_EVERYTHING ){
123
+ m_logger.log (
124
+ " Command Finished: " + std::to_string (parsed) +
125
+ " (queue size = " + std::to_string (m_next_seqnum - m_next_expected_seqnum_ack) + " )"
126
+ );
127
+ }
128
+
122
129
// Old ack
123
- if (parsed <= m_next_expected_seqnum_ack){
130
+ if (parsed < m_next_expected_seqnum_ack){
131
+ m_logger.log (
132
+ " Received Old Ack: Expected = " + std::to_string (m_next_expected_seqnum_ack) +
133
+ " , Actual = " + std::to_string (parsed),
134
+ COLOR_RED
135
+ );
124
136
return ;
125
137
}
126
138
127
139
// Ack is ahead of what has been dispatched.
128
140
if (parsed >= m_next_seqnum){
141
+ m_logger.log (
142
+ " Received Future Ack: Expected = " + std::to_string (m_next_expected_seqnum_ack) +
143
+ " , Actual = " + std::to_string (parsed),
144
+ COLOR_RED
145
+ );
129
146
return ;
130
147
}
131
148
132
149
m_next_expected_seqnum_ack = parsed + 1 ;
133
150
m_cv.notify_all ();
134
-
135
- if (GlobalSettings::instance ().LOG_EVERYTHING ){
136
- m_logger.log (" Command Finished: " + std::to_string (parsed));
137
- }
138
151
}
139
152
140
153
void ProController_SysbotBase3::push_state (const Cancellable* cancellable, WallDuration duration){
You can’t perform that action at this time.
0 commit comments