Skip to content

Commit 06b54bd

Browse files
authored
writeLatLng(): improved readability
1 parent fddf7af commit 06b54bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/LoraEncoder.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ void LoraEncoder::writeLatLng(double latitude, double longitude) {
5151
int32_t lng = longitude * 1e6;
5252

5353
_intToBytes(_buffer + _offset, lat, 4);
54-
_intToBytes(_buffer + _offset + 4, lng, 4);
55-
_offset += 8;
54+
_offset += 4;
55+
_intToBytes(_buffer + _offset, lng, 4);
56+
_offset += 4;
5657
}
5758

5859
void LoraEncoder::writeUint32(uint32_t i) {

0 commit comments

Comments
 (0)