Fix adsb warnings

This commit is contained in:
GullCode 2021-01-27 15:38:05 +01:00
parent 19ebf14e8c
commit c3fe053eb2
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() {