简体   繁体   English

x轴的wxMathPlot以毫秒为单位?

[英]wxMathPlot with x-axis in milliseconds?

I'm working with Sensor HID device and wxWidgets host application respectively. 我正在分别使用Sensor HID设备和wxWidgets主机应用程序。

Process Flow: 处理流程:

1.Sensor sends float value with time-stamp(in milliseconds) for every few milliseconds to seconds. 1.Sensor每隔几毫秒到几秒发送一次带有时间戳(以毫秒为单位)的浮点值。

2.Host application reads the data and represents it in a chart (x-axis as time and y-axis as float value). 2.主机应用程序读取数据并将其表示在图表中(x轴表示时间,y轴表示浮点值)。

I'm using the mpFXYVector and mpScaleX with mpX_TIME. 我正在将mpFXYVector和mpScaleX与mpX_TIME一起使用。

If the time-stamp is in milliseconds, x-axis time ticks are not coming properly. 如果时间戳以毫秒为单位,则x轴时间刻度未正确显示。

Kindly help me to resolve this issue. 请帮助我解决此问题。

Regards, 问候,

Rajan.M 拉詹

The issue is I've passed the time value in milliseconds directly instead of converting it to seconds! 问题是我直接以毫秒为单位传递了时间值,而不是将其转换为秒!

Eg 45678 milliseconds to 45.678 seconds 例如45678毫秒至45.678秒

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM