Skip to content

Commit

Permalink
Merge pull request #4612 from meshtastic/Tracker-1000E
Browse files Browse the repository at this point in the history
several small changes for Tracker 1000E
  • Loading branch information
caveman99 authored Sep 3, 2024
2 parents cdea602 + 6fc4a17 commit 8b1d782
Show file tree
Hide file tree
Showing 19 changed files with 23,610 additions and 15 deletions.
Binary file removed bin/Meshtastic_nRF52_factory_erase_v2.uf2
Binary file not shown.
Binary file not shown.
Binary file not shown.
11,744 changes: 11,744 additions & 0 deletions bin/generic/Meshtastic_6.1.0_bootloader-0.9.2_s140_6.1.1.hex

Large diffs are not rendered by default.

Binary file not shown.
11,851 changes: 11,851 additions & 0 deletions bin/generic/Meshtastic_7.3.0_bootloader-0.9.2_s140_7.3.0.hex

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions src/mesh/LR11x0Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/LR11x0Interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
/**
Expand Down
5 changes: 4 additions & 1 deletion src/mesh/SX126xInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/SX126xInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/mesh/SX128xInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/SX128xInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
/**
Expand Down
2 changes: 1 addition & 1 deletion src/meshUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion variants/tracker-t1000-e/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion variants/tracker-t1000-e/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b1d782

Please sign in to comment.