Browse Source

协议解析Bug修改

LAPTOP-KB7QFH2U\ChenJie-PC 1 year ago
parent
commit
fa637e371d

+ 1 - 1
Project_Settings/Debugger/S32K146_4G_Debug_FLASH_PNE.launch

@@ -216,5 +216,5 @@
 </listAttribute>
 <stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536806032&quot; label=&quot;RX_Buffer[UART_LPUART2]&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536823956&quot; label=&quot;GpsBufferGet&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;255&quot; label=&quot;SocketId&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536805632&quot; label=&quot;0x1fff0100&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536806632&quot; label=&quot;0x1fff04e8&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
-<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x10000010,0x1000000,0x10000000,0x1fffbea0,0x1fff7dee,0x1fffbbed,0x1fffbc88,0x1fffbc8a,0x14200,0x80000,0x1fffbb20,0x1fffbb3e,0x1fffb348,0x1fffb5cd,0x14600"/>
+<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x10000000,0x1fffbea0,0x1fff7dee,0x1fffbbed,0x1fffbc88,0x1fffbc8a,0x14200,0x80000,0x1fffbb20,0x1fffbb3e,0x1fffb348,0x1fffb5cd,0x14600,0x200022be,0x200022be+60"/>
 </launchConfiguration>

+ 2 - 2
code/app/AppTaskUart0.c

@@ -135,9 +135,9 @@ bool bmsCellInfoDecode1(uint8 *dataPtr) //电压数据解码1
 }
 bool bmsCellInfoDecode2(uint8 *dataPtr) //电压数据解码2
 {
-	for (uint8 i = 60; i < BMS_CELLNUM; i++)
+	for (uint8 i = 0; i < 60; i++)
 	{
-		battCellU[i] = ((dataPtr[(0x00 + i) * 2] << 8) | dataPtr[(0x00 + i) * 2 + 1]);
+		battCellU[i+60] = ((dataPtr[(0x00 + i) * 2] << 8) | dataPtr[(0x00 + i) * 2 + 1]);
 	}
 	return true;
 }