mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-12 08:19:39 +00:00
fix cppcheck
This commit is contained in:
parent
d3e9dbf6a9
commit
b1f789dddd
@ -15,7 +15,7 @@
|
|||||||
* -------------------------------------------
|
* -------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint printWPL(char *buf, Position &pos, const char *name)
|
uint printWPL(char *buf, const Position &pos, const char *name)
|
||||||
{
|
{
|
||||||
uint len = sprintf(buf, "$GNWPL,%07.2f,%c,%08.2f,%c,%s", pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', name);
|
uint len = sprintf(buf, "$GNWPL,%07.2f,%c,%08.2f,%c,%s", pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', name);
|
||||||
uint chk = 0;
|
uint chk = 0;
|
||||||
@ -50,9 +50,9 @@ uint printWPL(char *buf, Position &pos, const char *name)
|
|||||||
* -------------------------------------------
|
* -------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint printGGA(char *buf, Position &pos)
|
uint printGGA(char *buf, const Position &pos)
|
||||||
{
|
{
|
||||||
uint len = sprintf(buf, "$GNGGA,%06d.%03d,%07.2f,%c,%08.2f,%c,%d,%02d,%04d,%04d,%c,%04d,%c,%d,%04d",
|
uint len = sprintf(buf, "$GNGGA,%06u.%03u,%07.2f,%c,%08.2f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d",
|
||||||
pos.time / 1000,
|
pos.time / 1000,
|
||||||
pos.time % 1000,
|
pos.time % 1000,
|
||||||
pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N',
|
pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N',
|
||||||
|
Loading…
Reference in New Issue
Block a user