Skip to content

Commit

Permalink
Update RadiLib to V7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Nov 5, 2024
1 parent 0eead74 commit 9db7b60
Show file tree
Hide file tree
Showing 219 changed files with 10,355 additions and 6,166 deletions.
22 changes: 21 additions & 1 deletion lib/RadioLib/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,29 @@ Before submitting new issue, please check the [Troubleshooting Guide](https://gi
**Describe the bug**
A clear and concise description of what the bug is. When applicable, please include [debug mode output](https://github.com/jgromes/RadioLib/wiki/Debug-mode) **using the appropriate debug mode**.

<details><summary>Debug mode output</summary>
<p>

```
paste the debug output here
```

</p>
</details>

**To Reproduce**
Minimal Arduino sketch to reproduce the behavior. Please use Markdown to style the code to make it readable (see [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code)).

<details><summary>Sketch that is causing the module fail</summary>
<p>

```c++
paste the sketch here, even if it is an unmodified example code
```

</p>
</details>

**Expected behavior**
A clear and concise description of what you expected to happen.

Expand All @@ -27,4 +47,4 @@ If applicable, add screenshots to help explain your problem.
- Link to Arduino core: [e.g. https://github.com/stm32duino/Arduino_Core_STM32 when using official STM32 core. See readme for links to all supported cores]
- Wireless module type [e.g. CC1101, SX1268, etc.]
- Arduino IDE version [e.g. 1.8.5]
- Library version [e.g. 3.0.0]
- Library version [e.g. 3.0.0 or git hash]
18 changes: 16 additions & 2 deletions lib/RadioLib/.github/ISSUE_TEMPLATE/module-not-working.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,35 @@ assignees: ''
4. Use [Arduino forums](https://forum.arduino.cc/) to ask generic questions about wireless modules, wiring, usage, etc. Only create issues for problems specific to RadioLib!
5. Error codes, their meaning and how to fix them can be found on [this page](https://jgromes.github.io/RadioLib/group__status__codes.html).

**Sketch that is causing the module fail**
<details><summary>Sketch that is causing the module fail</summary>
<p>

```c++
paste the sketch here, even if it is an unmodified example code
```

</p>
</details>

**Hardware setup**
Wiring diagram, schematic, pictures etc.

**Debug mode output**
Enable the appropriate [debug levels](https://github.com/jgromes/RadioLib/wiki/Debug-mode) and paste the Serial monitor output here. For debugging protocols, enable `RADIOLIB_DEBUG_PROTOCOL`. For debugging issues with the radio module itself, enable `RADIOLIB_DEBUG_SPI`.

<details><summary>Debug mode output</summary>
<p>

```
paste the debug output here
```

</p>
</details>

**Additional info (please complete):**
- MCU: [e.g. Arduino Uno, ESP8266 etc.]
- Link to Arduino core: [e.g. https://github.com/stm32duino/Arduino_Core_STM32 when using official STM32 core. See readme for links to all supported cores]
- Wireless module type [e.g. CC1101, SX1268, etc.]
- Arduino IDE version [e.g. 1.8.5]
- Library version [e.g. 3.0.0]
- Library version [e.g. 3.0.0 or git hash]
2 changes: 1 addition & 1 deletion lib/RadioLib/.github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Build example
run:
arduino-cli compile --libraries /home/runner/work/RadioLib --fqbn arduino:avr:uno $PWD/examples/SX126x/SX126x_Transmit_Blocking/SX126x_Transmit_Blocking.ino --warnings=all
arduino-cli compile --libraries /home/runner/work/RadioLib --fqbn arduino:avr:uno $PWD/examples/SX123x/SX123x_Transmit_Blocking/SX123x_Transmit_Blocking.ino --warnings=all

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
26 changes: 13 additions & 13 deletions lib/RadioLib/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ on:
id:
description: The ID of the platform on which the build is run
required: true
default: arduino:avr:uno
default: arduino:avr:mega
type: choice
options:
- all
- none
- arduino:avr:uno
- arduino:avr:mega
- arduino:mbed:nano33ble
- arduino:mbed:envie_m4
Expand All @@ -27,7 +26,6 @@ on:
- esp32:esp32:esp32
- esp8266:esp8266:generic
- Intel:arc32:arduino_101
- SparkFun:apollo3:sfe_artemis
- STMicroelectronics:stm32:GenF3:pnum=BLACKPILL_F303CC
- STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_WL55JC1
- stm32duino:STM32F1:mapleMini
Expand All @@ -45,8 +43,6 @@ jobs:
matrix:
# platform-dependent settings - extra board options, board index URLs, skip patterns etc.
include:
- id: arduino:avr:uno
run: echo "skip-pattern=(STM32WL|SSTV|LoRaWAN|LR11x0_Firmware_Update|Pager)" >> $GITHUB_OUTPUT
- id: arduino:avr:mega
run: |
echo "options=':cpu=atmega2560'" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -79,16 +75,13 @@ jobs:
- id: esp32:esp32:esp32
run: |
python -m pip install pyserial
echo "version=2.0.17" >> $GITHUB_OUTPUT
echo "index-url=--additional-urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" >> $GITHUB_OUTPUT
- id: esp8266:esp8266:generic
run: |
echo "skip-pattern=(STM32WL|LR11x0_Firmware_Update)" >> $GITHUB_OUTPUT
echo "options=':xtal=80,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=qio,eesz=512K'" >> $GITHUB_OUTPUT
echo "index-url=--additional-urls http://arduino.esp8266.com/stable/package_esp8266com_index.json" >> $GITHUB_OUTPUT
- id: SparkFun:apollo3:sfe_artemis
run: |
echo "skip-pattern=(STM32WL|LoRaWAN)" >> $GITHUB_OUTPUT
echo "warnings='none'" >> $GITHUB_OUTPUT
echo "index-url=--additional-urls https://raw.githubusercontent.com/sparkfun/Arduino_Apollo3/master/package_sparkfun_apollo3_index.json" >> $GITHUB_OUTPUT
- id: STMicroelectronics:stm32:GenF3:pnum=BLACKPILL_F303CC
run: |
echo "index-url=--additional-urls https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/main/package_stmicroelectronics_index.json" >> $GITHUB_OUTPUT
Expand All @@ -106,7 +99,7 @@ jobs:
- id: MegaCoreX:megaavr:4809
run: |
echo "index-url=--additional-urls https://mcudude.github.io/MegaCoreX/package_MCUdude_MegaCoreX_index.json" >> $GITHUB_OUTPUT
echo "skip-pattern=(STM32WL|LR11x0_Firmware_Update)" >> $GITHUB_OUTPUT
echo "skip-pattern=(STM32WL|LR11x0_Firmware_Update|LoRaWAN)" >> $GITHUB_OUTPUT
- id: arduino:mbed_rp2040:pico
- id: rp2040:rp2040:rpipico
run: echo "index-url=--additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" >> $GITHUB_OUTPUT
Expand All @@ -129,9 +122,12 @@ jobs:
runs-on: ubuntu-latest
name: ${{ matrix.id }}
env:
run-build: ${{ (inputs.id != 'none' && matrix.id == 'arduino:avr:uno') || contains(github.event.head_commit.message, 'CI_BUILD_ALL') || contains(github.event.head_commit.message, 'Bump version to') || contains(github.event.head_commit.message, format('{0}', matrix.id)) || inputs.id == 'all' || inputs.id == matrix.id }}
run-build: ${{ (inputs.id != 'none' && matrix.id == 'arduino:avr:mega') || contains(github.event.head_commit.message, 'CI_BUILD_ALL') || contains(github.event.head_commit.message, 'Bump version to') || contains(github.event.head_commit.message, format('{0}', matrix.id)) || inputs.id == 'all' || inputs.id == matrix.id }}

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]

- name: Install arduino-cli
if: ${{ env.run-build == 'true' }}
run:
Expand Down Expand Up @@ -166,7 +162,11 @@ jobs:
run:
|
arduino-cli core update-index ${{ format('{0}', steps.prep.outputs.index-url) }}
arduino-cli core install ${{ format('{0}:{1} {2}', steps.split.outputs._0, steps.split.outputs._1, steps.prep.outputs.index-url) }}
if [ -z '${{ steps.prep.outputs.version }}' ]; then
arduino-cli core install ${{ format('{0}:{1} {2}', steps.split.outputs._0, steps.split.outputs._1, steps.prep.outputs.index-url) }}
else
arduino-cli core install ${{ format('{0}:{1}@{3} {2}', steps.split.outputs._0, steps.split.outputs._1, steps.prep.outputs.index-url, steps.prep.outputs.version) }}
fi

- name: Checkout repository
if: ${{ env.run-build == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion lib/RadioLib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ SX127x, RFM9x, SX126x, RF69, SX1231, CC1101, nRF24L01, RFM2x, Si443x and SX128x
SX127x, RFM9x, RF69, SX1231, CC1101, nRF24L01, RFM2x and Si443x
* [__LoRaWAN__](https://lora-alliance.org/) using LoRa for modules:
SX127x, RFM9x, SX126x, LR11x0 and SX128x
* NOTE: LoRaWAN support is currently in beta, feedback via [Issues](https://github.com/jgromes/RadioLib/issues) and [Discussions](https://github.com/jgromes/RadioLib/discussions) is appreciated!

### Supported Arduino platforms:
* __Arduino__
* [__AVR__](https://github.com/arduino/ArduinoCore-avr) - Arduino Uno, Mega, Leonardo, Pro Mini, Nano etc.
* NOTE: Arduino boards based on ATmega328 (Uno, Pro Mini, Nano etc.) and smaller are NOT recommended. This is because the ATmega328 MCU is very constrained in terms of program and memory size, so the library will end up taking most of the space available.
* [__mbed__](https://github.com/arduino/ArduinoCore-mbed) - Arduino Nano 33 BLE and Arduino Portenta H7
* [__megaAVR__](https://github.com/arduino/ArduinoCore-megaavr) - Arduino Uno WiFi Rev.2 and Nano Every
* [__SAM__](https://github.com/arduino/ArduinoCore-sam) - Arduino Due
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/*
RadioLib AFSK External Radio example
RadioLib AFSK External Radio example
This example shows how to use your Arduino
as modulator for an external analogue FM radio.
The example sends APRS position reports with
audio modulated as AFSK at 1200 baud using
Bell 202 tones. However, any other AFSK
protocol (RTTY, SSTV, etc.) may be used as well.
This example shows how to use your Arduino
as modulator for an external analogue FM radio.
The example sends APRS position reports with
audio modulated as AFSK at 1200 baud using
Bell 202 tones. However, any other AFSK
protocol (RTTY, SSTV, etc.) may be used as well.
DO NOT transmit in APRS bands unless
you have a ham radio license!
DO NOT transmit in APRS bands unless
you have a ham radio license!
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
*/

// include the library
Expand Down Expand Up @@ -46,7 +46,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while(true);
while (true) { delay(10); }
}

// initialize APRS client
Expand All @@ -58,23 +58,28 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while(true);
while (true) { delay(10); }
}
}

void loop() {
Serial.print(F("[APRS] Sending position ... "));

// send a location without message or timestamp
int state = aprs.sendPosition("N0CALL", 0, "4911.67N", "01635.96E");
char destination[] = "N0CALL";
char latitude[] = "4911.67N";
char longitude[] = "01635.96E";
int state = aprs.sendPosition(destination, 0, latitude, longitude);
delay(500);

// send a location with message and without timestamp
state |= aprs.sendPosition("N0CALL", 0, "4911.67N", "01635.96E", "I'm here!");
char message[] = "I'm here!";
state |= aprs.sendPosition(destination, 0, latitude, longitude, message);
delay(500);

// send a location with message and timestamp
state |= aprs.sendPosition("N0CALL", 0, "4911.67N", "01635.96E", "I'm here!", "093045z");
char timestamp[] = "093045z";
state |= aprs.sendPosition(destination, 0, latitude, longitude, message, timestamp);
delay(500);

if(state == RADIOLIB_ERR_NONE) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/*
RadioLib AFSK Imperial March Example
RadioLib AFSK Imperial March Example
This example shows how to EXECUTE ORDER 66
This example shows how to EXECUTE ORDER 66
Other modules that can be used for AFSK:
- SX127x/RFM9x
- RF69
- SX1231
- CC1101
- Si443x/RFM2x
- SX126x/LLCC68 (only devices without TCXO!)
Other modules that can be used for AFSK:
- SX127x/RFM9x
- RF69
- SX1231
- CC1101
- Si443x/RFM2x
- SX126x/LLCC68
For default module settings, see the wiki page
https://github.com/jgromes/RadioLib/wiki/Default-configuration
For default module settings, see the wiki page
https://github.com/jgromes/RadioLib/wiki/Default-configuration
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
*/

// include the library
Expand Down Expand Up @@ -58,7 +58,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while(true);
while (true) { delay(10); }
}

// initialize AFSK client
Expand All @@ -69,7 +69,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while(true);
while (true) { delay(10); }
}
}

Expand Down
6 changes: 3 additions & 3 deletions lib/RadioLib/examples/AFSK/AFSK_Imperial_March/melody.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Note definitions, melody and melody-related functions
adapted from https://github.com/robsoncouto/arduino-songs
by Robson Couto, 2019
Note definitions, melody and melody-related functions
adapted from https://github.com/robsoncouto/arduino-songs
by Robson Couto, 2019
*/

#define NOTE_B0 31
Expand Down
32 changes: 16 additions & 16 deletions lib/RadioLib/examples/AFSK/AFSK_Tone/AFSK_Tone.ino
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/*
RadioLib AFSK Example
RadioLib AFSK Example
This example shows hot to send audio FSK tones
using SX1278's FSK modem.
This example shows hot to send audio FSK tones
using SX1278's FSK modem.
Other modules that can be used for AFSK:
- SX127x/RFM9x
- RF69
- SX1231
- CC1101
- Si443x/RFM2x
- SX126x/LLCC68 (only devices without TCXO!)
Other modules that can be used for AFSK:
- SX127x/RFM9x
- RF69
- SX1231
- CC1101
- Si443x/RFM2x
- SX126x/LLCC68
For default module settings, see the wiki page
https://github.com/jgromes/RadioLib/wiki/Default-configuration
For default module settings, see the wiki page
https://github.com/jgromes/RadioLib/wiki/Default-configuration
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
*/

// include the library
Expand Down Expand Up @@ -56,7 +56,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while(true);
while (true) { delay(10); }
}

// initialize AFSK client
Expand All @@ -67,7 +67,7 @@ void setup() {
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while(true);
while (true) { delay(10); }
}
}

Expand Down
Loading

0 comments on commit 9db7b60

Please sign in to comment.