发布前微调
This commit is contained in:
parent
bd9696cd81
commit
fccc830f71
@ -62,7 +62,9 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
|
||||
public static RowerTaskPanel.RowerType rowerType { get; private set; }
|
||||
public void HandleAttributeReceived(byte[] data)
|
||||
{
|
||||
|
||||
if ((App.IsRowerMode?? false)) {
|
||||
return;
|
||||
}
|
||||
if (data[0] == 0x35)
|
||||
{
|
||||
PeakDriveForce = LbsToNewton(Convert.ToDouble(BitConvertHelper.ToUInt16(data, 13)) / 10, true);
|
||||
|
||||
@ -598,7 +598,7 @@ namespace Assets.Scenes.Ride.Scripts.Model
|
||||
try
|
||||
{
|
||||
DateTime ? startTime = null;// string.IsNullOrEmpty(list[16]) ? null : Convert.ToDateTime(list[16], CultureInfo.InvariantCulture);
|
||||
if (!string.IsNullOrEmpty(list[16]))
|
||||
if (list.Length>= 16 && !string.IsNullOrEmpty(list[16]))
|
||||
{
|
||||
startTime = Convert.ToDateTime(list[16], CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
currentSlope = currentSlope > 0? Math.Min(PreSlope, 15) : Math.Max(PreSlope, -15);
|
||||
CurrentDistance = pointList[CurrentIndex].Distance;
|
||||
//计算下一个海拔和坡度&当前区间距离
|
||||
nextSlope = pointList[nextIndex].Grade;
|
||||
nextSlope = pointList[nextIndex].Grade > 0 ? Math.Min(pointList[nextIndex].Grade, 15) : Math.Max(pointList[nextIndex].Grade, -15);
|
||||
nextSlopeDistance = sumDistance - totalDistance * 1000;
|
||||
NextSlopeTotalDistance = pointList[nextIndex].Distance;
|
||||
currentSlopeDistance = (totalDistance * 1000 - (sumDistance - pointList[index].Distance));// CurrentDistance-( totalDistance * 1000 - (sumDistance - pointList[index].Distance));
|
||||
|
||||
@ -13,11 +13,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
public class DeviceServiceMonoBase: BaseScene
|
||||
{
|
||||
double pregrade = 0;
|
||||
public void TrackResistance(double grade)
|
||||
{
|
||||
var device = (CurrentTrainer as ITrainerDevice);
|
||||
if (device != null)
|
||||
if (device != null && grade != pregrade)
|
||||
{
|
||||
pregrade = grade;
|
||||
device.SetTrackResistance(grade);
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,6 +53,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
if (!_headUrl.Equals(url))
|
||||
{
|
||||
_headUrl = url;
|
||||
//if (App.TextureCache.ContainsKey(url))
|
||||
//{
|
||||
// Head.texture = App.TextureCache[url];
|
||||
|
||||
@ -111,10 +111,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
private async void shareToWx(BaseEventData b)
|
||||
{
|
||||
UIManager.Instance.StartCoroutine(ShowLoading());
|
||||
var res = await ConfigHelper.mapInterruptRecordApi.GetRecordSnapShot(cyclingController.RankingId);
|
||||
//var res = await ConfigHelper.mapInterruptRecordApi.GetRecordSnapShot(cyclingController.RankingId);
|
||||
if (App.weChatController.IsWeChatAppInstalled())
|
||||
{
|
||||
App.weChatController.ShareImageToWX(0, res.data, Resources.Load<Sprite>("Images/pf").texture.EncodeToJPG());
|
||||
App.weChatController.ShareWebpageToWX(0, $"{App.CurrentUser.WebHost}RoutesRecords/{cyclingController.RankingId}?Token={App.CurrentUser.cookie}", cyclingController.mapRoute.NickName, "By " + App.CurrentUser.Nickname, null);
|
||||
//App.weChatController.ShareImageToWX(0, res.data, Resources.Load<Sprite>("Images/pf").texture.EncodeToJPG());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -124,7 +125,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
private IEnumerator ShowLoading()
|
||||
{
|
||||
Utils.showToast(null, "首次分享图片会消耗一些时间,请耐心等待", type: 1);
|
||||
//Utils.showToast(null, "首次分享图片会消耗一些时间,请耐心等待", type: 1);
|
||||
yield return null;
|
||||
}
|
||||
private async void shareToWxGp(BaseEventData b)
|
||||
|
||||
@ -151,43 +151,13 @@ public class DeviceView : MonoBehaviour
|
||||
{
|
||||
return;
|
||||
}
|
||||
var device = GetDevice();
|
||||
if (device != null && device.State == DeviceState.Connected)
|
||||
{
|
||||
UIManager.ShowConfirm(App.GetLocalString("Warning"), App.GetLocalString("Disconnect the device?"), () =>
|
||||
{
|
||||
device.Disconnect(false);
|
||||
DeviceCache.Remove(device);
|
||||
UIManager.CloseConfirm();
|
||||
}, 2, () => {
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
mDisconnectButtonClick();
|
||||
}
|
||||
mDisconnectButtonClick();
|
||||
}));
|
||||
#endif
|
||||
|
||||
|
||||
UIManager.AddEvent(mDisconnectButton, EventTriggerType.PointerClick, new UnityEngine.Events.UnityAction<BaseEventData>(e => {
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var device = GetDevice();
|
||||
if (device != null && device.State == DeviceState.Connected)
|
||||
{
|
||||
UIManager.ShowConfirm(App.GetLocalString("Warning"), App.GetLocalString("Disconnect the device?"), () =>
|
||||
{
|
||||
device.Disconnect(false);
|
||||
DeviceCache.Remove(device);
|
||||
UIManager.CloseConfirm();
|
||||
}, 2, () => {
|
||||
UIManager.CloseConfirm();
|
||||
});
|
||||
}
|
||||
#else
|
||||
mDisconnectButtonClick();
|
||||
#endif
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
@ -73,7 +73,6 @@ public class QuickLoginUser : MonoBehaviour
|
||||
private IEnumerator Loading()
|
||||
{
|
||||
yield return null;
|
||||
DontDestroyOnLoad(loadingPanel);
|
||||
Utils.showLoadingExtension(loadingPanel);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user