Commit graph

103 commits

Author SHA1 Message Date
jgromes
558e60b18d [RF69] Use public frequency step and max packet length variables 2025-02-15 14:48:33 +01:00
jgromes
fc6ff698b9 [RF69] Fix sync word length not set correctly (#1400) 2025-01-27 18:44:49 +01:00
jgromes
beb6689287 [RF69] Cppcheck fixes 2025-01-18 15:25:48 +01:00
Matej Frančeškin
f3276c2e66 fix implicit conversion from float to double warnings 2025-01-15 16:06:47 +01:00
SzczepanLeon
cb45f4fe5e
[SX127x/RF69] Added setFifoThreshold (#1309)
* [SX127x] Added setFifoThreshold

* [SX127x] Added setFifoThreshold

* Add setFifoThreshold to RF69 class.

* Documentation update, about setFifoThreshold.
2024-11-03 18:25:44 +01:00
Pavlo Manovi
6847fcda5c Reconcile implicit double / float promotion with math functions and passed function value types. Also suppress incorrect unused variable warnings when variables are used in logging macros. 2024-08-29 09:30:31 -04:00
jgromes
fffb1fae9f [PHY] Make transmit data const (#1156) 2024-07-13 16:42:46 +01:00
jgromes
4d7c16bd44 [RF69] Fixed issues found by cppcheck 2024-05-10 20:45:36 +01:00
jgromes
be56474596 [RF69] Use 32-bit IRQ flags 2024-05-08 14:52:42 +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
721a44c6e4 [RF69] Fix copy-pate error (#1013) 2024-03-29 08:40:25 +01:00
jgromes
5980e0fb00 [RF69] Use millis for timeouts 2024-03-29 08:34:56 +01:00
jgromes
4ee17cc168 Debugging rework 2024-03-10 11:07:23 +01:00
jgromes
3a5d9b5c32 [RF69] Cleanup private/protected members 2024-01-12 20:26:07 +01:00
Peter Buchegger
6600860915
Update RF69.cpp 2024-01-11 17:51:39 +01:00
jgromes
2e1ce8ce89 [RF69] Reworked macro configuration system 2023-11-27 19:40:19 +01:00
jgromes
df126c92f9 [RF69] Implemented generic actions 2023-06-21 22:15:54 +02:00
jgromes
14529f36c7 [RF69] Fixed variable shadowing 2023-04-23 22:03:37 +02:00
jgromes
9be1cdfa41 [RF69] General reformatting 2023-04-23 19:43:48 +02:00
Mestery
9a68a3c901 use uint32 instead of uint8 for pin type 2023-04-16 21:39:00 +02:00
Mestery
ec3d4eaf20 Improve hardware abstraction layer 2023-04-12 23:16:18 +02:00
Mestery
220b4dad7f
use printf in both build 2023-04-10 09:13:58 +00:00
Mestery
2a45f71384
fix undef digitalread 2023-04-10 09:13:57 +00:00
jgromes
b108686a0f [RF69] Added PHY startReceive (#700) 2023-03-26 22:18:16 +02:00
jgromes
874886b4cd [RF69] Added missing standby overload 2023-03-12 15:02:08 +01:00
jgromes
0a0f6979dd [RF69] Set minimum bit rate to 0.5 kbps 2023-01-18 18:58:26 +01:00
Matthijs Kooijman
52ec165643 Update radios to use new setRfSwitchState
This removes the compatibility wrapper and applies the following
replacements:

    sed -i 's/setRfSwitchState(LOW, LOW)/setRfSwitchState(Module::MODE_IDLE)/' src/modules/*/*.cpp
    sed -i 's/setRfSwitchState(HIGH, LOW)/setRfSwitchState(Module::MODE_RX)/' src/modules/*/*.cpp
    sed -i 's/setRfSwitchState(LOW, HIGH)/setRfSwitchState(Module::MODE_TX)/' src/modules/*/*.cpp
2023-01-09 10:26:28 +01:00
Matthijs Kooijman
3779faf600 Add setRfSwitchTable() wrapper methods
This gives all radios that use an rfswitch (i.e. have
a setRfSwitchPins() wrapper already) a wrapper method for
setRfSwitchTable() too. This wrapper just calls the same method on
Module, to make it easier for sketches to use it.
2023-01-09 10:26:27 +01:00
jgromes
0144faf02a [RF69] Fixed stream mode (#651) 2022-12-22 18:18:16 +01:00
Federico Maggi
7b4c27b702
[RF69] Missing 1000.0 multipler in 2022-12-04 00:21:22 +01:00
Federico Maggi
894e912252
[RF69] Fixed setPromiscuousMode(false) corner case
Signed-off-by: Federico Maggi <federico.maggi@gmail.com>
2022-12-01 13:24:42 +01:00
Federico Maggi
05217c095b
- Defined new RADIOLIB_ERR_NULL_POINTER
- all `begin()` now use macros for init values
- addressed other styling comments as per PR#612 review

Signed-off-by: Federico Maggi <federico.maggi@gmail.com>
2022-11-21 09:09:56 +01:00
Federico Maggi
1322796542
[RF69 & CC1101] Reworked cached parameters into getters
Signed-off-by: Federico Maggi <federico.maggi@gmail.com>
2022-11-20 01:35:08 +01:00
jgromes
8a81a7c827 [RF69] Added finishTransmit 2022-09-18 16:14:42 +02:00
obones
40599baef1 Use the RADIOLIB_CHECK_RANGE macro along with proper lower value (it has to be negative) 2022-08-25 10:39:21 +02:00
obones
a7b42b61b2 Use a better name for the parameter so that it is clear that it's dBm that are expected here 2022-08-24 15:38:12 +02:00
OBones
fd3b165bf0 Introduce setRSSIThreshold on RF69 modules 2022-08-23 17:41:37 +02:00
jgromes
da0993a6ed Added RADIOLIB_EXCLUDE_DIRECT_RECEIVE exclusion macro (#557) 2022-08-15 19:19:59 +02:00
Jan Gromeš
96f2e34e09
Merge pull request #542 from obones/setDIOMapping
Introduce the setDIOMapping method
2022-07-13 23:04:48 +02:00
jgromes
60aa0098b3 [RF69][SX1231] Added Stream support (#201) 2022-07-10 20:41:11 +02:00
obones
bdb14b9e9d Implement setDIOMapping for RF69 family 2022-07-07 15:36:26 +02:00
James Smith
63ba279fd2 Call setRxBandwidth again if setOOK is called 2022-03-28 17:28:01 -07:00
James Smith
77fa0e83c0 Merge remote-tracking branch 'upstream/master' into rf69-ook-rxbw 2022-03-28 17:20:13 -07:00
James Smith
2b99b6ec86 Add enableOOK param to RF69::begin, false by default, mirrors SX127x 2022-03-26 14:45:54 -07:00
James Smith
eed4075cb1 [RF69] Persist bit synchronization settings 2022-03-26 13:08:46 -07:00
James Smith
361eba8ebc Set RX bandwidth correctly for OOK mode 2022-03-26 12:53:17 -07:00
James Smith
dd0d48abe9 Fix setRxBandwidth by calculating mantissa and exponent, rather than comparing floats 2022-03-22 16:33:36 -07:00
jgromes
1d4295feed [RF69] Fixed known binary receive length (#408) 2021-11-21 21:17:26 +01:00
jgromes
22ae7dfd9b [RF69] Update macro names 2021-11-14 13:00:28 +01:00
jgromes
5d712f0bda Merge remote-tracking branch 'origin/master' into hal 2021-11-14 12:55:22 +01:00