Adsb rx airline display fix (#1847)

* This doesn't do anything, just gives me some sanity :D

* Don’t abuse std

* Only look for airline info if the callsign is received

* Format…

* Let the airline update when callsign is received
This commit is contained in:
E.T 2024-02-05 19:06:29 +01:00 committed by GitHub
parent b8073bca0f
commit f2c008602d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 36 additions and 34 deletions

View file

@ -25,14 +25,12 @@
#include "file.hpp"
#include <cstring>
namespace std {
int database::retrieve_mid_record(MidDBRecord* record, std::string search_term) {
file_path = "AIS/mids.db";
index_item_length = 4;
record_length = 32;
result = std::database::retrieve_record(file_path, index_item_length, record_length, record, search_term);
result = retrieve_record(file_path, index_item_length, record_length, record, search_term);
return (result);
}
@ -42,7 +40,7 @@ int database::retrieve_airline_record(AirlinesDBRecord* record, std::string sear
index_item_length = 4;
record_length = 64;
result = std::database::retrieve_record(file_path, index_item_length, record_length, record, search_term);
result = retrieve_record(file_path, index_item_length, record_length, record, search_term);
return (result);
}
@ -52,7 +50,7 @@ int database::retrieve_aircraft_record(AircraftDBRecord* record, std::string sea
index_item_length = 7;
record_length = 146;
result = std::database::retrieve_record(file_path, index_item_length, record_length, record, search_term);
result = retrieve_record(file_path, index_item_length, record_length, record, search_term);
return (result);
}
@ -91,5 +89,3 @@ int database::retrieve_record(std::string file_path, int index_item_length, int
} else
return (DATABASE_NOT_FOUND);
}
} /* namespace std */