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
+1 -2
View File
@@ -43,7 +43,6 @@
#include <board_config.h>
#include <px4_adc.h>
#include <px4_config.h>
#include <px4_module.h>
#include <px4_getopt.h>
@@ -422,7 +421,7 @@ Sensors::adc_poll(struct sensor_combined_s &raw)
/* rate limit to 100 Hz */
if (t - _last_adc >= 10000) {
/* make space for a maximum of twelve channels (to ensure reading all channels at once) */
struct adc_msg_s buf_adc[12];
px4_adc_msg_t buf_adc[PX4_MAX_ADC_CHANNELS];
/* read all channels available */
int ret = _h_adc.read(&buf_adc, sizeof(buf_adc));