From c68e92043cb52f859de724781f2e5774c60d465b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 27 Mar 2023 20:05:05 -0700 Subject: Add HuaSheng output control --- .../org/traccar/protocol/HuaShengProtocolEncoderTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/test/java/org/traccar') diff --git a/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java b/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java index b44f6e89c..c320d4aa9 100644 --- a/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java +++ b/src/test/java/org/traccar/protocol/HuaShengProtocolEncoderTest.java @@ -11,7 +11,17 @@ public class HuaShengProtocolEncoderTest extends ProtocolTest { var encoder = inject(new HuaShengProtocolEncoder(null)); - Command command = new Command(); + Command command; + + command = new Command(); + command.setDeviceId(1); + command.setType(Command.TYPE_OUTPUT_CONTROL); + command.set(Command.KEY_INDEX, 1); + command.set(Command.KEY_DATA, "1"); + + verifyCommand(encoder, command, binary("c00000000daa1600000000000101c0")); + + command = new Command(); command.setDeviceId(1); command.setType(Command.TYPE_POSITION_PERIODIC); command.set(Command.KEY_FREQUENCY, 60); -- cgit v1.2.3