Luca Antolini / Mbed 2 deprecated Stabilus322699_LA0002

Dependencies:   mbed QEI DmTftLibrary

Files at this revision

API Documentation at this revision

Comitter:
GregCr
Date:
Wed Apr 19 14:21:05 2017 +0000
Parent:
6:e4c4a6878542
Child:
8:c0a5f53fe196
Commit message:
Corrected handling of the Antenna switch in the ranging demo

Changed in this revision

Demo/DemoApplication.cpp Show annotated file Show diff for this revision Revisions of this file
Demo/SX1280Lib.lib Show annotated file Show diff for this revision Revisions of this file
--- a/Demo/DemoApplication.cpp	Mon Apr 03 15:33:08 2017 +0000
+++ b/Demo/DemoApplication.cpp	Wed Apr 19 14:21:05 2017 +0000
@@ -1034,7 +1034,8 @@
                         switch( Eeprom.EepromData.DemoSettings.RngAntenna )
                         {
                             case DEMO_RNG_ANT_1:
-                                ANT_SW = 1; // ANT1
+                                //ANT_SW = 1; // ANT1
+                                Eeprom.EepromData.DemoSettings.AntennaSwitch = 0;
                                 CurrentChannel++;
                                 if( CurrentChannel >= CHANNELS )
                                 {
@@ -1043,7 +1044,8 @@
                                 break;
 
                             case DEMO_RNG_ANT_2:
-                                ANT_SW = 0; // ANT2
+                                //ANT_SW = 0; // ANT2
+                                Eeprom.EepromData.DemoSettings.AntennaSwitch = 1;
                                 CurrentChannel++;
                                 if( CurrentChannel >= CHANNELS )
                                 {
@@ -1054,11 +1056,13 @@
                             case DEMO_RNG_ANT_BOTH:
                                 if( ANT_SW == 1 )
                                 {
-                                    ANT_SW = 0;
+                                    //ANT_SW = 0;
+                                    Eeprom.EepromData.DemoSettings.AntennaSwitch = 1;
                                 }
                                 else
                                 {
-                                    ANT_SW = 1;
+                                    //ANT_SW = 1;
+                                    Eeprom.EepromData.DemoSettings.AntennaSwitch = 0;
                                     CurrentChannel++;
                                     if( CurrentChannel >= CHANNELS )
                                     {
--- a/Demo/SX1280Lib.lib	Mon Apr 03 15:33:08 2017 +0000
+++ b/Demo/SX1280Lib.lib	Wed Apr 19 14:21:05 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/Semtech/code/SX1280Lib/#62b6e0f59f0f
+https://developer.mbed.org/teams/Semtech/code/SX1280Lib/#6cabb9538041