Skip to content

Commit

Permalink
Upgrade to RadioLib 6.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgzhg committed Mar 31, 2024
1 parent 1e5ece9 commit b32a183
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion RadioLib
Submodule RadioLib updated 60 files
+2 −2 .github/ISSUE_TEMPLATE/bug_report.md
+1 −1 .github/ISSUE_TEMPLATE/feature_request.md
+2 −2 .github/ISSUE_TEMPLATE/module-not-working.md
+1 −1 .github/ISSUE_TEMPLATE/regular-issue.md
+6 −12 .github/workflows/codeql-analysis.yml
+27 −0 .github/workflows/cppcheck.yml
+1 −1 .github/workflows/doxygen.yml
+17 −16 .github/workflows/main.yml
+3 −0 .gitignore
+1 −1 README.md
+71 −0 examples/LoRaWAN/LoRaWAN_ABP/LoRaWAN_ABP.ino
+132 −0 examples/LoRaWAN/LoRaWAN_ABP/configABP.h
+0 −164 examples/LoRaWAN/LoRaWAN_End_Device/LoRaWAN_End_Device.ino
+0 −172 examples/LoRaWAN/LoRaWAN_End_Device_ABP/LoRaWAN_End_Device_ABP.ino
+0 −156 examples/LoRaWAN/LoRaWAN_End_Device_Persistent/LoRaWAN_End_Device_Persistent.ino
+0 −294 examples/LoRaWAN/LoRaWAN_End_Device_Reference/LoRaWAN_End_Device_Reference.ino
+202 −0 examples/LoRaWAN/LoRaWAN_Reference/LoRaWAN_Reference.ino
+126 −0 examples/LoRaWAN/LoRaWAN_Reference/config.h
+68 −0 examples/LoRaWAN/LoRaWAN_Starter/LoRaWAN_Starter.ino
+126 −0 examples/LoRaWAN/LoRaWAN_Starter/config.h
+200 −0 examples/LoRaWAN/LoRaWAN_Starter/notes.md
+18 −0 examples/LoRaWAN/README.md
+3 −0 examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino
+3 −0 examples/SX127x/SX127x_PingPong/SX127x_PingPong.ino
+11 −0 idf_component.yml
+9 −2 keywords.txt
+1 −1 library.json
+1 −1 library.properties
+0 −45 src/ArduinoHal.cpp
+0 −3 src/ArduinoHal.h
+68 −39 src/BuildOpt.h
+3 −2 src/BuildOptUser.h
+0 −47 src/Hal.cpp
+0 −132 src/Hal.h
+41 −35 src/Module.cpp
+4 −2 src/Module.h
+19 −9 src/TypeDef.h
+22 −18 src/modules/CC1101/CC1101.cpp
+4 −3 src/modules/CC1101/CC1101.h
+3 −3 src/modules/RF69/RF69.cpp
+4 −4 src/modules/SX123x/SX1231.cpp
+4 −4 src/modules/SX123x/SX1233.cpp
+26 −25 src/modules/SX126x/SX126x.cpp
+5 −0 src/modules/SX126x/SX126x.h
+6 −6 src/modules/SX127x/SX127x.cpp
+6 −6 src/modules/SX128x/SX128x.cpp
+1 −1 src/modules/Si443x/Si4430.cpp
+1 −1 src/modules/Si443x/Si4431.cpp
+1 −1 src/modules/Si443x/Si4432.cpp
+6 −6 src/modules/Si443x/Si443x.cpp
+2 −2 src/modules/nRF24/nRF24.cpp
+1 −1 src/protocols/AX25/AX25.cpp
+595 −665 src/protocols/LoRaWAN/LoRaWAN.cpp
+182 −53 src/protocols/LoRaWAN/LoRaWAN.h
+22 −0 src/protocols/LoRaWAN/LoRaWANBands.cpp
+8 −8 src/protocols/Morse/Morse.cpp
+47 −4 src/protocols/Pager/Pager.cpp
+15 −0 src/protocols/Pager/Pager.h
+2 −2 src/protocols/PhysicalLayer/PhysicalLayer.cpp
+3 −1 src/protocols/PhysicalLayer/PhysicalLayer.h
15 changes: 10 additions & 5 deletions smtUdpPacketForwarder/Radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ void hexPrint(uint8_t data[], int length, FILE *dest) { // {{{
} else { \
SX126x* sx126x_chip = dynamic_cast<SX126x*>(origin); \
if (sx126x_chip != nullptr) { \
sx126x_chip->XTAL = true; \
result = sx126x_chip->invertIQ(false); \
if (result == RADIOLIB_ERR_NONE) { \
result = sx126x_chip->setCRC((uint8_t) 1); \
Expand Down Expand Up @@ -185,7 +184,6 @@ void hexPrint(uint8_t data[], int length, FILE *dest) { // {{{
} else { \
SX126x* sx126x_chip = dynamic_cast<SX126x*>(origin); \
if (sx126x_chip != nullptr) { \
sx126x_chip->XTAL = true; \
result = sx126x_chip->invertIQ(downlink_pkt.iq_polatization_inversion); \
if (result == RADIOLIB_ERR_NONE) { \
result = sx126x_chip->setCRC(downlink_pkt.disable_crc ? (uint8_t) 0 : (uint8_t) 1); \
Expand All @@ -205,8 +203,6 @@ void hexPrint(uint8_t data[], int length, FILE *dest) { // {{{
downlink_pkt.preamble_length, \
false /* don't use OOK */ \
); \
SX126x* sx126x_chip = dynamic_cast<SX126x*>(origin); \
if (sx126x_chip != nullptr) sx126x_chip->XTAL = true; \
if (result == RADIOLIB_ERR_NONE) result = chip->setSyncWord(gfskSyncWord, ((uint8_t) sizeof(gfskSyncWord))); \
} \
if (result == RADIOLIB_ERR_NONE) result = chip->setCurrentLimit(current_lim_ma); \
Expand Down Expand Up @@ -267,7 +263,16 @@ PhysicalLayer* instantiateLoRaChip(LoRaChipSettings_t& lora_chip_settings, SPICl
spiSettings
);

return LORA_CHIPS.at(lora_chip_settings.ic_model)(module_settings);
auto instance = LORA_CHIPS.at(lora_chip_settings.ic_model)(module_settings);

SX126x* sx126x_chip = dynamic_cast<SX126x*>(instance);
if (sx126x_chip != nullptr)
{
sx126x_chip->XTAL = true;
sx126x_chip->standbyXOSC = true;
}

return instance;
} // }}}

#define PKT_ENRICHER(origin_class, instance_ptr, inst_type_info, lora_packet, freq_err) \
Expand Down

0 comments on commit b32a183

Please sign in to comment.