This code holds the complete demo set for the sx1280: PingPong, PER and Ranging Outdoor demo application. >>>>> This code MUST run on the mbed library release 127 or everything will be painfully slow.

Dependencies:   mbed SX1280Lib DmTftLibrary

* This code MUST run on the mbed library release 127 or everything will be painfully slow.*
Revision:
19:45d0ce0f0677
Parent:
17:a0bbfc228415
--- a/main.cpp	Fri Aug 24 08:01:53 2018 +0000
+++ b/main.cpp	Thu Nov 08 10:13:23 2018 +0000
@@ -20,6 +20,7 @@
 #include "SX9306.h"
 #include "sx1280-hal.h"
 #include "main.h"
+#include "app_config.h"
 
 
 /*!
@@ -29,6 +30,7 @@
 DigitalOut SD_CS( D8 );     // MBED description of pin
 DigitalIn userButton( USER_BUTTON );
 
+void PrintCompileSupportMessage( void );
 
 /*!
  * \brief Specify serial datarate for UART debug output
@@ -51,7 +53,8 @@
     F_CS = 1;
     SD_CS = 1;
 
-    printf( "Starting SX1280DevKit : %s\n\r", FIRMWARE_VERSION );
+    printf( "Starting SX1280DevKit %s (%s)\n\r", FIRMWARE_VERSION, FIRMWARE_DATE );
+    PrintCompileSupportMessage();
 
     EepromInit( );
 
@@ -62,12 +65,16 @@
 
     InitDemoApplication( );
     MenuInit( );
-/*   Not currently used
     
+    #if defined(HAS_GPS_SENSOR) || defined (HAS_PROXIMITY_SENSOR)
     TimersInit( );
+    #endif
+    #if defined(HAS_GPS_SENSOR)
     Max7GpsInit( );
+    #endif
+    #if defined(HAS_PROXIMITY_SENSOR)
     SX9306ProximityInit( );
-*/
+    #endif
 
     printf( "Radio version: 0x%x\n\r", Radio.GetFirmwareVersion( ) );
 
@@ -115,8 +122,12 @@
 
             case PAGE_UTILITIES:
                 // Extracts time and position information from the GPS module
+                #if defined(HAS_GPS_SENSOR)
                 Max7GpsHandle( );
+                #endif
+                #if defined(HAS_PROXIMITY_SENSOR)
                 SX9306ProximityHandle( ); //Deals with the proximity IC readings
+                #endif
                 break;
 
             default:    // Any page not running a demo
@@ -130,3 +141,19 @@
     EepromFactoryReset( );
     HAL_NVIC_SystemReset( );
 }
+
+void PrintCompileSupportMessage( void )
+{
+    printf( "\nCompile time configuration:\n" );
+    #if defined(HAS_GPS_SENSOR)
+    printf( " + gps\n" );
+    #else
+    printf( " - gps\n" );
+    #endif
+    #if defined(HAS_PROXIMITY_SENSOR)
+    printf( " + proximity\n" );
+    #else
+    printf( " - proximity\n" );
+    #endif
+    printf("( '+ <FEAT>' means <FEAT> is enabled, '- <FEAT>' means <FEAT> is disabled)\n");
+}