diff options
author | px4dev <px4@purgatory.org> | 2012-11-01 23:42:36 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-11-03 01:14:24 -0700 |
commit | ea539031da96df3d3eb9faadd24eb1cc71813e7f (patch) | |
tree | 3e05732ce6410d59475ae30c8f1753084a5a4072 /apps/systemlib/ppm_decode.h | |
parent | 82c4dbaaa88c2cfc591e402817e6268de708de3b (diff) | |
download | px4-firmware-ea539031da96df3d3eb9faadd24eb1cc71813e7f.tar.gz px4-firmware-ea539031da96df3d3eb9faadd24eb1cc71813e7f.tar.bz2 px4-firmware-ea539031da96df3d3eb9faadd24eb1cc71813e7f.zip |
Cleanup and refactor of the PX4IO firmware and board support. Builds, not tested yet.
Diffstat (limited to 'apps/systemlib/ppm_decode.h')
-rw-r--r-- | apps/systemlib/ppm_decode.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/systemlib/ppm_decode.h b/apps/systemlib/ppm_decode.h index c2b24321a..6c5e15345 100644 --- a/apps/systemlib/ppm_decode.h +++ b/apps/systemlib/ppm_decode.h @@ -46,12 +46,17 @@ */ #define PPM_MAX_CHANNELS 12 +/* PPM input nominal min/max values */ +#define PPM_MIN 1000 +#define PPM_MAX 2000 +#define PPM_MID ((PPM_MIN + PPM_MAX) / 2) + __BEGIN_DECLS /* * PPM decoder state */ -__EXPORT extern uint16_t ppm_buffer[]; /**< decoded PPM channel values */ +__EXPORT extern uint16_t ppm_buffer[PPM_MAX_CHANNELS]; /**< decoded PPM channel values */ __EXPORT extern unsigned ppm_decoded_channels; /**< count of decoded channels */ __EXPORT extern hrt_abstime ppm_last_valid_decode; /**< timestamp of the last valid decode */ |