mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 03:43:34 +08:00
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:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user