mirror of https://github.com/rusefi/bldc.git
Fixed dual motor CAN regression
This commit is contained in:
parent
e5c5b3e655
commit
242a1924e1
|
@ -1297,7 +1297,7 @@ static void decode_msg(uint32_t eid, uint8_t *data8, int len, bool is_replaced)
|
|||
|
||||
case CAN_PACKET_PING: {
|
||||
uint8_t buffer[2];
|
||||
buffer[0] = app_get_configuration()->controller_id;
|
||||
buffer[0] = is_replaced ? utils_second_motor_id() : app_get_configuration()->controller_id;
|
||||
buffer[1] = HW_TYPE_VESC;
|
||||
comm_can_transmit_eid_replace(data8[0] |
|
||||
((uint32_t)CAN_PACKET_PONG << 8), buffer, 2, true);
|
||||
|
|
|
@ -1102,7 +1102,7 @@ void commands_process_packet(unsigned char *data, unsigned int len,
|
|||
bool is_ext = data[ind++];
|
||||
|
||||
if (is_ext) {
|
||||
comm_can_transmit_eid(id, data + ind, len - ind);
|
||||
comm_can_transmit_eid_replace(id, data + ind, len - ind, true);
|
||||
} else {
|
||||
comm_can_transmit_sid(id, data + ind, len - ind);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue