diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index f7ddb273d6..a85038d643 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -28,6 +28,7 @@ #if EFI_PROD_CODE || defined(__DOXYGEN__) #include "electronic_throttle.h" #include "rtc_helper.h" +#include "can_hw.h" #include "rusefi.h" #include "pin_repository.h" #include "hardware.h" @@ -1026,6 +1027,7 @@ command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode}, {"tps_accel_len", setTpsAccelLen}, {"engine_load_accel_len", setEngineLoadAccelLen}, #if EFI_PROD_CODE || defined(__DOXYGEN__) + {"can_mode", setCanType}, {"idle_position", setIdleValvePosition}, {"idle_rpm", setTargetIdleRpm}, {"idle_dt", setIdleDT}, diff --git a/firmware/hw_layer/can_hw.cpp b/firmware/hw_layer/can_hw.cpp index 7c4a38fb99..f8892c7ffa 100644 --- a/firmware/hw_layer/can_hw.cpp +++ b/firmware/hw_layer/can_hw.cpp @@ -257,6 +257,11 @@ static void canInfo(void) { scheduleMsg(&logger, "CAN rx count %d/tx ok %d/tx not ok %d", canReadCounter, canWriteOk, canWriteNotOk); } +void setCanType(int type) { + engineConfiguration->canNbcType = (can_nbc_e)type; + canInfo(); +} + #endif /* EFI_PROD_CODE */ void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_F) { diff --git a/firmware/hw_layer/can_hw.h b/firmware/hw_layer/can_hw.h index d526c44c90..62b2000d0f 100644 --- a/firmware/hw_layer/can_hw.h +++ b/firmware/hw_layer/can_hw.h @@ -31,6 +31,7 @@ void stopCanPins(DECLARE_ENGINE_PARAMETER_F); void startCanPins(DECLARE_ENGINE_PARAMETER_F); void commonTxInit(int eid); void sendMessage(); +void setCanType(int type); void setTxBit(int offset, int index); void enableFrankensoCan(DECLARE_ENGINE_PARAMETER_F); diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 781b7a5088..accafb0584 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -249,5 +249,5 @@ int getRusEfiVersion(void) { return 123; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] * 0 != 0) return 3211; // this is here to make the compiler happy about the unused array - return 20170108; + return 20170111; }