kopia lustrzana https://github.com/mikaelnousiainen/RS41ng
Update ax25.c
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
rodzic
4ebf656e13
commit
df4f37dc48
|
@ -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);
|
||||
|
|
Ładowanie…
Reference in New Issue