This commit is contained in:
parent
06a9408fac
commit
bbaec15d7c
|
@ -1,11 +1,11 @@
|
||||||
using AdamThinkDevicesData;
|
using AdamThinkDevicesData;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using static InterfaceManager;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 频谱探测
|
/// 频谱探测
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -193,8 +193,32 @@ public class Spectrumdetection : MonoBehaviour
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected string GetSyncDataThree()
|
protected string GetSyncDataThree()
|
||||||
{
|
{
|
||||||
|
UploadLog();
|
||||||
return string.Format("{0},{1},{2},{3}", "SweepFrequencyBand", "PPTC", equipmentCommon.deviceID, Frequency);
|
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>
|
||||||
/// 演习是否启动
|
/// 演习是否启动
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +1,12 @@
|
||||||
using AdamSync;
|
using AdamSync;
|
||||||
|
using AdamThinkDevicesData;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Security.Permissions;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using static InterfaceManager;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重点保护目标
|
/// 重点保护目标
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -246,6 +247,30 @@ public class HighPriorityTarget : MonoBehaviour
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected string GetSyncDataTwo()
|
protected string GetSyncDataTwo()
|
||||||
{
|
{
|
||||||
|
UploadLog();
|
||||||
return string.Format("{0},{1},{2},{3}", "BandSetting", "ZYMB", Number, frequency);
|
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
|
public static class InterfaceManager
|
||||||
{
|
{
|
||||||
|
|
||||||
private static string _IP = "192.168.97.15";
|
private static string _IP = "172.20.10.5";
|
||||||
public static string IP
|
public static string IP
|
||||||
{
|
{
|
||||||
get { return _IP; }
|
get { return _IP; }
|
||||||
|
|
|
@ -218,7 +218,6 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);
|
string uploadLogMainJson = JsonConvert.SerializeObject(uploadLogMains);
|
||||||
WWWForm wWWForm = new WWWForm();
|
WWWForm wWWForm = new WWWForm();
|
||||||
wWWForm.AddField("data", uploadLogMainJson);
|
wWWForm.AddField("data", uploadLogMainJson);
|
||||||
//Debug.Log(uploadLogMainJson);
|
|
||||||
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data =>
|
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data =>
|
||||||
{
|
{
|
||||||
//Debug.Log(data);
|
//Debug.Log(data);
|
||||||
|
|
|
@ -372,10 +372,16 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
List<Collider> allColliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
List<Collider> allColliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
||||||
for (int i = 0; i < allColliders.Count; i++)
|
for (int i = 0; i < allColliders.Count; i++)
|
||||||
{
|
{
|
||||||
if (allColliders[i].gameObject.tag == "AttackTarget" && !allColliders[i].isTrigger
|
if (allColliders[i].gameObject.tag == "AttackTarget"
|
||||||
&& !attackColliders1.Contains(allColliders[i]) && allColliders[i].transform.GetComponent<HighPriorityTarget>())
|
&& !allColliders[i].isTrigger
|
||||||
|
&& !attackColliders1.Contains(allColliders[i])
|
||||||
|
&& allColliders[i].transform.GetComponent<HighPriorityTarget>()
|
||||||
|
&& allColliders[i].transform.GetComponent<HighPriorityTarget>().frequency== electronicReconnaissanceCapability)
|
||||||
|
{
|
||||||
attackColliders1.Add(allColliders[i]);
|
attackColliders1.Add(allColliders[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(wrjModel == WRJModel.光学无人机)
|
else if(wrjModel == WRJModel.光学无人机)
|
||||||
{
|
{
|
||||||
|
@ -449,16 +455,39 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected string GetSyncDataTwo()
|
protected string GetSyncDataTwo()
|
||||||
{
|
{
|
||||||
|
UploadLog("频段设置为:", dataLinkCommunicationFrequency);
|
||||||
return string.Format("{0},{1},{2},{3}", "BandSetting", "WRJ", equipmentCommon.deviceID, 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>
|
||||||
/// 设置扫描频段同步
|
/// 设置扫描频段同步
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected string GetSyncDataThree()
|
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 启动暂停
|
#region 启动暂停
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue