This commit is contained in:
lishuo 2021-07-30 19:39:01 +08:00
parent da4fed58b0
commit b8a5982bc5
6 changed files with 7 additions and 9 deletions

View File

@ -103,7 +103,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
MapUDPService.Send(route.RouteInstance.Id, recorderData.BelongUserId,
new double[] { lastData._Lat, lastData._Lon },
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)//没有骑,但是有初始位置的情况
{

View File

@ -330,7 +330,7 @@ namespace Assets.Scenes.Ride.Scripts.Model
public double Speed { get; set; }
public double Power { get; set; }
public double? Heart { get; set; }
public double? HeartRate { get; set; }
public double? Cadence { get; set; }
public int TotalTicks { get; set; }

View File

@ -208,7 +208,7 @@ namespace Assets.Scenes.Ride.Scripts
Speed = speed,
Power = power,
Heart = heartRate,
HeartRate = heartRate,
Cadence = cadence,
TotalTicks = totalTicks,

View File

@ -196,12 +196,11 @@ namespace Assets.Scenes.Ride.Scripts
}
}
}
if (totalDistance >= mapData.TotalDistance && !stopRecord)
if (totalDistance > mapData.TotalDistance)
{
distance = totalDistance - mapData.TotalDistance;
totalDistance = mapData.TotalDistance;
stopRecord = true;
mainController.cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
StartCoroutine("LateUpload");
}

View File

@ -650,7 +650,6 @@ public class CyclingController : DeviceServiceMonoBase
//}
isStart = false;
isQuit = true;
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
}
#endregion
@ -677,7 +676,7 @@ public class CyclingController : DeviceServiceMonoBase
public void Save(double totalDistance)
{
//cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
isQuit = true;
isStart = false;
string recordId = Guid.NewGuid().ToString();
@ -688,7 +687,7 @@ public class CyclingController : DeviceServiceMonoBase
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);
cyclingController.recorderData.StartTime = startTime;
cyclingController.recorderData.IsCompleted = totalDistance == mapData.TotalDistance;
cyclingController.recorderData.IsCompleted = totalDistance >= mapData.TotalDistance;
cyclingController.recorderData.EndDistance = totalDistance;
cyclingController.recorderData.AntModelId = AntModelId;
cyclingController.recorderData.ManufacturerId = ManufacturerId;

View File

@ -56,7 +56,7 @@ namespace Assets.Scenes.Ride.Scripts
weight = App.CurrentUser.Weight;
bicycleWeight = App.CurrentUser.BicycleWeight;
#if UNITY_EDITOR
power = 2000;
power = 50;
#endif
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
}