Not encode by default the extended numbers in the packet

pull/36/head
Pawel Jalocha 2021-02-28 14:11:06 +00:00
rodzic dc4609678d
commit c7b4d1bb90
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -74,7 +74,7 @@ class PAW_Packet
// uint32_t getAddress(void) const { return Address>>8; } // remove the sync '$'
// void setAddress(uint32_t Addr) { Address = (Addr<<8) | 0x24; } // set new address and set the '$' sync char
int Copy(const OGN1_Packet &Packet, bool Ext=1)
int Copy(const OGN1_Packet &Packet, bool Ext=0)
{ Clear();
Address = Packet.Header.Address; // [24-bit]
if(Packet.Header.NonPos) return 0; // encode only position packets
@ -88,7 +88,7 @@ class PAW_Packet
{ OGN=1; // extended data flag
AddrType = Packet.Header.AddrType; // [2-bit]
Relay = Packet.Header.Relay; // relay flag
Time = Packet.Position.Time; // [sec]
// Time = Packet.Position.Time; // [sec]
int32_t ClimbRate = Packet.DecodeClimbRate(); // [0.1m/s]
ClimbRate = (ClimbRate*315+512)>>10; // [64fpm]
if(ClimbRate>127) ClimbRate=127;