Commit graph

14 commits

Author SHA1 Message Date
StevenCellist
1b2b8bd67b
[LoRaWAN] Improve PHY behaviour, update beginABP, bugfixes (#1080)
* [LoRaWAN] Add getter for ToA, prevent MAC queue overflow

* [LoRaWAN] Permute arguments to beginABP

* Implement & split off checkOutputPower

* [LoRaWAN] Configure physical layer on each up/downlink

* [LoRaWAN] Remove unnecessary dynamic array

* [LoRaWAN] Improve downlink handling

* Resolve return-warnings in checkOutputPower()

* [LoRaWAN] Improve buffer definition

* [LoRaWAN] Prevent requesting repeated MAC commands

* Update keywords.txt

* [CC1101] Resolve unused variable warning

* [CC1101] Update checkOutputPower

* [SX1278] Fix variable assignment

* Update keywords.txt

* [CC1101] Added checkOutputPower override for PHY compatibility

* [LR11x0] Added checkOutputPower override for PHY compatibility

* [SX127x] Added checkOutputPower override for PHY compatibility

---------

Co-authored-by: jgromes <jan.gromes@gmail.com>
2024-05-01 13:35:22 +02:00
Elizabeth Myers
205031550b
Use RadioLibTime_t (aka unsigned long) when dealing with millis() and micros() (#1075)
* 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>
2024-04-25 21:50:58 +02:00
jgromes
43ca08d8ee [LR11x0] Added LR1120/21 classes 2024-04-21 15:24:49 +02:00
jgromes
e8a6297c60 [LR11x0] Added support for LR-FHSS 2024-04-21 15:01:57 +02:00
jgromes
ce4d9aa150 [LR11x0] Fixed LoRa CRC configuration 2024-04-21 08:47:27 +02:00
jgromes
9451f36332 [LR11x0] Use IRQ instead of DIO1 as pin name 2024-04-21 08:34:00 +02:00
jgromes
01208574d9 [LR11x0] Added CAD support (#679) 2024-04-20 21:29:32 +02:00
jgromes
99d2e6c452 [LR11x0] Added direct mode support 2024-04-20 18:05:31 +02:00
jgromes
6fa4aa3ebb [LR11x0] Added GFSK modem support (#679) 2024-04-19 20:30:53 +02:00
jgromes
88e1411399 [LR11x0] Fix potential use after free 2024-04-14 19:42:14 +01:00
jgromes
7bb747fdba [LR11x0] Add missing header for non-Arduino paltforms (#679) 2024-04-14 19:29:35 +01:00
jgromes
f956a66ef2 [LR11x0] Fix typos in variable names 2024-04-14 19:29:12 +01:00
jgromes
23f45153c1 [LR11x0] Suppress warnings for unimplemented features 2024-04-14 19:28:54 +01:00
jgromes
77ed4452ae [LR11x0] Added basic LR11x0 support (#679) 2024-04-14 20:22:55 +02:00