diff --git a/conf/settings/persistent_settings.xml b/conf/settings/persistent_settings.xml
new file mode 100644
index 0000000000..4f1f4ef541
--- /dev/null
+++ b/conf/settings/persistent_settings.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/conf/settings/superbitrf.xml b/conf/settings/superbitrf.xml
index 1430076ecd..5358c1ecb3 100644
--- a/conf/settings/superbitrf.xml
+++ b/conf/settings/superbitrf.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/sw/airborne/firmwares/fixedwing/autopilot.h b/sw/airborne/firmwares/fixedwing/autopilot.h
index 42de3013ba..4d969224ba 100644
--- a/sw/airborne/firmwares/fixedwing/autopilot.h
+++ b/sw/airborne/firmwares/fixedwing/autopilot.h
@@ -145,4 +145,14 @@ extern bool_t power_switch;
#define NAVIGATION_FREQUENCY 4
#endif
+#include "subsystems/settings.h"
+
+static inline void autopilot_StoreSettings(float store)
+{
+ if (kill_throttle && store) {
+ settings_store_flag = store;
+ settings_store();
+ }
+}
+
#endif /* AUTOPILOT_H */
diff --git a/sw/airborne/firmwares/rotorcraft/autopilot.h b/sw/airborne/firmwares/rotorcraft/autopilot.h
index 68d0a4a8b1..5320f3db0a 100644
--- a/sw/airborne/firmwares/rotorcraft/autopilot.h
+++ b/sw/airborne/firmwares/rotorcraft/autopilot.h
@@ -30,11 +30,8 @@
#define AUTOPILOT_H
#include "std.h"
-
-#include "led.h"
-
#include "generated/airframe.h"
-#include "subsystems/ins.h"
+#include "state.h"
#define AP_MODE_KILL 0
#define AP_MODE_FAILSAFE 1
@@ -160,4 +157,14 @@ static inline void DetectGroundEvent(void) {
}
}
+#include "subsystems/settings.h"
+
+static inline void autopilot_StoreSettings(float store)
+{
+ if (kill_throttle && store) {
+ settings_store_flag = store;
+ settings_store();
+ }
+}
+
#endif /* AUTOPILOT_H */