mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-345 Changes from review - Typos - Initialize previousOPLinkSettings
This commit is contained in:
parent
1e920ec67c
commit
340d304558
@ -16,7 +16,8 @@
|
||||
* @{
|
||||
*
|
||||
* @file oplinkmod.c
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||
* @brief System module
|
||||
*
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
@ -71,7 +72,7 @@ static OPLinkSettingsData previousOPLinkSettings;
|
||||
|
||||
// Private functions
|
||||
static void systemTask(void *parameters);
|
||||
static void checkOPLinkSettingsUpdatedCb(UAVObjEvent *ev);
|
||||
static void oplinkSettingsUpdatedCb(UAVObjEvent *ev);
|
||||
|
||||
/**
|
||||
* Create the module task.
|
||||
@ -135,7 +136,10 @@ static void systemTask(__attribute__((unused)) void *parameters)
|
||||
PIOS_SYS_Reset();
|
||||
}
|
||||
|
||||
OPLinkSettingsConnectCallback(checkOPLinkSettingsUpdatedCb);
|
||||
// Initialize previousOPLinkSettings used by callback
|
||||
OPLinkSettingsGet(&previousOPLinkSettings);
|
||||
|
||||
OPLinkSettingsConnectCallback(oplinkSettingsUpdatedCb);
|
||||
|
||||
// Initialize vars
|
||||
lastSysTime = xTaskGetTickCount();
|
||||
@ -249,7 +253,7 @@ void vApplicationMallocFailedHook(void)
|
||||
/**
|
||||
* Called whenever OPLink settings changed
|
||||
*/
|
||||
static void checkOPLinkSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
||||
static void oplinkSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
||||
{
|
||||
OPLinkSettingsData currentOPLinkSettings;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @{
|
||||
*
|
||||
* @file systemmod.c
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010-2015.
|
||||
* @brief System module
|
||||
*
|
||||
@ -131,7 +131,7 @@ static uint8_t i2c_error_activity[PIOS_I2C_ERROR_COUNT_NUMELEM];
|
||||
|
||||
#ifdef PIOS_INCLUDE_RFM22B
|
||||
static OPLinkSettingsData previousOPLinkSettings;
|
||||
static void checkOPLinkSettingsUpdatedCb(UAVObjEvent *ev);
|
||||
static void oplinkSettingsUpdatedCb(UAVObjEvent *ev);
|
||||
#endif
|
||||
|
||||
extern uintptr_t pios_uavo_settings_fs_id;
|
||||
@ -237,7 +237,10 @@ static void systemTask(__attribute__((unused)) void *parameters)
|
||||
SystemSettingsConnectCallback(checkSettingsUpdatedCb);
|
||||
|
||||
#ifdef PIOS_INCLUDE_RFM22B
|
||||
OPLinkSettingsConnectCallback(checkOPLinkSettingsUpdatedCb);
|
||||
// Initialize previousOPLinkSettings used by callback
|
||||
OPLinkSettingsGet(&previousOPLinkSettings);
|
||||
|
||||
OPLinkSettingsConnectCallback(oplinkSettingsUpdatedCb);
|
||||
#endif
|
||||
|
||||
#ifdef DIAG_TASKS
|
||||
@ -467,7 +470,7 @@ static void checkSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
||||
/**
|
||||
* Called whenever OPLink settings changed
|
||||
*/
|
||||
static void checkOPLinkSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
||||
static void oplinkSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
||||
{
|
||||
OPLinkSettingsData currentOPLinkSettings;
|
||||
|
||||
|
@ -761,10 +761,10 @@ void PIOS_Board_Init(void)
|
||||
} /* hwsettings_rm_flexiport */
|
||||
|
||||
|
||||
/* Initalize the RFM22B radio COM device. */
|
||||
/* Initialize the RFM22B radio COM device. */
|
||||
#if defined(PIOS_INCLUDE_RFM22B)
|
||||
|
||||
/* Fetch the OPinkSettings object. */
|
||||
/* Fetch the OPLinkSettings object. */
|
||||
OPLinkSettingsData oplinkSettings;
|
||||
OPLinkSettingsGet(&oplinkSettings);
|
||||
|
||||
|
@ -396,7 +396,7 @@ void PIOS_Board_Init(void)
|
||||
PIOS_SYS_SerialNumberGetBinary(oplinkStatus.CPUSerial);
|
||||
oplinkStatus.BoardRevision = bdinfo->board_rev;
|
||||
|
||||
/* Initalize the RFM22B radio COM device. */
|
||||
/* Initialize the RFM22B radio COM device. */
|
||||
if (is_enabled) {
|
||||
if (openlrs) {
|
||||
#if defined(PIOS_INCLUDE_OPENLRS)
|
||||
|
@ -867,10 +867,10 @@ void PIOS_Board_Init(void)
|
||||
GPIO_WriteBit(pios_sbus_cfg.inv.gpio, pios_sbus_cfg.inv.init.GPIO_Pin, pios_sbus_cfg.gpio_inv_disable);
|
||||
}
|
||||
|
||||
/* Initalize the RFM22B radio COM device. */
|
||||
/* Initialize the RFM22B radio COM device. */
|
||||
#if defined(PIOS_INCLUDE_RFM22B)
|
||||
|
||||
/* Fetch the OPinkSettings object. */
|
||||
/* Fetch the OPLinkSettings object. */
|
||||
OPLinkSettingsData oplinkSettings;
|
||||
OPLinkSettingsGet(&oplinkSettings);
|
||||
|
||||
|
@ -807,10 +807,10 @@ void PIOS_Board_Init(void)
|
||||
} /* hwsettings_spk2_mainport */
|
||||
|
||||
|
||||
/* Initalize the RFM22B radio COM device. */
|
||||
/* Initialize the RFM22B radio COM device. */
|
||||
#if defined(PIOS_INCLUDE_RFM22B)
|
||||
|
||||
/* Fetch the OPinkSettings object. */
|
||||
/* Fetch the OPLinkSettings object. */
|
||||
OPLinkSettingsData oplinkSettings;
|
||||
OPLinkSettingsGet(&oplinkSettings);
|
||||
|
||||
|
@ -46,15 +46,15 @@ protected:
|
||||
virtual void refreshWidgetsValuesImpl(UAVObject *obj);
|
||||
|
||||
private:
|
||||
// Frequency display settings
|
||||
float frequency_base;
|
||||
float frequency_step;
|
||||
|
||||
Ui_OPLinkWidget *m_oplink;
|
||||
|
||||
OPLinkStatus *oplinkStatusObj;
|
||||
OPLinkSettings *oplinkSettingsObj;
|
||||
|
||||
// Frequency display settings
|
||||
float frequency_base;
|
||||
float frequency_step;
|
||||
|
||||
// Is the status current?
|
||||
bool statusUpdated;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user