Repeater, room server, sensor, companion: BMP388 / BMP390 pressure sensor supported
pub-release / release (push) Failing after 6s
tth-docs / site (push) Successful in 17s

Changelog-cs: Repeater, room server, senzor, companion: podpora tlakového čidla BMP388 / BMP390
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-12-03 16:55:26 +01:00
1 parent 1bcb850c99
commit 8f0f6859d3
6 files changed
+61

No files matched your search

+8
View File
@@ -191,6 +191,10 @@ Repeater navíc:
upstream PR meshcore-dev/MeshCore#4017). Čipy INA se rozlišují podle ID, takže
INA226 už se nedetekuje jako INA219. Odpor bočníku (INA219, INA226, INA3221; INA260 ho má uvnitř) se
nastavuje za běhu a ukládá se: `sensor set ina.shunt <mOhm>`.
* Nové čidlo **BMP388 / BMP390** (tlak, teplota, výška; adresa 0x77, se SDO na GND
0x76; `ENV_INCLUDE_BMP3XX`, výchozí adresa `TELEM_BMP3XX_ADDRESS`). Měří jen na
vyžádání a mezi čteními spí; první měření po startu, které je u tohoto čipu
nesmyslné, se zahodí už při inicializaci.
* Companion: `gps duty` přežije reboot, kopie data sestavení má hlídanou
délku. Export privátního klíče, čtení BLE PINu a jeho změna (i přes CLI
`set pin`) jdou jen přes spárované BLE, ne přes USB, UART ani WiFi/TCP,
@@ -534,6 +538,10 @@ The repeater also has:
so an INA226 is no longer taken for an INA219. The shunt (INA219, INA226,
INA3221; the INA260 has it inside) is set at runtime and saved:
`sensor set ina.shunt <mOhm>`.
* New sensor **BMP388 / BMP390** (pressure, temperature, altitude; address 0x77,
0x76 with SDO to GND; `ENV_INCLUDE_BMP3XX`, default address
`TELEM_BMP3XX_ADDRESS`). It measures on demand and sleeps between reads; the
first conversion after boot, which this chip gets wrong, is spent during init.
* Companion: `gps duty` persists, bounded build-date copy. Private key
export, reading the BLE PIN and changing it (CLI `set pin` included) work
only over paired BLE, never over USB, a UART or WiFi/TCP, and the reply that
+2
View File
@@ -196,6 +196,7 @@ build_flags =
-D ENV_INCLUDE_AHTX0=1
-D ENV_INCLUDE_BME280=1
-D ENV_INCLUDE_BMP280=1
-D ENV_INCLUDE_BMP3XX=1
-D ENV_INCLUDE_SHTC3=1
-D ENV_INCLUDE_SHT4X=1
-D ENV_INCLUDE_LPS22HB=1
@@ -215,6 +216,7 @@ lib_deps =
adafruit/Adafruit AHTX0 @ ^2.0.5
adafruit/Adafruit BME280 Library @ ^2.3.0
adafruit/Adafruit BMP280 Library @ ^2.6.8
adafruit/Adafruit BMP3XX Library @ ^2.1.6
adafruit/Adafruit SHTC3 Library @ ^1.0.1
sensirion/Sensirion I2C SHT4x @ ^1.1.2
arduino-libraries/Arduino_LPS22HB @ ^1.0.2
+13
View File
@@ -12,6 +12,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -44,6 +45,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -75,6 +77,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -106,6 +109,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -140,6 +144,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -174,6 +179,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -207,6 +213,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -240,6 +247,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -272,6 +280,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@1.13.0
adafruit/Adafruit GFX Library@2.0.0
@@ -304,6 +313,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -336,6 +346,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -367,6 +378,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -398,6 +410,7 @@ adafruit/Adafruit BME280 Library@2.3.0
adafruit/Adafruit BME680 Library@2.0.6
adafruit/Adafruit BMP085 Library@1.2.4
adafruit/Adafruit BMP280 Library@2.6.8
adafruit/Adafruit BMP3XX Library@2.1.6
adafruit/Adafruit BusIO@1.17.4
adafruit/Adafruit GFX Library@2.0.0
adafruit/Adafruit INA219@1.2.3
@@ -82,6 +82,15 @@ static Adafruit_BME280 BME280;
static Adafruit_BMP280 BMP280(TELEM_WIRE);
#endif
#if ENV_INCLUDE_BMP3XX
#ifndef TELEM_BMP3XX_ADDRESS
#define TELEM_BMP3XX_ADDRESS 0x77 // BMP388/BMP390, SDO high (0x76 with SDO to GND)
#endif
#define TELEM_BMP3XX_SEALEVELPRESSURE_HPA (1013.25)
#include <Adafruit_BMP3XX.h>
static Adafruit_BMP3XX BMP3XX;
#endif
#if ENV_INCLUDE_SHTC3
#include <Adafruit_SHTC3.h>
static Adafruit_SHTC3 SHTC3;
@@ -301,6 +310,29 @@ static void query_bmp280(uint8_t ch, uint8_t, CayenneLPP& lpp) {
}
#endif
#if ENV_INCLUDE_BMP3XX
// CUSTOM (TeTeHacko): BMP388/BMP390. begin_I2C() checks the chip ID (0x50 /
// 0x60) and leaves the chip asleep; performReading() runs one forced
// conversion and the chip goes back to sleep on its own, so it costs nothing
// between telemetry reads (see "Sensors sleep between reads" above).
static uint8_t init_bmp3xx(TwoWire* wire, uint8_t addr) {
if (!BMP3XX.begin_I2C(addr, wire)) return 0;
BMP3XX.setTemperatureOversampling(BMP3_OVERSAMPLING_2X);
BMP3XX.setPressureOversampling(BMP3_OVERSAMPLING_8X);
BMP3XX.setIIRFilterCoeff(BMP3_IIR_FILTER_DISABLE);
// The first conversion after init is garbage (x4, 3. 12. 2026: 806 hPa,
// then 1011 hPa from the second read on): spend it here, not on a query.
BMP3XX.performReading();
return 1;
}
static void query_bmp3xx(uint8_t ch, uint8_t, CayenneLPP& lpp) {
if (!BMP3XX.performReading()) return;
lpp.addTemperature(ch, BMP3XX.temperature);
lpp.addBarometricPressure(ch, BMP3XX.pressure / 100.0f);
lpp.addAltitude(ch, 44330.0f * (1.0f - powf(BMP3XX.pressure / 100.0f / (float)TELEM_BMP3XX_SEALEVELPRESSURE_HPA, 0.1903f)));
}
#endif
#if ENV_INCLUDE_SHTC3
static uint8_t init_shtc3(TwoWire* wire, uint8_t) {
// Adafruit_SHTC3::begin() does not accept an address (fixed at 0x70).
@@ -651,6 +683,10 @@ static const SensorDef SENSOR_TABLE[] = {
{ TELEM_BMP280_ADDRESS, "BMP280", init_bmp280, query_bmp280 },
{ TELEM_BOSCH_ALT_ADDR(TELEM_BMP280_ADDRESS), "BMP280", init_bmp280, query_bmp280 },
#endif
#if ENV_INCLUDE_BMP3XX
{ TELEM_BMP3XX_ADDRESS, "BMP3XX", init_bmp3xx, query_bmp3xx },
{ TELEM_BOSCH_ALT_ADDR(TELEM_BMP3XX_ADDRESS), "BMP3XX", init_bmp3xx, query_bmp3xx },
#endif
#if ENV_INCLUDE_SHTC3
{ 0x70, "SHTC3", init_shtc3, query_shtc3 },
#endif
+1
View File
@@ -24,6 +24,7 @@ build_flags =
-D ENV_INCLUDE_AHTX0=0
-D ENV_INCLUDE_BME280=0
-D ENV_INCLUDE_BMP280=0
-D ENV_INCLUDE_BMP3XX=0
-D ENV_INCLUDE_SHTC3=0
-D ENV_INCLUDE_SHT4X=0
-D ENV_INCLUDE_LPS22HB=0
+1
View File
@@ -171,6 +171,7 @@ lib_deps =
stevemarple/MicroNMEA @ ^2.0.6
adafruit/Adafruit BME680 Library @ ^2.0.6
adafruit/Adafruit BMP085 Library @ ^1.2.4
adafruit/Adafruit BMP3XX Library @ ^2.1.6
; transitive (pulled in by the sensor libraries), listed for the link order
adafruit/Adafruit BusIO @ ^1.17.4
adafruit/Adafruit Unified Sensor @ ^1.1.15