AP_Notify_test.cpp 730 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Example of AC_Notify library .
  3. * DIYDrones.com
  4. */
  5. #include <AP_HAL/AP_HAL.h>
  6. #include <AP_Notify/AP_Notify.h> // Notify library
  7. #include <AP_Notify/AP_BoardLED.h> // Board LED library
  8. void setup();
  9. void loop();
  10. const AP_HAL::HAL& hal = AP_HAL::get_HAL();
  11. // create board led object
  12. AP_BoardLED board_led;
  13. void setup()
  14. {
  15. hal.console->printf("AP_Notify library test\n");
  16. // initialise the board leds
  17. board_led.init();
  18. // turn on initialising notification
  19. AP_Notify::flags.initialising = true;
  20. AP_Notify::flags.gps_status = 1;
  21. AP_Notify::flags.armed = 1;
  22. AP_Notify::flags.pre_arm_check = 1;
  23. }
  24. void loop()
  25. {
  26. hal.scheduler->delay(1000);
  27. }
  28. AP_HAL_MAIN();