提交 517c7b69 作者: wysheng

验证获取交流电压OK

上级 8660b2a7
...@@ -624,10 +624,10 @@ void GetNXRAcVolt(CanRxMsg* RxMsg) ...@@ -624,10 +624,10 @@ void GetNXRAcVolt(CanRxMsg* RxMsg)
u32 M = val&0x007fffff; u32 M = val&0x007fffff;
u16 E = (u8)(val>>23); u16 E = (u8)(val>>23);
float f = (1+ M * pow(2,-23)) * pow(2, (E-127)); float f = (1+ M * pow(2,-23)) * pow(2, (E-127));
DcVoltIn = (u16)(f*10); DcVoltIn = (u16)(f/sqrt(3)*10);
DcModleVoltDetect((u16)(f*10)); DcModleVoltDetect(DcVoltIn);
} }
else if(0x0D == RxMsg->Data[3]) /*else if(0x0D == RxMsg->Data[3])
{ {
//B //B
u32 val = RxMsg->Data[4]; u32 val = RxMsg->Data[4];
...@@ -662,7 +662,7 @@ void GetNXRAcVolt(CanRxMsg* RxMsg) ...@@ -662,7 +662,7 @@ void GetNXRAcVolt(CanRxMsg* RxMsg)
float f = (1+ M * pow(2,-23)) * pow(2, (E-127)); float f = (1+ M * pow(2,-23)) * pow(2, (E-127));
DcModleVoltDetect((u16)(f*10)); DcModleVoltDetect((u16)(f*10));
} }*/
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论