1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Sanity Check: Perform the initial check then attach the callbacks to avoid

a case where two threads do the same thing.
This commit is contained in:
James Cotton 2012-10-25 22:51:14 -05:00
parent b28cdba46d
commit 32bf63c436

View File

@ -170,14 +170,14 @@ static void systemTask(void *parameters)
// Listen for SettingPersistance object updates, connect a callback function
ObjectPersistenceConnectQueue(objectPersistenceQueue);
// Run this initially to make sure the configuration is checked
configuration_check();
// Whenever the configuration changes, make sure it is safe to fly
SystemSettingsConnectCallback(configurationUpdatedCb);
ManualControlSettingsConnectCallback(configurationUpdatedCb);
TaskInfoConnectCallback(configurationUpdatedCb);
// Run this initially to make sure the configuration is checked
configuration_check();
// Main system loop
while (1) {
// Update the system statistics