PX4 System:Expunge the nuttx adc structure from the system

This PR is preliminary ground work for FMUv5.

   PX4 does not use the NuttX adc driver. But used the same format
   for the data returned by the nuttx ADC driver.

   There was a fixme:in src/platforms/px4_adc.h "this needs to be
   a px4_adc_msg_s type" With this PR the need for
   src/platforms/px4_adc.h goes away as the driver drv_adc.h now
   describes the px4_adc_msg_t.
This commit is contained in:
David Sidrane
2017-07-17 22:28:29 +02:00
committed by Lorenz Meier
parent d92377a6e6
commit 4349f49610
13 changed files with 50 additions and 101 deletions
+2 -3
View File
@@ -37,7 +37,6 @@
*/
#include <px4_config.h>
#include <px4_adc.h>
#include <px4_posix.h>
#include <px4_log.h>
@@ -63,8 +62,8 @@ int test_adc(int argc, char *argv[])
}
for (unsigned i = 0; i < 5; i++) {
/* make space for a maximum of twelve channels */
struct adc_msg_s data[12];
/* make space for a maximum number of channels */
px4_adc_msg_t data[PX4_MAX_ADC_CHANNELS];
/* read all channels available */
ssize_t count = px4_read(fd, data, sizeof(data));
-1
View File
@@ -47,7 +47,6 @@
#include <fcntl.h>
#include <errno.h>
#include <px4_adc.h>
#include "tests_main.h"
+3 -3
View File
@@ -48,7 +48,6 @@
#include "tests_main.h"
#include <px4_adc.h>
#include <drivers/drv_adc.h>
#include <systemlib/err.h>
@@ -95,8 +94,9 @@ int test_jig_voltages(int argc, char *argv[])
return 1;
}
/* make space for a maximum of eight channels */
struct adc_msg_s data[8];
/* make space for the maximum channels */
px4_adc_msg_t data[PX4_MAX_ADC_CHANNELS];
/* read all channels available */
ssize_t count = read(fd, data, sizeof(data));