Skip to content

Commit f0eb9d9

Browse files
committed
moved setting to big endian after reading can id
1 parent c00a725 commit f0eb9d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bms-growatt-hv-can/src/main/java/com/airepublic/bmstoinverter/bms/growatthv/can/GrowattHVBmsCANProcessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ protected List<ByteBuffer> sendMessage(final Port port, final Command cmd, final
141141
} catch (final InterruptedException e) {
142142
}
143143
} else {
144-
receiveFrame.order(ByteOrder.BIG_ENDIAN);
145144

146145
// read the BMS id
147146
final int canId = receiveFrame.getInt();
@@ -156,6 +155,7 @@ protected List<ByteBuffer> sendMessage(final Port port, final Command cmd, final
156155
final Command command = Command.forCommand(canId);
157156
// move position to the data part
158157
receiveFrame.getInt();
158+
receiveFrame.order(ByteOrder.BIG_ENDIAN);
159159

160160
// one batterypack per BMS
161161
final BatteryPack pack = getBatteryPack(0);

0 commit comments

Comments
 (0)