We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffb1f1c commit 4af10caCopy full SHA for 4af10ca
1 file changed
STM32duino_sample/RT-9DOF-IMU-V3-Quat/RT-9DOF-IMU-V3-Quat.ino
@@ -76,9 +76,12 @@ void timerInterrupt(void) {
76
double gy = ((double)data.Raw_Gyro.Data.Y) / 16.3835 * PI / 180.0;
77
double gz = ((double)data.Raw_Gyro.Data.Z) / 16.3835 * PI / 180.0;
78
79
- double time = (double)micros() / 1000000.0;
+ uint32_t time_sec = micros()/1000000;
80
+ uint32_t time_subsecs = micros() - time_sec*1000000;
81
- SERIAL_PORT.print(time, 4);
82
+ SERIAL_PORT.print(time_sec);
83
+ SERIAL_PORT.print(F("."));
84
+ SERIAL_PORT.print(time_subsecs);
85
SERIAL_PORT.print(F(","));
86
SERIAL_PORT.print(q1, 4);
87
0 commit comments