MPU9250 SPI Driver

Files at this revision

API Documentation at this revision

Comitter:
drrrnino7
Date:
Wed Aug 14 00:52:29 2019 +0000
Parent:
11:084e8ba240c1
Commit message:
Bugfix for online compiler; ; Add type casting.; 'Error: Non-constant-expression cannot be narrowed from type 'int' to 'std::uint8_t' (aka 'unsigned char') in initializer list'

Changed in this revision

MPU9250.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MPU9250.cpp	Tue Jul 01 13:59:45 2014 +0000
+++ b/MPU9250.cpp	Wed Aug 14 00:52:29 2019 +0000
@@ -55,7 +55,7 @@
         {0x80, MPUREG_PWR_MGMT_1},     // Reset Device
         {0x01, MPUREG_PWR_MGMT_1},     // Clock Source
         {0x00, MPUREG_PWR_MGMT_2},     // Enable Acc & Gyro
-        {low_pass_filter, MPUREG_CONFIG},         // Use DLPF set Gyroscope bandwidth 184Hz, temperature bandwidth 188Hz
+        {(uint8_t)low_pass_filter, MPUREG_CONFIG},         // Use DLPF set Gyroscope bandwidth 184Hz, temperature bandwidth 188Hz
         {0x18, MPUREG_GYRO_CONFIG},    // +-2000dps
         {0x08, MPUREG_ACCEL_CONFIG},   // +-4G
         {0x09, MPUREG_ACCEL_CONFIG_2}, // Set Acc Data Rates, Enable Acc LPF , Bandwidth 184Hz