Merge remote-tracking branch 'origin/dev_merge_shunyi_vr_map' into dev_merge_shunyi_vr_map

This commit is contained in:
董宏宇
2020-12-16 15:15:38 +08:00
22 changed files with 332 additions and 119 deletions

View File

@@ -30,6 +30,7 @@ import com.zhidao.mogo.module.obu.obu.bean.MogoObuEventInfo;
import com.zhidao.mogo.module.obu.obu.bean.MogoObuLocationInfo;
import com.zhidao.mogo.module.obu.obu.bean.MogoObuTrafficLightInfo;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.Map;
@@ -142,6 +143,10 @@ public class V2XObuManager implements IObuCallback, Handler.Callback {
} else {
json.put("surplusTime", trafficLightInfo.getSurplusTime());
}
JSONArray lightJsonArray = new JSONArray(trafficLightInfo.getLightArray());
JSONArray surplusTimeJsonArray = new JSONArray(trafficLightInfo.getSurplusTimeArray());
json.put("lightArray", lightJsonArray);
json.put("surplusTimeArray", surplusTimeJsonArray);
}
String data = json.toString();
Logger.d(MODULE_NAME, "发送红绿灯广播: " + data);