mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +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:
parent
b28cdba46d
commit
32bf63c436
@ -170,14 +170,14 @@ static void systemTask(void *parameters)
|
|||||||
// Listen for SettingPersistance object updates, connect a callback function
|
// Listen for SettingPersistance object updates, connect a callback function
|
||||||
ObjectPersistenceConnectQueue(objectPersistenceQueue);
|
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
|
// Whenever the configuration changes, make sure it is safe to fly
|
||||||
SystemSettingsConnectCallback(configurationUpdatedCb);
|
SystemSettingsConnectCallback(configurationUpdatedCb);
|
||||||
ManualControlSettingsConnectCallback(configurationUpdatedCb);
|
ManualControlSettingsConnectCallback(configurationUpdatedCb);
|
||||||
TaskInfoConnectCallback(configurationUpdatedCb);
|
TaskInfoConnectCallback(configurationUpdatedCb);
|
||||||
|
|
||||||
// Run this initially to make sure the configuration is checked
|
|
||||||
configuration_check();
|
|
||||||
|
|
||||||
// Main system loop
|
// Main system loop
|
||||||
while (1) {
|
while (1) {
|
||||||
// Update the system statistics
|
// Update the system statistics
|
||||||
|
Loading…
x
Reference in New Issue
Block a user