Skip to content

Commit f809300

Browse files
authored
Merge pull request #613 from ErikHougaard/fix_beacon_endian
Endian-swap implemented in setMajorMinor
2 parents a401e80 + 4095afb commit f809300

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/Bluefruit52Lib/src/services/BLEBeacon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ void BLEBeacon::setUuid(uint8_t const uuid128[16])
7777

7878
void BLEBeacon::setMajorMinor(uint16_t major, uint16_t minor)
7979
{
80-
_major_be = major;
81-
_minor_be = minor;
80+
_major_be = __swap16(major);
81+
_minor_be = __swap16(minor);
8282
}
8383

8484
void BLEBeacon::setRssiAt1m(int8_t rssi)

0 commit comments

Comments
 (0)