Skip to content

Commit 9843952

Browse files
authored
Merge pull request #6 from paulorb/presetSingleRegister
fix(ISSUE-5): fix issue on preset single register request
2 parents a36178e + 5d4212e commit 9843952

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/ModbusPresetSingleRegisterRequest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ModbusPresetSingleRegisterRequest (modbusPacket: ModbusPacket) :
2323
throw Exception("Expected 4 bytes, found ${byteVector.size} bytes")
2424
}
2525
address = DataConverter.make_ushort(byteVector[1], byteVector[0]).toInt()
26-
singleRegisterValue = DataConverter.make_short(byteVector[2], byteVector[3])
26+
singleRegisterValue = DataConverter.make_short(byteVector[3], byteVector[2])
2727
}
2828

2929
override fun encode() {

0 commit comments

Comments
 (0)