mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 03:23:34 +08:00
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:
committed by
Lorenz Meier
parent
d92377a6e6
commit
4349f49610
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user