tune via CAN #3361

better constant name
This commit is contained in:
rusefillc 2021-12-04 22:29:53 -05:00
parent 42b06aa27f
commit 8d20854ba3
4 changed files with 4 additions and 7 deletions

View File

@ -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);

View File

@ -110,7 +110,7 @@ public:
class CanTsListener : public CanListener {
public:
CanTsListener()
: CanListener(CAN_SERIAL_RX_ID)
: CanListener(CAN_ECU_SERIAL_RX_ID)
{
}

View File

@ -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

View File

@ -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();