Merge pull request #4612 from meshtastic/Tracker-1000E

several small changes for Tracker 1000E
This commit is contained in:
Thomas Göttgens 2024-09-03 14:33:03 +02:00 committed by GitHub
commit 8b1d7825b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 23610 additions and 15 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -87,7 +87,8 @@ monitor_speed = 115200
monitor_filters = direct
lib_deps =
jgromes/RadioLib@~6.6.0
; jgromes/RadioLib@~6.6.0
https://github.com/jgromes/RadioLib.git#eda4ec22ae0039f3b9a2844d68ac2023ac0076a5
https://github.com/meshtastic/esp8266-oled-ssd1306.git#e16cee124fe26490cb14880c679321ad8ac89c95 ; ESP8266_SSD1306
https://github.com/mathertel/OneButton@~2.6.1 ; OneButton library for non-blocking button debounce
https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159

View File

@ -100,13 +100,6 @@ template <typename T> bool LR11x0Interface<T>::init()
// FIXME: May want to set depending on a definition, currently all LR1110 variant files use the DC-DC regulator option
if (res == RADIOLIB_ERR_NONE)
res = lora.setRegulatorDCDC();
#ifdef TRACKER_T1000_E
#ifdef LR11X0_DIO_RF_SWITCH_CONFIG
res = lora.setDioAsRfSwitch(LR11X0_DIO_RF_SWITCH_CONFIG);
#else
res = lora.setDioAsRfSwitch(0x03, 0x0, 0x01, 0x03, 0x02, 0x0, 0x0, 0x0);
#endif
#endif
if (res == RADIOLIB_ERR_NONE) {
if (config.lora.sx126x_rx_boosted_gain) { // the name is unfortunate but historically accurate
res = lora.setRxBoostedGainMode(true);

View File

@ -25,7 +25,7 @@ template <class T> class LR11x0Interface : public RadioLibInterface
/// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep.
virtual bool sleep() override;
bool isIRQPending() override { return lora.getIrqStatus() != 0; }
bool isIRQPending() override { return lora.getIrqFlags() != 0; }
protected:
/**

View File

@ -12,6 +12,9 @@
#define SX126X_MAX_POWER 22
#endif
#define RADIOLIB_SX126X_IRQ_RX_DEFAULT \
RADIOLIB_SX126X_IRQ_RX_DONE | RADIOLIB_SX126X_IRQ_TIMEOUT | RADIOLIB_SX126X_IRQ_CRC_ERR | RADIOLIB_SX126X_IRQ_HEADER_ERR
template <typename T>
SX126xInterface<T>::SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
RADIOLIB_PIN_TYPE busy)
@ -301,7 +304,7 @@ template <typename T> bool SX126xInterface<T>::isActivelyReceiving()
// The IRQ status will be cleared when we start our read operation. Check if we've started a header, but haven't yet
// received and handled the interrupt for reading the packet/handling errors.
uint16_t irq = lora.getIrqStatus();
uint16_t irq = lora.getIrqFlags();
bool detected = (irq & (RADIOLIB_SX126X_IRQ_HEADER_VALID | RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED));
// Handle false detections
if (detected) {

View File

@ -25,7 +25,7 @@ template <class T> class SX126xInterface : public RadioLibInterface
/// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep.
virtual bool sleep() override;
bool isIRQPending() override { return lora.getIrqStatus() != 0; }
bool isIRQPending() override { return lora.getIrqFlags() != 0; }
protected:
float currentLimit = 140; // Higher OCP limit for SX126x PA

View File

@ -12,6 +12,10 @@
#define SX128X_MAX_POWER 13
#endif
#define RADIOLIB_SX128X_IRQ_RX_DEFAULT \
RADIOLIB_SX128X_IRQ_RX_DONE | RADIOLIB_SX128X_IRQ_RX_TX_TIMEOUT | RADIOLIB_SX128X_IRQ_CRC_ERROR | \
RADIOLIB_SX128X_IRQ_HEADER_ERROR
template <typename T>
SX128xInterface<T>::SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
RADIOLIB_PIN_TYPE busy)

View File

@ -27,7 +27,7 @@ template <class T> class SX128xInterface : public RadioLibInterface
/// Prepare hardware for sleep. Call this _only_ for deep sleep, not needed for light sleep.
virtual bool sleep() override;
bool isIRQPending() override { return lora.getIrqStatus() != 0; }
bool isIRQPending() override { return lora.getIrqFlags() != 0; }
protected:
/**

View File

@ -68,7 +68,7 @@ void printBytes(const char *label, const uint8_t *p, size_t numbytes)
bool memfll(const uint8_t *mem, uint8_t find, size_t numbytes)
{
for (int i = 0; i < numbytes; i++) {
for (uint8_t i = 0; i < numbytes; i++) {
if (mem[i] != find)
return false;
}

View File

@ -4,7 +4,7 @@ extends = nrf52840_base
board = tracker-t1000-e
; board_level = extra
; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e
build_flags = ${nrf52840_base.build_flags} -Ivariants/tracker-t1000-e -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DTRACKER_T1000_E -DRADIOLIB_GODMODE
build_flags = ${nrf52840_base.build_flags} -Ivariants/tracker-t1000-e -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DTRACKER_T1000_E
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld

View File

@ -102,7 +102,6 @@ extern "C" {
#define LR11X0_DIO3_TCXO_VOLTAGE 1.6
#define LR11X0_DIO_AS_RF_SWITCH
#define LR11X0_DIO_RF_SWITCH_CONFIG 0x0f, 0x0, 0x09, 0x0B, 0x0A, 0x0, 0x4, 0x0
#define HAS_GPS 1
#define GNSS_AIROHA