Exemplo n.º 1
0
 private void MsBandAndroidBridge_HeartRateUpdateEvent(HeartRate heartRate, MsBand band)
 {
     if (HeartRateDisplay != null)
     {
         HeartRateDisplay.text = heartRate.Rate.ToString();
     }
 }
Exemplo n.º 2
0
 private void MsBandAndroidBridge_RawAccUpdateEvent(float x, float y, float z, MsBand band)
 {
     if (AccDisplay != null)
     {
         AccDisplay.text = x.ToString() + ", " + y.ToString() + ", " + z.ToString();
     }
 }
 private void MsBandAndroidBridge_ConnectedBandEvent(int id, MsBand band)
 {
     if (AutoEnableSensors)
     {
         if (SensorsToEnable != null && SensorsToEnable.Count > 0)
         {
             EnableNamedSensors(id);
         }
         else
         {
             EnableAllSensors(id);
         }
     }
 }
Exemplo n.º 4
0
    private void MsBandAndroidBridge_RawAccUpdateEvent(float x, float y, float z, MsBand band)
    {
        if (band.BandId == 0)
        {
            if (Band0Acc != null)
            {
                Band0Acc.text = x.ToString() + ", " + y.ToString() + ", " + z.ToString();
            }
        }

        if (band.BandId == 1)
        {
            if (Band1Acc != null)
            {
                Band1Acc.text = x.ToString() + ", " + y.ToString() + ", " + z.ToString();
            }
        }
    }
Exemplo n.º 5
0
    private void MsBandAndroidBridge_ConnectedBandEvent(int id, MsBand band)
    {
        // throw new System.NotImplementedException();

        if (FeedbackPanel != null)
        {
            FeedbackPanel.SetActive(true);
        }

        if (ConnectionPanel != null)
        {
            ConnectionPanel.SetActive(false);
        }

        if (SelectButtonA != null)
        {
            SelectButtonA.SetActive(MsBandAndroidBridge.Instance.BandDictionary.ContainsKey(0));
        }

        if (SelectButtonB != null)
        {
            SelectButtonB.SetActive(MsBandAndroidBridge.Instance.BandDictionary.ContainsKey(1));
        }
    }
Exemplo n.º 6
0
 private void MsBandAndroidBridge_RawAccUpdateEvent(float x, float y, float z, MsBand band)
 {
     roll  = band.Accelerometer.Roll;
     pitch = band.Accelerometer.Pitch;
 }
Exemplo n.º 7
0
 public void SelectBand(int id)
 {
     CurrentBand = MsBandAndroidBridge.Instance.BandDictionary[id];
 }