comparison Small_CPU/Src/GNSS.c @ 899:2225c467f1e9 Evo_2_23

Added data path and visualization for position data: The GNSS data exchange is now initialized and triggered on a cyclic basis (once a second). RTE verion has been increased because of interface change. For now only the position data is shown in a T7 surface views. The functionality may be switched on/off using the compile switch ENABLE_GNSS.
author Ideenmodellierer
date Mon, 30 Sep 2024 21:56:05 +0200
parents 17f02ac9da67
children c0553dd70608
comparison
equal deleted inserted replaced
898:fac13aa6ba93 899:2225c467f1e9
59 59
60 /*! 60 /*!
61 * Searching for a header in data buffer and matching class and message ID to buffer data. 61 * Searching for a header in data buffer and matching class and message ID to buffer data.
62 * @param GNSS Pointer to main GNSS structure. 62 * @param GNSS Pointer to main GNSS structure.
63 */ 63 */
64 void GNSS_ParseBuffer(GNSS_StateHandle *GNSS) { 64 uint8_t GNSS_ParseBuffer(GNSS_StateHandle *GNSS) {
65
66 uint8_t DataReceived = 0;
65 67
66 for (int var = 0; var <= 100; ++var) { 68 for (int var = 0; var <= 100; ++var) {
67 if (GNSS->uartWorkingBuffer[var] == 0xB5 69 if (GNSS->uartWorkingBuffer[var] == 0xB5
68 && GNSS->uartWorkingBuffer[var + 1] == 0x62) { 70 && GNSS->uartWorkingBuffer[var + 1] == 0x62) {
71 DataReceived = 1;
69 if (GNSS->uartWorkingBuffer[var + 2] == 0x27 72 if (GNSS->uartWorkingBuffer[var + 2] == 0x27
70 && GNSS->uartWorkingBuffer[var + 3] == 0x03) { //Look at: 32.19.1.1 u-blox 8 Receiver description 73 && GNSS->uartWorkingBuffer[var + 3] == 0x03) { //Look at: 32.19.1.1 u-blox 8 Receiver description
71 GNSS_ParseUniqID(GNSS); 74 GNSS_ParseUniqID(GNSS);
72 } else if (GNSS->uartWorkingBuffer[var + 2] == 0x01 75 } else if (GNSS->uartWorkingBuffer[var + 2] == 0x01
73 && GNSS->uartWorkingBuffer[var + 3] == 0x21) { //Look at: 32.17.14.1 u-blox 8 Receiver description 76 && GNSS->uartWorkingBuffer[var + 3] == 0x21) { //Look at: 32.17.14.1 u-blox 8 Receiver description
79 && GNSS->uartWorkingBuffer[var + 3] == 0x02) { // Look at: 32.17.15.1 u-blox 8 Receiver description 82 && GNSS->uartWorkingBuffer[var + 3] == 0x02) { // Look at: 32.17.15.1 u-blox 8 Receiver description
80 GNSS_ParsePOSLLHData(GNSS); 83 GNSS_ParsePOSLLHData(GNSS);
81 } 84 }
82 } 85 }
83 } 86 }
87 return DataReceived;
84 } 88 }
85 89
86 /*! 90 /*!
87 * Make request for unique chip ID data. 91 * Make request for unique chip ID data.
88 * @param GNSS Pointer to main GNSS structure. 92 * @param GNSS Pointer to main GNSS structure.