调整动画和chart图标细节,重置命令
This commit is contained in:
parent
8d8fd59a80
commit
561ad993b8
@ -26,6 +26,7 @@ namespace ChartAndGraph
|
|||||||
public static string DateToTimeString(DateTime dateTime)
|
public static string DateToTimeString(DateTime dateTime)
|
||||||
{
|
{
|
||||||
Debug.Log("暫時");
|
Debug.Log("暫時");
|
||||||
|
//return dateTime.ToString(@"HH\'mm\'\'");
|
||||||
return dateTime.ToString("t");
|
return dateTime.ToString("t");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,7 @@ MonoBehaviour:
|
|||||||
m_Alignment: 4
|
m_Alignment: 4
|
||||||
m_AlignByGeometry: 0
|
m_AlignByGeometry: 0
|
||||||
m_RichText: 1
|
m_RichText: 1
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 1
|
||||||
m_VerticalOverflow: 0
|
m_VerticalOverflow: 1
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: New Text
|
m_Text:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -10,5 +10,6 @@ namespace Assets.Scripts.Devices.Ant.Interfaces
|
|||||||
interface IRowerDevice
|
interface IRowerDevice
|
||||||
{
|
{
|
||||||
FtmsRowerData rowerData { get; }
|
FtmsRowerData rowerData { get; }
|
||||||
|
void Reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -194,7 +194,7 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
|
|||||||
PullValue = val;
|
PullValue = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Debug.Log("原始数据:" + string.Join(",", data));
|
Debug.Log("原始数据:" + string.Join(",", data));
|
||||||
}
|
}
|
||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,7 +39,12 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
|||||||
{
|
{
|
||||||
foreach (var character in response.Data)
|
foreach (var character in response.Data)
|
||||||
{
|
{
|
||||||
if (character.MatchGuid(ServiceUuids.Characteristics.RowerData))
|
if (character.MatchGuid(ServiceUuids.Characteristics.FitnessMachineControlPoint))
|
||||||
|
{
|
||||||
|
Debug.Log("中控台获取");
|
||||||
|
this.controlPointCharacteristic = character;
|
||||||
|
}
|
||||||
|
else if (character.MatchGuid(ServiceUuids.Characteristics.RowerData))
|
||||||
{
|
{
|
||||||
Debug.Log("划船机");
|
Debug.Log("划船机");
|
||||||
this.hwInterface.SubscribeCharacteristic(character, (hw, cha, res) =>
|
this.hwInterface.SubscribeCharacteristic(character, (hw, cha, res) =>
|
||||||
@ -66,5 +71,11 @@ namespace Assets.Scripts.Devices.Ble.Devices
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
Debug.Log("发送重置命令");
|
||||||
|
hwInterface.WriteCharacteristic(this.controlPointCharacteristic, new byte[] { 0x01 });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,18 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private IRowerDevice Rower
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var device = App.MainDeviceAdapter.GetDevices().FirstOrDefault(d => (d.State == DeviceState.Connected || d.State == DeviceState.Connecting) && d.Sensor == SensorType.Rower);
|
||||||
|
if (device != null)
|
||||||
|
{
|
||||||
|
return (IRowerDevice)device;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 心率数据
|
/// 心率数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -245,6 +257,10 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
RowerData.PullChanged -= PaintPullCurveDelegate;
|
RowerData.PullChanged -= PaintPullCurveDelegate;
|
||||||
RowerData.Reset();
|
RowerData.Reset();
|
||||||
}
|
}
|
||||||
|
if (Rower != null)
|
||||||
|
{
|
||||||
|
Rower.Reset();
|
||||||
|
}
|
||||||
btnStart.tag = "Start";
|
btnStart.tag = "Start";
|
||||||
btnStart.GetComponent<Image>().sprite = spriteDict["Start"];
|
btnStart.GetComponent<Image>().sprite = spriteDict["Start"];
|
||||||
left.Find("Rower").GetComponent<Image>().sprite = spriteDict[0];
|
left.Find("Rower").GetComponent<Image>().sprite = spriteDict[0];
|
||||||
@ -273,6 +289,11 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
}
|
}
|
||||||
private void ReturnHome()
|
private void ReturnHome()
|
||||||
{
|
{
|
||||||
|
if (seconds > 0)
|
||||||
|
{
|
||||||
|
Utils.showToast(null, "Please end this training.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
UIManager.ShowHomePanel();
|
UIManager.ShowHomePanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,7 +302,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
double x = 0f;
|
double x = 0f;
|
||||||
//List<ushort> tempList = new List<ushort>()
|
//List<ushort> tempList = new List<ushort>()
|
||||||
//{
|
//{
|
||||||
// 0,1,4,5,12,13,16,20,30,40,50,60,500
|
// 0,1,4,500,12,13,16//,20,30,40,50,60,500
|
||||||
//};
|
//};
|
||||||
//int tempx = 0;
|
//int tempx = 0;
|
||||||
void TimerTicks()
|
void TimerTicks()
|
||||||
@ -304,13 +325,13 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
var heartRate = HeartRate ?? 0;
|
var heartRate = HeartRate ?? 0;
|
||||||
bottom.Find("BPM/Value").GetComponent<Text>().text = heartRate.ToString();
|
bottom.Find("BPM/Value").GetComponent<Text>().text = heartRate.ToString();
|
||||||
var strokeCount = RowerData.StrokeCount;
|
var strokeCount = RowerData.StrokeCount;
|
||||||
if (ushort.TryParse(left.Find("Times/Value").GetComponent<Text>().text, out ushort originStroke))
|
//if (ushort.TryParse(left.Find("Times/Value").GetComponent<Text>().text, out ushort originStroke))
|
||||||
{
|
//{
|
||||||
if (strokeCount != originStroke)
|
// if (strokeCount != originStroke)
|
||||||
{
|
// {
|
||||||
left.Find("Rower").GetComponent<RowerAnimation>().StartAnimation();
|
// left.Find("Rower").GetComponent<RowerAnimation>().StartAnimation();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
left.Find("Times/Value").GetComponent<Text>().text = strokeCount.ToString();
|
left.Find("Times/Value").GetComponent<Text>().text = strokeCount.ToString();
|
||||||
left.Find("Calories/Value").GetComponent<Text>().text = RowerData.TotalEnergy.ToString();
|
left.Find("Calories/Value").GetComponent<Text>().text = RowerData.TotalEnergy.ToString();
|
||||||
records.Add($"{RowerData.StrokeCount},{RowerData.ElapsedTime},{RowerData.TotalDistance},{RowerData.InstantaneousPower},{RowerData.InstantaneousPace},{RowerData.StrokeRate},{RowerData.ResistanceLevel},{heartRate}");
|
records.Add($"{RowerData.StrokeCount},{RowerData.ElapsedTime},{RowerData.TotalDistance},{RowerData.InstantaneousPower},{RowerData.InstantaneousPace},{RowerData.StrokeRate},{RowerData.ResistanceLevel},{heartRate}");
|
||||||
@ -325,12 +346,13 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
Debug.Log(ftms.PullValue);
|
Debug.Log(ftms.PullValue);
|
||||||
PaintPullCurve(ftms.PullValue);
|
PaintPullCurve(ftms.PullValue);
|
||||||
}
|
}
|
||||||
|
bool isPlay = false;
|
||||||
void PaintPullCurve(ushort y)
|
void PaintPullCurve(ushort y)
|
||||||
{
|
{
|
||||||
if (y > 1000) y = 1000;
|
if (y > 1000) y = 1000;
|
||||||
//拉力条
|
//拉力条
|
||||||
var rate = ((float)y) * 2 / 1000;
|
var rate = ((float)y) * 2 / 1000;
|
||||||
if (rate > 1) rate = 1;
|
if (rate > 1) rate = 1f;
|
||||||
left.Find("LeftImage/Value").GetComponent<Image>().fillAmount = rate;
|
left.Find("LeftImage/Value").GetComponent<Image>().fillAmount = rate;
|
||||||
left.Find("RightImage/Value").GetComponent<Image>().fillAmount = rate;
|
left.Find("RightImage/Value").GetComponent<Image>().fillAmount = rate;
|
||||||
//动画
|
//动画
|
||||||
@ -340,6 +362,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
{
|
{
|
||||||
if (pullList.Count == 0)
|
if (pullList.Count == 0)
|
||||||
{
|
{
|
||||||
|
isPlay = true;
|
||||||
x = 0;
|
x = 0;
|
||||||
pullList.Add(new DoubleVector2(x, y));
|
pullList.Add(new DoubleVector2(x, y));
|
||||||
transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||||
@ -351,6 +374,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||||
pullList.Clear();
|
pullList.Clear();
|
||||||
x = 0;
|
x = 0;
|
||||||
|
isPlay = true;
|
||||||
pullList.Add(new DoubleVector2(x, y));
|
pullList.Add(new DoubleVector2(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,7 +382,14 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
{
|
{
|
||||||
x += 0.1;
|
x += 0.1;
|
||||||
pullList.Add(new DoubleVector2(x, y));
|
pullList.Add(new DoubleVector2(x, y));
|
||||||
|
if (pullList.Count > 5 && isPlay)
|
||||||
|
{
|
||||||
|
Debug.Log("开始动画");
|
||||||
|
isPlay = false;
|
||||||
|
left.Find("Rower").GetComponent<RowerAnimation>().StartAnimation();
|
||||||
|
}
|
||||||
transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||||
|
|
||||||
}
|
}
|
||||||
Debug.Log($"{x},{y}");
|
Debug.Log($"{x},{y}");
|
||||||
//transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
//transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||||
|
|||||||
@ -118,6 +118,7 @@ public class RouteItem : MonoBehaviour
|
|||||||
{
|
{
|
||||||
UIManager.ShowConfirm("Re-Rowing", "Rowing again?", () =>
|
UIManager.ShowConfirm("Re-Rowing", "Rowing again?", () =>
|
||||||
{
|
{
|
||||||
|
UIManager.CloseConfirm();
|
||||||
UIManager.ShowRowerPanel();
|
UIManager.ShowRowerPanel();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -47,10 +47,15 @@ public class RowerAnimation : PFUIPanel
|
|||||||
IEnumerator Animation()
|
IEnumerator Animation()
|
||||||
{
|
{
|
||||||
yield return new WaitForEndOfFrame();
|
yield return new WaitForEndOfFrame();
|
||||||
for (int i = 0; i < 30; i++)
|
for (int i = 0; i < 15; i++)
|
||||||
{
|
{
|
||||||
image.sprite = sprites[i];
|
image.sprite = sprites[i];
|
||||||
yield return new WaitForSeconds(0.08f);
|
yield return new WaitForSeconds(0.02f);
|
||||||
|
}
|
||||||
|
for (int i = 15; i < 30; i++)
|
||||||
|
{
|
||||||
|
image.sprite = sprites[i];
|
||||||
|
yield return new WaitForSeconds(0.04f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -205,6 +205,7 @@ public class RowerDeviceView : MonoBehaviour
|
|||||||
sprite1 = Resources.Load<Sprite>("Images/Rower/设备 - 划船机 - 未连接");
|
sprite1 = Resources.Load<Sprite>("Images/Rower/设备 - 划船机 - 未连接");
|
||||||
sprite3 = Resources.Load<Sprite>("Images/Rower/设备 - 划船机");
|
sprite3 = Resources.Load<Sprite>("Images/Rower/设备 - 划船机");
|
||||||
powerUnit.text = "";
|
powerUnit.text = "";
|
||||||
|
powerValue.text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,12 +331,12 @@ public class RowerDeviceView : MonoBehaviour
|
|||||||
//noDevice.enabled = true;
|
//noDevice.enabled = true;
|
||||||
noDevice.text = connectedDevice.Name +" "+ connectedDevice.DeviceNumber.ToString();
|
noDevice.text = connectedDevice.Name +" "+ connectedDevice.DeviceNumber.ToString();
|
||||||
}
|
}
|
||||||
noDevice.color = Color.white;
|
noDevice.color = Utils.HexToColorHtml("#f93086");
|
||||||
|
|
||||||
if (powerValue != null)
|
//if (powerValue != null)
|
||||||
{
|
//{
|
||||||
powerValue.text = GetValue(connectedDevice);
|
// powerValue.text = GetValue(connectedDevice);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Debug.Log(Newtonsoft.Json.JsonConvert.SerializeObject(App.MainDeviceAdapter.GetDevices().Where(d => d.Sensor == SensorType)));
|
//Debug.Log(Newtonsoft.Json.JsonConvert.SerializeObject(App.MainDeviceAdapter.GetDevices().Where(d => d.Sensor == SensorType)));
|
||||||
@ -359,7 +360,7 @@ public class RowerDeviceView : MonoBehaviour
|
|||||||
case SensorType.Trainer:
|
case SensorType.Trainer:
|
||||||
return "Smart Trainer";
|
return "Smart Trainer";
|
||||||
case SensorType.Rower:
|
case SensorType.Rower:
|
||||||
return "Rower Machine";
|
return "Rowing Machine";
|
||||||
case SensorType.VirtualPower:
|
case SensorType.VirtualPower:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -40,16 +40,17 @@ public class RowerGraphChartFeed : MonoBehaviour
|
|||||||
graph.Scrollable = false;
|
graph.Scrollable = false;
|
||||||
//graph.HorizontalValueToStringMap[0.0] = "Zero"; // example of how to set custom axis strings
|
//graph.HorizontalValueToStringMap[0.0] = "Zero"; // example of how to set custom axis strings
|
||||||
graph.DataSource.StartBatch();
|
graph.DataSource.StartBatch();
|
||||||
graph.DataSource.ClearAndMakeBezierCurve("Player 1");
|
graph.DataSource.ClearCategory("Player 1");
|
||||||
for (int i = 0; i < list.Count; i++)
|
for (int i = 0; i < list.Count; i++)
|
||||||
{
|
{
|
||||||
var item = list[i];
|
var item = list[i];
|
||||||
if (i == 0)
|
graph.DataSource.AddPointToCategory("Player 1", item.x, item.y);
|
||||||
graph.DataSource.SetCurveInitialPoint("Player 1", item.x, item.y);
|
//if (i == 0)
|
||||||
else
|
// graph.DataSource.SetCurveInitialPoint("Player 1", item.x, item.y);
|
||||||
graph.DataSource.AddLinearCurveToCategory("Player 1", new DoubleVector2(item.x, item.y));
|
//else
|
||||||
|
// graph.DataSource.AddLinearCurveToCategory("Player 1", new DoubleVector2(item.x, item.y));
|
||||||
}
|
}
|
||||||
graph.DataSource.MakeCurveCategorySmooth("Player 1");
|
//graph.DataSource.MakeCurveCategorySmooth("Player 1");
|
||||||
graph.DataSource.EndBatch();
|
graph.DataSource.EndBatch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,8 @@ public partial class RowerHoverText : MonoBehaviour
|
|||||||
public Text TextPrefab;
|
public Text TextPrefab;
|
||||||
public int FontSize = 5;
|
public int FontSize = 5;
|
||||||
public Vector3 TextOffset = new Vector3();
|
public Vector3 TextOffset = new Vector3();
|
||||||
|
public string Title;
|
||||||
|
public string Unit;
|
||||||
int fractionDigits = 0;
|
int fractionDigits = 0;
|
||||||
AnyChart mChart;
|
AnyChart mChart;
|
||||||
|
|
||||||
@ -135,9 +137,9 @@ public partial class RowerHoverText : MonoBehaviour
|
|||||||
var point = graph.DataSource.GetPoint(args.Category, args.Index);
|
var point = graph.DataSource.GetPoint(args.Category, args.Index);
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
if(graph.PointToWorldSpace(out position, point.x, point.y, args.Category))
|
if(graph.PointToWorldSpace(out position, point.x, point.y, args.Category))
|
||||||
PopText($"({args.XString},{args.YString})", position, true);
|
PopText($"{Title}\n{args.YString} {Unit}", position, true);
|
||||||
else
|
else
|
||||||
PopText($"({args.XString},{args.YString})", args.Position,false);
|
PopText($"{Title}\n{args.YString} {Unit}", args.Position,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,8 +8,8 @@ using System.IO;
|
|||||||
public partial class RowerLargeDataFeed : MonoBehaviour, IComparer<DoubleVector2>
|
public partial class RowerLargeDataFeed : MonoBehaviour, IComparer<DoubleVector2>
|
||||||
{
|
{
|
||||||
public string Category = "Player 1";
|
public string Category = "Player 1";
|
||||||
public int DownSampleToPoints = 100;
|
public int DownSampleToPoints = 1000;
|
||||||
public List<DoubleVector2> mData = new List<DoubleVector2>(); // the data held by the chart
|
List<DoubleVector2> mData = new List<DoubleVector2>(); // the data held by the chart
|
||||||
double pageSize = 2f;
|
double pageSize = 2f;
|
||||||
double currentPagePosition = 0.0;
|
double currentPagePosition = 0.0;
|
||||||
double currentZoom = 0f;
|
double currentZoom = 0f;
|
||||||
@ -169,15 +169,7 @@ public partial class RowerLargeDataFeed : MonoBehaviour, IComparer<DoubleVector2
|
|||||||
{
|
{
|
||||||
for (int i = start; i < end; i++) // load the data
|
for (int i = start; i < end; i++) // load the data
|
||||||
{
|
{
|
||||||
if (i == 0)
|
graph.DataSource.AddPointToCategory(Category, mData[i].x, mData[i].y);
|
||||||
{
|
|
||||||
graph.DataSource.SetCurveInitialPoint(Category, mData[i].x, mData[i].y);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
graph.DataSource.AddLinearCurveToCategory(Category, new DoubleVector2(mData[i].x, mData[i].y));
|
|
||||||
}
|
|
||||||
//graph.DataSource.AddPointToCategory(Category, mData[i].x, mData[i].y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,14 +221,11 @@ public partial class RowerLargeDataFeed : MonoBehaviour, IComparer<DoubleVector2
|
|||||||
int start, end;
|
int start, end;
|
||||||
findPointsForPage(pagePosition, out start, out end); // get the page edges
|
findPointsForPage(pagePosition, out start, out end); // get the page edges
|
||||||
graph.DataSource.ClearCategory(Category); // clear the cateogry
|
graph.DataSource.ClearCategory(Category); // clear the cateogry
|
||||||
|
graph.DataSource.HorizontalViewSize = mData.Count;
|
||||||
graph.DataSource.HorizontalViewSize = 500 > mData.Count ? mData.Count : 500;
|
|
||||||
|
|
||||||
if (DownSampleToPoints <= 0)
|
if (DownSampleToPoints <= 0)
|
||||||
LoadWithoutDownSampling(start, end);
|
LoadWithoutDownSampling(start, end);
|
||||||
else
|
else
|
||||||
LoadWithDownSampling(start, end);
|
LoadWithDownSampling(start, end);
|
||||||
//graph.DataSource.MakeCurveCategorySmooth(Category);
|
|
||||||
graph.DataSource.EndBatch();
|
graph.DataSource.EndBatch();
|
||||||
graph.HorizontalScrolling = pagePosition;
|
graph.HorizontalScrolling = pagePosition;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,9 +39,9 @@ public class RowerResult : PFUIPanel
|
|||||||
//}
|
//}
|
||||||
//transform.Find("Scroll View/Viewport/Content/Content/ChartPace/Chart").GetComponent<RowerLargeDataFeed>().SetData(a);
|
//transform.Find("Scroll View/Viewport/Content/Content/ChartPace/Chart").GetComponent<RowerLargeDataFeed>().SetData(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void Initial(string id)
|
public async void Initial(string id)
|
||||||
{
|
{
|
||||||
|
transform.Find("Scroll View").GetComponent<ScrollRect>().verticalNormalizedPosition = 1;
|
||||||
GetComponent<CanvasGroup>().alpha = 0;
|
GetComponent<CanvasGroup>().alpha = 0;
|
||||||
var res = await ConfigHelper.rowerApi.GetDetail(id);
|
var res = await ConfigHelper.rowerApi.GetDetail(id);
|
||||||
if (res.result)
|
if (res.result)
|
||||||
@ -59,7 +59,7 @@ public class RowerResult : PFUIPanel
|
|||||||
dataContent.Find("Table/AvgHR/Text").GetComponent<Text>().text
|
dataContent.Find("Table/AvgHR/Text").GetComponent<Text>().text
|
||||||
= $"{_model.AvgHeartRate} BPM";
|
= $"{_model.AvgHeartRate} BPM";
|
||||||
dataContent.Find("Table/AvgRate/Text").GetComponent<Text>().text
|
dataContent.Find("Table/AvgRate/Text").GetComponent<Text>().text
|
||||||
= $"{_model.AvgRate.ToString("#0")} W";
|
= $"{_model.AvgRate.ToString("#0")} SPM";
|
||||||
dataContent.Find("Table/MaxPower/Text").GetComponent<Text>().text
|
dataContent.Find("Table/MaxPower/Text").GetComponent<Text>().text
|
||||||
= $"{TimeSpan.FromSeconds(_model.MaxPace).ToString(@"mm\:ss")} /500M";
|
= $"{TimeSpan.FromSeconds(_model.MaxPace).ToString(@"mm\:ss")} /500M";
|
||||||
dataContent.Find("Table/MaxHR/Text").GetComponent<Text>().text
|
dataContent.Find("Table/MaxHR/Text").GetComponent<Text>().text
|
||||||
@ -85,7 +85,7 @@ public class RowerResult : PFUIPanel
|
|||||||
//var b = _model.ChartList.Select((x, i) => new DoubleVector2(i, ChartDateUtility.TimeSpanToValue(TimeSpan.FromMinutes(x.Pace + UnityEngine.Random.value * 300)))).ToList();
|
//var b = _model.ChartList.Select((x, i) => new DoubleVector2(i, ChartDateUtility.TimeSpanToValue(TimeSpan.FromMinutes(x.Pace + UnityEngine.Random.value * 300)))).ToList();
|
||||||
//Debug.Log(_model.ChartList.Select((x, i) => new DoubleVector2(i, ChartDateUtility.TimeSpanToValue(TimeSpan.FromMinutes(x.Pace + UnityEngine.Random.value * 300)))).ToList());
|
//Debug.Log(_model.ChartList.Select((x, i) => new DoubleVector2(i, ChartDateUtility.TimeSpanToValue(TimeSpan.FromMinutes(x.Pace + UnityEngine.Random.value * 300)))).ToList());
|
||||||
//var a = new List<DoubleVector2>();
|
//var a = new List<DoubleVector2>();
|
||||||
//for (int i = 0; i < 20000; i++)
|
//for (int i = 0; i < 100; i++)
|
||||||
//{
|
//{
|
||||||
// a.Add(new DoubleVector2(i, UnityEngine.Random.value * 200));
|
// a.Add(new DoubleVector2(i, UnityEngine.Random.value * 200));
|
||||||
//}
|
//}
|
||||||
@ -105,6 +105,7 @@ public class RowerResult : PFUIPanel
|
|||||||
chartRate.GetComponent<RowerLargeDataFeed>()
|
chartRate.GetComponent<RowerLargeDataFeed>()
|
||||||
.SetData(_model.ChartList.Select((x, i) => new DoubleVector2(i, x.Rate)).ToList());
|
.SetData(_model.ChartList.Select((x, i) => new DoubleVector2(i, x.Rate)).ToList());
|
||||||
chartHR.GetComponent<RowerLargeDataFeed>()
|
chartHR.GetComponent<RowerLargeDataFeed>()
|
||||||
|
//.SetData(a);
|
||||||
.SetData(_model.ChartList.Select((x, i) => new DoubleVector2(i, x.HeartRate)).ToList());
|
.SetData(_model.ChartList.Select((x, i) => new DoubleVector2(i, x.HeartRate)).ToList());
|
||||||
}
|
}
|
||||||
GetComponent<CanvasGroup>().DOFade(1, 0.3f);
|
GetComponent<CanvasGroup>().DOFade(1, 0.3f);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user