Added velocity/bearing ADS-B frame for tx

Added compass widget
Manchester encoder
This commit is contained in:
furrtek
2017-07-25 08:30:12 +01:00
parent c2a9ed7d9b
commit 0cbf9cd386
9 changed files with 290 additions and 121 deletions

View File

@@ -69,3 +69,14 @@ FormattedSymbols format_symbols(
return { hex_data, hex_error };
}
void manchester_encode(uint8_t * dest, uint8_t * src, size_t length, const size_t sense) {
uint_fast8_t part = sense ? 0 : 0xFF;
for (size_t c = 0; c < length; c++) {
if ((src[c >> 3] << (c & 7)) & 0x80) {
*(dest++) = part;
*(dest++) = ~part;
}
}
}