public void StopTaskfromFeeding(String TagName) { if (new List <GameObject>(GameObject.FindGameObjectsWithTag(TagName)).Count < 1) { OBDJobService.Instance().StopAndRemoveTaskFromJobList(TagName); } }
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)); } }
public void ConnectToVehicle() { OBDJobService.Instance().ConnectToVehicleOBD(IpAddress, Int32.Parse(Port)); //StartCoroutine("StartConnectionProcess"); }
void Start() { StartCoroutine("UpdateConnectionStatus"); m_queue = OBDJobService.Instance()._getObdResponseQueue(); StartCoroutine("ProcessQueueCommands"); }
public void OnApplicationQuit() { CloseConnectionToVehicle(); OBDJobService.Instance()._dispose(); }
public void CloseConnectionToVehicle() { OBDJobService.Instance().CloseConnectionToVehicle(); }