Commit graph

9 commits

Author SHA1 Message Date
jgromes
9b8b9c2802 [FSK4] Cppcheck fixes 2025-01-18 17:49:10 +01:00
jgromes
f53d5b9027 [FSK4] Fixed issues found by cppcheck 2024-05-11 20:32:41 +01: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
71dbf371e7 [FSK4] Reworked macro configuration system 2023-11-27 21:16:56 +01:00
jgromes
c988f64921 [FSK4] Use compact Doxygen and stop using reserved format 2023-04-22 19:35:42 +02:00
jgromes
355446c43a [FSK4] Added correction method 2022-11-18 13:56:40 +01:00
jgromes
727e4b4703 [FSK4] Update to 5.0.0 2021-11-14 11:39:17 +01:00
jgromes
b46d9f8e59 [FSK4] Formatting fixes 2021-09-24 08:58:48 +02:00
Mark Jessop
2de09e1b0a Added FSK4 protocol, compatible with Horus Binary 4FSK modulation 2021-05-31 21:16:38 +09:30