|
@@ -51,8 +51,8 @@ void can_report_phase_voltage(u8 can) {
|
|
|
void can_report_dq_current(u8 can) {
|
|
void can_report_dq_current(u8 can) {
|
|
|
u8 data[6];
|
|
u8 data[6];
|
|
|
encoder_can_key(data, CMD_2_CAN_KEY(Foc_Report_Dq_Current));
|
|
encoder_can_key(data, CMD_2_CAN_KEY(Foc_Report_Dq_Current));
|
|
|
- float id = PMSM_FOC_GetDQCurrent()->d;
|
|
|
|
|
- float iq = PMSM_FOC_GetDQCurrent()->q;
|
|
|
|
|
|
|
+ float id = PMSM_FOC_Get()->out.s_FilterIdq.d;
|
|
|
|
|
+ float iq = PMSM_FOC_Get()->out.s_FilterIdq.q;
|
|
|
encode_s16(data + 2, S16Q5(id));
|
|
encode_s16(data + 2, S16Q5(id));
|
|
|
encode_s16(data + 4, S16Q5(iq));
|
|
encode_s16(data + 4, S16Q5(iq));
|
|
|
can_send_message(get_indicator_can_id(can), data, sizeof(data), 0);
|
|
can_send_message(get_indicator_can_id(can), data, sizeof(data), 0);
|