mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Split out the PipX radio interface from RadioComBridge module to a separate Radio module. Now the RadioComBridge module just routes messages between the com ports and handles sending/receiving the PipX UAVOs.
Conflicts: flight/Modules/RadioComBridge/RadioComBridge.c flight/PipXtreme/System/pios_board.c Conflicts: flight/Modules/RadioComBridge/RadioComBridge.c
This commit is contained in:
parent
415b86879c
commit
e602b73a6f
@ -55,8 +55,8 @@
|
||||
#define BRIDGE_BUF_LEN 512
|
||||
#define MAX_RETRIES 2
|
||||
#define RETRY_TIMEOUT_MS 20
|
||||
#define STATS_UPDATE_PERIOD_MS 500
|
||||
#define RADIOSTATS_UPDATE_PERIOD_MS 250
|
||||
#define STATS_UPDATE_PERIOD_MS 1000
|
||||
#define RADIOSTATS_UPDATE_PERIOD_MS 500
|
||||
#define MAX_LOST_CONTACT_TIME 4
|
||||
#define PACKET_QUEUE_SIZE 10
|
||||
#define MAX_PORT_DELAY 200
|
||||
@ -664,10 +664,17 @@ static void ppmInputTask(void *parameters)
|
||||
#endif /* PIOS_INCLUDE_WDG */
|
||||
|
||||
// Read the receiver.
|
||||
bool valid_input_detected = false;
|
||||
for (uint8_t i = 1; i <= PIOS_PPM_NUM_INPUTS; ++i)
|
||||
{
|
||||
ppm_packet.channels[i - 1] = PIOS_RCVR_Read(PIOS_PPM_RECEIVER, i);
|
||||
if(ppm_packet.channels[i - 1] != PIOS_RCVR_TIMEOUT)
|
||||
valid_input_detected = true;
|
||||
}
|
||||
|
||||
// Send the PPM packet
|
||||
// Send the PPM packet if it's valid
|
||||
if (valid_input_detected)
|
||||
{
|
||||
if (data->ppmOutQueue)
|
||||
{
|
||||
ppm_packet.header.destination_id = data->destination_id;
|
||||
@ -686,6 +693,7 @@ static void ppmInputTask(void *parameters)
|
||||
// Set the GCSReceiverData object.
|
||||
GCSReceiverSet(&rcvr);
|
||||
}
|
||||
}
|
||||
|
||||
// Delay until the next update period.
|
||||
vTaskDelay(PIOS_PPM_PACKET_UPDATE_PERIOD_MS / portTICK_RATE_MS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user