mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 09:58:23 +08:00
[pfc] Add ground checklists (#3276)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<!-- Paparazzi airframe DTD -->
|
<!-- Paparazzi airframe DTD -->
|
||||||
|
|
||||||
<!ELEMENT airframe (include|servos|commands|rc_commands|auto_rc_commands|ap_only_commands|command_laws|section|modules|firmware|autopilot|heli_curves|description)*>
|
<!ELEMENT airframe (include|servos|commands|rc_commands|auto_rc_commands|ap_only_commands|command_laws|section|modules|firmware|autopilot|heli_curves|description|checklist)*>
|
||||||
<!ELEMENT include EMPTY>
|
<!ELEMENT include EMPTY>
|
||||||
<!ELEMENT servos (servo)*>
|
<!ELEMENT servos (servo)*>
|
||||||
<!ELEMENT commands (axis)*>
|
<!ELEMENT commands (axis)*>
|
||||||
@@ -28,6 +28,8 @@
|
|||||||
<!ELEMENT autopilot EMPTY>
|
<!ELEMENT autopilot EMPTY>
|
||||||
<!ELEMENT comment (#PCDATA)>
|
<!ELEMENT comment (#PCDATA)>
|
||||||
<!ELEMENT description (#PCDATA)>
|
<!ELEMENT description (#PCDATA)>
|
||||||
|
<!ELEMENT item EMPTY>
|
||||||
|
<!ELEMENT checklist (item)*>
|
||||||
|
|
||||||
<!ATTLIST include
|
<!ATTLIST include
|
||||||
href CDATA #REQUIRED>
|
href CDATA #REQUIRED>
|
||||||
@@ -125,3 +127,7 @@ target CDATA #IMPLIED>
|
|||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
type CDATA #IMPLIED
|
type CDATA #IMPLIED
|
||||||
dir CDATA #IMPLIED>
|
dir CDATA #IMPLIED>
|
||||||
|
|
||||||
|
<!ATTLIST item
|
||||||
|
name CDATA #REQUIRED
|
||||||
|
type CDATA #IMPLIED>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!-- This is a Rotating Wing 25kg
|
<!-- This is a Rotating Wing 25kg
|
||||||
* Airframe: TUD00???
|
* Airframe: TUD00455
|
||||||
* Autopilot: Cube Orange Plus
|
* Autopilot: Pixhawk 6X
|
||||||
* Datalink: Herelink
|
* Datalink: Herelink
|
||||||
* GPS: UBlox F9P (2x)
|
* GPS: UBlox F9P (2x)
|
||||||
* RC: SBUS Crossfire (diversity)
|
* RC: SBUS Crossfire (diversity)
|
||||||
@@ -498,4 +498,19 @@
|
|||||||
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
||||||
<define name="JS_AXIS_MODE" value="4"/>
|
<define name="JS_AXIS_MODE" value="4"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<checklist>
|
||||||
|
<item name="pic" type="text">Enter the PIC</item>
|
||||||
|
<item name="pac" type="text">Enter the PAC</item>
|
||||||
|
<item name="gcs" type="text">Enter the GCS op</item>
|
||||||
|
<item name="goal" type="text">Goal of the flight</item>
|
||||||
|
<item name="basic law">Location, airspace and weather</item>
|
||||||
|
<item name="RC Battery">Check the RC battery</item>
|
||||||
|
<item name="attitude">Check attitude and heading</item>
|
||||||
|
<item name="takeoff location">Put UAV on take-off location</item>
|
||||||
|
<item name="flight plan">Check flight plan</item>
|
||||||
|
<item name="flight block">Switch to correct flight block</item>
|
||||||
|
<item name="camera">Switch on camera</item>
|
||||||
|
<item name="announce">Announce flight to other airspace users</item>
|
||||||
|
</checklist>
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -548,4 +548,21 @@
|
|||||||
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
||||||
<define name="JS_AXIS_MODE" value="4"/>
|
<define name="JS_AXIS_MODE" value="4"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<checklist>
|
||||||
|
<item name="pic" type="text">Enter the PIC</item>
|
||||||
|
<item name="pac" type="text">Enter the PAC</item>
|
||||||
|
<item name="gcs" type="text">Enter the GCS op</item>
|
||||||
|
<item name="goal" type="text">Goal of the flight</item>
|
||||||
|
<item name="basic law">Location, airspace and weather</item>
|
||||||
|
<item name="RC Battery">Check the RC battery</item>
|
||||||
|
<item name="tail connection">Check tail connection</item>
|
||||||
|
<item name="wing tape">Check wings taped and secured</item>
|
||||||
|
<item name="attitude">Check attitude and heading</item>
|
||||||
|
<item name="takeoff location">Put UAV on take-off location</item>
|
||||||
|
<item name="flight plan">Check flight plan</item>
|
||||||
|
<item name="flight block">Switch to correct flight block</item>
|
||||||
|
<item name="camera">Switch on camera</item>
|
||||||
|
<item name="announce">Announce flight to other airspace users</item>
|
||||||
|
</checklist>
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -535,4 +535,21 @@
|
|||||||
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
||||||
<define name="JS_AXIS_MODE" value="4"/>
|
<define name="JS_AXIS_MODE" value="4"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<checklist>
|
||||||
|
<item name="pic" type="text">Enter the PIC</item>
|
||||||
|
<item name="pac" type="text">Enter the PAC</item>
|
||||||
|
<item name="gcs" type="text">Enter the GCS op</item>
|
||||||
|
<item name="goal" type="text">Goal of the flight</item>
|
||||||
|
<item name="basic law">Location, airspace and weather</item>
|
||||||
|
<item name="RC Battery">Check the RC battery</item>
|
||||||
|
<item name="tail connection">Check tail connection</item>
|
||||||
|
<item name="wing tape">Check wings taped and secured</item>
|
||||||
|
<item name="attitude">Check attitude and heading</item>
|
||||||
|
<item name="takeoff location">Put UAV on take-off location</item>
|
||||||
|
<item name="flight plan">Check flight plan</item>
|
||||||
|
<item name="flight block">Switch to correct flight block</item>
|
||||||
|
<item name="camera">Switch on camera</item>
|
||||||
|
<item name="announce">Announce flight to other airspace users</item>
|
||||||
|
</checklist>
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!-- This is a 7kg rotating wing drone
|
<!-- This is a 7kg rotating wing drone
|
||||||
* Airframe: TUD00359
|
* Airframe: TUD00360
|
||||||
* Autopilot: Cube orange+
|
* Autopilot: Cube orange+
|
||||||
* Datalink: Herelink
|
* Datalink: Herelink
|
||||||
* GPS: UBlox F9P
|
* GPS: UBlox F9P
|
||||||
@@ -535,4 +535,21 @@
|
|||||||
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
||||||
<define name="JS_AXIS_MODE" value="4"/>
|
<define name="JS_AXIS_MODE" value="4"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<checklist>
|
||||||
|
<item name="pic" type="text">Enter the PIC</item>
|
||||||
|
<item name="pac" type="text">Enter the PAC</item>
|
||||||
|
<item name="gcs" type="text">Enter the GCS op</item>
|
||||||
|
<item name="goal" type="text">Goal of the flight</item>
|
||||||
|
<item name="basic law">Location, airspace and weather</item>
|
||||||
|
<item name="RC Battery">Check the RC battery</item>
|
||||||
|
<item name="tail connection">Check tail connection</item>
|
||||||
|
<item name="wing tape">Check wings taped and secured</item>
|
||||||
|
<item name="attitude">Check attitude and heading</item>
|
||||||
|
<item name="takeoff location">Put UAV on take-off location</item>
|
||||||
|
<item name="flight plan">Check flight plan</item>
|
||||||
|
<item name="flight block">Switch to correct flight block</item>
|
||||||
|
<item name="camera">Switch on camera</item>
|
||||||
|
<item name="announce">Announce flight to other airspace users</item>
|
||||||
|
</checklist>
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!-- This is a 7kg rotating wing drone
|
<!-- This is a 7kg rotating wing drone
|
||||||
* Airframe: TUD00360
|
* Airframe: TUD00361
|
||||||
* Autopilot: Cube orange+
|
* Autopilot: Cube orange+
|
||||||
* Datalink: Herelink
|
* Datalink: Herelink
|
||||||
* GPS: UBlox F9P
|
* GPS: UBlox F9P
|
||||||
@@ -535,4 +535,21 @@
|
|||||||
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
||||||
<define name="JS_AXIS_MODE" value="4"/>
|
<define name="JS_AXIS_MODE" value="4"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<checklist>
|
||||||
|
<item name="pic" type="text">Enter the PIC</item>
|
||||||
|
<item name="pac" type="text">Enter the PAC</item>
|
||||||
|
<item name="gcs" type="text">Enter the GCS op</item>
|
||||||
|
<item name="goal" type="text">Goal of the flight</item>
|
||||||
|
<item name="basic law">Location, airspace and weather</item>
|
||||||
|
<item name="RC Battery">Check the RC battery</item>
|
||||||
|
<item name="tail connection">Check tail connection</item>
|
||||||
|
<item name="wing tape">Check wings taped and secured</item>
|
||||||
|
<item name="attitude">Check attitude and heading</item>
|
||||||
|
<item name="takeoff location">Put UAV on take-off location</item>
|
||||||
|
<item name="flight plan">Check flight plan</item>
|
||||||
|
<item name="flight block">Switch to correct flight block</item>
|
||||||
|
<item name="camera">Switch on camera</item>
|
||||||
|
<item name="announce">Announce flight to other airspace users</item>
|
||||||
|
</checklist>
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!-- This is a 7kg rotating wing drone
|
<!-- This is a 7kg rotating wing drone
|
||||||
* Airframe: TUD00361
|
* Airframe: TUD00362
|
||||||
* Autopilot: Cube orange+
|
* Autopilot: Cube orange+
|
||||||
* Datalink: Herelink
|
* Datalink: Herelink
|
||||||
* GPS: UBlox F9P
|
* GPS: UBlox F9P
|
||||||
@@ -542,4 +542,21 @@
|
|||||||
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
||||||
<define name="JS_AXIS_MODE" value="4"/>
|
<define name="JS_AXIS_MODE" value="4"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<checklist>
|
||||||
|
<item name="pic" type="text">Enter the PIC</item>
|
||||||
|
<item name="pac" type="text">Enter the PAC</item>
|
||||||
|
<item name="gcs" type="text">Enter the GCS op</item>
|
||||||
|
<item name="goal" type="text">Goal of the flight</item>
|
||||||
|
<item name="basic law">Location, airspace and weather</item>
|
||||||
|
<item name="RC Battery">Check the RC battery</item>
|
||||||
|
<item name="tail connection">Check tail connection</item>
|
||||||
|
<item name="wing tape">Check wings taped and secured</item>
|
||||||
|
<item name="attitude">Check attitude and heading</item>
|
||||||
|
<item name="takeoff location">Put UAV on take-off location</item>
|
||||||
|
<item name="flight plan">Check flight plan</item>
|
||||||
|
<item name="flight block">Switch to correct flight block</item>
|
||||||
|
<item name="camera">Switch on camera</item>
|
||||||
|
<item name="announce">Announce flight to other airspace users</item>
|
||||||
|
</checklist>
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!-- This is a 7kg rotating wing drone
|
<!-- This is a 7kg rotating wing drone
|
||||||
* Airframe: TUD00359
|
* Airframe: TUD00363
|
||||||
* Autopilot: Cube orange+
|
* Autopilot: Cube orange+
|
||||||
* Datalink: Herelink
|
* Datalink: Herelink
|
||||||
* GPS: UBlox F9P
|
* GPS: UBlox F9P
|
||||||
@@ -542,4 +542,21 @@
|
|||||||
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
<define name="NO_MOTOR_MIXING" value="TRUE"/>
|
||||||
<define name="JS_AXIS_MODE" value="4"/>
|
<define name="JS_AXIS_MODE" value="4"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<checklist>
|
||||||
|
<item name="pic" type="text">Enter the PIC</item>
|
||||||
|
<item name="pac" type="text">Enter the PAC</item>
|
||||||
|
<item name="gcs" type="text">Enter the GCS op</item>
|
||||||
|
<item name="goal" type="text">Goal of the flight</item>
|
||||||
|
<item name="basic law">Location, airspace and weather</item>
|
||||||
|
<item name="RC Battery">Check the RC battery</item>
|
||||||
|
<item name="tail connection">Check tail connection</item>
|
||||||
|
<item name="wing tape">Check wings taped and secured</item>
|
||||||
|
<item name="attitude">Check attitude and heading</item>
|
||||||
|
<item name="takeoff location">Put UAV on take-off location</item>
|
||||||
|
<item name="flight plan">Check flight plan</item>
|
||||||
|
<item name="flight block">Switch to correct flight block</item>
|
||||||
|
<item name="camera">Switch on camera</item>
|
||||||
|
<item name="announce">Announce flight to other airspace users</item>
|
||||||
|
</checklist>
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -9,12 +9,15 @@
|
|||||||
<define name="MAX_MSGBUF" value="512" description="Maximum combined message size for storing the errors"/>
|
<define name="MAX_MSGBUF" value="512" description="Maximum combined message size for storing the errors"/>
|
||||||
<define name="SEPERATOR" value=";" description="Seperating character for storing the errors"/>
|
<define name="SEPERATOR" value=";" description="Seperating character for storing the errors"/>
|
||||||
<define name="INFO_TIMEOUT" value="5" description="Only send messages down every xx amount of seconds"/>
|
<define name="INFO_TIMEOUT" value="5" description="Only send messages down every xx amount of seconds"/>
|
||||||
|
<define name="GROUND" value="TRUE" description="Enable groundstation checklist"/>
|
||||||
|
<define name="BYPASS" value="FALSE" description="Bypass all checks for arming"/>
|
||||||
</section>
|
</section>
|
||||||
</doc>
|
</doc>
|
||||||
<settings>
|
<settings>
|
||||||
<dl_settings>
|
<dl_settings>
|
||||||
<dl_settings name="Checks">
|
<dl_settings name="Checks">
|
||||||
<dl_setting var="preflight_bypass" min="0" max="1" step="1" values="FALSE|TRUE"/>
|
<dl_setting var="preflight_bypass" shortname="bypass" min="0" max="1" step="1" values="FALSE|TRUE"/>
|
||||||
|
<dl_setting var="preflight_ground_done" shortname="ground_done" min="0" max="1" step="1" values="FALSE|TRUE"/>
|
||||||
</dl_settings>
|
</dl_settings>
|
||||||
</dl_settings>
|
</dl_settings>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
@@ -269,16 +269,16 @@ static void pfc_actuators_cb(struct preflight_result_t *result)
|
|||||||
{
|
{
|
||||||
switch(pfc_actuators.state) {
|
switch(pfc_actuators.state) {
|
||||||
case PFC_ACTUATORS_STATE_INIT:
|
case PFC_ACTUATORS_STATE_INIT:
|
||||||
preflight_error(result, "Actuators not checked perform checks first[%d]", pfc_actuators.act_nb);
|
preflight_error(result, "Actuators not checked [act: %d]", pfc_actuators.act_nb);
|
||||||
break;
|
break;
|
||||||
case PFC_ACTUATORS_STATE_RUNNING:
|
case PFC_ACTUATORS_STATE_RUNNING:
|
||||||
preflight_error(result, "Actuators are currently being checked[%d/%d]",pfc_actuators.act_idx, pfc_actuators.act_nb);
|
preflight_error(result, "Actuators are currently being checked [act: %d/%d]",pfc_actuators.act_idx, pfc_actuators.act_nb);
|
||||||
break;
|
break;
|
||||||
case PFC_ACTUATORS_STATE_SUCCESS:
|
case PFC_ACTUATORS_STATE_SUCCESS:
|
||||||
preflight_success(result, "Actuators checked and moved succesfully[%d]", pfc_actuators.act_nb);
|
preflight_success(result, "Actuators checked and succesfull [act: %d]", pfc_actuators.act_nb);
|
||||||
break;
|
break;
|
||||||
case PFC_ACTUATORS_STATE_ERROR:
|
case PFC_ACTUATORS_STATE_ERROR:
|
||||||
preflight_error(result, "Actuators not responding correctly[%d/%d]",pfc_actuators.act_idx, pfc_actuators.act_nb);
|
preflight_error(result, "Actuators not responding correctly [act: %d/%d]",pfc_actuators.act_idx, pfc_actuators.act_nb);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,11 +43,18 @@
|
|||||||
#define PREFLIGHT_CHECK_INFO_TIMEOUT 5
|
#define PREFLIGHT_CHECK_INFO_TIMEOUT 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** Enable ground based checklist */
|
||||||
|
#ifndef PREFLIGHT_CHECK_GROUND
|
||||||
|
#define PREFLIGHT_CHECK_GROUND TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** Bypass the preflight checks */
|
||||||
#ifndef PREFLIGHT_CHECK_BYPASS
|
#ifndef PREFLIGHT_CHECK_BYPASS
|
||||||
#define PREFLIGHT_CHECK_BYPASS FALSE
|
#define PREFLIGHT_CHECK_BYPASS FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool preflight_bypass = PREFLIGHT_CHECK_BYPASS;
|
bool preflight_bypass = PREFLIGHT_CHECK_BYPASS;
|
||||||
|
bool preflight_ground_done = false;
|
||||||
|
|
||||||
static struct preflight_check_t *preflight_head = NULL;
|
static struct preflight_check_t *preflight_head = NULL;
|
||||||
|
|
||||||
@@ -92,6 +99,15 @@ bool preflight_check(void)
|
|||||||
check = check->next;
|
check = check->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add the ground check
|
||||||
|
#if PREFLIGHT_CHECK_GROUND
|
||||||
|
if (!preflight_ground_done) {
|
||||||
|
preflight_error(&result, "Ground checks not done");
|
||||||
|
} else {
|
||||||
|
preflight_success(&result, "Ground checks done");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// We failed a check or have a warning
|
// We failed a check or have a warning
|
||||||
if (result.fail_cnt > 0 || result.warning_cnt > 0) {
|
if (result.fail_cnt > 0 || result.warning_cnt > 0) {
|
||||||
// Only send every xx amount of seconds
|
// Only send every xx amount of seconds
|
||||||
@@ -183,7 +199,7 @@ void preflight_error(struct preflight_result_t *result, const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Register a preflight error used inside the preflight checking functions
|
* @brief Register a preflight warning used inside the preflight checking functions
|
||||||
*
|
*
|
||||||
* @param result Where the error gets registered
|
* @param result Where the error gets registered
|
||||||
* @param fmt A formatted string describing the error used in a vsnprintf
|
* @param fmt A formatted string describing the error used in a vsnprintf
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ struct preflight_check_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern bool preflight_bypass;
|
extern bool preflight_bypass;
|
||||||
|
extern bool preflight_ground_done;
|
||||||
extern void preflight_check_register(struct preflight_check_t *check, preflight_check_f func);
|
extern void preflight_check_register(struct preflight_check_t *check, preflight_check_f func);
|
||||||
extern bool preflight_check(void);
|
extern bool preflight_check(void);
|
||||||
extern void preflight_error(struct preflight_result_t *result, const char *fmt, ...);
|
extern void preflight_error(struct preflight_result_t *result, const char *fmt, ...);
|
||||||
|
|||||||
Reference in New Issue
Block a user