More ADS-B TX experimentation

Lots of junk added in Numbers Station regarding voice files
Removed warnings caused by unfinished ADS-B function
This commit is contained in:
furrtek 2017-05-01 10:42:09 +01:00
parent 790ec34ac0
commit bebec9ccf7
12 changed files with 224 additions and 172 deletions

View file

@ -127,13 +127,25 @@ static void to_string_hex_internal(char* p, const uint64_t n, const int32_t l) {
}
}
std::string to_string_hex(const uint64_t n, const int32_t l) {
std::string to_string_hex(const uint64_t n, int32_t l) {
char p[32];
l = std::min(l, 31L);
to_string_hex_internal(p, n, l - 1);
p[l] = 0;
return p;
}
std::string to_string_hex_array(uint8_t * const array, const int32_t l) {
std::string str_return = "";
uint8_t bytes;
for (bytes = 0; bytes < l; bytes++)
str_return += to_string_hex(array[bytes], 2);
return str_return;
}
std::string to_string_datetime(const rtc::RTC& value) {
return to_string_dec_uint(value.year(), 4, '0') + "/" +
to_string_dec_uint(value.month(), 2, '0') + "/" +