Browse Source

修改海外版本分机按了blue code之后门口机没有处理门灯问题,升级版本到2.0.18

weizhengliang 1 tháng trước cách đây
mục cha
commit
1aa9ae97c0
3 tập tin đã thay đổi với 20 bổ sung2 xóa
  1. 15 0
      src/logic/startLogic.cc
  2. 3 0
      src/net/tcp_model.h
  3. 2 2
      src/service/BusinessConfig.h

+ 15 - 0
src/logic/startLogic.cc

@@ -740,6 +740,21 @@ void handleMsg(byte* inBytes){
                 deleteGainCallData(tcpModel.json["id"].asString());
             }
         }
+        else if (tcpModel.action == SideAction::BLUE_CALL) {
+            //blue code call亮蓝灯
+			std::string nurseColor = StoragePreferences::getString(STORE_NURSING_COLOR_RGB, "010");
+			std::string blueColor = "001F";
+			if (nurseColor != "" && nurseColor.size() == 3) {
+				if (nurseColor == "001") {
+					blueColor = "010F";
+				}
+			}
+			lightControl("DOORLED", blueColor);
+		}
+        else if (tcpModel.action == SideAction::BLUE_RESPONSE) {
+            //blue code call响应,灭灯
+            lightControl("DOORLED", "000F");
+        }
 	}
 	else if (tcpModel.type == TcpType::CALLBACK) {
 		if (tcpModel.action == CallbackAction::ACK) {

+ 3 - 0
src/net/tcp_model.h

@@ -115,6 +115,9 @@ public:
 	inline static std::string NURSING_END = "NURSING_END";	// 护理结束
 	inline static std::string SHOW = "SHOW";	// 护理结束
 	inline static std::string CLEAR = "CLEAR";	// 护理结束
+	inline static std::string SIMULATE = "SIMULATE";	// 模拟
+	inline static std::string BLUE_CALL = "BLUE_CALL";	// blue code
+	inline static std::string BLUE_RESPONSE = "BLUE_RESPONSE";	// blue code response
 };
 
 class BlueCodeAction {

+ 2 - 2
src/service/BusinessConfig.h

@@ -98,8 +98,8 @@ static uint32_t defaultGreen = 0xFF2EA22A;
 static uint32_t defaultBlue = 0xFF68A5FF;
 static uint32_t defaultYellow = 0xFFE68024;
 
-static std::string versionCode = "v2.0.17";
-static int versionNo = 64;
+static std::string versionCode = "v2.0.18";
+static int versionNo = 65;
 static std::string serverIP = "172.28.100.100";
 static std::string tcpIP = "172.28.100.100";
 static int serverHttpPort = 8006;