1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Fix simulation implementation of pios_rcvr to match channel mappings in real

firmware
This commit is contained in:
James Cotton 2012-06-04 10:30:44 -05:00
parent b11b606ddc
commit 70a6bf539b

View File

@ -80,6 +80,15 @@ out_fail:
int32_t PIOS_RCVR_Read(uint32_t rcvr_id, uint8_t channel)
{
// Publicly facing API uses channel 1 for first channel
if(channel == 0)
return PIOS_RCVR_INVALID;
else
channel--;
if (rcvr_id == 0)
return PIOS_RCVR_NODRIVER;
struct pios_rcvr_dev * rcvr_dev = &pios_rcvr_devs[rcvr_id];
if (!PIOS_RCVR_validate(rcvr_dev)) {