sensors/calibration: use params in DF wrappers

Instead of using a uORB topic with the calibration values published in
sensors and consumed by the DriverFramework driver wrappers, let's just
use the the params directly. This is quite a rough change and needs
definitely some cleanup and refactoring.
This commit is contained in:
Julian Oes
2016-03-24 13:08:31 +01:00
parent aa9d698204
commit 1b5210ca13
16 changed files with 513 additions and 242 deletions
+9 -1
View File
@@ -42,7 +42,6 @@
#include <stdint.h>
#include <sys/ioctl.h>
#include <uORB/topics/accel_calibration.h>
#include "drv_sensor.h"
#include "drv_orb_dev.h"
@@ -55,6 +54,15 @@
#include <uORB/topics/sensor_accel.h>
#define accel_report sensor_accel_s
/** accel scaling factors; Vout = Vscale * (Vin + Voffset) */
struct accel_calibration_s {
float x_offset;
float x_scale;
float y_offset;
float y_scale;
float z_offset;
float z_scale;
};
/*
* ioctl() definitions
*
+9 -1
View File
@@ -42,7 +42,6 @@
#include <stdint.h>
#include <sys/ioctl.h>
#include <uORB/topics/gyro_calibration.h>
#include "drv_sensor.h"
#include "drv_orb_dev.h"
@@ -55,6 +54,15 @@
#include <uORB/topics/sensor_gyro.h>
#define gyro_report sensor_gyro_s
/** gyro scaling factors; Vout = (Vin * Vscale) + Voffset */
struct gyro_calibration_s {
float x_offset;
float x_scale;
float y_offset;
float y_scale;
float z_offset;
float z_scale;
};
/*
* ioctl() definitions
+9 -1
View File
@@ -40,7 +40,6 @@
#include <stdint.h>
#include <sys/ioctl.h>
#include <uORB/topics/mag_calibration.h>
#include "drv_sensor.h"
#include "drv_orb_dev.h"
@@ -53,6 +52,15 @@
#include <uORB/topics/sensor_mag.h>
#define mag_report sensor_mag_s
/** mag scaling factors; Vout = (Vin * Vscale) + Voffset */
struct mag_calibration_s {
float x_offset;
float x_scale;
float y_offset;
float y_scale;
float z_offset;
float z_scale;
};
/*
* ioctl() definitions