mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 18:07:25 +08:00
Merge remote-tracking branch 'refs/remotes/origin/gtk_to_pyqt' into gtk_to_pyqt
This commit is contained in:
@@ -7,6 +7,13 @@
|
|||||||
The vehicles are are running the INDI control and the desired acceleration are given by script from ground.
|
The vehicles are are running the INDI control and the desired acceleration are given by script from ground.
|
||||||
</description>
|
</description>
|
||||||
</doc>
|
</doc>
|
||||||
|
<settings>
|
||||||
|
<dl_settings>
|
||||||
|
<dl_settings name="fcROTOR">
|
||||||
|
<dl_setting shortname="fc_rotor_running" var="fc_rotor_started" min="0" step="1" max="1" values="STOPPED|RUNNING"/>
|
||||||
|
</dl_settings>
|
||||||
|
</dl_settings>
|
||||||
|
</settings>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<file name="fc_rotor.h"/>
|
<file name="fc_rotor.h"/>
|
||||||
|
|||||||
@@ -25,8 +25,15 @@
|
|||||||
#include "modules/multi/fc_rotor/fc_rotor.h"
|
#include "modules/multi/fc_rotor/fc_rotor.h"
|
||||||
#include "firmwares/rotorcraft/navigation.h"
|
#include "firmwares/rotorcraft/navigation.h"
|
||||||
|
|
||||||
|
bool fc_rotor_started = false;
|
||||||
|
|
||||||
|
#ifndef FCROTOR_STARTED
|
||||||
|
#define FCROTOR_STARTED true
|
||||||
|
#endif
|
||||||
|
|
||||||
void fc_rotor_init(void)
|
void fc_rotor_init(void)
|
||||||
{
|
{
|
||||||
|
fc_rotor_started = FCROTOR_STARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void fc_read_msg(uint8_t *buf)
|
void fc_read_msg(uint8_t *buf)
|
||||||
@@ -34,7 +41,7 @@ void fc_read_msg(uint8_t *buf)
|
|||||||
struct FloatVect3 u;
|
struct FloatVect3 u;
|
||||||
uint8_t ac_id = DL_DESIRED_SETPOINT_ac_id(buf);
|
uint8_t ac_id = DL_DESIRED_SETPOINT_ac_id(buf);
|
||||||
|
|
||||||
if (ac_id == AC_ID) {
|
if ((ac_id == AC_ID) && (fc_rotor_started == true)) {
|
||||||
// 0: 2D control, 1: 3D control
|
// 0: 2D control, 1: 3D control
|
||||||
uint8_t flag = DL_DESIRED_SETPOINT_flag(buf);
|
uint8_t flag = DL_DESIRED_SETPOINT_flag(buf);
|
||||||
|
|
||||||
|
|||||||
@@ -32,4 +32,6 @@
|
|||||||
extern void fc_rotor_init(void);
|
extern void fc_rotor_init(void);
|
||||||
extern void fc_read_msg(uint8_t *buf);
|
extern void fc_read_msg(uint8_t *buf);
|
||||||
|
|
||||||
|
extern bool fc_rotor_started;
|
||||||
|
|
||||||
#endif // FC_ROTOR_H
|
#endif // FC_ROTOR_H
|
||||||
|
|||||||
Reference in New Issue
Block a user