Closed Oleg-Perevyshin closed 1 month ago
Need Add pragma
#pragma pack(push, 1)
struct LoRaNavData {
char type[3]; // delete (used receiveInitialMessage)
uint8_t dev_id;
int32_t latitude;
int32_t longitude;
int32_t altitude;
uint8_t crc8;
};
#pragma pack(pop)
Hello! I have a transmitter that needs to transmit a structure
In the serial port I see (Its Ok):
Type: ND, ID: 3 | LTD: 59916757, LNG: 33590709, ALT: 127690 | CRC: 0xE0
I am successfully sending data over the air.
=================================
On the receiving side my code is:
In the serial port I see something like this (not what I expected):
Type: ND, ID: 54 | LTD: -1526807549, LNG: 57776641, ALT: 0 | CRC: 0x00
I did everything according to the example, the structures are the same, but I get something completely different from what I send.
How to correctly receive structures?