sl-firmware created pull request seb/saltylab-firmware#31

sl-firmware
Sat, 28 Feb 2026 19:44:05 -0500

31#feat: BME280 temp/humidity/pressure telemetry (#30)#

Summary

Extends bmp280.c to fully support BME280 (chip_id 0x60) alongside BMP280 (0x58)

Reads humidity calibration (dig_H1–H6) from registers 0xA1 and 0xE1–0xE7

Sets ctrl_hum (0xF2, osrs_h=×16) before ctrl_meas — hardware requirement

Adds bmp280_read_humidity(): float compensation on FPv5-SP FPU, returns %RH × 10; -1 if BMP280

main.c: baro_chip (chip_id) replaces baro_ok; telemetry adds t (°C×10), pa (hPa×10) for all barometers; h (%RH×10) for BME280 only

Web UI: hidden TEMP / HUMIDITY / PRESSURE rows revealed on first packet containing t/h/pa

I2C hang safety: all HAL operations use 100ms timeouts — missing hardware returns fast, not stuck

Test plan

Build passes (verified: 7.4% Flash, 1.6% RAM)

With GYBMEP at 0x76 or 0x77: JSON stream includes t, pa, h fields

With BMP280 only: h field absent, t and pa present

With no baro: no t/pa/h/alt fields

Web UI shows TEMP/HUMIDITY/PRESSURE rows only when data received

Closes #30.

🤖 Generated with Claude Code