Fixed 9250 mag readouts. From @Inspirati

This commit is contained in:
Lorenz Meier
2016-03-25 16:07:51 +01:00
parent a721cd88cb
commit 425c5dea2a
2 changed files with 85 additions and 29 deletions
+9
View File
@@ -82,10 +82,19 @@ private:
struct mag_calibration_s _mag_scale;
float _mag_range_scale;
perf_counter_t _mag_reads;
perf_counter_t _mag_errors;
perf_counter_t _mag_overruns;
perf_counter_t _mag_overflows;
perf_counter_t _mag_duplicates;
float _mag_asa_x;
float _mag_asa_y;
float _mag_asa_z;
bool check_duplicate(uint8_t *mag_data);
// keep last mag reading for duplicate detection
uint8_t _last_mag_data[6];
/* do not allow to copy this class due to pointer data members */
MPU9250_mag(const MPU9250_mag &);
MPU9250_mag operator=(const MPU9250_mag &);