Skip to content

Commit a67d9fe

Browse files
author
Jim Lindblom
committed
Updating default and max frequency to 100Hz
1 parent 93adaee commit a67d9fe

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Firmware/_9DoF_Razor_M0_Firmware/_9DoF_Razor_M0_Firmware.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,13 @@ void parseSerialInput(char c)
426426
enableHeading = !enableHeading;
427427
flashEnableHeading.write(enableHeading);
428428
break;
429-
case SET_LOG_RATE: // Increment the log rate from 1-200Hz (10Hz increments)
429+
case SET_LOG_RATE: // Increment the log rate from 1-100Hz (10Hz increments)
430430
temp = imu.dmpGetFifoRate(); // Get current FIFO rate
431431
if (temp == 1) // If it's 1Hz, set it to 10Hz
432432
temp = 10;
433433
else
434434
temp += 10; // Otherwise increment by 10
435-
if (temp > 200) // If it's greater than 200Hz, reset to 1
435+
if (temp > 100) // If it's greater than 100Hz, reset to 1
436436
temp = 1;
437437
imu.dmpSetFifoRate(temp); // Send the new rate
438438
temp = imu.dmpGetFifoRate(); // Read the updated rate

Firmware/_9DoF_Razor_M0_Firmware/config.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// Serial Port Config //
33
////////////////////////
44
#define ENABLE_UART_LOGGING true
5-
#define LOG_PORT SerialUSB // "UART" to log to, can also be Serial
5+
// Select the Serial port to log to. Either SERIAL_PORT_USBVIRTUAL
6+
// or LOG_PORT SERIAL_PORT_HARDWARE (SerialUSB or Serial1)
7+
#define LOG_PORT SERIAL_PORT_USBVIRTUAL
68
#define SERIAL_BAUD_RATE 115200 // Serial port baud
79

810
////////////////
@@ -16,7 +18,7 @@
1618
/////////////////////////
1719
// Note: Some of these params can be overwritten using serial
1820
// commands. These are just defaults on initial programming
19-
#define DMP_SAMPLE_RATE 200 // Logging/DMP sample rate(4-200 Hz)
21+
#define DMP_SAMPLE_RATE 100 // Logging/DMP sample rate(4-200 Hz)
2022
#define IMU_COMPASS_SAMPLE_RATE 100 // Compass sample rate (4-100 Hz)
2123
#define IMU_AG_SAMPLE_RATE 100 // Accel/gyro sample rate Must be between 4Hz and 1kHz
2224
#define IMU_GYRO_FSR 2000 // Gyro full-scale range (250, 500, 1000, or 2000)

0 commit comments

Comments
 (0)