Exemple #1
0
 public void StopTaskfromFeeding(String TagName)
 {
     if (new List <GameObject>(GameObject.FindGameObjectsWithTag(TagName)).Count < 1)
     {
         OBDJobService.Instance().StopAndRemoveTaskFromJobList(TagName);
     }
 }
Exemple #2
0
 private IEnumerator UpdateConnectionStatus()
 {
     while (true)
     {
         CurrentStatus = OBDJobService.Instance().GetVehicleConnectionStatus();
         if (CurrentStatus && !PreviousConnectionStatus)
         {
             //StartCoroutine("StartConnectionProcess");
             OnConnectedEventTriggered();
             Debug.Log(CurrentStatus);
         }
         else if (!CurrentStatus && PreviousConnectionStatus)
         {
             //StartCoroutine("StartDISConnectionProcess");
             OnDisConnectedEventTriggered();
             Debug.Log(CurrentStatus);
         }
         PreviousConnectionStatus = CurrentStatus;
         yield return(new WaitForSeconds(1.0f));
     }
 }
Exemple #3
0
 public void ConnectToVehicle()
 {
     OBDJobService.Instance().ConnectToVehicleOBD(IpAddress, Int32.Parse(Port));
     //StartCoroutine("StartConnectionProcess");
 }
Exemple #4
0
 void Start()
 {
     StartCoroutine("UpdateConnectionStatus");
     m_queue = OBDJobService.Instance()._getObdResponseQueue();
     StartCoroutine("ProcessQueueCommands");
 }
Exemple #5
0
 public void OnApplicationQuit()
 {
     CloseConnectionToVehicle();
     OBDJobService.Instance()._dispose();
 }
Exemple #6
0
 public void CloseConnectionToVehicle()
 {
     OBDJobService.Instance().CloseConnectionToVehicle();
 }