* Initial work to get NimbleBluetooth working reliably, and cross-task mutexes cleaned up
* Pre-fill toPhoneQueue when safe (during config/nodeinfo): runOnceToPhoneCanPreloadNextPacket
* Handle 0-byte responses breaking clients during initial config phases
* requestLowerPowerConnection
* PhoneAPI: onConfigStart and onConfigComplete callbacks for subclasses
* NimbleBluetooth: switch to high-throughput BLE mode during config, then lower-power BLE mode for steady-state
* Add some documentation to NimbleBluetooth.cpp
* make cppcheck happier
* Allow runOnceHandleToPhoneQueue to tell runOnce to shouldBreakAndRetryLater, so we don't busy-loop forever in runOnce
* Gating some logging behind DEBUG_NIMBLE_ON_READ_TIMING ifdef again; bump retry count
* Add check for connected state in NimBLE onRead()
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Add RAK3401 variant files
* Add SPI configuration for RAK3401 and RAK13302 variants
* Refactor SPI pin configuration and clean up variant definitions for RAK3401
* Add TX_GAIN_LORA for RAK13302 Power Amp
* Fix merge
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
* Add general-purpose packet cache
This commit adds a caching system that will save packet data in a much
more compact form than the regular MeshPacket protobuf. It cannot be
worked with directly to the same degree (although the packet header is
available), but consumes *much* less memory, and as a result can be used
to temporarily store large numbers of packets.
Cached packets can be retrieved either by their (from, id) tuple, or by
their hash.
This cache is a pre-requisite for the upcoming packet replay feature.
* Remove debug initialiser
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix ordering
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add missing size assignment
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add comments for hash & bucket macros
* Make it clear that this field stores a map of the original data
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* rework I2C sensor init
the goal is to only instantiate sensors that are pressend to save memory.
side effacts:
- easyer sensor integration (less C&P code)
- nodeTelemetrySensorsMap can be removed when all devices are migrated
* add missing ifdef
* refactor a bunch of more sensors
RAM -816
Flash -916
* fix build for t1000
* refactor more sensors
RAM -192
Flash -60
* improve error handling
Flash -112
* fix build
* fix build
* fix IndicatorSensor
* fix tracker-t1000-e build
not sure what magic is used but it works
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/Telemetry/Sensor/DFRobotGravitySensor.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Ham Mode ignores region regulatory limits, so regardless of whether
we set a single TX_GAIN_LORA or an array with a non-linear PA,
we shouldn't limit the power.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* update to use long names for pager
* remove duplicate
* add menu item
* fix after conflict
* menu name change. use sanitizeString
* fix formatting issue. should pass trunk now.
* remove auto-generated protobufs
* remove log, add tdeck, improvements.
---------
Co-authored-by: l0g-lab <l0g-lab@users.noreply.github.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add Power and Environmental Telemetry Hide/Show
* Allow Power and Telemetry Frames even if module disabled
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
8 months ago, when this was added to the code, the GPS probe code
was still a little flaky.
Particularly after #6114 and #6116 were added, reliability improved
for all devices as we were sending fewer calls on the bus.
Today, the T1000E is the only Meshtastic device that regularly takes
2, 3, or 4 attempts to be detected via the probe code.
Removing these lines, on my T1000E, results in the AG3335 being
detected immediately.
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Force coverage tests to run in simulation mode
* Revert "Force coverage tests to run in simulation mode"
This reverts commit e4ec719e6f.
* fix: Move `#include "variant.h"` to top of file (fixes#8276)
The original line being further down the file causes any #ifdef/defined() checks for definitions in variant.h to silently skip.
This was noticed when `USE_GC1109_PA` in Heltec v4 and Heltec Wireless Tracker failed to correct program TX_GAIN_LORA, but will also affect any variant.h-dependent configurations in this file, if they would have been defined above where the `#include` previously was.
---------
Co-authored-by: Austin Lane <vidplace7@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Force coverage tests to run in simulation mode
* Revert "Force coverage tests to run in simulation mode"
This reverts commit e4ec719e6f.
* fix: Move `#include "variant.h"` to top of file (fixes#8276)
The original line being further down the file causes any #ifdef/defined() checks for definitions in variant.h to silently skip.
This was noticed when `USE_GC1109_PA` in Heltec v4 and Heltec Wireless Tracker failed to correct program TX_GAIN_LORA, but will also affect any variant.h-dependent configurations in this file, if they would have been defined above where the `#include` previously was.
---------
Co-authored-by: Austin Lane <vidplace7@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
SHT4X chip recognized as SHT31, registerValue that stores first bytes of chip's serial number did not mach the chip.
Added a serial number match for SHT40 found in a SONOFF SNZB-02P.
* Wait until after GPS lock hold before updating position, if we can.
After the recent patch, we hold lock for a bit before updating the position.
The positions that come in after the hold are genuinely better positions
than what we've been doing before. However, they only come 20 seconds
after we've got lock.
Previously, we would update the local position as soon as we got a lock as well
as at the end of the hold, since a hold was not always possible.
With this patch, if the settings allow, we should skip that first local position update.
Fixes https://github.com/meshtastic/firmware/issues/8029
* Fix falling edge handling.
* spelling
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Congeal lock handling
* Add named constants
* define unit to avoid confusion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* ifdef, not if.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add handling for when we first turn on.
* Don't run if not active
* Reset fixhold
* Logic fixes
* Add path for ACTIVE--> IDLE --> ACTIVE
Previously we only covered HARDSLEEP --> ACTIVE.
* Change hold time to gps_update_interval - 10s
* Update comment
* Add extra buffer to avoid re-starting hold
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>