mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 06:54:49 +08:00
[superbit] Trigger persistent settings store on bind.
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include "mcu_periph/spi.h"
|
#include "mcu_periph/spi.h"
|
||||||
#include "mcu_periph/sys_time.h"
|
#include "mcu_periph/sys_time.h"
|
||||||
#include "mcu_periph/gpio.h"
|
#include "mcu_periph/gpio.h"
|
||||||
|
#include "subsystems/settings.h"
|
||||||
|
|
||||||
/* Default SuperbitRF SPI DEV */
|
/* Default SuperbitRF SPI DEV */
|
||||||
#ifndef SUPERBITRF_SPI_DEV
|
#ifndef SUPERBITRF_SPI_DEV
|
||||||
@@ -739,6 +740,12 @@ static inline void superbitrf_receive_packet_cb(bool_t error, uint8_t status, ui
|
|||||||
superbitrf.num_channels = packet[11];
|
superbitrf.num_channels = packet[11];
|
||||||
superbitrf_set_protocol(packet[12]);
|
superbitrf_set_protocol(packet[12]);
|
||||||
|
|
||||||
|
// Store all the persistent settings.
|
||||||
|
// In case we have the superbit setting file loaded and persistent settings
|
||||||
|
// enabled in the airframe file this will store our binding information and
|
||||||
|
// survive a reboot.
|
||||||
|
settings_StoreSettings(1);
|
||||||
|
|
||||||
// Update the status of the receiver
|
// Update the status of the receiver
|
||||||
superbitrf.state = 0;
|
superbitrf.state = 0;
|
||||||
superbitrf.status = SUPERBITRF_INIT_TRANSFER;
|
superbitrf.status = SUPERBITRF_INIT_TRANSFER;
|
||||||
|
|||||||
Reference in New Issue
Block a user