1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

Added a 115200 baud telemetry option to the OP main board/UAVTalk.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1632 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2010-09-15 14:43:42 +00:00 committed by pip
parent 73787f7f15
commit 22b9b2512e
2 changed files with 10 additions and 13 deletions

View File

@ -537,21 +537,18 @@ static void updateSettings()
{
// Set port
telemetryPort = PIOS_COM_TELEM_RF;
// Retrieve settings
TelemetrySettingsGet(&settings);
// Set port speed
if (settings.Speed == TELEMETRYSETTINGS_SPEED_9600)
{
PIOS_COM_ChangeBaud(telemetryPort, 9600);
}
else if (settings.Speed == TELEMETRYSETTINGS_SPEED_57600)
{
PIOS_COM_ChangeBaud(telemetryPort, 57600);
}
else if (settings.Speed == TELEMETRYSETTINGS_SPEED_38400)
{
PIOS_COM_ChangeBaud(telemetryPort, 38400);
}
if (settings.Speed == TELEMETRYSETTINGS_SPEED_9600) PIOS_COM_ChangeBaud(telemetryPort, 9600);
else
if (settings.Speed == TELEMETRYSETTINGS_SPEED_38400) PIOS_COM_ChangeBaud(telemetryPort, 38400);
else
if (settings.Speed == TELEMETRYSETTINGS_SPEED_57600) PIOS_COM_ChangeBaud(telemetryPort, 57600);
else
if (settings.Speed == TELEMETRYSETTINGS_SPEED_115200) PIOS_COM_ChangeBaud(telemetryPort, 115200);
}
/**

View File

@ -78,7 +78,7 @@ typedef struct {
// Field information
// Field Speed information
/* Enumeration options for field Speed */
typedef enum { TELEMETRYSETTINGS_SPEED_9600=0, TELEMETRYSETTINGS_SPEED_38400=1, TELEMETRYSETTINGS_SPEED_57600=2 } TelemetrySettingsSpeedOptions;
typedef enum { TELEMETRYSETTINGS_SPEED_9600=0, TELEMETRYSETTINGS_SPEED_38400=1, TELEMETRYSETTINGS_SPEED_57600=2, TELEMETRYSETTINGS_SPEED_115200=3 } TelemetrySettingsSpeedOptions;
// Generic interface functions