Merge pull request #277 from GullCode/adsb_warning_fix

Fix adsb warnings
This commit is contained in:
Erwin Ried 2021-03-15 11:45:32 +01:00 committed by GitHub
commit fe98a58a4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -319,14 +319,14 @@ void encode_frame_velo(ADSBFrame& frame, const uint32_t ICAO_address, const uint
// Decoding method from dump1090
adsb_vel decode_frame_velo(ADSBFrame& frame){
adsb_vel velo {false, 0, 0};
adsb_vel velo {false, 0, 0, 0};
uint8_t * frame_data = frame.get_raw_data();
uint8_t velo_type = frame.get_msg_sub();
if(velo_type >= 1 && velo_type <= 4){ //vertical rate is always present
velo.v_rate = (((frame_data[8] & 0x07 ) << 6) | ((frame_data[9]) >> 2) - 1) * 64;
velo.v_rate = (((frame_data[8] & 0x07 ) << 6) | ((frame_data[9] >> 2) - 1)) * 64;
if((frame_data[8] & 0x8) >> 3) velo.v_rate *= -1; //check v_rate sign
}

View File

@ -69,7 +69,7 @@ public:
}
uint8_t * get_raw_data() const {
return (uint8_t* const)raw_data;
return (uint8_t* )raw_data;
}
void make_CRC() {