The Big Refactoring of 2019: scheduler should not be global #655

This commit is contained in:
rusefi 2019-01-09 20:06:41 -05:00
parent 270af0c0ab
commit dee2402341
4 changed files with 3 additions and 8 deletions

View File

@ -6,12 +6,8 @@
*/
#include "signal_executor.h"
#include "event_queue.h"
#include "global_execution_queue.h"
// this global instance is used by integration tests via 'scheduleByTimestamp' global methods below
static EventQueue schedulingQueue;
bool_t debugSignalExecutor = false;
TestExecutor::TestExecutor() {

View File

@ -9,6 +9,7 @@
#define GLOBAL_EXECUTION_QUEUE_H_
#include "scheduler.h"
#include "event_queue.h"
class TestExecutor : public ExecutorInterface {
public:
@ -19,6 +20,8 @@ public:
int executeAll(efitime_t now);
int size();
scheduling_s* getForUnitTest(int index);
private:
EventQueue schedulingQueue;
};
#endif /* GLOBAL_EXECUTION_QUEUE_H_ */

View File

@ -46,7 +46,6 @@ static void test100dutyCycle() {
TestExecutor executor;
SimplePwm pwm("test PWM1");
OutputPin pin;
executor.clear();
startSimplePwm(&pwm, "unit_test",
&executor,
@ -74,7 +73,6 @@ static void testSwitchToNanPeriod() {
TestExecutor executor;
SimplePwm pwm("test PWM1");
OutputPin pin;
executor.clear();
startSimplePwm(&pwm, "unit_test",
&executor,
@ -113,7 +111,6 @@ void testPwmGenerator() {
TestExecutor executor;
SimplePwm pwm("test PWM3");
OutputPin pin;
executor.clear();
startSimplePwm(&pwm,
"unit_test",

View File

@ -14,7 +14,6 @@ void testSpeedDensity(void) {
printf("*************************************************** testSpeedDensity\r\n");
EngineTestHelper eth(FORD_INLINE_6_1995);
EXPAND_EngineTestHelper;
engine->executor.clear(); // todo: there must be a better place for this
engineConfiguration->trigger.customTotalToothCount = 8;
eth.applyTriggerShape();