|
@@ -28,8 +28,16 @@ static string callTid = "";
|
|
|
|
|
|
static bool isConnectHandle = false;
|
|
|
static bool isConnectSos = false;
|
|
|
+static bool isConnectHandle1 = false;
|
|
|
+static bool isConnectHandle2 = false;
|
|
|
+static bool isConnectHandle3 = false;
|
|
|
+static bool isConnectHandle4 = false;
|
|
|
static bool isTriggerHandle = false;
|
|
|
static bool isTriggerSos = false;
|
|
|
+static bool isTriggerHandle1 = false;
|
|
|
+static bool isTriggerHandle2 = false;
|
|
|
+static bool isTriggerHandle3 = false;
|
|
|
+static bool isTriggerHandle4 = false;
|
|
|
|
|
|
|
|
|
#define FUNCTION_TIMER_HANDLE 3 // 增援的定时器id
|
|
@@ -42,6 +50,10 @@ static bool isTriggerSos = false;
|
|
|
|
|
|
#define HANDLE_TRIGGER_TIME_HANDLE 15
|
|
|
#define SOS_TRIGGER_TIME_HANDLE 16
|
|
|
+#define HANDLE1_TRIGGER_TIME_HANDLE 17
|
|
|
+#define HANDLE2_TRIGGER_TIME_HANDLE 18
|
|
|
+#define HANDLE3_TRIGGER_TIME_HANDLE 19
|
|
|
+#define HANDLE4_TRIGGER_TIME_HANDLE 20
|
|
|
|
|
|
#define HTTP_SERVER_PORT 80
|
|
|
|
|
@@ -111,6 +123,7 @@ namespace {
|
|
|
}
|
|
|
}
|
|
|
if (state == voip::STATE_CALL_DISCONNECTED) {
|
|
|
+ LOGD("通话挂断");
|
|
|
if (telephone->GetCallCount() > 1) {
|
|
|
LOGD("call count > 1, return");
|
|
|
return;
|
|
@@ -139,6 +152,12 @@ namespace {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const char* currentAppName = EASYUICONTEXT->currentAppName();
|
|
|
+ string _currentAppName = currentAppName;
|
|
|
+ if (_currentAppName == "callActivity") {
|
|
|
+ callActivityFinish(HANDOFF);
|
|
|
+ return;
|
|
|
+ }
|
|
|
//PrintCallLog();
|
|
|
}
|
|
|
}
|
|
@@ -359,7 +378,6 @@ void handleMsg(byte* inBytes){
|
|
|
//来电话了
|
|
|
Intent* intent = new Intent();
|
|
|
intent->putExtra(isOutgoing, "false");
|
|
|
- intent->putExtra(audioOnly, "true");
|
|
|
EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
}
|
|
|
} else if (tcpModel.action == VoiceAction::HANDOFF){
|
|
@@ -422,10 +440,22 @@ void handleMsg(byte* inBytes){
|
|
|
else if (tcpModel.action == SideAction::ACCEPT) {
|
|
|
// 进行门灯还原
|
|
|
lightControl("DOORLED", "000F");
|
|
|
+
|
|
|
+ if (isHandleId(tcpModel.to_id) && CallingStatus::instance()->busy()) {
|
|
|
+ CallingStatus::instance()->setTcpModel(tcpModel);
|
|
|
+ std::string toSipId = tcpModel.json["toSipId"].asString();
|
|
|
+ callActivityFinish(CallFinishType::ACCEPT);
|
|
|
+ //接听
|
|
|
+ buildSIP(toSipId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
else if (tcpModel.action == SideAction::CANCEL) {
|
|
|
// 进行门灯还原
|
|
|
lightControl("DOORLED", "000F");
|
|
|
+ if (isHandleId(tcpModel.to_id) && CallingStatus::instance()->busy()) {
|
|
|
+ callActivityFinish(CallFinishType::CANCEL);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
else if (tcpModel.action == SideAction::SOS_CALL) {
|
|
@@ -562,6 +592,53 @@ void setCallTid(std::string tid) {
|
|
|
callTid = tid;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+void handleHCall(int id) {
|
|
|
+ int handleId = getHandleId(id);
|
|
|
+ if (handleId != 0) {
|
|
|
+ const char* currentAppName = EASYUICONTEXT->currentAppName();
|
|
|
+ string _currentAppName = currentAppName;
|
|
|
+ if (_currentAppName == "callActivity") {
|
|
|
+ LOGD("已经在呼叫界面");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ string handleIdStr = to_string(handleId);
|
|
|
+ Intent* intent = new Intent();
|
|
|
+ intent->putExtra(isOutgoing, "handleHCall");
|
|
|
+ intent->putExtra(handleCallId, handleIdStr);
|
|
|
+ EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ string errorMsg = LANGUAGEMANAGER->getValue("HandleError") +
|
|
|
+ StoragePreferences::getString(STORE_MAC_ADDR, "0.0.0.0") + ":h" + to_string(id) +
|
|
|
+ LANGUAGEMANAGER->getValue("NotAdd");
|
|
|
+ Intent* intent = new Intent();
|
|
|
+ intent->putExtra(functionWindows, "warn");
|
|
|
+ intent->putExtra(warnText, errorMsg);
|
|
|
+ EASYUICONTEXT->openActivity("functionActivity", intent);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+void sosCall(string sosMsg) {
|
|
|
+ if (sosTimerRegistered) {
|
|
|
+ LOGD("TCP -> SOS_CALL");
|
|
|
+ sendSosCall(sosMsg);
|
|
|
+
|
|
|
+
|
|
|
+ // SOS亮红灯
|
|
|
+ lightControl("ULED", "1F");
|
|
|
+ // 门灯亮红灯
|
|
|
+ lightControl("DOORLED", "200F");
|
|
|
+
|
|
|
+ lightControl("CALLLED", "100F");
|
|
|
+
|
|
|
+ sosTimerRegistered = false;
|
|
|
+ mActivityPtr->registerUserTimer(SOS_CLICK_TIME_HANDLE, 10000); // 10秒后才能触发
|
|
|
+ mActivityPtr->registerUserTimer(SOS_LAMP_TIME_HANDLE, 120000); // 2分钟后才能触发
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//================================= IO 口操作
|
|
|
//紧急按钮灯,明/灭
|
|
|
void setSOS_A5(bool light){
|
|
@@ -603,7 +680,6 @@ public:
|
|
|
} else {
|
|
|
Intent* intent = new Intent();
|
|
|
intent->putExtra(isOutgoing, "true");
|
|
|
- intent->putExtra(audioOnly, "true");
|
|
|
EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
}
|
|
|
}
|
|
@@ -790,7 +866,7 @@ static void onProtocolDataUpdate(const SProtocolData &data) {
|
|
|
// if (data.msg != ""){
|
|
|
// LOGD("msg = %s", data.msg.c_str());
|
|
|
// }
|
|
|
- if(UartContext::Uart3IsOpen()) { // 如果是true,表示串口打开了
|
|
|
+ if(UartContext::Uart2IsOpen()) { // 如果是true,表示串口打开了
|
|
|
string heartStr;
|
|
|
|
|
|
// 面板拨号
|
|
@@ -817,7 +893,6 @@ static void onProtocolDataUpdate(const SProtocolData &data) {
|
|
|
} else {
|
|
|
Intent* intent = new Intent();
|
|
|
intent->putExtra(isOutgoing, "true");
|
|
|
- intent->putExtra(audioOnly, "true");
|
|
|
EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
}
|
|
|
}
|
|
@@ -854,45 +929,19 @@ static void onProtocolDataUpdate(const SProtocolData &data) {
|
|
|
} else {
|
|
|
Intent* intent = new Intent();
|
|
|
intent->putExtra(isOutgoing, "true");
|
|
|
- intent->putExtra(audioOnly, "true");
|
|
|
EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else if (data.state == "3") {
|
|
|
+ LOGD("手柄在线");
|
|
|
isConnectHandle = true;
|
|
|
}
|
|
|
else if (data.state == "4") {
|
|
|
if (!isConnectHandle) {
|
|
|
return;
|
|
|
}
|
|
|
- if (sosTimerRegistered) {
|
|
|
- LOGD("TCP -> SOS_CALL");
|
|
|
- Json::Value data;
|
|
|
- data["title"] = "手柄断连";
|
|
|
-
|
|
|
- TcpModel tcpModel;
|
|
|
- tcpModel.tid = base::format("t%d", TimeHelper::getCurrentTime());
|
|
|
- tcpModel.type = TcpType::SOS;
|
|
|
- tcpModel.action = SosAction::CALL;
|
|
|
- tcpModel.from_id = StoragePreferences::getInt(STORE_DEVICE_ID, 0);
|
|
|
- tcpModel.json = data;
|
|
|
- std::string req = getTcpModelString(tcpModel);
|
|
|
- LOGD("TCP SOS_CALL : %s",req.c_str());
|
|
|
- TcpClient::instance()->sendMsg(req.c_str());
|
|
|
-
|
|
|
-
|
|
|
- // SOS亮红灯
|
|
|
- lightControl("ULED", "1F");
|
|
|
- // 门灯亮红灯
|
|
|
- lightControl("DOORLED", "200F");
|
|
|
-
|
|
|
- lightControl("CALLLED", "100F");
|
|
|
-
|
|
|
- sosTimerRegistered = false;
|
|
|
- mActivityPtr->registerUserTimer(SOS_CLICK_TIME_HANDLE, 10000); // 10秒后才能触发
|
|
|
- mActivityPtr->registerUserTimer(SOS_LAMP_TIME_HANDLE, 120000); // 2分钟后才能触发
|
|
|
- }
|
|
|
+ sosCall(LANGUAGEMANAGER->getValue("HandleDisconnected"));
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -915,15 +964,7 @@ static void onProtocolDataUpdate(const SProtocolData &data) {
|
|
|
}
|
|
|
else if (data.state == "1") {
|
|
|
if (isTriggerSos) {
|
|
|
- LOGD("TCP -> SOS_CALL");
|
|
|
- TcpModel tcpModel;
|
|
|
- tcpModel.type = TcpType::SOS;
|
|
|
- tcpModel.action = SosAction::CALL;
|
|
|
- tcpModel.from_id = StoragePreferences::getInt(STORE_DEVICE_ID, 0);
|
|
|
- tcpModel.tid = base::format("t%d",TimeHelper::getCurrentTime());
|
|
|
- std::string req = getTcpModelString(tcpModel);
|
|
|
- LOGD("TCP SOS_CALL : %s",req.c_str());
|
|
|
- TcpClient::instance()->sendMsg(req.c_str());
|
|
|
+ sendSosCall("");
|
|
|
|
|
|
// SOS亮红灯
|
|
|
lightControl("ULED", "1F");
|
|
@@ -937,39 +978,15 @@ static void onProtocolDataUpdate(const SProtocolData &data) {
|
|
|
}
|
|
|
}
|
|
|
else if (data.state == "3") {
|
|
|
+ LOGD("SOS按钮在线");
|
|
|
isConnectSos = true;
|
|
|
}
|
|
|
else if (data.state == "4") {
|
|
|
if (!isConnectSos) {
|
|
|
return;
|
|
|
}
|
|
|
- if (sosTimerRegistered) {
|
|
|
- LOGD("TCP -> SOS_CALL");
|
|
|
- Json::Value data;
|
|
|
- data["title"] = "紧急按钮断连";
|
|
|
-
|
|
|
- TcpModel tcpModel;
|
|
|
- tcpModel.tid = base::format("t%d", TimeHelper::getCurrentTime());
|
|
|
- tcpModel.type = TcpType::SOS;
|
|
|
- tcpModel.action = SosAction::CALL;
|
|
|
- tcpModel.from_id = StoragePreferences::getInt(STORE_DEVICE_ID, 0);
|
|
|
- tcpModel.json = data;
|
|
|
- std::string req = getTcpModelString(tcpModel);
|
|
|
- LOGD("TCP SOS_CALL : %s",req.c_str());
|
|
|
- TcpClient::instance()->sendMsg(req.c_str());
|
|
|
-
|
|
|
-
|
|
|
- // SOS亮红灯
|
|
|
- lightControl("ULED", "1F");
|
|
|
- // 门灯亮红灯
|
|
|
- lightControl("DOORLED", "200F");
|
|
|
|
|
|
- lightControl("CALLLED", "100F");
|
|
|
-
|
|
|
- sosTimerRegistered = false;
|
|
|
- mActivityPtr->registerUserTimer(SOS_CLICK_TIME_HANDLE, 10000); // 10秒后才能触发
|
|
|
- mActivityPtr->registerUserTimer(SOS_LAMP_TIME_HANDLE, 120000); // 2分钟后才能触发
|
|
|
- }
|
|
|
+ sosCall(LANGUAGEMANAGER->getValue("SosDisconnected"));
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1006,194 +1023,120 @@ static void onProtocolDataUpdate(const SProtocolData &data) {
|
|
|
}
|
|
|
// lightControl("DOORLED", "111F");
|
|
|
}
|
|
|
+ else if (data.cmd == "HANDKEY00") {
|
|
|
+ if (data.state == "0") {
|
|
|
+ if (isSleep) {
|
|
|
+ scrrenOn();
|
|
|
+ }
|
|
|
+
|
|
|
+ isTriggerHandle1 = true;
|
|
|
+ mActivityPtr->registerUserTimer(HANDLE1_TRIGGER_TIME_HANDLE, 5 * 1000);
|
|
|
+ }
|
|
|
+ else if (data.state == "1") {
|
|
|
+ if (isTriggerHandle1) {
|
|
|
+ isTriggerHandle1 = false;
|
|
|
+
|
|
|
+ handleHCall(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (data.state == "3") {
|
|
|
+ LOGD("手柄1在线");
|
|
|
+ isConnectHandle1 = true;
|
|
|
+ }
|
|
|
+ else if (data.state == "4") {
|
|
|
+ if (!isConnectHandle1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ sosCall(LANGUAGEMANAGER->getValue("Handle1Disconnected"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (data.cmd == "HANDKEY10") {
|
|
|
+ if (data.state == "0") {
|
|
|
+ if (isSleep) {
|
|
|
+ scrrenOn();
|
|
|
+ }
|
|
|
+
|
|
|
+ isTriggerHandle2 = true;
|
|
|
+ mActivityPtr->registerUserTimer(HANDLE2_TRIGGER_TIME_HANDLE, 5 * 1000);
|
|
|
+ }
|
|
|
+ else if (data.state == "1") {
|
|
|
+ if (isTriggerHandle2) {
|
|
|
+ isTriggerHandle2 = false;
|
|
|
+
|
|
|
+ handleHCall(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (data.state == "3") {
|
|
|
+ LOGD("手柄2在线");
|
|
|
+ isConnectHandle2 = true;
|
|
|
+ }
|
|
|
+ else if (data.state == "4") {
|
|
|
+ if (!isConnectHandle2) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ sosCall(LANGUAGEMANAGER->getValue("Handle2Disconnected"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (data.cmd == "HANDKEY20") {
|
|
|
+ if (data.state == "0") {
|
|
|
+ if (isSleep) {
|
|
|
+ scrrenOn();
|
|
|
+ }
|
|
|
+
|
|
|
+ isTriggerHandle3 = true;
|
|
|
+ mActivityPtr->registerUserTimer(HANDLE3_TRIGGER_TIME_HANDLE, 5 * 1000);
|
|
|
+ }
|
|
|
+ else if (data.state == "1") {
|
|
|
+ if (isTriggerHandle3) {
|
|
|
+ isTriggerHandle3 = false;
|
|
|
+
|
|
|
+ handleHCall(3);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (data.state == "3") {
|
|
|
+ LOGD("手柄3在线");
|
|
|
+ isConnectHandle3 = true;
|
|
|
+ }
|
|
|
+ else if (data.state == "4") {
|
|
|
+ if (!isConnectHandle3) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ sosCall(LANGUAGEMANAGER->getValue("Handle3Disconnected"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (data.cmd == "HANDKEY30") {
|
|
|
+ if (data.state == "0") {
|
|
|
+ if (isSleep) {
|
|
|
+ scrrenOn();
|
|
|
+ }
|
|
|
+
|
|
|
+ isTriggerHandle4 = true;
|
|
|
+ mActivityPtr->registerUserTimer(HANDLE4_TRIGGER_TIME_HANDLE, 5 * 1000);
|
|
|
+ }
|
|
|
+ else if (data.state == "1") {
|
|
|
+ if (isTriggerHandle4) {
|
|
|
+ isTriggerHandle4 = false;
|
|
|
+
|
|
|
+ handleHCall(4);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (data.state == "3") {
|
|
|
+ LOGD("手柄4在线");
|
|
|
+ isConnectHandle4 = true;
|
|
|
+ }
|
|
|
+ else if (data.state == "4") {
|
|
|
+ if (!isConnectHandle4) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ sosCall(LANGUAGEMANAGER->getValue("Handle4Disconnected"));
|
|
|
+ }
|
|
|
+ }
|
|
|
else {
|
|
|
if (isSleep) {
|
|
|
scrrenOn();
|
|
|
}
|
|
|
lightControl("DOORLED", "000F");
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-// //按下
|
|
|
-// if (data.state=="0"){ // 0表示正被按下,1表示短按松开,2表示长按松开。
|
|
|
-// if (data.cmd == "KEY5") { // key5是面板拨号按钮
|
|
|
-// if (StoragePreferences::getString(STORE_SIGNAL_TYPE, SIGNAL_TYPE) == "SIP") {
|
|
|
-// setCheckbox("KEY5");
|
|
|
-// return;
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (!StoragePreferences::getInt(STORE_SCREEN_LIGHT, 0)) {
|
|
|
-// if (isSleep) {
|
|
|
-// scrrenOn();
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// voip::CallInfo info = GetTelephone()->GetCallInfo();
|
|
|
-// //拨打 或 挂断
|
|
|
-// if (CallingStatus::instance()->busy()){
|
|
|
-// callActivityFinish(CallFinishType::A1CLICK);
|
|
|
-// } else {
|
|
|
-// Intent* intent = new Intent();
|
|
|
-// intent->putExtra(isOutgoing, "true");
|
|
|
-// intent->putExtra(audioOnly, "true");
|
|
|
-// EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// scrrenOn();
|
|
|
-// voip::CallInfo info = GetTelephone()->GetCallInfo();
|
|
|
-// //拨打 或 挂断
|
|
|
-// if (CallingStatus::instance()->busy()){
|
|
|
-// callActivityFinish(CallFinishType::A1CLICK);
|
|
|
-// } else {
|
|
|
-// Intent* intent = new Intent();
|
|
|
-// intent->putExtra(isOutgoing, "true");
|
|
|
-// intent->putExtra(audioOnly, "true");
|
|
|
-// EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// else if (data.cmd == "KEY6"){ // key6是手柄触发,手柄只有呼叫和挂断功能,没有取消功能,防止用户不停地按
|
|
|
-//
|
|
|
-// if (!StoragePreferences::getInt(STORE_SCREEN_LIGHT, 0)) {
|
|
|
-// if (isSleep) {
|
|
|
-// scrrenOn();
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// voip::CallInfo info = GetTelephone()->GetCallInfo();
|
|
|
-// //拨打 或 挂断
|
|
|
-// if (CallingStatus::instance()->busy()){
|
|
|
-// callActivityFinish(CallFinishType::KEY6_CLICK);
|
|
|
-// } else {
|
|
|
-// Intent* intent = new Intent();
|
|
|
-// intent->putExtra(isOutgoing, "true");
|
|
|
-// intent->putExtra(audioOnly, "true");
|
|
|
-// EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// scrrenOn();
|
|
|
-// voip::CallInfo info = GetTelephone()->GetCallInfo();
|
|
|
-// //拨打 或 挂断
|
|
|
-// if (CallingStatus::instance()->busy()){
|
|
|
-// callActivityFinish(CallFinishType::KEY6_CLICK);
|
|
|
-// } else {
|
|
|
-// Intent* intent = new Intent();
|
|
|
-// intent->putExtra(isOutgoing, "true");
|
|
|
-// intent->putExtra(audioOnly, "true");
|
|
|
-// EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-// else if (data.cmd == "KEY7"){ // key7是紧急按钮
|
|
|
-// if (StoragePreferences::getString(STORE_SIGNAL_TYPE, SIGNAL_TYPE) == "SIP") {
|
|
|
-// setCheckbox("KEY7");
|
|
|
-// return;
|
|
|
-// }
|
|
|
-// if (isSleep) {
|
|
|
-// scrrenOn();
|
|
|
-// }
|
|
|
-// if (sosTimerRegistered) {
|
|
|
-// LOGD("TCP -> SOS_CALL");
|
|
|
-// TcpModel tcpModel;
|
|
|
-// tcpModel.type = TcpType::SOS;
|
|
|
-// tcpModel.action = SosAction::CALL;
|
|
|
-// tcpModel.from_id = StoragePreferences::getInt(STORE_DEVICE_ID, 0);
|
|
|
-// tcpModel.tid = base::format("t%d",TimeHelper::getCurrentTime());
|
|
|
-// std::string req = getTcpModelString(tcpModel);
|
|
|
-// LOGD("TCP SOS_CALL : %s",req.c_str());
|
|
|
-// TcpClient::instance()->sendMsg(req.c_str());
|
|
|
-//
|
|
|
-// // SOS亮红灯
|
|
|
-// lightControl("ULED", "1F");
|
|
|
-// // 门灯亮红灯
|
|
|
-// lightControl("DOORLED", "200F");
|
|
|
-//
|
|
|
-// lightControl("CALLLED", "100F");
|
|
|
-//
|
|
|
-// mActivityPtr->registerUserTimer(SOS_CLICK_TIME_HANDLE, 10000); // 10秒后才能触发
|
|
|
-// mActivityPtr->registerUserTimer(SOS_LAMP_TIME_HANDLE, 120000); // 2分钟后才能触发
|
|
|
-// }
|
|
|
-// }
|
|
|
-// else if (data.cmd == "KEY<") { //下左3,红
|
|
|
-// if (StoragePreferences::getString(STORE_SIGNAL_TYPE, SIGNAL_TYPE) == "SIP") {
|
|
|
-// setCheckbox("KEY<");
|
|
|
-// return;
|
|
|
-// }
|
|
|
-//
|
|
|
-// if (!StoragePreferences::getInt(STORE_SCREEN_LIGHT, 0)) {
|
|
|
-// if (isSleep) {
|
|
|
-// scrrenOn();
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// voip::CallInfo info = GetTelephone()->GetCallInfo();
|
|
|
-// //拨打 或 挂断
|
|
|
-// if (CallingStatus::instance()->busy()){
|
|
|
-// callActivityFinish(CallFinishType::A1CLICK);
|
|
|
-// } else {
|
|
|
-// Intent* intent = new Intent();
|
|
|
-// intent->putExtra(isOutgoing, "true");
|
|
|
-// intent->putExtra(audioOnly, "true");
|
|
|
-// EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// scrrenOn();
|
|
|
-// voip::CallInfo info = GetTelephone()->GetCallInfo();
|
|
|
-// //拨打 或 挂断
|
|
|
-// if (CallingStatus::instance()->busy()){
|
|
|
-// callActivityFinish(CallFinishType::A1CLICK);
|
|
|
-// } else {
|
|
|
-// Intent* intent = new Intent();
|
|
|
-// intent->putExtra(isOutgoing, "true");
|
|
|
-// intent->putExtra(audioOnly, "true");
|
|
|
-// EASYUICONTEXT->openActivity("callActivity", intent);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// else if (data.cmd == "KEY>") { // key>是面板挂断按钮
|
|
|
-// if (!StoragePreferences::getInt(STORE_SCREEN_LIGHT, 0)) {
|
|
|
-// if (isSleep) {
|
|
|
-// scrrenOn();
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// voip::CallInfo info = GetTelephone()->GetCallInfo();
|
|
|
-// //拨打 或 挂断
|
|
|
-// if (CallingStatus::instance()->busy()){
|
|
|
-// callActivityFinish(CallFinishType::A1CLICK);
|
|
|
-//
|
|
|
-// lightControl("DOORLED", "000F");
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// scrrenOn();
|
|
|
-// voip::CallInfo info = GetTelephone()->GetCallInfo();
|
|
|
-// //拨打 或 挂断
|
|
|
-// if (CallingStatus::instance()->busy()){
|
|
|
-// callActivityFinish(CallFinishType::A1CLICK);
|
|
|
-//
|
|
|
-// lightControl("DOORLED", "000F");
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// else if (data.cmd == "KEY;"){ //下左4,白
|
|
|
-// if (isSleep) {
|
|
|
-// scrrenOn();
|
|
|
-// }
|
|
|
-// lightControl("DOORLED", "111F");
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// if (isSleep) {
|
|
|
-// scrrenOn();
|
|
|
-// }
|
|
|
-//// lightControl("DOORLED", "000F");
|
|
|
-// }
|
|
|
-// }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1278,6 +1221,26 @@ static bool onUI_Timer(int id){
|
|
|
return false;
|
|
|
}
|
|
|
break;
|
|
|
+ case HANDLE1_TRIGGER_TIME_HANDLE: {
|
|
|
+ isTriggerHandle1 = false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case HANDLE2_TRIGGER_TIME_HANDLE: {
|
|
|
+ isTriggerHandle2 = false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case HANDLE3_TRIGGER_TIME_HANDLE: {
|
|
|
+ isTriggerHandle3 = false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case HANDLE4_TRIGGER_TIME_HANDLE: {
|
|
|
+ isTriggerHandle4 = false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|