Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
378161ebec
|
@ -1,11 +1,11 @@
|
|||
using AdamThinkDevicesData;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
using static InterfaceManager;
|
||||
/// <summary>
|
||||
/// 频谱探测
|
||||
/// </summary>
|
||||
|
@ -193,8 +193,32 @@ public class Spectrumdetection : MonoBehaviour
|
|||
/// <returns></returns>
|
||||
protected string GetSyncDataThree()
|
||||
{
|
||||
UploadLog();
|
||||
return string.Format("{0},{1},{2},{3}", "SweepFrequencyBand", "PPTC", equipmentCommon.deviceID, Frequency);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///上传日志
|
||||
/// </summary>
|
||||
/// <param name="deviceID"></param>
|
||||
public void UploadLog()
|
||||
{
|
||||
string currentTime = System.DateTime.Now.ToString();
|
||||
List<UploadLogMain> uploadLogMains = new List<UploadLogMain>();
|
||||
UploadLogMain uploadLogMain = new UploadLogMain();
|
||||
uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID;
|
||||
uploadLogMain.ThinkId = GlobalFlag.currentThinkId;
|
||||
string log = currentTime + " " + transform.name + "(" + equipmentCommon.deviceID + ")频段设置为" + Frequency;
|
||||
uploadLogMain.log = log;
|
||||
uploadLogMains.Add(uploadLogMain);
|
||||
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);
|
||||
WWWForm wWWForm = new WWWForm();
|
||||
wWWForm.AddField("data", uploadLogMainJson);
|
||||
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data =>
|
||||
{
|
||||
//Debug.Log(data);
|
||||
}));
|
||||
}
|
||||
/// <summary>
|
||||
/// 演习是否启动
|
||||
/// </summary>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +1,12 @@
|
|||
using AdamSync;
|
||||
using AdamThinkDevicesData;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Permissions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
using static InterfaceManager;
|
||||
/// <summary>
|
||||
/// 重点保护目标
|
||||
/// </summary>
|
||||
|
@ -246,6 +247,30 @@ public class HighPriorityTarget : MonoBehaviour
|
|||
/// <returns></returns>
|
||||
protected string GetSyncDataTwo()
|
||||
{
|
||||
UploadLog();
|
||||
return string.Format("{0},{1},{2},{3}", "BandSetting", "ZYMB", Number, frequency);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///上传日志
|
||||
/// </summary>
|
||||
/// <param name="deviceID"></param>
|
||||
public void UploadLog()
|
||||
{
|
||||
string currentTime = System.DateTime.Now.ToString();
|
||||
List<UploadLogMain> uploadLogMains = new List<UploadLogMain>();
|
||||
UploadLogMain uploadLogMain = new UploadLogMain();
|
||||
uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID;
|
||||
uploadLogMain.ThinkId = GlobalFlag.currentThinkId;
|
||||
string log = currentTime + " " + "重要用户(" + Number + ")频段设置为" + frequency;
|
||||
uploadLogMain.log = log;
|
||||
uploadLogMains.Add(uploadLogMain);
|
||||
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);
|
||||
WWWForm wWWForm = new WWWForm();
|
||||
wWWForm.AddField("data", uploadLogMainJson);
|
||||
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data =>
|
||||
{
|
||||
//Debug.Log(data);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ using Newtonsoft.Json.Linq;
|
|||
public static class InterfaceManager
|
||||
{
|
||||
|
||||
private static string _IP = "192.168.97.15";
|
||||
private static string _IP = "172.20.10.5";
|
||||
public static string IP
|
||||
{
|
||||
get { return _IP; }
|
||||
|
|
|
@ -218,7 +218,6 @@ public class EquipmentCommon : MonoBehaviour
|
|||
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);
|
||||
WWWForm wWWForm = new WWWForm();
|
||||
wWWForm.AddField("data", uploadLogMainJson);
|
||||
//Debug.Log(uploadLogMainJson);
|
||||
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data =>
|
||||
{
|
||||
//Debug.Log(data);
|
||||
|
|
|
@ -372,9 +372,15 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
List<Collider> allColliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
||||
for (int i = 0; i < allColliders.Count; i++)
|
||||
{
|
||||
if (allColliders[i].gameObject.tag == "AttackTarget" && !allColliders[i].isTrigger
|
||||
&& !attackColliders1.Contains(allColliders[i]) && allColliders[i].transform.GetComponent<HighPriorityTarget>())
|
||||
if (allColliders[i].gameObject.tag == "AttackTarget"
|
||||
&& !allColliders[i].isTrigger
|
||||
&& !attackColliders1.Contains(allColliders[i])
|
||||
&& allColliders[i].transform.GetComponent<HighPriorityTarget>()
|
||||
&& allColliders[i].transform.GetComponent<HighPriorityTarget>().frequency== electronicReconnaissanceCapability)
|
||||
{
|
||||
attackColliders1.Add(allColliders[i]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if(wrjModel == WRJModel.光学无人机)
|
||||
|
@ -449,16 +455,39 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
|||
/// <returns></returns>
|
||||
protected string GetSyncDataTwo()
|
||||
{
|
||||
UploadLog("频段设置为:", dataLinkCommunicationFrequency);
|
||||
return string.Format("{0},{1},{2},{3}", "BandSetting", "WRJ", equipmentCommon.deviceID, dataLinkCommunicationFrequency);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///上传日志
|
||||
/// </summary>
|
||||
/// <param name="deviceID"></param>
|
||||
public void UploadLog(string str1,string str2)
|
||||
{
|
||||
string currentTime = System.DateTime.Now.ToString();
|
||||
List<UploadLogMain> uploadLogMains = new List<UploadLogMain>();
|
||||
UploadLogMain uploadLogMain = new UploadLogMain();
|
||||
uploadLogMain.PracticeId = GlobalFlag.practiceSubjectID;
|
||||
uploadLogMain.ThinkId = GlobalFlag.currentThinkId;
|
||||
string log = currentTime + " " + transform.name+"(" + equipmentCommon.deviceID + ")"+ str1 + str2;
|
||||
uploadLogMain.log = log;
|
||||
uploadLogMains.Add(uploadLogMain);
|
||||
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);
|
||||
WWWForm wWWForm = new WWWForm();
|
||||
wWWForm.AddField("data", uploadLogMainJson);
|
||||
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data =>
|
||||
{
|
||||
//Debug.Log(data);
|
||||
}));
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置扫描频段同步
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected string GetSyncDataThree()
|
||||
{
|
||||
return string.Format("{0},{1},{2},{3}", "SweepFrequencyBand", "WRJ", equipmentCommon.deviceID, dataLinkCommunicationFrequency);
|
||||
UploadLog("扫描频段设置为:", electronicReconnaissanceCapability);
|
||||
return string.Format("{0},{1},{2},{3}", "SweepFrequencyBand", "WRJ", equipmentCommon.deviceID, electronicReconnaissanceCapability);
|
||||
}
|
||||
#region 启动暂停
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue