APM:Libraries
AP_Parachute_test.cpp
Go to the documentation of this file.
1 /*
2  * Example of AP_Parachute library.
3  * DIYDrones.com
4  */
5 
6 #include <AP_Common/AP_Common.h>
7 #include <AP_Math/AP_Math.h> // ArduPilot Mega Vector/Matrix math Library
8 #include <AP_Param/AP_Param.h>
9 #include <AP_HAL/AP_HAL.h>
10 #include <RC_Channel/RC_Channel.h>
11 #include <AP_Relay/AP_Relay.h>
13 #include <AP_Notify/AP_Notify.h>
15 
16 void setup();
17 void loop();
18 
20 
21 // Relay
22 static AP_Relay relay;
23 
24 // Parachute
25 static AP_Parachute parachute{relay};
26 
27 void setup()
28 {
29  hal.console->printf("AP_Parachute library test\n");
30 }
31 
32 void loop()
33 {
34  // print message to user
35  hal.console->printf("this example tests compilation only");
36  hal.scheduler->delay(5000);
37 }
38 
39 AP_HAL_MAIN();
AP_HAL::UARTDriver * console
Definition: HAL.h:110
static AP_Relay relay
static AP_Parachute parachute
void setup()
A system for managing and storing variables that are of general interest to the system.
virtual void delay(uint16_t ms)=0
virtual void printf(const char *,...) FMT_PRINTF(2
Definition: BetterStream.cpp:5
RC_Channel manager, with EEPROM-backed storage of constants.
AP_HAL_MAIN()
Class managing the release of a parachute.
Definition: AP_Parachute.h:25
const HAL & get_HAL()
Common definitions and utility routines for the ArduPilot libraries.
Class to manage the ArduPilot relay.
Definition: AP_Relay.h:18
void loop()
Parachute release library.
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
APM relay control class.
AP_HAL::Scheduler * scheduler
Definition: HAL.h:114