Closed myasir926 closed 6 months ago
@beegee-tokyo
The function you changed was designed to work with our payload decoders. Your change would break our decoders.
But feel free to use your enhanced precision version in your own application.
Thanks
C H A N G E L O G
We added a function called addPositionData that centralizes the process of including GNSS data, in the buffer. This function helps avoid repetition by managing the formatting and addition of; latitude, longitude and altitude data in GNSS data functions (addGNSS_4, addGNSS_6 and addGNSS_H). Another function, addToBuffer handles the conversion of 32 bit values into byte formats for the buffer to ensure consistent and error free data addition.
In terms of restructuring GNSS Data Functions we revamped addGNSS_4, addGNSS_6 and addGNSS_H to utilize addPositionData. This simplifies these functions by consolidating buffer overflow checks and data addition logic. We also enhanced how we handle data precision and adjusted byte order for buffer addition to enhance data integrity and align with protocol standards.
To improve error handling we have applied buffer overflow checks consistently across all data addition functions to catch errors uniformly. This helps prevent data corruption and ensures stability in the transmission process. Additionally redundant code blocks have been removed by leveraging the helper functions. This action reduces the codebase size. Makes it easier, for modifications.
Moreover we have replaced numbers with constants where appropriate to enhance code readability and facilitate better understanding and maintenance of the codebase.