We have two perhapsSetRTC functions, which are called to set the time.
The one with 3 parameters had a helpful check to reject an invalid time,
by comparing the time from the source against when the firmware was compiled.
The one with 2 parameters, which is called from the GPS lookForTime did not.
As a result, certain GPS with bad time handling could set a time that was
in the past.
This patch adds the same epoch check code to the other perhapsSetRTC method.
Fixes https://github.com/meshtastic/firmware/issues/7364
* Calculate the length of the right string and use it
* Improve readability of Version Number
* Prevent negative message IDs and proactively favorite DM'd nodes
* Patch up Remove Favorite functionality
* Fix warnings for TFT_MESH_* and hasSupportBrightness
* Fix warning around casting variables
* Correct Favorite Node Behavior to rebuild favorite nodes when updated.
* Resolve bool kb_found issue not working for second discovery keyboards
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Clock updates and some TDeck corrections
* TDeck Brightness Works in TFT Builds
* Remove HAS_TFT from enabling Brightness, disable Brightness for TDeck
* Add default textMessage frame actions and adjust SharedUIDisplay
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* add new platform rak_wismeshtag
* Remove RTC and Ethernet definitions from variant.h
* Remove unused EINK and Ethernet definitions from variant.h and platformio.ini
* Add WISMESH_TAG hardware model definition in architecture.h and update build flags in platformio.ini
* Remove unused build flags and dependencies
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: daniel <daniel.cao@rakwireless.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
The screen of the heltec wireless tracker uses the same power source as the GPS. If the GPS turns off the power during the screen shutdown period and then turns on the power, the screen will not function properly. So initialize the screen every time it starts.
* Enable GPS for Wio-E5 variant on Serial2
* Add ability to override GPS serial port using GPS_SERIAL_PORT, and make RAK2560 use it.
* Don't try to send ATAK packets if ATAK is disabled, +4k flash
* No delay between UI frame rendering for OLED
* force redraw the display
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
The previous method of removing `--change-mode` from the argument list used a
string (`NEW_ARGS`) and `eval set -- $NEW_ARGS` to reconstruct the positional
parameters. This was both unsafe and incorrect.
Because `NEW_ARGS` was built using quoted literal `$arg` strings instead of the
actual values, it resulted in all filtered arguments being set to the same last
value of `$arg`. This caused `getopts` to receive incorrect input and silently
fail to parse options like `-p` and `-f`, leading to broken behavior and unset
variables (e.g., `ESPTOOL_CMD` never got a port).
This patch rewrites the logic to use an array (`NEW_ARGS+=("$arg")`), and
resets positional parameters via `set -- "${NEW_ARGS[@]}"`. This preserves
argument integrity and avoids the unsafe use of `eval`.
Example of the broken behavior before this fix:
./device-update.sh -p /dev/ttyACM0 -f firmware.bin
Resulted in:
set -- firmware.bin firmware.bin firmware.bin firmware.bin
Now:
set -- -p /dev/ttyACM0 -f firmware.bin
as expected.
Signed-off-by: Neil Hanlon <neil@shrug.pw>
* docs(xiao_ble): Simplify building and flashing instructions
- **Update Bootloader** - deleted this section, as Meshtastic now builds-in a compatible SoftDevice
- **PlatformIO Environment Preparation** - deleted this section, as Meshtastic now builds-in a compatible SoftDevice
- **Build Meshtastic** - simplified it greatly by referring to Meshtastic documentation
- **Flash the firmware to the Xiao BLE** - simplified it greatly as Meshtastic now builds firmware.uf2; added some observations for a succesful flash
Light cleanup of Markdown and renumbering of sections.
Signed-off-by: Andrew Yong <me@ndoo.sg>
* docs(xiao_ble): Replace some HTML with Markdown, cleanup Markdown
Signed-off-by: Andrew Yong <me@ndoo.sg>
* docs(xiao_ble): Update SX126X_TXEN definition location
Signed-off-by: Andrew Yong <me@ndoo.sg>
* docs(xiao_ble): Fresher information about E22 modules
Signed-off-by: Andrew Yong <me@ndoo.sg>
* docs(xiao_ble): Instructions for E22...M33S modules
Also re-order the Build section to come after the Wiring section since the build instructions require special attention if the wiring/modules differ from the variant's expected pins/module.
Signed-off-by: Andrew Yong <me@ndoo.sg>
* docs(xiao_ble): Rename all XIAO BLE to XIAO nRF52840
Signed-off-by: Andrew Yong <me@ndoo.sg>
* docs(xiao_ble): Remove note about Linux since shell script is gone
Signed-off-by: Andrew Yong <me@ndoo.sg>
* docs(xiao_ble): trunk fmt and fix links
Signed-off-by: Andrew Yong <me@ndoo.sg>
---------
Signed-off-by: Andrew Yong <me@ndoo.sg>
These DIY builds are functionally similar to the legacy xiao_ble variant, but use a pinout harmonized with the officially-supported XIAO nRF52840 & Wio-SX1262 Kit for Meshtastic (SKU 102010710).
An additional E22-900M33S variant is provided to ensure SX1262 transmit power is set below the maximum PA input for that module, to avoid damaging it.
- seeed_xiao_nrf52840_e22_900m30s:
- XIAO nRF52840 + EBYTE E22-900M30S
- EBYTE E22 pinout matching Wio-SX1262 (SKU 113010003)
- I2C
- SDA: D6
- SCL: D7
- User button: D0
- Gain is programmed in firmware - user Tx power setting is the desired final output power
- seeed_xiao_nrf52840_e22_900m33s:
- XIAO nRF52840 + EBYTE E22-900M33S
- EBYTE E22 pinout matching Wio-SX1262 (SKU 113010003)
- I2C
- SDA: D6
- SCL: D7
- User button: D0
- Gain is programmed in firmware - user Tx power setting is the desired final output power
Signed-off-by: Andrew Yong <me@ndoo.sg>
* Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28
* Merge PR #420
* Fixed double and missing Default class.
* Use correct format specifier and fixed typo.
* Removed duplicate code.
* Fix error: #if with no expression
* Fix warning: extra tokens at end of #endif directive.
* Fix antenna switching logic. Complementary-pin control logic is required on the rp2040-lora board.
* Fix deprecated macros.
* Set RP2040 in dormant mode when deep sleep is triggered.
* Fix array out of bounds read.
* Admin key count needs to be set otherwise the key will be zero loaded after reset.
* Don't reset the admin key size when loading defaults. Preserve an existing key in config if possible.
* Remove log spam when reading INA voltage sensor.
* Remove static declaration for admin keys from userPrefs.h. Load hard coded admin keys in case config file has empty slots.
* Removed newlines from log.
* Fix issue #5665.
* Fix build for Pico2 RP2350 platform.
* Enable Wifi client on Pico2W.
* Use correct processor on Pico2.
* Fix deprecated warning.
* Update platform and framework for RP2350.
* Added Pico2W variant including Wifi support.
* Fix typo in used variant.
* Remove obsolete define.
* Fix for native Linux build.
* Simplify RP2350 platform tag reference.
Co-authored-by: Austin <vidplace7@gmail.com>
* Cast user prefs strings.
* Update to last successfully building platform package.
* Define I2C GPIOs to ensure usage of both ports. Possibly fixes#5361
* RAK11310 support for RAK12002 RTC added.
* Update platform and framework packages to 4.4.3.
* Use RP2040 base platform and framework package. Use RAK11300 board definition in arduino-pico framework.
* Use RAK11300 board definition in arduino-pico framework.
* Fix build when MESHTASTIC_EXCLUDE_GPS is defined.
* Added configuration for Waveshare Pico LoRa module in combination with Orange Pi Zero3.
* Equal to upstream master.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
Co-authored-by: Austin <vidplace7@gmail.com>
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* feat(display): enable screen wake on received messages
* feat(menu): add Screen Wakeup option in system menu
* feat(ui): update wake on message configuration and refactor save logic
* feat(TextMessageModule): conditionally trigger screen wake on received message
* Refactoring system menu options for notification and screen.
* Fix MUI options in the system menu.
* Build out Reboot/Shutdown Menu and consolidate options within it
* Trunk fixes
* Protobuf ref
* Revert generated files
* Update plumbing for screen_wakeup_menu
* Begin work on crafting a method to stop screen wake for received messages
* SharedUIDisplay.cpp doesn't need ExternalNotificationModule.h
* Stop screen wake if External Notification is enabled
* Removing extra log lines
* Add role and battery state checks for not waking screen. Menu updates to resolve some Back options not being linked
* Resolve some additional merge conflict related issues
* Shouldn't throttle the power menu
* Finalize renames of some menus
* Flip Flop MUI Menu to avoid accidental clicks
* NULL check for powerStatus
* Remove "Wakeup" eNum
* Update src/graphics/Screen.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* CoPilot was close this should fix the builds
---------
Co-authored-by: whywilson <m.tools@qq.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The link to the product should point to the vendor's website, not a random distributor.
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>