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){
119119
120120 std::lock_guard<std::mutex> lg (m_state_lock);
121121
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+
122129 // 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+ );
124136 return ;
125137 }
126138
127139 // Ack is ahead of what has been dispatched.
128140 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+ );
129146 return ;
130147 }
131148
132149 m_next_expected_seqnum_ack = parsed + 1 ;
133150 m_cv.notify_all ();
134-
135- if (GlobalSettings::instance ().LOG_EVERYTHING ){
136- m_logger.log (" Command Finished: " + std::to_string (parsed));
137- }
138151}
139152
140153void ProController_SysbotBase3::push_state (const Cancellable* cancellable, WallDuration duration){
You can’t perform that action at this time.
0 commit comments