From 88b833899db29908e7844ddac523ad1dee0f9327 Mon Sep 17 00:00:00 2001 From: nikzori Date: Fri, 14 Feb 2025 10:22:15 +0300 Subject: [PATCH] added Standard Radio support --- Main.cs | 29 ++++++++++++++++++++++++++--- README.md | 1 + 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Main.cs b/Main.cs index 42cd571..985bdc5 100644 --- a/Main.cs +++ b/Main.cs @@ -45,7 +45,8 @@ namespace Gidrolock_Modbus_Scanner upDownModbusID.Minimum = 1; upDownModbusID.Maximum = 247; - models.Add("Standard", "STW485"); + models.Add("Standard Wi-Fi", "STW485"); + models.Add("Standard Radio", "STR485"); models.Add("Premium Plus", "PRPLS1"); models.Add("Inteli", "INTELI"); models.Add("Premium", "BUP485"); @@ -287,7 +288,7 @@ namespace Gidrolock_Modbus_Scanner Device d = new Device(); switch (dt) { - case DeviceType.Standard: + case DeviceType.StandardWifi: d.name = "Standard Wi-Fi RS485"; d.id = 30; d.modelName = "STW485"; @@ -308,6 +309,28 @@ namespace Gidrolock_Modbus_Scanner d.radioStatus = new Entry(RegisterType.Input, 1215, 21); + break; + case DeviceType.StandardRadio: + d.name = "Standard Radio RS485"; + d.id = 30; + d.modelName = "STR485"; + d.firmware = new Entry(RegisterType.Input, 250, 6); + d.baudRate = new Entry(RegisterType.Holding, 110); + + d.valveStatus = new Entry(RegisterType.Coil, 1202); + d.alarmStatus = new Entry(RegisterType.Coil, 1201); + + d.hasCleaningMode = true; + d.cleaningMode = new Entry(RegisterType.Coil, 3); + + d.hasBattery = false; + + d.wiredSensors = 2; + d.hasScenarioSensor = false; + d.sensorAlarm = new Entry(RegisterType.Discrete, 1343, 23); + + d.radioStatus = new Entry(RegisterType.Input, 1215, 21); + break; case DeviceType.Inteli: d.modelName = "Inteli"; @@ -355,4 +378,4 @@ public enum FunctionCode { ReadCoil = 1, ReadDiscrete = 2, ReadHolding = 3, Read //public enum SelectedPath { File, Folder }; -public enum DeviceType { Standard, PremiumPlus, Inteli, Premium }; +public enum DeviceType { StandardWifi, StandardRadio, PremiumPlus, Inteli, Premium }; diff --git a/README.md b/README.md index a555096..7fbb61b 100644 --- a/README.md +++ b/README.md @@ -6,5 +6,6 @@ Поддерживаемые устройства: - Standard Wi-Fi RS485 +- Standard Radio RS485 - Premium Plus