![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Forked to initiate the Current Loop Gain
Dependencies: mbed QEI DmTftLibraryEx
Diff: main.cpp
- Revision:
- 15:ed7ed20b7114
- Parent:
- 14:ebd89dacc807
- Child:
- 17:a0bbfc228415
--- a/main.cpp Thu Aug 17 10:22:32 2017 +0000 +++ b/main.cpp Fri Aug 18 08:26:13 2017 +0000 @@ -19,6 +19,7 @@ #include "GpsMax7.h" #include "SX9306.h" #include "sx1280-hal.h" +#include "main.h" /*! @@ -26,6 +27,8 @@ */ DigitalOut F_CS( D6 ); // MBED description of pin DigitalOut SD_CS( D8 ); // MBED description of pin +DigitalIn userButton( USER_BUTTON ); + /*! * \brief Specify serial datarate for UART debug output @@ -51,6 +54,12 @@ printf( "Starting SX1280DevKit : %s\n\r", FIRMWARE_VERSION ); EepromInit( ); + + if( userButton == 0 ) + { + FactoryReset( ); + } + InitDemoApplication( ); MenuInit( ); TimersInit( ); @@ -112,3 +121,9 @@ } } } + +void FactoryReset( void ) +{ + EepromFactoryReset( ); + HAL_NVIC_SystemReset( ); +}