drv_mag: delete unused MAGIOCSRANGE, MAGIOCCALIBRATE, MAGIOCEXSTRAP, MAGIOCSTEMPCOMP

This commit is contained in:
Daniel Agar
2020-03-30 15:18:06 -04:00
parent cfc087c6ad
commit b3fe235129
2 changed files with 1 additions and 25 deletions
-12
View File
@@ -74,19 +74,7 @@ struct mag_calibration_s {
/** copy the mag scaling constants to the structure pointed to by (arg) */
#define MAGIOCGSCALE _MAGIOC(5)
/** set the measurement range to handle (at least) arg Gauss */
#define MAGIOCSRANGE _MAGIOC(6)
/** perform self-calibration, update scale factors to canonical units */
#define MAGIOCCALIBRATE _MAGIOC(8)
/** excite strap */
#define MAGIOCEXSTRAP _MAGIOC(9)
/** determine if mag is external or onboard */
#define MAGIOCGEXTERNAL _MAGIOC(11)
/** enable/disable temperature compensation */
#define MAGIOCSTEMPCOMP _MAGIOC(12)
#endif /* _DRV_MAG_H */
+1 -13
View File
@@ -88,7 +88,7 @@ config_main(int argc, char *argv[])
static void
print_usage(void)
{
PRINT_MODULE_DESCRIPTION("Configure a sensor driver (sampling & publication rate, range, etc.)");
PRINT_MODULE_DESCRIPTION("Configure a sensor driver (sampling & publication rate, etc.)");
PRINT_MODULE_USAGE_NAME("config", "command");
PRINT_MODULE_USAGE_PARAM_COMMENT("The <file:dev> argument is typically one of /dev/{gyro,accel,mag}i");
@@ -102,8 +102,6 @@ print_usage(void)
PRINT_MODULE_USAGE_ARG("<file:dev> <rate>", "Sensor device file and sampling rate in Hz", false);
PRINT_MODULE_USAGE_COMMAND_DESCR("rate", "Set sensor publication rate");
PRINT_MODULE_USAGE_ARG("<file:dev> <rate>", "Sensor device file and publication rate in Hz", false);
PRINT_MODULE_USAGE_COMMAND_DESCR("range", "Set sensor measurement range");
PRINT_MODULE_USAGE_ARG("<file:dev> <rate>", "Sensor device file and range", false);
PRINT_MODULE_USAGE_COMMAND_DESCR("check", "Perform sensor self-test (and print info)");
PRINT_MODULE_USAGE_ARG("<file:dev>", "Sensor device file", false);
}
@@ -177,16 +175,6 @@ do_mag(int argc, char *argv[])
return 1;
}
} else if (argc == 3 && !strcmp(argv[0], "range")) {
/* set the range to i G */
ret = ioctl(fd, MAGIOCSRANGE, strtoul(argv[2], NULL, 0));
if (ret) {
PX4_ERR("range could not be set");
return 1;
}
} else {
print_usage();
return 1;