private void OnDataUpdate(NavigationApiResponse response)
        {
            speedText?.SetValue(response.data.speed);
            deepnessText?.SetValue(0);
            windStrengthText?.SetValue(response.data.windStrength);

            CompassManager?.DisplayCurrentCurse(response.data.currentCourse);
            CompassManager?.DisplayDesiredCurse(response.data.desiredCourse);

            WindManager?.SetDirection(response.data.windDirection);
        }
Beispiel #2
0
 public void GetData(string data)
 {
     lastResponse = JsonUtility.FromJson <NavigationApiResponse>(data);
     onDataChange?.Invoke(lastResponse);
     onLocationChange?.Invoke(lastResponse.data.location);
 }