AP_Parachute: add example sketch

Only tests that the lib compiles
This commit is contained in:
Randy Mackay 2014-04-01 20:58:20 +09:00
parent 8600b9d4f1
commit d4cb51d8f7
1 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,36 @@
/*
* Example of AP_Parachute library.
* DIYDrones.com
*/
#include <AP_Common.h>
#include <AP_Progmem.h>
#include <AP_Math.h> // ArduPilot Mega Vector/Matrix math Library
#include <AP_Param.h>
#include <AP_HAL.h>
#include <AP_HAL_AVR.h>
#include <RC_Channel.h>
#include <AP_Relay.h>
#include <AP_Parachute.h>
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;
// Relay
AP_Relay relay;
// Parachute
AP_Parachute parachute(relay);
void setup()
{
hal.console->println("AP_Parachute library test");
}
void loop()
{
// print message to user
hal.console->printf_P(PSTR("this example tests compilation only"));
hal.scheduler->delay(5000);
}
AP_HAL_MAIN();