* [HAL] Move HALs to src
* [CI] Temporarily drop unofficial STM32 (package down)
* [LR11x0] Fix ambiguous call
* [CI] Return Maple mini back to build matrix
* [LR11x0] Added WIP GNSS control
* [LR11x0] Added almanac update
* [LR11x0] Added almanac update example
* [LR11x0] Add missing memory deallocation
* [LR11x0] Fix underflow in delay until subframe
* [LR11x0] Remove pin mapping from example
* [LR11x0] Finish rework of the GNSS API
* [LR11x0] Added position and satellite examples
* [LR11x0] Fix result member in example
* Added LR11x0 GNSS keywords
* [LR11x0] Fix typo in macro name
* [LR11x0] Print scan failed in example
* [LR11x0] Added GNSS abort
* Use unsigned long when dealing with millis() and micros().
Although sizeof(uint32_t) == sizeof(unsigned long) on Arduino, this is
not the case on 64-bit Linux, where sizeof(unsigned long) ==
sizeof(uint64_t).
Most timestamp arithmetic and comparisons have been left alone, to
reduce code churn. This is fine, as uint32_t is perfectly wide to store
most timestamp deltas this library will deal with, and C will promote
the integer rather than do a narrowing conversion. The real problem
arises with narrowing conversions being done by assuming timestamps are
32-bit.
No functional changes intended for platforms where sizeof(uint32_t) ==
sizeof(unsigned long) (so most 8/16/32-bit platforms).
Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>
* Change most timestamps to use RadioLibTime_t.
This makes it obvious what is and isn't a timestamp.
Not everything has been converted; anything dealing with protocol and
chip-level timestamps has been left alone on purpose, to make it clear
that these functions do require 32-bit timestamps.
No functional changes intended on platforms where sizeof(uint32_t) ==
sizeof(unsigned long).
Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>
* Use uint32_t internally in getTimeOnAir.
We need to not overflow the integers with the shifts and
multiplications, so this is correct behaviour.
Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>
---------
Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>
Instead of getting the status from the very first byte in the input
buffer, which will be what we read when we send the first byte. Let's
instead get the status from the first byte after the command. This
provides a more accurate status value.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
The SX126x get status command returns a single status byte. The status
byte is automatically read in the `Module::SPItransferStream()` function
when we increment buffLen (see
https://github.com/jgromes/RadioLib/blob/master/src/Module.cpp#L259).
By setting numBytes we incorrectly end up reading 2 bytes. Instead set
numBytes to zero so we only read the single status byte.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
In Module::waitForMicroseconds if RADIOLIB_INTERRUPT_TIMING is defined the variable prevTimingLen has been incorrectly upated in v6.0.0 introducing a bug that stops compilation.
Fix: renamed _prevTimingLen to prevTimingLen to match other updates