Skip to content

Commit 3dbb942

Browse files
committed
Fix scheduler.
1 parent 5585767 commit 3dbb942

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

SerialPrograms/Source/Controllers/Schedulers/SuperscalarScheduler.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ void SuperscalarScheduler::clear() noexcept{
4343
SuperscalarScheduler::State SuperscalarScheduler::current_live_commands(){
4444
WallClock device_sent_time = m_device_sent_time;
4545
State ret;
46+
// cout << "device_sent_time = " << std::chrono::duration_cast<Milliseconds>(device_sent_time - m_local_start).count() << endl;
4647
for (auto& item : m_live_commands){
48+
// cout << "busy = " << std::chrono::duration_cast<Milliseconds>(item.second.busy_time - m_local_start).count()
49+
// << ", done = " << std::chrono::duration_cast<Milliseconds>(item.second.done_time - m_local_start).count() << endl;
4750
if (item.second.busy_time <= device_sent_time && device_sent_time < item.second.done_time){
4851
ret.emplace_back(item.second.command);
4952
}
@@ -230,6 +233,7 @@ void SuperscalarScheduler::issue_to_resource(
230233
if (!ret.second){
231234
// cout << m_device_sent_time << " : " << ret.first->second.free_time << endl;
232235
m_device_issue_time = std::max(m_device_issue_time, ret.first->second.free_time);
236+
process_schedule(schedule);
233237
}
234238
Command& command = ret.first->second;
235239

SerialPrograms/Source/Controllers/StandardHid/StandardHid_Keyboard_SerialPABotBase.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ void SerialPABotBase_Keyboard::execute_state(
116116
state.insert(key);
117117
}
118118

119+
// cout << "last = " << m_last_state.size() << ", now = " << state.size() << endl;
120+
119121
// Last State: Remove keys that are no longer pressed.
120122
// Current State: Remove keys that were already pressed.
121123
for (auto iterL = m_last_state.begin(); iterL != m_last_state.end();){

0 commit comments

Comments
 (0)