source_ssid and destination_ssid are both defined the same in config.h and in ax25.h.  Both are inserted to memory by adjusting a pointer. Therefore both should require moving the pointer back 7 bytes to place in correctly addressed position. I am puzzled that the header definition and the cast in this code line are both needed.
pull/77/head
Randy Pratt 2023-11-30 19:41:17 -06:00 zatwierdzone przez GitHub
rodzic 4ebf656e13
commit df4f37dc48
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -89,7 +89,7 @@ uint16_t ax25_encode_packet_aprs(char *source, uint8_t source_ssid, char *destin
call_length = strlen(destination);
memset(header->destination, ' ', sizeof(header->destination));
memcpy(header->destination, destination, call_length < 6 ? call_length : 6);
header->destination_ssid = destination_ssid;
header->destination_ssid = (uint8_t) destination_ssid >= 'A' ? destination_ssid - 7 : destination_ssid);;
char *digipeater_addresses_start = ((char *) header) + 1 + 14;
uint16_t digipeater_addresses_length = ax25_encode_digipeater_path(digipeater_addresses, digipeater_addresses_start);