* * Adding the -Wcast-align compilation flag for
the rp2040.
* * Some rework to use a struct to access radio data
* Buffer will not be accessed by arithmetic pointer anymore
* * Remplace arithmetic pointer to avoid Warning
* * Avoid 2 little artitmetic pointer
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* When importing config, keep Bluetooth on and defer rebooting until config is committed
* One more place that was prematurely disabling Bluetooth
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Potential fix for bad Rx performance on T1000-E
* validate and refactor RF switching, eliminate godmode
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* Ignore PhoneAPI packet if it's been seen
* ignoramus
* Also keep track of the last 20 packet IDs
* Fill
* Make this match the nimble one
* Add the log too
* Ignore zero ID packets
* Remove message entirely
* TRunkt
* Replace multiple potentially non aligned pointer dereference (#4855)
First step to fix some Crypto crashes or strange behaviors
* Makes the two Crypto byte buffers aligned (#4855)
Fix#4855, and probably multiple Crypto problems depending on hardware
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
There is no EXTINT pin available on the Tdeck, which uses
the Ublox M10 GPS. Therefore our previous hack to use that pin
makes the GPS not work. That workaround was implemented to
fix sleep issues which have now since been fixed with the
state machine.
This patch restores the state prior to the hack, which is
known-working.
Additionaly, it was discovered that M10s hate it when you
try and save to non-extistent eeprom/SPI flash.
This patch creates a new SAVE command for the M10 that fixes
this issue.
Many thanks to @MisterC925 whose report and testing was
essential for this fix.
fixes https://github.com/meshtastic/firmware/issues/4625
Co-authored-by: Ken McGuire <kenm@paonia.com>
Based on #4745, PIN_WIRE1_SDA is the 'second' wire interface.
This pach amends the check to determine whether a device has two
wire interfaces should use PIN_WIRE1_SDA, rather than PIN_WIRE_SDA.
* Rename message length headers and set payload max to 255
* Add MESHTASTIC_PKC_OVERHEAD
* compare to MESHTASTIC_HEADER_LENGTH
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* Refactor and consolidate windowing logic
* Trunk
* Fixes
* More
* Fix braces and remove unused now variables.
There was a brace in src/mesh/RadioLibInterface.cpp that was breaking
compile on some architectures.
Additionally, there were some brace errors in
src/modules/Telemetry/AirQualityTelemetry.cpp
src/modules/Telemetry/EnvironmentTelemetry.cpp
src/mesh/wifi/WiFiAPClient.cpp
Move throttle include in WifiAPClient.cpp to top.
Add Default.h to sleep.cpp
rest of files just remove unused now variables.
* Remove a couple more meows
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Minor fixes
It turns out setting a map value with the index notation causes
an lookup that can be avoided with emplace. Apply this to one line in
the StoreForward module.
Fix also Cppcheck-determined highly minor performance increase by
passing gpiochipname as a const reference :)
The amount of cycles used on this laptop while learning about these
callouts from cppcheck is unlikely to ever be more than the cycles
saved by the fixes ;)
* Update PortduinoGlue.cpp
* Simplify Ublox code
Ublox comes in a myriad of versions and settings. Presently our
configuration code does a lot of branching based on versions being
or not being present.
This patch adds version detection earlier in the piece and branches
on the set gnssModel instead to create separate setup methods for Ublox 6,
Ublox 7/8/9, and Ublox10.
Additionally, adds a macro to make the code much shorter and more
readable.
* Make trunk happy
* Make trunk happy
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Honor TFT_MESH color if defined for Heltec T114 or T190
* Temporary: point lib_deps at fork of Heltec's ST7789 library
For demo only, until ST7789 is merged
* Update lib_deps; tidy preprocessor logic
* Rename message length headers and set payload max to 255
* Add MESHTASTIC_PKC_OVERHEAD
* compare to MESHTASTIC_HEADER_LENGTH
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
* Refactor and consolidate windowing logic
* Trunk
* Fixes
* More
* Fix braces and remove unused now variables.
There was a brace in src/mesh/RadioLibInterface.cpp that was breaking
compile on some architectures.
Additionally, there were some brace errors in
src/modules/Telemetry/AirQualityTelemetry.cpp
src/modules/Telemetry/EnvironmentTelemetry.cpp
src/mesh/wifi/WiFiAPClient.cpp
Move throttle include in WifiAPClient.cpp to top.
Add Default.h to sleep.cpp
rest of files just remove unused now variables.
* Remove a couple more meows
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Minor fixes
It turns out setting a map value with the index notation causes
an lookup that can be avoided with emplace. Apply this to one line in
the StoreForward module.
Fix also Cppcheck-determined highly minor performance increase by
passing gpiochipname as a const reference :)
The amount of cycles used on this laptop while learning about these
callouts from cppcheck is unlikely to ever be more than the cycles
saved by the fixes ;)
* Update PortduinoGlue.cpp
* Simplify Ublox code
Ublox comes in a myriad of versions and settings. Presently our
configuration code does a lot of branching based on versions being
or not being present.
This patch adds version detection earlier in the piece and branches
on the set gnssModel instead to create separate setup methods for Ublox 6,
Ublox 7/8/9, and Ublox10.
Additionally, adds a macro to make the code much shorter and more
readable.
* Make trunk happy
* Make trunk happy
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Honor TFT_MESH color if defined for Heltec T114 or T190
* Temporary: point lib_deps at fork of Heltec's ST7789 library
For demo only, until ST7789 is merged
* Update lib_deps; tidy preprocessor logic
* PMSA0031 sensors require ~3secs before coming up on I2C
As reported by @MALAONE1 and debugged by @shodan8192 , PMSA0031s
on a RAK4631 take 3 seconds before they can become detectable on I2c.
Add a delay(4000) before I2C scan if the air quality sensor pin
is defined.
Fixes https://github.com/meshtastic/firmware/issues/3690
* Remove 4 second wait and rescan during air quality init for the sensor
* works without but this triggers my OCD
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
As discovered and tested by @Mictronics, default Serial FIFO size
on the Pico is 32bytes, which is not enough for GPS messages.
This patch increases the Serial GPS FIFO buffer size to 256
for the RP2040 Architecture
fixes https://github.com/meshtastic/firmware/issues/3989
QMC5883L and HMC5883L are 3-axis compasses which are often confused.
As reported by @Africmod, we had the wrong I2C address for the QMC5883L.
This patch fixes the address and adds its HMC5883L so we keep info
about both.
Fixes https://github.com/meshtastic/firmware/issues/4144
This getACK is used to look for ASCII responses, so print ASCII
when GPS_DEBUG is enabled.
This markedly assisted with recent AG3335 debugging. It works great
with other chips too (tested eg ATGM336H). Even UBLOX prints
understandable "GPTXT,01,01,01,PDTI inv format*35." responses.
Credit to bluebrolly. on discord.
* Added STK8xxxx Accelerometer chip
Added detection of STK8BA53 to I2C scanner.
Change the way and order MCP9808, lLISH3DH and STK8BA53 is detected since they all shares the same I2C address.
* Accelerometer support Radiomaster Bandit.
Enables tap to wake screen if enabled in config,
* Trunk
Trunk
* Add option to preserve private key for factory reset (config)
* Typo fix
* Copy the key in the right direction, and set the size.
* Don't set the key size back to 0 right after setting it to 32.
* Set the key size before using it to do a memcpy.
* Use the right key_size for backing up private_key
* Don't factoryReset() for a missing nodeDB
* Disable Bluetooth in AdminModule when resetting device settings or nodeDB to avoid race
* Add checks for valid objects before deinit bluetooth
* Add disableBluetooth to handleSetConfig, handleSetModuleConfig, and commit settings
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* All the debug
* Change `memccpy()` to `memcpy()`
* Brint all the bytes of the MAC Address from the NodeDB
* Check for blank MAC Address in ourown NodeDB entry
* One more `memccpy()`
* Clean-up debug log
---------
Co-authored-by: GUVWAF <thijs@havinga.eu>
if u8i == 135, then u8i++ runs, the loop exits since u8i == 136,
then value for u8i is 136 after the for loop.
then in the next line, ntc_res2[u8i] will read past the end
of the array
At the moment if the result of sleepTime calculations comes out
to zero, we put the GPS into HARDSLEEP (losing all its status) and
then immediately make it ACTIVE again.
This patch avoids that toga.
fixes https://github.com/meshtastic/firmware/issues/4657
AG33352 is a Mediatek/Airoha GPS/GLONASS/Galileo/BeiDou receiver.
Patch adds relevant detection and setup code.
Thanks to Bluebrolly and kongduino for providing the relevant
information and testing.
This patch also fixes support for the A3335, which is a related chip.
The setup and detection code now works as tested on a real life
T-1000E!
Thanks to @gpsfan for the guidance.
* Don't filter PKI packets just for being encrypted.
* Add ok_to_mqtt config and bit
* Bitfield
* Adjust dontmqttmebro logic.
* Manipulate bitfield only in router.cpp
* Want_ack is not want_response
* Bitfield macros
* Use new Bitfield macro in MQTT.cpp
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This patch takes inspiration from our I2CDetect code where we have
many sensors that can be detected rather simply. It creates a new
macro,
PROBE_SIMPLE(Chip name, Command to run, response, Driver, timeout)
and converts existing simple cases to use this macro.
* tryfix #4384 - don't assume we want that functionality if the Accelerometer was found. This is only for T-Watch
* Add config.display.wake_on_tap_or_motion default to RAK
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Fixes (#3618) by allowing more time for slower requests.
Resolve Syslog not maintaining client causing issues on RAK13800.
Resolve Ethernet static IP setting subnet as gateway IP.
Reduce comment and log message ambiguity around API.
Remove duplicate #if !MESHTASTIC_EXCLUDE_WEBSERVER block.
* Same priority packets processed in enqueue order
* Prefer same prio pkts on mesh over new ones.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>