APM:Libraries
AP_Notify_test.cpp
Go to the documentation of this file.
1 /*
2  * Example of AC_Notify library .
3  * DIYDrones.com
4  */
5 
6 #include <AP_HAL/AP_HAL.h>
7 #include <AP_Notify/AP_Notify.h> // Notify library
8 #include <AP_Notify/AP_BoardLED.h> // Board LED library
9 
10 void setup();
11 void loop();
12 
14 
15 // create board led object
17 
18 void setup()
19 {
20  hal.console->printf("AP_Notify library test\n");
21 
22  // initialise the board leds
23  board_led.init();
24 
25  // turn on initialising notification
30 }
31 
32 void loop()
33 {
34  hal.scheduler->delay(1000);
35 }
36 
37 AP_HAL_MAIN();
void setup()
AP_HAL::UARTDriver * console
Definition: HAL.h:110
virtual void delay(uint16_t ms)=0
virtual void printf(const char *,...) FMT_PRINTF(2
Definition: BetterStream.cpp:5
void loop()
AP_BoardLED board_led
const HAL & get_HAL()
static struct notify_flags_and_values_type flags
Definition: AP_Notify.h:117
AP_HAL_MAIN()
AP_HAL::Scheduler * scheduler
Definition: HAL.h:114
bool init(void)
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-