parent
a08e79789d
commit
5f69d23976
|
@ -15,10 +15,6 @@ EXTERN_ENGINE;
|
||||||
extern LoggingWithStorage sharedLogger;
|
extern LoggingWithStorage sharedLogger;
|
||||||
extern ButtonDebounce startStopButtonDebounce;
|
extern ButtonDebounce startStopButtonDebounce;
|
||||||
|
|
||||||
#if ! EFI_PROD_CODE
|
|
||||||
extern bool mockPinStates[(1 << sizeof(brain_pin_e))];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLE_PERF_TRACE
|
#if ENABLE_PERF_TRACE
|
||||||
static uint8_t nextThreadId = 0;
|
static uint8_t nextThreadId = 0;
|
||||||
void threadInitHook(void* vtp) {
|
void threadInitHook(void* vtp) {
|
||||||
|
|
|
@ -125,7 +125,10 @@ void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *config) {
|
||||||
#endif /* HAL_USE_ICU */
|
#endif /* HAL_USE_ICU */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
extern bool mockPinStates[(1 << sizeof(brain_pin_e))];
|
|
||||||
|
// This has been made global so we don't need to worry about efiReadPin having access the object
|
||||||
|
// we store it in, every time we need to use efiReadPin.
|
||||||
|
bool mockPinStates[BRAIN_PIN_COUNT];
|
||||||
|
|
||||||
bool efiReadPin(brain_pin_e pin) {
|
bool efiReadPin(brain_pin_e pin) {
|
||||||
return mockPinStates[static_cast<int>(pin)];
|
return mockPinStates[static_cast<int>(pin)];
|
||||||
|
|
|
@ -29,5 +29,10 @@ EXTERNC iomode_t getInputMode(pin_input_mode_e mode);
|
||||||
#if HAL_USE_ICU
|
#if HAL_USE_ICU
|
||||||
EXTERNC void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *config);
|
EXTERNC void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *config);
|
||||||
#endif /* HAL_USE_ICU */
|
#endif /* HAL_USE_ICU */
|
||||||
|
|
||||||
#endif /* EFI_GPIO_HARDWARE */
|
#endif /* EFI_GPIO_HARDWARE */
|
||||||
|
|
||||||
|
#if ! EFI_PROD_CODE
|
||||||
|
#define BRAIN_PIN_COUNT (1 << 8 * sizeof(brain_pin_e))
|
||||||
|
extern bool mockPinStates[BRAIN_PIN_COUNT];
|
||||||
|
#endif
|
||||||
|
|
|
@ -24,10 +24,6 @@ extern engine_configuration_s & activeConfiguration;
|
||||||
extern bool printTriggerDebug;
|
extern bool printTriggerDebug;
|
||||||
extern bool printFuelDebug;
|
extern bool printFuelDebug;
|
||||||
|
|
||||||
// This has been made global so we don't need to worry about efiReadPin having access the object
|
|
||||||
// we store it in, every time we need to use efiReadPin.
|
|
||||||
bool mockPinStates[BRAIN_PIN_COUNT];
|
|
||||||
|
|
||||||
EngineTestHelperBase::EngineTestHelperBase() {
|
EngineTestHelperBase::EngineTestHelperBase() {
|
||||||
// todo: make this not a global variable, we need currentTimeProvider interface on engine
|
// todo: make this not a global variable, we need currentTimeProvider interface on engine
|
||||||
timeNowUs = 0;
|
timeNowUs = 0;
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define BRAIN_PIN_COUNT (1 << sizeof(brain_pin_e))
|
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "trigger_central.h"
|
#include "trigger_central.h"
|
||||||
#include "rpm_calculator.h"
|
#include "rpm_calculator.h"
|
||||||
|
|
Loading…
Reference in New Issue