Library to read 433MHz codes with decoder HT6P20

Dependents:   Gateway_Cotosys Gateway_Cotosys_os5

Revision:
1:adf26c4f20cd
Parent:
0:bcd4927f951a
--- a/RFDecoder.cpp	Sun Jun 02 19:56:03 2019 +0000
+++ b/RFDecoder.cpp	Tue Jun 11 00:23:55 2019 +0000
@@ -45,18 +45,9 @@
         
      if (!startbit) {               // Check the PILOT CODE until START BIT;
      dur0 = _rx.read_low_us();
-/*    
-     if(dur0>50){
-         addressFull = dur0;
-         return true;      
-     }else{
-         return false;
-     }
-}
-*/
      
-        //If time at "0" is between 5359 us (23 cycles of 233us) and 9959 us (23 cycles of 433 us).
-        if((dur0 > 5000) && (dur0 < 13000) && !startbit){
+        //If time at "0" is between 9200 us (23 cycles of 400us) and 13800 us (23 cycles of 600 us).
+        if((dur0 > 9200) && (dur0 < 13800) && !startbit){
             //calculate wave length - lambda
             lambda_RX = (dur0 / 23);