V04 envoi multiple, config RTC, RTC autonome(pile bouton)

Dependencies:   mbed LoRaWAN-lib SX1272Lib

Files at this revision

API Documentation at this revision

Comitter:
MGstic
Date:
Wed Dec 12 08:41:45 2018 +0000
Parent:
8:cfe39840b9fb
Child:
10:1a85ff06be1a
Commit message:
V02;

Changed in this revision

app/main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/app/main.cpp	Wed Dec 05 08:47:37 2018 +0000
+++ b/app/main.cpp	Wed Dec 12 08:41:45 2018 +0000
@@ -84,7 +84,7 @@
  * User application data buffer size
  */
 #if ( LORAWAN_CONFIRMED_MSG_ON == 1 )
-#define LORAWAN_APP_DATA_SIZE                       6
+#define LORAWAN_APP_DATA_SIZE                       12
 
 #else
 #define LORAWAN_APP_DATA_SIZE                       1
@@ -284,7 +284,7 @@
 /*!
  * \brief   Prepares the payload of the frame
  */
-static void PrepareTxFrame( uint8_t port )
+static void PrepareTxFrame( uint8_t port,uint8_t jojo )//, 2EME PARAMETRE TABLEAU DONNEE INIT=>APPDATA DANS FONCION 
 {
     switch( port )
     {
@@ -292,20 +292,21 @@
         {
             //AppData[0] = AppLedStateOn;
             AppData[0] = 0xAA;
-            AppData[8] = 0xAA;
-            AppData[10] = 23;
-            AppData[44] = 99;
-            AppData[62] = 0xCC;
-            printf("%x\n",AppData[55]);
+            AppData[1] = 'j'; 
+           
             
-            if( IsTxConfirmed == true )
+            //AppData[3] = 150000;
+            AppData[4] = 0xAA;
+
+            
+          /*  if( IsTxConfirmed == true )
             {
                 AppData[1] = LoRaMacDownlinkStatus.DownlinkCounter >> 8;
                 AppData[2] = LoRaMacDownlinkStatus.DownlinkCounter;
                 AppData[3] = LoRaMacDownlinkStatus.Rssi >> 8;
                 AppData[4] = LoRaMacDownlinkStatus.Rssi;
                 AppData[5] = LoRaMacDownlinkStatus.Snr;
-            }
+            }*/
         }
         break;
     case 224:
@@ -766,6 +767,7 @@
 /**
  * Main application entry point.
  */
+ uint8_t jiji=1;
 int main( void )
 {
     LoRaMacPrimitives_t LoRaMacPrimitives;
@@ -929,10 +931,13 @@
             {
                 if( NextTx == true )
                 {
+                    jiji++;
                     SerialDisplayUpdateUplinkAcked( false );
                     SerialDisplayUpdateDonwlinkRxData( false );
-                    PrepareTxFrame( AppPort );
-                    printf("%x\n",AppData[55]);
+                    PrepareTxFrame( AppPort,jiji );
+                    
+                   
+         
                     NextTx = SendFrame( );
                 }
                 if( ComplianceTest.Running == true )