idle bench test from TS

This commit is contained in:
rusefi 2019-01-13 19:41:39 -05:00
parent 2931f8d361
commit d37c5c54a2
5 changed files with 16 additions and 5 deletions

View File

@ -774,7 +774,7 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin
} }
#if EFI_PROD_CODE || defined(__DOXYGEN__) #if EFI_PROD_CODE || defined(__DOXYGEN__)
runIoTest(subsystem, index); runBenchTest(subsystem, index);
#endif /* EFI_PROD_CODE */ #endif /* EFI_PROD_CODE */
sendOkResponse(tsChannel, TS_CRC); sendOkResponse(tsChannel, TS_CRC);
} else { } else {

View File

@ -429,6 +429,9 @@ void onConfigurationChangeIdleCallback(engine_configuration_s *previousConfigura
idleSolenoid.setFrequency(CONFIGB(idle).solenoidFrequency); idleSolenoid.setFrequency(CONFIGB(idle).solenoidFrequency);
} }
/**
* Idle test would activate the solenoid for three seconds
*/
void startIdleBench(void) { void startIdleBench(void) {
timeToStopIdleTest = getTimeNowUs() + MS2US(3000); // 3 seconds timeToStopIdleTest = getTimeNowUs() + MS2US(3000); // 3 seconds
scheduleMsg(logger, "idle valve bench test"); scheduleMsg(logger, "idle valve bench test");

View File

@ -33,6 +33,7 @@
#include "pin_repository.h" #include "pin_repository.h"
#include "efiGpio.h" #include "efiGpio.h"
#include "settings.h" #include "settings.h"
#include "idle_thread.h"
EXTERN_ENGINE EXTERN_ENGINE
; ;
@ -161,6 +162,9 @@ void fanBench(void) {
fanBenchExt("3000"); fanBenchExt("3000");
} }
/**
* we are blinking for 16 seconds so that one can click the button and walk around to see the light blinking
*/
void milBench(void) { void milBench(void) {
pinbench("0", "500", "500", "16", &enginePins.checkEnginePin, CONFIGB(malfunctionIndicatorPin)); pinbench("0", "500", "500", "16", &enginePins.checkEnginePin, CONFIGB(malfunctionIndicatorPin));
} }
@ -240,7 +244,7 @@ void OutputPin::unregisterOutput(brain_pin_e oldPin, brain_pin_e newPin) {
} }
} }
void runIoTest(int subsystem, int index) { void runBenchTest(int subsystem, int index) {
scheduleMsg(logger, "IO test subsystem=%d index=%d", subsystem, index); scheduleMsg(logger, "IO test subsystem=%d index=%d", subsystem, index);
if (subsystem == 0x12) { if (subsystem == 0x12) {
@ -248,12 +252,16 @@ void runIoTest(int subsystem, int index) {
} else if (subsystem == 0x13) { } else if (subsystem == 0x13) {
doRunFuel(index, "300", "4", "400", "3"); doRunFuel(index, "300", "4", "400", "3");
} else if (subsystem == 0x14) { } else if (subsystem == 0x14) {
// cmd_test_fuel_pump
fuelPumpBench(); fuelPumpBench();
} else if (subsystem == 0x15) { } else if (subsystem == 0x15) {
fanBench(); fanBench();
} else if (subsystem == 0x16) { } else if (subsystem == 0x16) {
// cmd_test_check_engine_light
milBench(); milBench();
} else if (subsystem == 0x17) { } else if (subsystem == 0x17) {
// cmd_test_idle_valve
startIdleBench();
} else if (subsystem == 0x20 && index == 0x3456) { } else if (subsystem == 0x20 && index == 0x3456) {
// call to pit // call to pit
setCallFromPitStop(30000); setCallFromPitStop(30000);

View File

@ -20,6 +20,6 @@ void milBench(void);
void initInjectorCentral(Logging *sharedLogger); void initInjectorCentral(Logging *sharedLogger);
bool isRunningBenchTest(void); bool isRunningBenchTest(void);
void runIoTest(int subsystem, int index); void runBenchTest(int subsystem, int index);
#endif /* INJECTOR_CENTRAL_H_ */ #endif /* INJECTOR_CENTRAL_H_ */

View File

@ -1126,7 +1126,7 @@ menuDialog = main
subMenu = monitoringSettings, "rusEfi Console Settings" subMenu = monitoringSettings, "rusEfi Console Settings"
subMenu = std_separator subMenu = std_separator
subMenu = connection, "Connection" subMenu = connection, "Connection"
subMenu = ioTest, "I-O Test" subMenu = ioTest, "Bench Test"
subMenu = allPins, "Full pinout" subMenu = allPins, "Full pinout"
[ControllerCommands] [ControllerCommands]
@ -2215,7 +2215,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
commandButton = "Stop Engine", cmd_stop_engine commandButton = "Stop Engine", cmd_stop_engine
; bench test ; bench test
dialog = ioTest, "I-O Test", border dialog = ioTest, "Bench Test", border
panel = testSpark, West panel = testSpark, West
panel = testInjectors, Center panel = testInjectors, Center
panel = testMisc, East panel = testMisc, East