mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 03:39:49 +03:00
post-refactoring fix (Mercury)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#define CST_UNKNOWN 0
|
||||
#define CST_FAILED 1
|
||||
#define CST_INITIALIZED 2
|
||||
#define CST_USER 3
|
||||
|
||||
class abstractCh {
|
||||
public:
|
||||
|
||||
@@ -2497,6 +2497,11 @@ infoSerial<<F("\nNOSERIAL");
|
||||
infoSerial<<F("\n(+)ELEVATOR");
|
||||
#endif
|
||||
|
||||
#ifdef MERCURY_ENABLE
|
||||
infoSerial<<F("\n(+)MERCURY");
|
||||
#else
|
||||
infoSerial<<F("\n(-)MERCURY");
|
||||
#endif
|
||||
//#ifdef IPMODBUS
|
||||
//infoSerial<<F("\n(+)IPMODBUS");
|
||||
//#endif
|
||||
|
||||
@@ -21,8 +21,8 @@ extern bool disableCMD;
|
||||
|
||||
#define AC_FAILED CST_FAILED
|
||||
#define AC_UNKNOWN CST_UNKNOWN
|
||||
#define AC_IDLE CST_INITIALIZED
|
||||
#define AC_SENDING 3
|
||||
#define AC_IDLE CST_INITIALIZED
|
||||
#define AC_SENDING CST_USER
|
||||
|
||||
//byte inCheck = 0;
|
||||
byte qstn[] = {255,255,10,0,0,0,0,0,1,1,77,1,90}; // Команда опроса
|
||||
|
||||
@@ -97,6 +97,7 @@ debugSerial.println("Mercury: De-Init");
|
||||
disconnectMercury();
|
||||
delete store;
|
||||
item->setPersistent(NULL);
|
||||
setStatus(CST_UNKNOWN);
|
||||
store = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -20,16 +20,16 @@ public:
|
||||
#define MB_SEND_ERROR 4
|
||||
#define MB_SEND_ATTEMPTS 3
|
||||
|
||||
#define M_CONNECTING 10
|
||||
#define M_CONNECTED 11
|
||||
#define M_POLLING1 12
|
||||
#define M_POLLING2 13
|
||||
#define M_POLLING3 14
|
||||
#define M_POLLING4 15
|
||||
#define M_POLLING5 16
|
||||
#define M_POLLING6 17
|
||||
#define M_POLLING7 18
|
||||
#define M_POLLING8 19
|
||||
#define M_CONNECTING CST_USER+0
|
||||
#define M_CONNECTED CST_USER+1
|
||||
#define M_POLLING1 CST_USER+2
|
||||
#define M_POLLING2 CST_USER+3
|
||||
#define M_POLLING3 CST_USER+4
|
||||
#define M_POLLING4 CST_USER+5
|
||||
#define M_POLLING5 CST_USER+6
|
||||
#define M_POLLING6 CST_USER+7
|
||||
#define M_POLLING7 CST_USER+8
|
||||
#define M_POLLING8 CST_USER+9
|
||||
|
||||
#define RET_SUCCESS 0
|
||||
#define RET_INVALID_PARAM 1
|
||||
|
||||
Reference in New Issue
Block a user