From 1302f780b2320d532470cd57bbc87cabf4d0a584 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 7 Jan 2024 21:11:34 -0500 Subject: [PATCH] unused parameters --- firmware/controllers/engine_cycle/fuel_schedule.cpp | 4 ++-- firmware/controllers/engine_cycle/fuel_schedule.h | 4 ++-- .../controllers/engine_cycle/main_trigger_callback.cpp | 8 ++++---- unit_tests/tests/trigger/test_injection_scheduling.cpp | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/firmware/controllers/engine_cycle/fuel_schedule.cpp b/firmware/controllers/engine_cycle/fuel_schedule.cpp index 0ac63a52d3..a407cfeebc 100644 --- a/firmware/controllers/engine_cycle/fuel_schedule.cpp +++ b/firmware/controllers/engine_cycle/fuel_schedule.cpp @@ -195,14 +195,14 @@ void FuelSchedule::addFuelEvents() { isReady = true; } -void FuelSchedule::onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase, float nextPhase) { +void FuelSchedule::onTriggerTooth(efitick_t nowNt, float currentPhase, float nextPhase) { // Wait for schedule to be built - this happens the first time we get RPM if (!isReady) { return; } for (size_t i = 0; i < engineConfiguration->cylindersCount; i++) { - elements[i].onTriggerTooth(rpm, nowNt, currentPhase, nextPhase); + elements[i].onTriggerTooth(nowNt, currentPhase, nextPhase); } } diff --git a/firmware/controllers/engine_cycle/fuel_schedule.h b/firmware/controllers/engine_cycle/fuel_schedule.h index c089a43a61..fa2a972175 100644 --- a/firmware/controllers/engine_cycle/fuel_schedule.h +++ b/firmware/controllers/engine_cycle/fuel_schedule.h @@ -20,7 +20,7 @@ public: bool update(); // Call this every decoded trigger tooth. It will schedule any relevant events for this injector. - void onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase, float nextPhase); + void onTriggerTooth(efitick_t nowNt, float currentPhase, float nextPhase); WallFuel& getWallFuel(); @@ -66,7 +66,7 @@ public: void invalidate(); // Call this every trigger tooth. It will schedule all required injector events. - void onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase, float nextPhase); + void onTriggerTooth(efitick_t nowNt, float currentPhase, float nextPhase); /** * this method schedules all fuel events for an engine cycle diff --git a/firmware/controllers/engine_cycle/main_trigger_callback.cpp b/firmware/controllers/engine_cycle/main_trigger_callback.cpp index 327c00496e..83e5d520ba 100644 --- a/firmware/controllers/engine_cycle/main_trigger_callback.cpp +++ b/firmware/controllers/engine_cycle/main_trigger_callback.cpp @@ -64,7 +64,7 @@ void turnInjectionPinLow(InjectionEvent *event) { event->update(); } -void InjectionEvent::onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase, float nextPhase) { +void InjectionEvent::onTriggerTooth(efitick_t nowNt, float currentPhase, float nextPhase) { auto eventAngle = injectionStartAngle; // Determine whether our angle is going to happen before (or near) the next tooth @@ -164,7 +164,7 @@ void InjectionEvent::onTriggerTooth(int rpm, efitick_t nowNt, float currentPhase #endif /* EFI_DEFAILED_LOGGING */ } -static void handleFuel(int rpm, efitick_t nowNt, float currentPhase, float nextPhase) { +static void handleFuel(efitick_t nowNt, float currentPhase, float nextPhase) { ScopePerf perf(PE::HandleFuel); efiAssertVoid(ObdCode::CUSTOM_STACK_6627, hasLotsOfRemainingStack(), "lowstck#3"); @@ -191,7 +191,7 @@ static void handleFuel(int rpm, efitick_t nowNt, float currentPhase, float nextP } #endif /* FUEL_MATH_EXTREME_LOGGING */ - fs->onTriggerTooth(rpm, nowNt, currentPhase, nextPhase); + fs->onTriggerTooth(nowNt, currentPhase, nextPhase); } /** @@ -240,7 +240,7 @@ void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp, angle_ * For fuel we schedule start of injection based on trigger angle, and then inject for * specified duration of time */ - handleFuel(rpm, edgeTimestamp, currentPhase, nextPhase); + handleFuel(edgeTimestamp, currentPhase, nextPhase); engine->module()->scheduleEventsUntilNextTriggerTooth( rpm, edgeTimestamp, currentPhase, nextPhase); diff --git a/unit_tests/tests/trigger/test_injection_scheduling.cpp b/unit_tests/tests/trigger/test_injection_scheduling.cpp index da1ebb51cf..3542b3158a 100644 --- a/unit_tests/tests/trigger/test_injection_scheduling.cpp +++ b/unit_tests/tests/trigger/test_injection_scheduling.cpp @@ -43,7 +43,7 @@ TEST(injectionScheduling, InjectionIsScheduled) { event.injectionStartAngle = 125; // We are at 120 degrees now, next tooth 130 - event.onTriggerTooth(1000, nowNt, 120, 130); + event.onTriggerTooth(nowNt, 120, 130); } TEST(injectionScheduling, InjectionIsScheduledBeforeWraparound) { @@ -82,7 +82,7 @@ TEST(injectionScheduling, InjectionIsScheduledBeforeWraparound) { event.injectionStartAngle = 715; // We are at 710 degrees now, next tooth 010 - event.onTriggerTooth(1000, nowNt, 710, 010); + event.onTriggerTooth(nowNt, 710, 010); } TEST(injectionScheduling, InjectionIsScheduledAfterWraparound) { @@ -121,7 +121,7 @@ TEST(injectionScheduling, InjectionIsScheduledAfterWraparound) { event.injectionStartAngle = 5; // We are at 710 degrees now, next tooth 010 - event.onTriggerTooth(1000, nowNt, 710, 010); + event.onTriggerTooth(nowNt, 710, 010); } TEST(injectionScheduling, InjectionNotScheduled) { @@ -155,5 +155,5 @@ TEST(injectionScheduling, InjectionNotScheduled) { event.injectionStartAngle = 125; // We are at 130 degrees now, next tooth 140 - event.onTriggerTooth(1000, nowNt, 130, 140); + event.onTriggerTooth(nowNt, 130, 140); }