예제 #1
0
    void IListenerErg.OnStrokeDataEvent(StrokeDataEvent strokeDataEvent)
    {
        StrokeData stroke = strokeDataEvent.strokeData;

        textWatts.text       = stroke.strokePower + "";
        textStrokeCount.text = stroke.strokeCount + "";
    }
예제 #2
0
        public void ScanDevices()
        {
#if UNITY_STANDALONE || UNITY_EDITOR
#elif UNITY_ANDROID
            PluginBLEPM5.StartScanning((ErgData a) => {
                ergDataEvent = new ErgDataEvent(a);
                erdataReady  = true;
                print("INTERO_BLE ergdata " + a);
            }, (StrokeData a) => {
                strokeDataEvent = new StrokeDataEvent(a);
                strokeDataReady = true;
                print("INTERO_BLE stroke " + a);
            });
#endif
        }
예제 #3
0
        public void onStrokeDataReady(string s)
        {
            // 35
            strokeData.time                   = PM5EventHandler.getTime();
            strokeData.distance               = PM5EventHandler.getDistance();
            strokeData.driveLength            = PM5EventHandler.getDriveLength();
            strokeData.driveTime              = PM5EventHandler.getDriveTime();
            strokeData.strokeRecoveryTime     = PM5EventHandler.getStrokeRecoveryTime();
            strokeData.strokeRecoveryDistance = PM5EventHandler.getStrokeRecoveryDistance();
            strokeData.peakDriveForce         = PM5EventHandler.getPeakDriveForce();
            strokeData.avgDriveForce          = PM5EventHandler.getAvgDriveForce();
            strokeData.strokeCount            = PM5EventHandler.getStrokeCount();
            // 36
            strokeData.strokePower    = PM5EventHandler.getStrokePower();
            strokeData.strokeCalories = PM5EventHandler.getStrokeCalories();
            strokeData.workPerStroke  = PM5EventHandler.getWorkPerStroke();

            StrokeDataEvent e = new StrokeDataEvent(strokeData);

            InteroEventManager.GetEventManager().SendEvent(e);
        }
 void IListenerErg.OnStrokeDataEvent(StrokeDataEvent strokeDataEvent)
 {
     throw new System.NotImplementedException();
 }
 void IListenerErg.OnStrokeDataEvent(StrokeDataEvent strokeDataEvent)
 {
     // UnityEngine.Debug.Log("got strokeData " + strokeDataEvent.strokeData);
 }
 void IListenerErg.OnStrokeDataEvent(StrokeDataEvent strokeDataEvent)
 {
 }