Too many bench test buttons are broken #5327

This commit is contained in:
rusefi 2023-06-15 22:28:15 -04:00
parent 308bbbe6c5
commit 7b2985c1c3
5 changed files with 6 additions and 8 deletions

View File

@ -6,6 +6,7 @@
#include "pch.h"
#include "fuel_pump.h"
#include "bench_test.h"
void FuelPumpController::onSlowCallback() {
auto timeSinceIgn = m_ignOnTimer.getElapsedSeconds();

View File

@ -482,10 +482,7 @@ todo: move to shutdown_controller.cpp
}
bool Engine::isInMainRelayBench() {
if (mainRelayBenchStartNt == 0) {
return false;
}
return (getTimeNowNt() - mainRelayBenchStartNt) < NT_PER_SECOND;
return !mainRelayBenchStart.hasElapsedSec(1);
}
bool Engine::isInShutdownMode() const {

View File

@ -299,7 +299,7 @@ public:
SensorsState sensors;
efitick_t mainRelayBenchStartNt = 0;
Timer mainRelayBenchStart;
void preCalculate();

View File

@ -51,7 +51,7 @@
static bool isRunningBench = false;
bool isRunningBenchTest(void) {
bool isRunningBenchTest() {
return isRunningBench;
}
@ -263,7 +263,7 @@ void acRelayBench(void) {
static void mainRelayBench(void) {
// main relay is usually "ON" via FSIO thus bench testing that one is pretty unusual
engine->mainRelayBenchStartNt = getTimeNowNt();
engine->mainRelayBenchStart.reset();
}
static void hpfpValveBench(void) {

View File

@ -13,7 +13,7 @@
void initBenchTest();
void onConfigurationChangeBenchTest();
bool isRunningBenchTest(void);
bool isRunningBenchTest();
void fanBench(void);
void fan2Bench(void);