minor housekeeping

This commit is contained in:
Matthew Kennedy 2024-01-06 23:10:56 -08:00
parent 1c4a9a7ac0
commit a45b9ab611
5 changed files with 8 additions and 8 deletions

View File

@ -10,7 +10,7 @@
void turnInjectionPinHigh(InjectionEvent *event) {
efitick_t nowNt = getTimeNowNt();
for (int i = 0;i < MAX_WIRES_COUNT;i++) {
for (size_t i = 0; i < efi::size(event->outputs); i++) {
InjectorOutputPin *output = event->outputs[i];
if (output) {

View File

@ -13,7 +13,6 @@
#define MAX_WIRES_COUNT 2
class InjectionEvent {
public:
InjectionEvent();

View File

@ -54,7 +54,7 @@ void endSimultaneousInjection(InjectionEvent *event) {
void turnInjectionPinLow(InjectionEvent *event) {
efitick_t nowNt = getTimeNowNt();
for (int i = 0;i<MAX_WIRES_COUNT;i++) {
for (size_t i = 0; i < efi::size(event->outputs); i++) {
InjectorOutputPin *output = event->outputs[i];
if (output) {
output->close(nowNt);

View File

@ -50,7 +50,7 @@ static const char* const injectorNames[] = { "Injector 1", "Injector 2", "Inject
"Injector 7", "Injector 8", "Injector 9", "Injector 10", "Injector 11", "Injector 12"};
static const char* const injectorShortNames[] = { PROTOCOL_INJ1_SHORT_NAME, "i2", "i3", "i4", "i5", "i6", "i7", "i8",
"j9", "iA", "iB", "iC"};
"i9", "iA", "iB", "iC"};
static const char* const auxValveShortNames[] = { "a1", "a2"};

View File

@ -528,10 +528,11 @@ static void setTestBug299(EngineTestHelper *eth) {
assertEqualsM("duty for maf=0", 7.5, getInjectorDutyCycle(round(Sensor::getOrZero(SensorType::Rpm))));
}
static void assertInjectors(const char *msg, int value0, int value1) {
EXPECT_EQ(value0, enginePins.injectors[0].m_currentLogicValue);
EXPECT_EQ(value1, enginePins.injectors[1].m_currentLogicValue);
}
#define assertInjectors(msg, value0, value1) \
do { \
EXPECT_EQ(value0, enginePins.injectors[0].m_currentLogicValue) << msg; \
EXPECT_EQ(value1, enginePins.injectors[1].m_currentLogicValue) << msg; \
} while (false);
static void setArray(float* p, size_t count, float value) {
while (count--) {