merge: upstream/dev into observer-firmware-dev
Brings in the external FEM gain preferences (fem_txgain, PR #3137 plus the companion-side port), the AGC reset rxgain fix, the LR2021 preamble/IRQ timeout logic, and assorted variant fixes (T096, T-Echo Card TCXO, promicro pinmap, minewsemi, R1 Neo). Conflict resolutions: - SH1106Display: both sides fixed T-Beam Supreme startup independently. Kept our _initialized guard and DISPLAY_ADDRESS_ALT override, took upstream's SA0-pair fallback and its unconditional display.begin() so the frame buffer is allocated even when no panel answers. - MyMesh/SensorMesh/CommonCLI: took upstream's fem_txgain default and wiring, kept our comments and the observer-side prefs layout. Also fixes CustomLLCC68Wrapper, which upstream missed when sx126xResetAGC gained its rx_boost_gain parameter. No variant builds that wrapper today, so neither tree failed to compile.
This commit is contained in:
commit
ced0eb3780
41 files changed
+521
-153
No files matched your search
@@ -24,20 +24,26 @@ bool SH1106Display::begin()
|
||||
{
|
||||
// Wire must already be initialised by board.begin() before this is called.
|
||||
// Boards with non-standard SH1106 addresses should define DISPLAY_ADDRESS
|
||||
// in their variant/platformio configuration. Some board revisions may have
|
||||
// different solder-bridge address configurations, so variants can also
|
||||
// provide DISPLAY_ADDRESS_ALT as a fallback.
|
||||
_initialized = false;
|
||||
if (i2c_probe(Wire, DISPLAY_ADDRESS) && display.begin(DISPLAY_ADDRESS, true)) {
|
||||
_initialized = true;
|
||||
}
|
||||
// in their variant/platformio configuration. The SA0 strap selects 0x3C or
|
||||
// 0x3D and differs between revisions of the same board (e.g. T-Beam Supreme),
|
||||
// so fall back to the other address of the pair, or to DISPLAY_ADDRESS_ALT
|
||||
// when a variant names one explicitly.
|
||||
#ifdef DISPLAY_ADDRESS_ALT
|
||||
if (!_initialized && DISPLAY_ADDRESS_ALT != DISPLAY_ADDRESS &&
|
||||
i2c_probe(Wire, DISPLAY_ADDRESS_ALT) &&
|
||||
display.begin(DISPLAY_ADDRESS_ALT, true)) {
|
||||
_initialized = true;
|
||||
}
|
||||
const uint8_t alt_addr = DISPLAY_ADDRESS_ALT;
|
||||
#else
|
||||
const uint8_t alt_addr = DISPLAY_ADDRESS ^ 1;
|
||||
#endif
|
||||
uint8_t addr = 0;
|
||||
if (i2c_probe(Wire, DISPLAY_ADDRESS)) {
|
||||
addr = DISPLAY_ADDRESS;
|
||||
} else if (alt_addr != DISPLAY_ADDRESS && i2c_probe(Wire, alt_addr)) {
|
||||
addr = alt_addr;
|
||||
}
|
||||
// Run the Adafruit init even when no panel answered: it is what allocates the
|
||||
// frame buffer and the I2C device. Skipping it leaves i2c_dev and spi_dev
|
||||
// NULL for any caller that draws without checking our return value.
|
||||
bool ok = display.begin(addr ? addr : DISPLAY_ADDRESS, true);
|
||||
_initialized = (addr != 0) && ok;
|
||||
return _initialized;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user