mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-13 16:42:07 +00:00
Merge branch 'radiolib-701' of github.com:meshtastic/firmware into radiolib-701
This commit is contained in:
commit
51ee6c11ea
2
.github/workflows/main_matrix.yml
vendored
2
.github/workflows/main_matrix.yml
vendored
@ -235,7 +235,7 @@ jobs:
|
|||||||
path: ./*.elf
|
path: ./*.elf
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- uses: PicoCentauri/comment-artifact@main
|
- uses: scruplelesswizard/comment-artifact@main
|
||||||
with:
|
with:
|
||||||
name: firmware-${{ steps.version.outputs.version }}
|
name: firmware-${{ steps.version.outputs.version }}
|
||||||
description: "Download firmware-${{ steps.version.outputs.version }}.zip. This artifact will be available for 90 days from creation"
|
description: "Download firmware-${{ steps.version.outputs.version }}.zip. This artifact will be available for 90 days from creation"
|
||||||
|
@ -60,26 +60,26 @@ build_flags = -Wno-missing-field-initializers
|
|||||||
-DUSE_THREAD_NAMES
|
-DUSE_THREAD_NAMES
|
||||||
-DTINYGPS_OPTION_NO_CUSTOM_FIELDS
|
-DTINYGPS_OPTION_NO_CUSTOM_FIELDS
|
||||||
-DPB_ENABLE_MALLOC=1
|
-DPB_ENABLE_MALLOC=1
|
||||||
-DRADIOLIB_EXCLUDE_CC1101
|
-DRADIOLIB_EXCLUDE_CC1101=1
|
||||||
-DRADIOLIB_EXCLUDE_NRF24
|
-DRADIOLIB_EXCLUDE_NRF24=1
|
||||||
-DRADIOLIB_EXCLUDE_RF69
|
-DRADIOLIB_EXCLUDE_RF69=1
|
||||||
-DRADIOLIB_EXCLUDE_SX1231
|
-DRADIOLIB_EXCLUDE_SX1231=1
|
||||||
-DRADIOLIB_EXCLUDE_SX1233
|
-DRADIOLIB_EXCLUDE_SX1233=1
|
||||||
-DRADIOLIB_EXCLUDE_SI443X
|
-DRADIOLIB_EXCLUDE_SI443X=1
|
||||||
-DRADIOLIB_EXCLUDE_RFM2X
|
-DRADIOLIB_EXCLUDE_RFM2X=1
|
||||||
-DRADIOLIB_EXCLUDE_AFSK
|
-DRADIOLIB_EXCLUDE_AFSK=1
|
||||||
-DRADIOLIB_EXCLUDE_BELL
|
-DRADIOLIB_EXCLUDE_BELL=1
|
||||||
-DRADIOLIB_EXCLUDE_HELLSCHREIBER
|
-DRADIOLIB_EXCLUDE_HELLSCHREIBER=1
|
||||||
-DRADIOLIB_EXCLUDE_MORSE
|
-DRADIOLIB_EXCLUDE_MORSE=1
|
||||||
-DRADIOLIB_EXCLUDE_RTTY
|
-DRADIOLIB_EXCLUDE_RTTY=1
|
||||||
-DRADIOLIB_EXCLUDE_SSTV
|
-DRADIOLIB_EXCLUDE_SSTV=1
|
||||||
-DRADIOLIB_EXCLUDE_AX25
|
-DRADIOLIB_EXCLUDE_AX25=1
|
||||||
-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE
|
-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
|
||||||
-DRADIOLIB_EXCLUDE_BELL
|
-DRADIOLIB_EXCLUDE_BELL=1
|
||||||
-DRADIOLIB_EXCLUDE_PAGER
|
-DRADIOLIB_EXCLUDE_PAGER=1
|
||||||
-DRADIOLIB_EXCLUDE_FSK4
|
-DRADIOLIB_EXCLUDE_FSK4=1
|
||||||
-DRADIOLIB_EXCLUDE_APRS
|
-DRADIOLIB_EXCLUDE_APRS=1
|
||||||
-DRADIOLIB_EXCLUDE_LORAWAN
|
-DRADIOLIB_EXCLUDE_LORAWAN=1
|
||||||
-DMESHTASTIC_EXCLUDE_DROPZONE=1
|
-DMESHTASTIC_EXCLUDE_DROPZONE=1
|
||||||
-DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1
|
-DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1
|
||||||
-DBUILD_EPOCH=$UNIX_TIME
|
-DBUILD_EPOCH=$UNIX_TIME
|
||||||
@ -158,7 +158,7 @@ lib_deps =
|
|||||||
|
|
||||||
https://github.com/boschsensortec/Bosch-BSEC2-Library#v1.7.2502
|
https://github.com/boschsensortec/Bosch-BSEC2-Library#v1.7.2502
|
||||||
boschsensortec/BME68x Sensor Library@^1.1.40407
|
boschsensortec/BME68x Sensor Library@^1.1.40407
|
||||||
https://github.com/KodinLanewave/INA3221@^1.0.0
|
https://github.com/KodinLanewave/INA3221@^1.0.1
|
||||||
lewisxhe/SensorLib@0.2.0
|
lewisxhe/SensorLib@0.2.0
|
||||||
mprograms/QMC5883LCompass@^1.2.0
|
mprograms/QMC5883LCompass@^1.2.0
|
||||||
|
|
||||||
|
13
src/main.cpp
13
src/main.cpp
@ -885,7 +885,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(RF95_IRQ)
|
#if defined(RF95_IRQ) && RADIOLIB_EXCLUDE_SX127X != 1
|
||||||
if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {
|
if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {
|
||||||
rIf = new RF95Interface(RadioLibHAL, LORA_CS, RF95_IRQ, RF95_RESET, RF95_DIO1);
|
rIf = new RF95Interface(RadioLibHAL, LORA_CS, RF95_IRQ, RF95_RESET, RF95_DIO1);
|
||||||
if (!rIf->init()) {
|
if (!rIf->init()) {
|
||||||
@ -899,7 +899,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_SX1262) && !defined(ARCH_PORTDUINO) && !defined(TCXO_OPTIONAL)
|
#if defined(USE_SX1262) && !defined(ARCH_PORTDUINO) && !defined(TCXO_OPTIONAL) && RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {
|
if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {
|
||||||
rIf = new SX1262Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY);
|
rIf = new SX1262Interface(RadioLibHAL, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY);
|
||||||
if (!rIf->init()) {
|
if (!rIf->init()) {
|
||||||
@ -975,7 +975,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_LR1110)
|
#if defined(USE_LR1110) && RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {
|
if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {
|
||||||
rIf = new LR1110Interface(RadioLibHAL, LR1110_SPI_NSS_PIN, LR1110_IRQ_PIN, LR1110_NRESET_PIN, LR1110_BUSY_PIN);
|
rIf = new LR1110Interface(RadioLibHAL, LR1110_SPI_NSS_PIN, LR1110_IRQ_PIN, LR1110_NRESET_PIN, LR1110_BUSY_PIN);
|
||||||
if (!rIf->init()) {
|
if (!rIf->init()) {
|
||||||
@ -989,7 +989,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_LR1120)
|
#if defined(USE_LR1120) && RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
if (!rIf) {
|
if (!rIf) {
|
||||||
rIf = new LR1120Interface(RadioLibHAL, LR1120_SPI_NSS_PIN, LR1120_IRQ_PIN, LR1120_NRESET_PIN, LR1120_BUSY_PIN);
|
rIf = new LR1120Interface(RadioLibHAL, LR1120_SPI_NSS_PIN, LR1120_IRQ_PIN, LR1120_NRESET_PIN, LR1120_BUSY_PIN);
|
||||||
if (!rIf->init()) {
|
if (!rIf->init()) {
|
||||||
@ -1003,7 +1003,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_LR1121)
|
#if defined(USE_LR1121) && RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
if (!rIf) {
|
if (!rIf) {
|
||||||
rIf = new LR1121Interface(RadioLibHAL, LR1121_SPI_NSS_PIN, LR1121_IRQ_PIN, LR1121_NRESET_PIN, LR1121_BUSY_PIN);
|
rIf = new LR1121Interface(RadioLibHAL, LR1121_SPI_NSS_PIN, LR1121_IRQ_PIN, LR1121_NRESET_PIN, LR1121_BUSY_PIN);
|
||||||
if (!rIf->init()) {
|
if (!rIf->init()) {
|
||||||
@ -1017,7 +1017,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_SX1280)
|
#if defined(USE_SX1280) && RADIOLIB_EXCLUDE_SX128X != 1
|
||||||
if (!rIf) {
|
if (!rIf) {
|
||||||
rIf = new SX1280Interface(RadioLibHAL, SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY);
|
rIf = new SX1280Interface(RadioLibHAL, SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY);
|
||||||
if (!rIf->init()) {
|
if (!rIf->init()) {
|
||||||
@ -1032,7 +1032,6 @@ void setup()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// check if the radio chip matches the selected region
|
// check if the radio chip matches the selected region
|
||||||
|
|
||||||
if ((config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (!rIf->wideLora())) {
|
if ((config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (!rIf->wideLora())) {
|
||||||
LOG_WARN("Radio chip does not support 2.4GHz LoRa. Reverting to unset.\n");
|
LOG_WARN("Radio chip does not support 2.4GHz LoRa. Reverting to unset.\n");
|
||||||
config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;
|
config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;
|
||||||
|
@ -8,13 +8,19 @@
|
|||||||
#include "api/ServerAPI.h"
|
#include "api/ServerAPI.h"
|
||||||
|
|
||||||
// We need this declaration for proper linking in derived classes
|
// We need this declaration for proper linking in derived classes
|
||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
template class SX126xInterface<SX1262>;
|
template class SX126xInterface<SX1262>;
|
||||||
template class SX126xInterface<SX1268>;
|
template class SX126xInterface<SX1268>;
|
||||||
template class SX126xInterface<LLCC68>;
|
template class SX126xInterface<LLCC68>;
|
||||||
|
#endif
|
||||||
|
#if RADIOLIB_EXCLUDE_SX128X != 1
|
||||||
template class SX128xInterface<SX1280>;
|
template class SX128xInterface<SX1280>;
|
||||||
|
#endif
|
||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
template class LR11x0Interface<LR1110>;
|
template class LR11x0Interface<LR1110>;
|
||||||
template class LR11x0Interface<LR1120>;
|
template class LR11x0Interface<LR1120>;
|
||||||
template class LR11x0Interface<LR1121>;
|
template class LR11x0Interface<LR1121>;
|
||||||
|
#endif
|
||||||
#ifdef ARCH_STM32WL
|
#ifdef ARCH_STM32WL
|
||||||
template class SX126xInterface<STM32WLx>;
|
template class SX126xInterface<STM32WLx>;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
#include "LLCC68Interface.h"
|
#include "LLCC68Interface.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -6,4 +7,5 @@ LLCC68Interface::LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R
|
|||||||
RADIOLIB_PIN_TYPE busy)
|
RADIOLIB_PIN_TYPE busy)
|
||||||
: SX126xInterface(hal, cs, irq, rst, busy)
|
: SX126xInterface(hal, cs, irq, rst, busy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
#include "SX126xInterface.h"
|
#include "SX126xInterface.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -15,4 +15,5 @@ class LLCC68Interface : public SX126xInterface<LLCC68>
|
|||||||
public:
|
public:
|
||||||
LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||||
RADIOLIB_PIN_TYPE busy);
|
RADIOLIB_PIN_TYPE busy);
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,5 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
|
|
||||||
#include "LR1110Interface.h"
|
#include "LR1110Interface.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -6,4 +8,5 @@ LR1110Interface::LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R
|
|||||||
RADIOLIB_PIN_TYPE busy)
|
RADIOLIB_PIN_TYPE busy)
|
||||||
: LR11x0Interface(hal, cs, irq, rst, busy)
|
: LR11x0Interface(hal, cs, irq, rst, busy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
#include "LR11x0Interface.h"
|
#include "LR11x0Interface.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,4 +10,5 @@ class LR1110Interface : public LR11x0Interface<LR1110>
|
|||||||
public:
|
public:
|
||||||
LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||||
RADIOLIB_PIN_TYPE busy);
|
RADIOLIB_PIN_TYPE busy);
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,5 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
|
|
||||||
#include "LR1120Interface.h"
|
#include "LR1120Interface.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -11,4 +13,5 @@ LR1120Interface::LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R
|
|||||||
bool LR1120Interface::wideLora()
|
bool LR1120Interface::wideLora()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
|
|
||||||
#include "LR11x0Interface.h"
|
#include "LR11x0Interface.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Our adapter for LR1120 wideband radios
|
* Our adapter for LR1120 wideband radios
|
||||||
*/
|
*/
|
||||||
@ -11,4 +11,5 @@ class LR1120Interface : public LR11x0Interface<LR1120>
|
|||||||
LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||||
RADIOLIB_PIN_TYPE busy);
|
RADIOLIB_PIN_TYPE busy);
|
||||||
bool wideLora() override;
|
bool wideLora() override;
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
#include "LR1121Interface.h"
|
#include "LR1121Interface.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -11,4 +12,5 @@ LR1121Interface::LR1121Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R
|
|||||||
bool LR1121Interface::wideLora()
|
bool LR1121Interface::wideLora()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
|
|
||||||
#include "LR11x0Interface.h"
|
#include "LR11x0Interface.h"
|
||||||
|
|
||||||
@ -11,4 +12,5 @@ class LR1121Interface : public LR11x0Interface<LR1121>
|
|||||||
LR1121Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
LR1121Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||||
RADIOLIB_PIN_TYPE busy);
|
RADIOLIB_PIN_TYPE busy);
|
||||||
bool wideLora() override;
|
bool wideLora() override;
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
#include "LR11x0Interface.h"
|
#include "LR11x0Interface.h"
|
||||||
#include "Throttle.h"
|
#include "Throttle.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
@ -284,4 +285,5 @@ template <typename T> bool LR11x0Interface<T>::sleep()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_LR11X0 != 1
|
||||||
#include "RadioLibInterface.h"
|
#include "RadioLibInterface.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,3 +66,4 @@ template <class T> class LR11x0Interface : public RadioLibInterface
|
|||||||
|
|
||||||
virtual void setStandby() override;
|
virtual void setStandby() override;
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX127X != 1
|
||||||
#include "RF95Interface.h"
|
#include "RF95Interface.h"
|
||||||
#include "MeshRadio.h" // kinda yucky, but we need to know which region we are in
|
#include "MeshRadio.h" // kinda yucky, but we need to know which region we are in
|
||||||
#include "RadioLibRF95.h"
|
#include "RadioLibRF95.h"
|
||||||
@ -336,3 +337,4 @@ bool RF95Interface::sleep()
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_SX127X != 1
|
||||||
#include "MeshRadio.h" // kinda yucky, but we need to know which region we are in
|
#include "MeshRadio.h" // kinda yucky, but we need to know which region we are in
|
||||||
#include "RadioLibInterface.h"
|
#include "RadioLibInterface.h"
|
||||||
#include "RadioLibRF95.h"
|
#include "RadioLibRF95.h"
|
||||||
@ -69,3 +69,4 @@ class RF95Interface : public RadioLibInterface
|
|||||||
/** Some boards require GPIO control of tx vs rx paths */
|
/** Some boards require GPIO control of tx vs rx paths */
|
||||||
void setTransmitEnable(bool txon);
|
void setTransmitEnable(bool txon);
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX127X != 1
|
||||||
#include "RadioLibRF95.h"
|
#include "RadioLibRF95.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
|
||||||
@ -81,4 +82,5 @@ uint8_t RadioLibRF95::readReg(uint8_t addr)
|
|||||||
{
|
{
|
||||||
Module *mod = this->getMod();
|
Module *mod = this->getMod();
|
||||||
return mod->SPIreadRegister(addr);
|
return mod->SPIreadRegister(addr);
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_SX127X != 1
|
||||||
#include <RadioLib.h>
|
#include <RadioLib.h>
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -69,3 +70,4 @@ class RadioLibRF95 : public SX1278
|
|||||||
// use the previous value
|
// use the previous value
|
||||||
float currentLimit = 100;
|
float currentLimit = 100;
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
#include "SX1262Interface.h"
|
#include "SX1262Interface.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -6,4 +7,5 @@ SX1262Interface::SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R
|
|||||||
RADIOLIB_PIN_TYPE busy)
|
RADIOLIB_PIN_TYPE busy)
|
||||||
: SX126xInterface(hal, cs, irq, rst, busy)
|
: SX126xInterface(hal, cs, irq, rst, busy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "SX126xInterface.h"
|
#include "SX126xInterface.h"
|
||||||
@ -10,4 +11,5 @@ class SX1262Interface : public SX126xInterface<SX1262>
|
|||||||
public:
|
public:
|
||||||
SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||||
RADIOLIB_PIN_TYPE busy);
|
RADIOLIB_PIN_TYPE busy);
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
#include "SX1268Interface.h"
|
#include "SX1268Interface.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -15,4 +16,5 @@ float SX1268Interface::getFreq()
|
|||||||
return 433.125f;
|
return 433.125f;
|
||||||
else
|
else
|
||||||
return savedFreq;
|
return savedFreq;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
|
|
||||||
#include "SX126xInterface.h"
|
#include "SX126xInterface.h"
|
||||||
|
|
||||||
@ -13,3 +14,4 @@ class SX1268Interface : public SX126xInterface<SX1268>
|
|||||||
SX1268Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
SX1268Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||||
RADIOLIB_PIN_TYPE busy);
|
RADIOLIB_PIN_TYPE busy);
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
#include "SX126xInterface.h"
|
#include "SX126xInterface.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -341,4 +342,5 @@ template <typename T> bool SX126xInterface<T>::sleep()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_SX126X != 1
|
||||||
|
|
||||||
#include "RadioLibInterface.h"
|
#include "RadioLibInterface.h"
|
||||||
|
|
||||||
@ -68,3 +69,4 @@ template <class T> class SX126xInterface : public RadioLibInterface
|
|||||||
|
|
||||||
virtual void setStandby() override;
|
virtual void setStandby() override;
|
||||||
};
|
};
|
||||||
|
#endif
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX128X != 1
|
||||||
#include "SX1280Interface.h"
|
#include "SX1280Interface.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -7,3 +8,4 @@ SX1280Interface::SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, R
|
|||||||
: SX128xInterface(hal, cs, irq, rst, busy)
|
: SX128xInterface(hal, cs, irq, rst, busy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#if RADIOLIB_EXCLUDE_SX128X != 1
|
||||||
#include "SX128xInterface.h"
|
#include "SX128xInterface.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,3 +12,4 @@ class SX1280Interface : public SX128xInterface<SX1280>
|
|||||||
SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
|
||||||
RADIOLIB_PIN_TYPE busy);
|
RADIOLIB_PIN_TYPE busy);
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#if RADIOLIB_EXCLUDE_SX128X != 1
|
||||||
#include "SX128xInterface.h"
|
#include "SX128xInterface.h"
|
||||||
#include "Throttle.h"
|
#include "Throttle.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
@ -313,4 +314,5 @@ template <typename T> bool SX128xInterface<T>::sleep()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
@ -209,13 +209,15 @@ void setupModules()
|
|||||||
#if defined(USE_SX1280) && !MESHTASTIC_EXCLUDE_AUDIO
|
#if defined(USE_SX1280) && !MESHTASTIC_EXCLUDE_AUDIO
|
||||||
audioModule = new AudioModule();
|
audioModule = new AudioModule();
|
||||||
#endif
|
#endif
|
||||||
#if !MESHTASTIC_EXCLUDE_STOREFORWARD
|
|
||||||
storeForwardModule = new StoreForwardModule();
|
|
||||||
#endif
|
|
||||||
#if !MESHTASTIC_EXCLUDE_PAXCOUNTER
|
#if !MESHTASTIC_EXCLUDE_PAXCOUNTER
|
||||||
paxcounterModule = new PaxcounterModule();
|
paxcounterModule = new PaxcounterModule();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)
|
||||||
|
#if !MESHTASTIC_EXCLUDE_STOREFORWARD
|
||||||
|
storeForwardModule = new StoreForwardModule();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)
|
#if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)
|
||||||
#if !MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION
|
#if !MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION
|
||||||
externalNotificationModule = new ExternalNotificationModule();
|
externalNotificationModule = new ExternalNotificationModule();
|
||||||
|
@ -30,9 +30,6 @@
|
|||||||
|
|
||||||
StoreForwardModule *storeForwardModule;
|
StoreForwardModule *storeForwardModule;
|
||||||
|
|
||||||
uint32_t lastHeartbeat = 0;
|
|
||||||
uint32_t heartbeatInterval = 60; // Default to 60 seconds, adjust as needed
|
|
||||||
|
|
||||||
int32_t StoreForwardModule::runOnce()
|
int32_t StoreForwardModule::runOnce()
|
||||||
{
|
{
|
||||||
#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)
|
#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)
|
||||||
|
@ -9,6 +9,9 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/rak4631 -D RAK_4631
|
|||||||
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
|
||||||
-DEINK_WIDTH=250
|
-DEINK_WIDTH=250
|
||||||
-DEINK_HEIGHT=122
|
-DEINK_HEIGHT=122
|
||||||
|
-DRADIOLIB_EXCLUDE_SX128X=1
|
||||||
|
-DRADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-DRADIOLIB_EXCLUDE_LR11X0=1
|
||||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak4631> +<mesh/eth/> +<mesh/api/> +<mqtt/>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
|
Loading…
Reference in New Issue
Block a user