1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00

Radio: Make sure pios_packet_handler is set to 0 when radio module is not initialized.

This commit is contained in:
Brian Webb 2012-09-12 19:19:38 -07:00
parent 8ca2e85f4c
commit 057227726b

View File

@ -166,8 +166,10 @@ static int32_t RadioInitialize(void)
HwSettingsInitialize();
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
HwSettingsOptionalModulesGet(optionalModules);
if (optionalModules[HWSETTINGS_OPTIONALMODULES_RADIO] != HWSETTINGS_OPTIONALMODULES_ENABLED)
if (optionalModules[HWSETTINGS_OPTIONALMODULES_RADIO] != HWSETTINGS_OPTIONALMODULES_ENABLED) {
pios_packet_handler = 0;
return -1;
}
#endif
// Initalize out UAVOs