mirror of https://github.com/rusefi/bldc.git
Add a poll CAN message.
This commit is contained in:
parent
31d524f7fa
commit
f887c30e86
|
@ -1774,6 +1774,14 @@ static void decode_msg(uint32_t eid, uint8_t *data8, int len, bool is_replaced)
|
|||
}
|
||||
} break;
|
||||
|
||||
case CAN_PACKET_POLL_ROTOR_POS: {
|
||||
uint8_t buffer[4];
|
||||
int32_t index = 0;
|
||||
buffer_append_int32(buffer, (int32_t)(encoder_read_deg() * 100000.0), &index);
|
||||
comm_can_transmit_eid_replace(data8[0] |
|
||||
((uint32_t)CAN_PACKET_POLL_ROTOR_POS << 8), (uint8_t*)buffer, 4, true);
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define FW_VERSION_MAJOR 5
|
||||
#define FW_VERSION_MINOR 03
|
||||
// Set to 0 for building a release and iterate during beta test builds
|
||||
#define FW_TEST_VERSION_NUMBER 50
|
||||
#define FW_TEST_VERSION_NUMBER 51
|
||||
|
||||
#include "datatypes.h"
|
||||
|
||||
|
|
|
@ -1105,7 +1105,8 @@ typedef enum {
|
|||
CAN_PACKET_BMS_AH_WH_CHG_TOTAL,
|
||||
CAN_PACKET_BMS_AH_WH_DIS_TOTAL,
|
||||
CAN_PACKET_UPDATE_PID_POS_OFFSET,
|
||||
CAN_PACKET_MAKE_ENUM_32_BITS = 0xFFFFFFFF
|
||||
CAN_PACKET_POLL_ROTOR_POS,
|
||||
CAN_PACKET_MAKE_ENUM_32_BITS = 0xFFFFFFFF,
|
||||
} CAN_PACKET_ID;
|
||||
|
||||
// Logged fault data
|
||||
|
|
Loading…
Reference in New Issue