expose the problem
This commit is contained in:
parent
b2c0a6b3a5
commit
4527b7694a
|
@ -209,5 +209,18 @@ scheduling_s *EventQueue::getElementAtIndexForUnitText(int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventQueue::clear(void) {
|
void EventQueue::clear(void) {
|
||||||
|
// Flush the queue, resetting all scheduling_s as though we'd executed them
|
||||||
|
while(head) {
|
||||||
|
auto x = head;
|
||||||
|
// link next element to head
|
||||||
|
head = x->nextScheduling_s;
|
||||||
|
|
||||||
|
// Reset this element
|
||||||
|
x->momentX = 0;
|
||||||
|
x->isScheduled = false;
|
||||||
|
x->nextScheduling_s = nullptr;
|
||||||
|
x->action = {};
|
||||||
|
}
|
||||||
|
|
||||||
head = nullptr;
|
head = nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,11 @@
|
||||||
bool_t debugSignalExecutor = false;
|
bool_t debugSignalExecutor = false;
|
||||||
extern bool verboseMode;
|
extern bool verboseMode;
|
||||||
|
|
||||||
|
TestExecutor::~TestExecutor() {
|
||||||
|
// Flush the queue and reset all scheduling_s at the end of a test's execution
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
void TestExecutor::scheduleForLater(scheduling_s *scheduling, int delayUs, action_s action) {
|
void TestExecutor::scheduleForLater(scheduling_s *scheduling, int delayUs, action_s action) {
|
||||||
if (debugSignalExecutor) {
|
if (debugSignalExecutor) {
|
||||||
printf("scheduleTask %d\r\n", delayUs);
|
printf("scheduleTask %d\r\n", delayUs);
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
class TestExecutor : public ExecutorInterface {
|
class TestExecutor : public ExecutorInterface {
|
||||||
public:
|
public:
|
||||||
|
~TestExecutor();
|
||||||
|
|
||||||
void scheduleByTimestamp(scheduling_s *scheduling, efitimeus_t timeUs, action_s action) override;
|
void scheduleByTimestamp(scheduling_s *scheduling, efitimeus_t timeUs, action_s action) override;
|
||||||
void scheduleByTimestampNt(scheduling_s *scheduling, efitick_t timeNt, action_s action) override;
|
void scheduleByTimestampNt(scheduling_s *scheduling, efitick_t timeNt, action_s action) override;
|
||||||
void scheduleForLater(scheduling_s *scheduling, int delayUs, action_s action) override;
|
void scheduleForLater(scheduling_s *scheduling, int delayUs, action_s action) override;
|
||||||
|
|
Loading…
Reference in New Issue