Skip to content

Commit

Permalink
Hitec: fix a bind issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Langer committed Mar 21, 2020
1 parent 2b8ed25 commit 3df836e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Multiprotocol/Hitec_cc2500.ino
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ static void __attribute__((unused)) HITEC_build_packet()
break;
case 0x7B:
packet[5]=hopping_frequency[13]>>1; // if not there the Optima link is jerky...
packet[14]=0x2A;
packet[15]=0x46; // unknown but if 0x45 then 17=0x46, if 0x46 then 17=0x46 or 0x47, if 0x47 then 0x45 or 0x46
packet[16]=0x2A;
packet[17]=0x47;
packet[18]=0x2A;
break;
}
if(sub_protocol==MINIMA)
Expand Down Expand Up @@ -302,8 +307,8 @@ uint16_t ReadHITEC()
{ // bind packet: 0A,00,E5,F2,7X,05,06,07,08,09,00
debug(",bind");
boolean check=true;
for(uint8_t i=5;i<=10;i++)
if(packet_in[i]!=i%10) check=false;
for(uint8_t i=5;i<10;i++)
if(packet_in[i]!=i) check=false;
if((packet_in[4]&0xF0)==0x70 && check)
{
bind_phase=packet_in[4]+1;
Expand Down
2 changes: 1 addition & 1 deletion Multiprotocol/Multiprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 0
#define VERSION_PATCH_LEVEL 75
#define VERSION_PATCH_LEVEL 76

//******************
// Protocols
Expand Down

0 comments on commit 3df836e

Please sign in to comment.