1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-01 18:29:16 +01:00

changed receiver constants to be all negative in order to allow valid channel values of 0 for dsm

This commit is contained in:
lilvinz 2012-09-21 23:51:21 +02:00
parent c3b9e7a992
commit 9b6b5bc729
3 changed files with 7 additions and 7 deletions

View File

@ -145,8 +145,8 @@ extern int32_t PIOS_PPM_Init(uint32_t * ppm_id, const struct pios_ppm_cfg * cfg)
for (uint8_t i = 0; i < PIOS_PPM_IN_MAX_NUM_CHANNELS; i++) {
/* Flush counter variables */
ppm_dev->CaptureValue[i] = 0;
ppm_dev->CaptureValueNewFrame[i] = 0;
ppm_dev->CaptureValue[i] = PIOS_RCVR_TIMEOUT;
ppm_dev->CaptureValueNewFrame[i] = PIOS_RCVR_TIMEOUT;
}

View File

@ -145,8 +145,8 @@ extern int32_t PIOS_PPM_Init(uint32_t * ppm_id, const struct pios_ppm_cfg * cfg)
for (uint8_t i = 0; i < PIOS_PPM_IN_MAX_NUM_CHANNELS; i++) {
/* Flush counter variables */
ppm_dev->CaptureValue[i] = 0;
ppm_dev->CaptureValueNewFrame[i] = 0;
ppm_dev->CaptureValue[i] = PIOS_RCVR_TIMEOUT;
ppm_dev->CaptureValueNewFrame[i] = PIOS_RCVR_TIMEOUT;
}

View File

@ -42,11 +42,11 @@ extern int32_t PIOS_RCVR_Read(uint32_t rcvr_id, uint8_t channel);
/*! Define error codes for PIOS_RCVR_Get */
enum PIOS_RCVR_errors {
/*! Indicates that a failsafe condition or missing receiver detected for that channel */
PIOS_RCVR_TIMEOUT = 0,
PIOS_RCVR_TIMEOUT = -1,
/*! Channel is invalid for this driver (usually out of range supported) */
PIOS_RCVR_INVALID = -1,
PIOS_RCVR_INVALID = -2,
/*! Indicates that the driver for this channel has not been initialized */
PIOS_RCVR_NODRIVER = -2
PIOS_RCVR_NODRIVER = -3
};
#endif /* PIOS_RCVR_H */