Skip to content

Commit

Permalink
chore: fix minor linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
smlx committed Feb 19, 2024
1 parent 4658229 commit ca0623d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mitm/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ func (h *OutboundPacketHandler) HandlePacket(
return nil, fmt.Errorf("couldn't signal batman: %v", err)
}
var fullPacket []byte
fullPacket = append(headerData, newBodyData...)
fullPacket = append(fullPacket, headerData...)
fullPacket = append(fullPacket, newBodyData...)
fullPacket =
outboundCRCByteOrder.AppendUint16(fullPacket, goodwe.CRC(fullPacket))
return fullPacket, nil
Expand Down
4 changes: 2 additions & 2 deletions mitm/outboundmarshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestUnmarshalMeterMetrics(t *testing.T) {
}{
"metrics": {
input: []byte{
//0x50, 0x4f, 0x53, 0x54, 0x47, 0x57, 0x00, 0x00, 0x00, 0x99, 0x03, 0x04,
// 0x50, 0x4f, 0x53, 0x54, 0x47, 0x57, 0x00, 0x00, 0x00, 0x99, 0x03, 0x04,
0x00, 0x00, 0x39, 0x31,
0x30, 0x30, 0x30, 0x48, 0x4b, 0x55, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x17, 0x09,
0x12, 0x09, 0x09, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x09,
Expand All @@ -25,7 +25,7 @@ func TestUnmarshalMeterMetrics(t *testing.T) {
0x0e, 0x52, 0xb3, 0xcc, 0x9f, 0x0a, 0xaf, 0xef, 0x6d, 0x28, 0xce, 0xad, 0x52, 0xe7, 0x9f, 0x7f,
0x9b, 0xe3, 0x3c, 0xa0, 0x1b, 0x22, 0xc9, 0x59, 0x33, 0x04, 0xf2, 0x39, 0x8d, 0xd1, 0x20, 0xfc,
0x88, 0xaa, 0x1d, 0x99,
// 0x4b, 0xcd,
// 0x4b, 0xcd,
},
metrics: OutboundMeterMetricsPacket{
OutboundEnvelopeTS: OutboundEnvelopeTS{
Expand Down

0 comments on commit ca0623d

Please sign in to comment.