Commit Graph

2880 Commits

Author SHA1 Message Date
Scott Powell bc5d648204 * contacts sync fix
* fix for reusing transient/anon contacts only
2026-06-01 19:04:42 +10:00
Scott Powell d9df8307ca * first draft 2026-06-01 16:49:31 +10:00
ripplebiz bb6cf8396d Merge pull request #2634 from NickDunklee/bme680-fixes-consolidation
feat: Integrate BME680 Bosch BSEC support for RAK4631
2026-06-01 13:35:32 +10:00
ripplebiz 3e4d6b074a Merge pull request #2637 from sefinek/docs/remove-duplicate-rxgain-entry
docs: remove duplicate radio.rxgain entry and fix hardware note
2026-06-01 13:23:11 +10:00
ripplebiz d8686b224d Merge pull request #2643 from disq/companion-display-keep-on-when-powered
companion_radio: Add optional `KEEP_DISPLAY_ON_USB` flag to keep display on while powered 🤖🤖
2026-06-01 13:18:34 +10:00
Scott Powell b259fbd01b * power saving: hasPendingWork() now also checks if there's a pending contacts write 2026-05-31 18:52:42 +10:00
ripplebiz 54c111609a Merge pull request #2286 from IoTThinks/MCdev-PowerSaving-for-nrf52-companion-202604
Added Power Saving for NRF52 companions to have extra 30% battery life
2026-05-31 18:49:46 +10:00
Kemal Hadimli bb781ff10a companion_radio: opt-in KEEP_DISPLAY_ON_USB to keep OLED on while powered
AUTO_OFF_MILLIS is a power-save feature aimed at battery use. When the
board reports isExternalPowered() == true (USB or other DC source),
blanking the screen serves no purpose — there's nothing to conserve.

But OLEDs are vulnerable to burn-in with static content, so this
behaviour is gated behind a new build flag KEEP_DISPLAY_ON_USB. Default
is unchanged from upstream — the display blanks after AUTO_OFF_MILLIS
on USB or battery. Variants that ship with an LCD instead of an OLED
(e.g. heltec_t096) can opt in by adding -D KEEP_DISPLAY_ON_USB to
their env, gaining always-on-while-powered without exposing OLED users
to burn-in risk.

When the flag is enabled, the implementation refreshes _auto_off every
loop iteration while externally powered, so the timer naturally counts
a fresh AUTO_OFF_MILLIS window from the moment power is removed —
no instantaneous-blank-on-unplug.

Applied to all three companion_radio UI flavours (ui-new, ui-tiny,
ui-orig). Boards without an isExternalPowered() override use the
base-class default in MeshCore.h (returns false), so battery-powered
behaviour is unchanged everywhere.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 11:25:48 +01:00
Nick Dunklee f86e6c019c 8 hour save window, LP, 28 day calibration window 2026-05-28 18:35:22 -06:00
Sefinek 7937b43b49 docs: remove duplicate radio.rxgain entry and fix hardware note 2026-05-28 14:52:00 +02:00
Nick Dunklee e501704d2c Am idiot, and deleted some of the adafruit code path
I put it back and test-compiled a few builds.
2026-05-27 16:28:15 -06:00
Nick Dunklee 59cee5c8a0 feat: Integrate BME680 Bosch BSEC support for RAK4631
This is a consolidation of my changes for BME680 on RAK4631 nodes.
I will close my other PRs related to this and link back to this one.

*Background on change:*

This change replaces the Adafruit BME680 driver on RAK4631 with the
Bosch BSEC library. Other boards continue to use the existing
Adafruit path via ENV_INCLUDE_BME680.

This makes the IAQ portion of the sensor functional, and more accurate.
It also contains the math and/or CayenneLPP fixes from my other PRs.
The Bosch code also appears to handle calibrating sensor aging as well,
whereas the Adafruit code is just looking at blind values that can drift
with time. Pretty cool to see this shooting out useful data!

RAK4631 platform.io is set to override to ENV_INCLUDE_BME680_BSEC while
leaving the Adafruit code for other node types. (If this becomes applicable
for other node types in future, awesome! I just don't have hardware
to test against.)

Using the BSEC library introduces IAQ sensor calibration, and saves
the calibration state periodically so it does not have to calibrate
again later.

At startup the IAQ sensor takes 30 minutes to heat and to hit a baseline,
then starts calibrating. Once calibrated, it will save those settings
and will only write settings again if calibration falls back and restores
back to state 3.

This fix also has the gas resistance math fix that was in
[pull 2146](https://github.com/meshcore-dev/MeshCore/pull/2146) so
the adafruit path also can at least show accurate values instead
of looping negative.

Also includes the fix from [pull 2149](https://github.com/meshcore-dev/MeshCore/pull/2149) so the pressure output isn't truncated to 1hPa steps.

*Fixes/Changes:*
- Add bsec_config_iaq[] with the 3.3V/3s-LP/28d calibration profile
- BSEC init applies setConfig() for voltage-correct heater targeting
- IAQ, heat-compensated temperature/humidity, pressure, and altitude
  reported over CayenneLPP
- IAQ accuracy reported as analog input over CayenneLPP (0,1,2,3)
- Calibration state persisted to /bsec_state.bin on nRF52 internal
  flash; written only when iaqAccuracy improves to >= 2, should
  keep write frequency well within flash endurance over device lifetime
- Fix non-BSEC query_bme680: float pressure division, addGenericSensor
  for gas resistance (was addAnalogInput, overflows at > 327 Ohm)
- loop() correctly gated for both GPS and BSEC-only builds
- Add fix_bsec_lib.py extra_script to resolve nRF52840 hard-float ABI
  mismatch in Bosch's PlatformIO packaging, silly Bosch

One general note outside of this code change: I noticed while BME680
_functions_ in companion nodes, since companion nodes run Bluetooth,
BLE preempts the CPU, and can do so mid-I2C-transaction.

This can cause the BME680 to see an anomaly and drop calibration and
start a recalibrate. This is behavior that will exist (and has existed)
regardless of using the Adafruit or Bosch paths.

This particular companion behavior does not seem to occur in sensor
or repeater nodes since their BLE is off. Probably affects other
I2C devices as well.

*Tests:*

- RAK19003
- RAK19007
- RAK19001
- repeater, sensor, companion
2026-05-27 15:33:48 -06:00
Liam Cottle d2c2a6ef0b Merge pull request #2621 from AtlavoxDev/feature/mainboard-boot-complete-hook
Feature/mainboard boot complete hook
2026-05-26 02:04:49 +12:00
AtlavoxDev e5dab6b999 Rename bootComplete() to onBootComplete() for naming consistency
Matches the existing event-style lifecycle hooks on MainBoard
(onBeforeTransmit, onAfterTransmit) per @liamcottle's review feedback.
2026-05-25 09:50:28 -04:00
AtlavoxDev 39a69b86c3 Add MainBoard::bootComplete() hook for boot-indicator LED feedback
Framework for upcoming variant-specific PRs that add LED feedback during boot. The hook gives users visual cues that the device is busy and
shouldn't be interacted with until startup completes.
2026-05-25 09:04:47 -04:00
ripplebiz 7227871d6a Merge pull request #2620 from jirogit/feat/kiss-modem-xiao-s3-v2
feat(xiao_s3): add kiss modem env
2026-05-25 12:00:46 +10:00
me 2df944d48d feat(xiao_s3): add kiss modem env 2026-05-24 14:03:28 -07:00
Liam Cottle 2183805c24 Merge pull request #2615 from omeg/omeg/respect-i2c-address
Respect predefined I2C addresses in EnvironmentSensorManager
2026-05-25 00:04:49 +12:00
Rafał Wojdyła eb53c61f17 Respect predefined I2C addresses in EnvironmentSensorManager 2026-05-24 13:16:50 +02:00
fdlamotte 73c7718b9e Merge pull request #2235 from jirogit/fix/lr1110-rxgain-cli-guard
fix: enable radio.rxgain CLI command for LR1110 (T1000-E)
2026-05-24 11:56:23 +02:00
ripplebiz e251dc1659 Merge pull request #2540 from agessaman/feat/regions-quick-loasd
Add bulk region hierarchy command to CLI
2026-05-23 18:37:28 +10:00
ripplebiz 26d0001301 Merge pull request #2608 from recrof/flood-advert-interval-47
Set flood advert interval to 47h for new installs
2026-05-23 15:37:31 +10:00
ripplebiz dc00790f79 Merge pull request #2604 from recrof/patch-1
Companion repeat: update to more usable default EU frequency
2026-05-23 15:19:30 +10:00
Rastislav Vysoky a37078f6c5 Companion repeat: update to more usable default EU frequency
869.495 is in 869.4 to 869.65 range which does have 10% duty cycle and 500mW ERP.
2026-05-22 17:04:19 +02:00
Liam Cottle a35b1bbbfd Merge pull request #2590 from jocasmark/fix/typos
Fix typos in comments and docs
2026-05-22 19:38:19 +12:00
Mark Jocas bffd17a188 Revert typo fix from external libraries
Reverts typo fixes in comments within external libs.
2026-05-22 09:32:54 +02:00
Kevin Le da7663a6fb Fixed hasPendingWork for BLE companions 2026-05-22 10:58:21 +07:00
Kevin Le 280213d41f Fixed to put hasPendingWork out of ENV_INCLUDE_GPS 2026-05-22 10:58:21 +07:00
Kevin Le 6b1099161c Added Power Saving for NRF52 companions 2026-05-22 10:58:17 +07:00
agessaman 1296aa7792 Refactor region def with helpers, refine docs
Extract the inline cursor-walk in handleRegionCmd into file-local
helpers (skipSpaces, rtrimSpaces, takeToken, splitNameJump,
processRegionDefSegment), grouped immediately above the consumer.
Behavior is identical; addresses PR #2540 review feedback on
readability.

Tighten the region def docs: collapse five Note callouts into three
grouped paragraphs (Behavior / Existing regions / Limits), add a
case-sensitivity caveat plus an error example, note the cursor reset
between split commands, and use generic placeholder names.
2026-05-21 19:25:01 -07:00
Rastislav Vysoky 01500e55d8 Change room server flood advert interval to 47 hours 2026-05-21 14:53:49 +02:00
Rastislav Vysoky 40180b8fe6 Update repeater flood advert interval to 47 hours 2026-05-21 14:50:58 +02:00
ripplebiz 23f48e025f Merge pull request #2517 from oltaco/techo-card
Add support for LilyGo T-Echo Card (and tiny-ui!)
2026-05-21 20:45:54 +10:00
taco efaf95d685 fix debug params for t-echo card 2026-05-21 19:58:10 +10:00
taco 7c8d84ffb5 remove deprecated functions, fix typo and style 2026-05-21 19:58:10 +10:00
taco 26c641bc63 tiny ui rendering fixes 2026-05-21 19:58:10 +10:00
taco 9f683975c1 add torch 2026-05-21 19:58:10 +10:00
taco 8540c98947 add tinyui for lilygo t-echo card 2026-05-21 19:58:10 +10:00
taco 5058415fa3 u8g2 wrapper: allow larger font when size >= 2 2026-05-21 19:58:10 +10:00
pelgraine 2462cf6c97 add wrapper for u8g2 display driver 2026-05-21 19:58:10 +10:00
taco 1e740d30f2 initial t-echo card support 2026-05-21 19:58:10 +10:00
Huw Duddy bfdceae16e Merge pull request #2443 from kizniche/fix-rxdelay-txdelay
Fix: Enforce upper bounds for rxdelay, txdelay, and direct.txdelay
2026-05-21 16:57:41 +10:00
Liam Cottle 683299079f Merge pull request #2594 from meshcore-dev/extended-ack
support for sending 6-byte ACKs
2026-05-21 17:45:03 +12:00
Scott Powell a130a95a0d * added 6th byte to ACK, with RNG 2026-05-21 00:00:03 +10:00
Huw Duddy 0a13f6bcba Merge pull request #2576 from csrutil/fix/heltec-t096-sensor-env
Add Heltec T096 sensor environment
2026-05-20 22:21:58 +10:00
Liam Cottle f03662af11 Merge pull request #2592 from oltaco/nrf52-pio-target-fix
Fix upload and monitor targets for nrf52 envs
2026-05-20 22:26:58 +12:00
taco b92fcbed10 add openocd_target to lilygo t-impulse board.json 2026-05-20 20:02:18 +10:00
Mark Jocas 63fe3d42a2 Corrects typos and grammatical errors
Improves readability across documentation and inline comments by fixing common spelling mistakes and duplicate words.
2026-05-20 08:33:48 +02:00
Scott Powell 717142abd6 * bug fix 2026-05-19 17:06:42 +10:00
Scott Powell 2eb747d504 * fix 2026-05-17 22:38:42 +10:00