TS command to reset firmware

This commit is contained in:
rusefi 2019-03-12 20:33:13 -04:00
parent 1776ed64c3
commit 24e6f13d6a
4 changed files with 8 additions and 3 deletions

View File

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

View File

@ -243,7 +243,7 @@ void OutputPin::unregisterOutput(brain_pin_e oldPin, brain_pin_e newPin) {
}
}
void runBenchTest(uint16_t subsystem, uint16_t index) {
void executeTSCommand(uint16_t subsystem, uint16_t index) {
scheduleMsg(logger, "IO test subsystem=%d index=%d", subsystem, index);
if (subsystem == 0x12) {
@ -268,6 +268,8 @@ void runBenchTest(uint16_t subsystem, uint16_t index) {
setCallFromPitStop(30000);
} else if (subsystem == 0x30) {
setEngineType(index);
} else if (subsystem == 0x31) {
setEngineType(DEFAULT_ENGINE_TYPE);
} else if (subsystem == 0x79) {
scheduleStopEngine();
}

View File

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

View File

@ -1226,6 +1226,7 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01"
cmd_call_from_pit = "w\x00\x20\x34\x56"
cmd_stop_engine = "w\x00\x49\x00\x00"
; See 'executeTSCommand' in firmware source code
; MIATA_NA6_MAP = 41
cmd_set_engine_type_Miata_NA6_MAP = "w\x00\x30\x00\x29"
; MIATA_NA6_VAF = 57
@ -1234,6 +1235,7 @@ cmd_set_engine_type_Miata_NA6_VAF = "w\x00\x30\x00\x39"
cmd_set_engine_type_Miata_NA2 = "w\x00\x30\x00\x2F"
; ETB_BENCH_ENGINE = 58
cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A"
cmd_set_engine_type_default = "w\x00\x31\x00\x00"
[UserDefined]
dialog = fuelTableBottomDialog, "", card
@ -2318,6 +2320,7 @@ cmd_set_engine_type_etb_test = "w\x00\x30\x00\x3A"
commandButton = "Miata NA6 Stage 1", cmd_set_engine_type_Miata_NA6_MAP
commandButton = "Miata NB2 MAP", cmd_set_engine_type_Miata_NA2
commandButton = "ETB test bench", cmd_set_engine_type_etb_test
commandButton = "Reset firmware settings", cmd_set_engine_type_default
; Board->ECU stimulator