Skip to content

Commit

Permalink
writeLatLng(): improved readability
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs authored Oct 9, 2022
1 parent fddf7af commit 06b54bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/LoraEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ void LoraEncoder::writeLatLng(double latitude, double longitude) {
int32_t lng = longitude * 1e6;

_intToBytes(_buffer + _offset, lat, 4);
_intToBytes(_buffer + _offset + 4, lng, 4);
_offset += 8;
_offset += 4;
_intToBytes(_buffer + _offset, lng, 4);
_offset += 4;
}

void LoraEncoder::writeUint32(uint32_t i) {
Expand Down

0 comments on commit 06b54bd

Please sign in to comment.