From 8d20854ba355c7b6729773121fd0b8dd9052f32b Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 4 Dec 2021 22:29:53 -0500 Subject: [PATCH] tune via CAN #3361 better constant name --- firmware/console/binary/serial_can.cpp | 2 +- firmware/console/binary/serial_can.h | 2 +- firmware/integration/rusefi_config.txt | 3 --- .../io/src/main/java/com/rusefi/io/can/Elm327Connector.java | 4 ++-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/firmware/console/binary/serial_can.cpp b/firmware/console/binary/serial_can.cpp index d7117b5dc9..d248f4ae51 100644 --- a/firmware/console/binary/serial_can.cpp +++ b/firmware/console/binary/serial_can.cpp @@ -26,7 +26,7 @@ static CanTsListener listener; int CanStreamerState::sendFrame(const IsoTpFrameHeader & header, const uint8_t *data, int num, can_sysinterval_t timeout) { int dlc = 8; // standard 8 bytes - CanTxMessage txmsg(CAN_SERIAL_TX_ID, dlc, false); + CanTxMessage txmsg(CAN_ECU_SERIAL_TX_ID, dlc, false); // fill the frame data according to the CAN-TP protocol (ISO 15765-2) txmsg[0] = (uint8_t)((header.frameType & 0xf) << 4); diff --git a/firmware/console/binary/serial_can.h b/firmware/console/binary/serial_can.h index 8be83be418..e4adcb0bad 100644 --- a/firmware/console/binary/serial_can.h +++ b/firmware/console/binary/serial_can.h @@ -110,7 +110,7 @@ public: class CanTsListener : public CanListener { public: CanTsListener() - : CanListener(CAN_SERIAL_RX_ID) + : CanListener(CAN_ECU_SERIAL_RX_ID) { } diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index d22da05ad3..9048a9ba0b 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1991,8 +1991,5 @@ end_struct #define show_test_presets true #define show_Frankenso_presets true -#define CAN_SERIAL_RX_ID 0x100 -#define CAN_SERIAL_TX_ID 0x102 - #define CAN_ECU_SERIAL_RX_ID 0x100 #define CAN_ECU_SERIAL_TX_ID 0x102 diff --git a/java_console/io/src/main/java/com/rusefi/io/can/Elm327Connector.java b/java_console/io/src/main/java/com/rusefi/io/can/Elm327Connector.java index 7321600202..ba9852855a 100644 --- a/java_console/io/src/main/java/com/rusefi/io/can/Elm327Connector.java +++ b/java_console/io/src/main/java/com/rusefi/io/can/Elm327Connector.java @@ -24,8 +24,8 @@ public class Elm327Connector implements Closeable { public static final String HELLO = "ATZ"; public static final String ELM_EOL = "\r"; // those are inverted between ECU side and PC side - private static final int CAN_PC_SERIAL_RX_ID = Fields.CAN_SERIAL_TX_ID; - private static final int CAN_PC_SERIAL_TX_ID = Fields.CAN_SERIAL_RX_ID; + private static final int CAN_PC_SERIAL_RX_ID = Fields.CAN_ECU_SERIAL_TX_ID; + private static final int CAN_PC_SERIAL_TX_ID = Fields.CAN_ECU_SERIAL_RX_ID; private final Object lock = new Object();