速度显示

This commit is contained in:
lvyuankang 2024-11-01 13:44:14 +08:00
parent f68a521f8c
commit 0140c2197c

View File

@ -226,7 +226,7 @@ export default struct SignDisplayCom {
Text('时分秒:' + this.time).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('经度:' + this.signArr[95]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('纬度:' + this.signArr[96]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('速度:' + (this.signArr[97]*1.852).toFixed(2)).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('速度:' + (Number(this.signArr[97])*1.852).toFixed(2)).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
}
.backgroundColor('#1A1A1A')
.width(170 * this.ratio)
@ -416,6 +416,7 @@ export default struct SignDisplayCom {
this.GPSColum[t].value = this.signArr[i]
t++
}
this.GPSColum[97].value= ((Number(this.GPSColum[97])*1.852).toFixed(2)).toString()
this.sjxhColum = JSON.parse(JSON.stringify((this.sjxhColum)))
that.signArr = JSON.parse(JSON.stringify((this.signArr)))
that.GPSColum = JSON.parse(JSON.stringify((this.GPSColum)))