微调
This commit is contained in:
parent
da4fed58b0
commit
b8a5982bc5
@ -103,7 +103,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
|||||||
MapUDPService.Send(route.RouteInstance.Id, recorderData.BelongUserId,
|
MapUDPService.Send(route.RouteInstance.Id, recorderData.BelongUserId,
|
||||||
new double[] { lastData._Lat, lastData._Lon },
|
new double[] { lastData._Lat, lastData._Lon },
|
||||||
recorderData.IsCompleted, false, recorderData.EndDistance,
|
recorderData.IsCompleted, false, recorderData.EndDistance,
|
||||||
true, 1, lastData._Speed, false, preDistance, weightKg, competitionId: recorderData.Competitionid, recorderData.Saved, lastData._HeartRate, lastData._Power, lastData._Cadence, lastData.Ticks);
|
true, 1, lastData._Speed, false, preDistance, weightKg, competitionId: recorderData.Competitionid, recorderData.Saved, 0, lastData._Power, lastData._Cadence, lastData.Ticks);
|
||||||
}
|
}
|
||||||
else if (recorderData.EndDistance > 0)//没有骑,但是有初始位置的情况
|
else if (recorderData.EndDistance > 0)//没有骑,但是有初始位置的情况
|
||||||
{
|
{
|
||||||
|
|||||||
@ -330,7 +330,7 @@ namespace Assets.Scenes.Ride.Scripts.Model
|
|||||||
public double Speed { get; set; }
|
public double Speed { get; set; }
|
||||||
|
|
||||||
public double Power { get; set; }
|
public double Power { get; set; }
|
||||||
public double? Heart { get; set; }
|
public double? HeartRate { get; set; }
|
||||||
public double? Cadence { get; set; }
|
public double? Cadence { get; set; }
|
||||||
public int TotalTicks { get; set; }
|
public int TotalTicks { get; set; }
|
||||||
|
|
||||||
|
|||||||
@ -208,7 +208,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
Speed = speed,
|
Speed = speed,
|
||||||
|
|
||||||
Power = power,
|
Power = power,
|
||||||
Heart = heartRate,
|
HeartRate = heartRate,
|
||||||
Cadence = cadence,
|
Cadence = cadence,
|
||||||
TotalTicks = totalTicks,
|
TotalTicks = totalTicks,
|
||||||
|
|
||||||
|
|||||||
@ -196,12 +196,11 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (totalDistance >= mapData.TotalDistance && !stopRecord)
|
if (totalDistance > mapData.TotalDistance)
|
||||||
{
|
{
|
||||||
distance = totalDistance - mapData.TotalDistance;
|
distance = totalDistance - mapData.TotalDistance;
|
||||||
totalDistance = mapData.TotalDistance;
|
totalDistance = mapData.TotalDistance;
|
||||||
stopRecord = true;
|
stopRecord = true;
|
||||||
mainController.cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
|
||||||
StartCoroutine("LateUpload");
|
StartCoroutine("LateUpload");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -650,7 +650,6 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
//}
|
//}
|
||||||
isStart = false;
|
isStart = false;
|
||||||
isQuit = true;
|
isQuit = true;
|
||||||
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -677,7 +676,7 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
|
|
||||||
public void Save(double totalDistance)
|
public void Save(double totalDistance)
|
||||||
{
|
{
|
||||||
//cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
||||||
isQuit = true;
|
isQuit = true;
|
||||||
isStart = false;
|
isStart = false;
|
||||||
string recordId = Guid.NewGuid().ToString();
|
string recordId = Guid.NewGuid().ToString();
|
||||||
@ -688,7 +687,7 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
string imageFileName = path +"/"+ Guid.NewGuid().ToString() + ".png";
|
string imageFileName = path +"/"+ Guid.NewGuid().ToString() + ".png";
|
||||||
CaptureCamera(Camera.main, new Rect(Screen.width * 0f, Screen.height * 0f, Screen.width * 0.5f, Screen.height * 0.5f), imageFileName);
|
CaptureCamera(Camera.main, new Rect(Screen.width * 0f, Screen.height * 0f, Screen.width * 0.5f, Screen.height * 0.5f), imageFileName);
|
||||||
cyclingController.recorderData.StartTime = startTime;
|
cyclingController.recorderData.StartTime = startTime;
|
||||||
cyclingController.recorderData.IsCompleted = totalDistance == mapData.TotalDistance;
|
cyclingController.recorderData.IsCompleted = totalDistance >= mapData.TotalDistance;
|
||||||
cyclingController.recorderData.EndDistance = totalDistance;
|
cyclingController.recorderData.EndDistance = totalDistance;
|
||||||
cyclingController.recorderData.AntModelId = AntModelId;
|
cyclingController.recorderData.AntModelId = AntModelId;
|
||||||
cyclingController.recorderData.ManufacturerId = ManufacturerId;
|
cyclingController.recorderData.ManufacturerId = ManufacturerId;
|
||||||
|
|||||||
@ -56,7 +56,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
weight = App.CurrentUser.Weight;
|
weight = App.CurrentUser.Weight;
|
||||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
power = 2000;
|
power = 50;
|
||||||
#endif
|
#endif
|
||||||
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
|
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user