mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-14 15:31:31 +10:00
feat(variants): add Seeed Wio Tracker L1 Pro 1W (#11542)
* fix(sx126x): allow boards to opt out of the PA optimization table Boards driving an external PA can define SX126X_NO_POWER_OPTIMIZATION_TABLE to use the fixed PA config instead of RadioLib's table, which is tuned for a bare SX126x. Default behaviour is unchanged. init() applies the fixed config after begin(), which programs power through the table. * feat(variants): add Seeed Wio Tracker L1 Pro 1W nRF52840 + SX1262 with a 1 W external PA, L76K GNSS, SH1106 OLED. Uses hw_model 144 (meshtastic/protobufs#1038), opts into SX126X_NO_POWER_OPTIMIZATION_TABLE and declares SX126X_MAX_POWER explicitly. The PA gain table is indexed by SX1262 output power in dBm. Requires protobufs#1038 and a protobuf regen before it builds. * chore(deps): bump RadioLib to 510e00cf Carries the current LR11x0 and LR2021 fixes. * fix(variants): correct L1 Pro 1W QSPI pins and clean up comments PIN_QSPI_* are logical pin indices. The QSPI flash sits at D19-D24 in variant.cpp, but the defines carried D21-D26 from seeed_solar_node, where that block does start at D21. D25 and D26 are trackball pins. Also replaces mis-encoded characters in the pin comments and drops the migration note, which referenced a private repo path and a stale PINS_COUNT. * fix(variants): move L1 Pro 1W out of the per-PR build matrix board_level = pr is the high-attention tier that builds on every PR. This board belongs with the mainline set, which uses board_level = release.
This commit is contained in:
+8
-1
@@ -205,6 +205,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define TX_GAIN_LORA 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8
|
||||
#endif
|
||||
|
||||
#ifdef SEEED_WIO_TRACKER_L1_PRO_1W
|
||||
// Indexed by SX1262 output power in dBm, matching RadioInterface::limitPower().
|
||||
// TODO: verify against measured output.
|
||||
#define NUM_PA_POINTS 22
|
||||
#define TX_GAIN_LORA 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10
|
||||
#endif
|
||||
|
||||
// Default system gain to 0 if not defined
|
||||
#ifndef NUM_PA_POINTS
|
||||
#define NUM_PA_POINTS 1
|
||||
@@ -234,7 +241,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define SSD1306_ADDRESS_L 0x3C // Addr = 0
|
||||
#define SSD1306_ADDRESS_H 0x3D // Addr = 1
|
||||
|
||||
#if defined(SEEED_WIO_TRACKER_L1) && !defined(SEEED_WIO_TRACKER_L1_EINK)
|
||||
#if (defined(SEEED_WIO_TRACKER_L1) || defined(SEEED_WIO_TRACKER_L1_PRO_1W)) && !defined(SEEED_WIO_TRACKER_L1_EINK)
|
||||
#define SSD1306_ADDRESS SSD1306_ADDRESS_H
|
||||
#define USE_SH1106
|
||||
#endif
|
||||
|
||||
@@ -176,6 +176,12 @@ template <typename T> bool SX126xInterface<T>::init()
|
||||
if (res == RADIOLIB_ERR_NONE)
|
||||
res = lora.setCRC(RADIOLIB_SX126X_LORA_CRC_ON);
|
||||
|
||||
#ifdef SX126X_NO_POWER_OPTIMIZATION_TABLE
|
||||
// begin() applied the optimization table; re-apply the fixed PA config.
|
||||
if (res == RADIOLIB_ERR_NONE)
|
||||
res = lora.setOutputPower(power, false);
|
||||
#endif
|
||||
|
||||
if (res == RADIOLIB_ERR_NONE)
|
||||
startReceive(); // start receiving
|
||||
|
||||
@@ -226,7 +232,11 @@ template <typename T> bool SX126xInterface<T>::reconfigure()
|
||||
if (power < -9)
|
||||
power = -9;
|
||||
|
||||
#ifdef SX126X_NO_POWER_OPTIMIZATION_TABLE
|
||||
err = lora.setOutputPower(power, false); // external PA: fixed PA config
|
||||
#else
|
||||
err = lora.setOutputPower(power);
|
||||
#endif
|
||||
if (err != RADIOLIB_ERR_NONE) {
|
||||
// Don't abort: this power is operator config (tx_power/SX126X_MAX_POWER); a value above the
|
||||
// driver's max would crash the daemon before reloadConfig() persists. Flag it and keep prior power.
|
||||
@@ -525,4 +535,4 @@ template <typename T> void SX126xInterface<T>::setTransmitEnable(bool txon)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -137,6 +137,8 @@
|
||||
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_POCKET
|
||||
#elif defined(SEEED_WIO_TRACKER_L1_EINK)
|
||||
#define HW_VENDOR meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1_EINK
|
||||
#elif defined(SEEED_WIO_TRACKER_L1_PRO_1W)
|
||||
#define HW_VENDOR meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1_PRO_1W
|
||||
#elif defined(SEEED_WIO_TRACKER_L1)
|
||||
#define HW_VENDOR meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1
|
||||
#elif defined(HELTEC_MESH_SOLAR)
|
||||
|
||||
Reference in New Issue
Block a user