|
@@ -214,7 +214,7 @@ public class MainActivity extends SerialPortActivity {
|
|
|
//$8C:FC:A0:F1:01:A7{"action":"ACK","type":"S433"}#
|
|
|
Log.e(TAG, "receive 433 Data: " + data);
|
|
|
|
|
|
- if (BuildConfig.DEBUG) {
|
|
|
+ /*if (BuildConfig.DEBUG) {
|
|
|
runOnUiThread(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
@@ -224,7 +224,7 @@ public class MainActivity extends SerialPortActivity {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
try {
|
|
|
if (data.startsWith("$") && data.endsWith("#")) {
|
|
@@ -247,7 +247,7 @@ public class MainActivity extends SerialPortActivity {
|
|
|
Iterator<Map.Entry<String, String>> iterator = s433Data.entrySet().iterator();
|
|
|
while (iterator.hasNext()) {
|
|
|
if (iterator.next().getKey().equals(mac)) {
|
|
|
- Log.e(TAG, "清除缓存mac: " + mac);
|
|
|
+ Log.e(TAG, "收到ack回复,清除缓存mac: " + mac);
|
|
|
iterator.remove();
|
|
|
}
|
|
|
}
|
|
@@ -416,8 +416,18 @@ public class MainActivity extends SerialPortActivity {
|
|
|
String title = tcpData.getString("title");
|
|
|
if (tcpModel.getAction() == TcpAction.S433Action.SOS_CALL || tcpModel.getAction() == TcpAction.S433Action.CALL) {
|
|
|
if (!TextUtils.isEmpty(title)) {
|
|
|
- String speech = StringUtils.appendSpace(title);
|
|
|
- SpeechUtil.getInstance().addSpeech(speech, false);
|
|
|
+ if ("reboot".equals(title)) {
|
|
|
+ //重启点阵屏
|
|
|
+ SpeechUtil.getInstance().stopSpeak();
|
|
|
+ } else if (title.startsWith("led")) {
|
|
|
+ //修改点阵屏IP
|
|
|
+ } else if (title.startsWith("host")) {
|
|
|
+ //修改Android控制板IP
|
|
|
+ } else {
|
|
|
+ //点阵屏显示
|
|
|
+ String speech = StringUtils.appendSpace(title);
|
|
|
+ SpeechUtil.getInstance().addSpeech(speech, false);
|
|
|
+ }
|
|
|
}
|
|
|
} else if (tcpModel.getAction() == TcpAction.S433Action.CANCEL) {
|
|
|
if (TextUtils.isEmpty(title)) {
|