|
@@ -100,6 +100,9 @@ void can_mcast_foc_status2(u8 can) {
|
|
|
float vDC = get_vbus_float();
|
|
float vDC = get_vbus_float();
|
|
|
encode_s16(data + 4, (s16)(vDC*10));
|
|
encode_s16(data + 4, (s16)(vDC*10));
|
|
|
float iDC = PMSM_FOC_GetVbusCurrent();
|
|
float iDC = PMSM_FOC_GetVbusCurrent();
|
|
|
|
|
+ if (!PMSM_FOC_Is_Start()) {
|
|
|
|
|
+ iDC = 0;
|
|
|
|
|
+ }
|
|
|
encode_s16(data + 6, (s16)(iDC*10));
|
|
encode_s16(data + 6, (s16)(iDC*10));
|
|
|
shark_can0_send_ext_message(get_indicator_can_id(0x7E), data, sizeof(data));
|
|
shark_can0_send_ext_message(get_indicator_can_id(0x7E), data, sizeof(data));
|
|
|
}
|
|
}
|
|
@@ -128,6 +131,9 @@ void can_report_ext_status(u8 can) {
|
|
|
float vDC = get_vbus_float();
|
|
float vDC = get_vbus_float();
|
|
|
encode_s16(data + 4, (s16)(vDC*10));
|
|
encode_s16(data + 4, (s16)(vDC*10));
|
|
|
float iDC = PMSM_FOC_GetVbusCurrent();
|
|
float iDC = PMSM_FOC_GetVbusCurrent();
|
|
|
|
|
+ if (!PMSM_FOC_Is_Start()) {
|
|
|
|
|
+ iDC = 0;
|
|
|
|
|
+ }
|
|
|
encode_s16(data + 6, (s16)(iDC*10));
|
|
encode_s16(data + 6, (s16)(iDC*10));
|
|
|
shark_can0_send_ext_message(0x1A014D43, data, sizeof(data));
|
|
shark_can0_send_ext_message(0x1A014D43, data, sizeof(data));
|
|
|
}
|
|
}
|