Trond Enger / d7a_1x

Fork of d7a_1x by WizziLab

Revision:
60:8d4133fbc060
Parent:
59:b42eae56b51b
Child:
61:87be16080640
--- a/src/d7a_alp.cpp	Fri Sep 23 15:00:41 2016 +0000
+++ b/src/d7a_alp.cpp	Mon Sep 26 12:42:32 2016 +0000
@@ -401,7 +401,7 @@
     bool broadcast = false;
     uint8_t current_tag;
     d7a_msg_t** ret = NULL;
-    uint32_t max_responses = 1;
+    uint32_t max_responses = 2;
     uint8_t i;
     
     if (addressee)
@@ -411,12 +411,12 @@
             broadcast = true;
             d7a_ctf_t ctf;
             ctf.byte = addressee->id[0];
-            max_responses = ((1 << (2*ctf.bf.exp)) * ctf.bf.mant);
+            max_responses = ((1 << (2*ctf.bf.exp)) * ctf.bf.mant) + 1;
         }
         else if (addressee->ctrl.bf.idf == D7A_ID_NOID)
         {
             broadcast = true;
-            max_responses = 32;
+            max_responses = 33;
         }
     }
     
@@ -426,7 +426,7 @@
     {
         ret[i] = NULL;
     }
-        
+    
     // Construct command
     
     // Tag action
@@ -478,7 +478,7 @@
     bool broadcast = false;
     uint8_t current_tag;
     d7a_msg_t** ret = NULL;
-    uint32_t max_responses = 1;
+    uint32_t max_responses = 2;
     uint8_t i;
     
     if (addressee)
@@ -488,12 +488,12 @@
             broadcast = true;
             d7a_ctf_t ctf;
             ctf.byte = addressee->id[0];
-            max_responses = ((1 << (2*ctf.bf.exp)) * ctf.bf.mant);
+            max_responses = ((1 << (2*ctf.bf.exp)) * ctf.bf.mant) + 1;
         }
         else if (addressee->ctrl.bf.idf == D7A_ID_NOID)
         {
             broadcast = true;
-            max_responses = 32;
+            max_responses = 33;
         }
     }