fix display smi2

This commit is contained in:
Mit4el
2024-11-30 21:11:02 +03:00
parent 64b4e67dcd
commit 889eb5f85b
4 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@
"mqttUser": "rise", "mqttUser": "rise",
"mqttPass": "3hostel3", "mqttPass": "3hostel3",
"serverip": "http://iotmanager.org", "serverip": "http://iotmanager.org",
"serverlocal": "http://192.168.1.2:5500", "serverlocal": "http://192.168.1.2:5500",
"log": 0, "log": 0,
"mqttin": 0, "mqttin": 0,
"i2c": 0, "i2c": 0,
@@ -22,7 +22,7 @@
"pinSDA": 0, "pinSDA": 0,
"i2cFreq": 100000, "i2cFreq": 100000,
"wg": "group1", "wg": "group1",
"debugTrace": 1, "debugTraceMsgTlgrm": 1,
"udps": 1, "udps": 1,
"settings_": "" "settings_": ""
} }

View File

@@ -22,7 +22,7 @@
"pinSDA": 0, "pinSDA": 0,
"i2cFreq": 100000, "i2cFreq": 100000,
"wg": "group1", "wg": "group1",
"debugTrace": 1 "debugTraceMsgTlgrm": 1
}, },
"projectProp": { "projectProp": {
"platformio": { "platformio": {

View File

@@ -221,7 +221,7 @@ void setup() {
stopErrorMarker(SETUPINET_ERRORMARKER); stopErrorMarker(SETUPINET_ERRORMARKER);
bool postMsgTelegram; bool postMsgTelegram;
if (!jsonRead(settingsFlashJson, "debugTrace", postMsgTelegram, false)) postMsgTelegram = 1; if (!jsonRead(settingsFlashJson, "debugTraceMsgTlgrm", postMsgTelegram, false)) postMsgTelegram = 1;
sendDebugTraceAndFreeMemory(postMsgTelegram); sendDebugTraceAndFreeMemory(postMsgTelegram);
initErrorMarker(SETUPLAST_ERRORMARKER); initErrorMarker(SETUPLAST_ERRORMARKER);

View File

@@ -45,7 +45,7 @@ class Smi2_m : public IoTItem {
// Пакет,SLAVE адрес,функция модбус,адрес регистра,количесво запрашиваемых регистров,локальный адрес регистра. // Пакет,SLAVE адрес,функция модбус,адрес регистра,количесво запрашиваемых регистров,локальный адрес регистра.
// Пакет,SLAVE адрес,функция модбус,адрес регистра,данные,локальный адрес регистра. // Пакет,SLAVE адрес,функция модбус,адрес регистра,данные,локальный адрес регистра.
smi->modbus_construct(&packets[PACKET1], 1, PRESET_MULTIPLE_REGISTERS, 4200, 1, 0); smi->modbus_construct(&packets[PACKET1], 1, PRESET_MULTIPLE_REGISTERS, 4200, 1, 0);
smi->modbus_configure(&Serial, _baud, SERIAL_8N1, _rx, _tx, _pin, packets, TOTAL_NO_OF_PACKETS, regs); smi->modbus_configure((HardwareSerial*)&Serial, _baud, SERIAL_8N1, _rx, _tx, _pin, &packets[PACKET1], (uint)TOTAL_NO_OF_PACKETS, &regs[0]);
jsonRead(parameters, "id2show", _show); jsonRead(parameters, "id2show", _show);
} }