mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 16:53:34 +08:00
PX4IO: Robustify firmware for mixer load operation
This change makes the mixer load and reset operation closer to thread-safe. It was guarded one-way before and in only one location. This change ensures that its being locked out from both directions. The accesses to the locking variables still need work because they are non-atomic.
This commit is contained in:
@@ -83,7 +83,7 @@ static const uint16_t r_page_config[] = {
|
||||
*
|
||||
* Status values.
|
||||
*/
|
||||
uint16_t r_page_status[] = {
|
||||
volatile uint16_t r_page_status[] = {
|
||||
[PX4IO_P_STATUS_FREEMEM] = 0,
|
||||
[PX4IO_P_STATUS_CPULOAD] = 0,
|
||||
[PX4IO_P_STATUS_FLAGS] = 0,
|
||||
@@ -214,7 +214,7 @@ volatile uint16_t r_page_setup[] = {
|
||||
*
|
||||
* Control values from the FMU.
|
||||
*/
|
||||
volatile uint16_t r_page_controls[PX4IO_CONTROL_GROUPS * PX4IO_CONTROL_CHANNELS];
|
||||
uint16_t r_page_controls[PX4IO_CONTROL_GROUPS * PX4IO_CONTROL_CHANNELS];
|
||||
|
||||
/*
|
||||
* PAGE 102 does not have a buffer.
|
||||
|
||||
Reference in New Issue
Block a user