Commit Graph

7824 Commits

Author SHA1 Message Date
geeksville
33c46d6eb1
fix python warning in uf2conf (#4235)
the old regex worked but was technically incorrect.  fixes:
Generating NRF52 uf2 file
/home/kevinh/development/meshtastic/firmware/bin/uf2conv.py:195: SyntaxWarning: invalid escape sequence '\s'
  words = re.split('\s+', line)
Converting to uf2, output size: 1458688, start address: 0x26000
2024-07-09 07:19:03 -05:00
Tom Fifield
308060b1fe
Add wio-sdk-wm1110 to build. (#4258)
The wio-sdk-wm1110 is distinct from the wio-tracker-wm1110, with
different platformio build options and pin config.

This change adds the wio-sdk-wm1110 to the CI matrix so firmware
is built as part of release.
2024-07-08 20:59:27 -05:00
github-actions[bot]
a664d4597f
[create-pull-request] automated change (#4247)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-07-08 14:26:19 -05:00
Ben Meadors
2b9848bf1b
Remove tracker variant specific soft device headers (#4255) 2024-07-08 08:16:38 -05:00
Tom Fifield
deb7c274c4
Cleanup NRF s140 Softdevice variants (#4252)
Note: This idea is originally from @caveman99 and should be
credited as such. Submitting as a separate PR so the work in
meshtastic/firmware#4148 can be a bit cleaner and Seeed boards
can build while that work is ongoing.

The nrf52 boards that depend on the v7 softdevice all use the same
code and linker files. Rather than duplicate the code, keep it
all together with the platform.
2024-07-08 06:02:05 -05:00
Mark Trevor Birss
e1bf4c32f3
Update to SoftDevice 7.3.0 for wio-sdk-wm1110 and wio-tracker-wm1110 (#4248)
* Update variant.h

* Update wio-tracker-wm1110.json

* Update wio-sdk-wm1110.json

* Update platformio.ini

* Update platformio.ini

* Add files via upload

* Add files via upload

* Update variant.h
2024-07-07 12:14:18 -05:00
GUVWAF
86ca81b555
If toPhoneQueue is full, still increment fromNum to avoid client never getting packets (#4246) 2024-07-07 09:06:42 -05:00
geeksville
f59d98482f
Fix build when HAS_NETWORKING is false on nrf52 (#4237)
(tested on a rak4631 by setting HAS_ETHERNET false when shrinking
image)
2024-07-07 07:08:49 -05:00
geeksville
27dfe10689
Fix BLE logging on nrf52 (#4244)
* allow ble logrecords to be fetched either by NOTIFY or INDICATE ble types

This allows 'lossless' log reading.  If client has requested INDICATE
(rather than NOTIFY) each log record emitted via log() will have to fetched
by the client device before the meshtastic node can continue.

* Fix serious problem with nrf52 BLE logging.
When doing notifies of LogRecords it is important to use the
binary write routines - writing using the 'string' write won't work.
Because protobufs can contain \0 nuls inside of them which if being
parsed as a string will cause only a portion of the protobuf to be sent.
I noticed this because some log messages were not getting through.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-07-07 06:50:47 -05:00
Agent Blu, 006
7b838d388d
Updated raspbian CI to update apt repository ahead of libbluetooth. (#4243) 2024-07-06 19:45:58 -05:00
todd-herbert
c3d3dfa8c8
Tidy Wireless Paper variant files (#4238)
* Quick tidy of pins_arduino.h
Matches requests made at https://github.com/meshtastic/firmware/pull/4226#discussion_r1664183480)

* Tidy variant.h

* Change deprecated ADC attenuation parameter
From 11dB to 12dB. Resolves compiler warning. Allegly, no impact on function: `This is deprecated, it behaves the same as `ADC_ATTEN_DB_12`
2024-07-06 12:41:29 -05:00
Tom Fifield
8be378c227
fix typo in build-nrf52.sh (#4231)
chmod is the command, '+x' is the argument.
2024-07-05 09:03:45 -05:00
Manuel
ae420dcd21
Fix exclude macros (#4233)
* fix MESHTASTIC_EXCLUDE_BLUETOOTH

* fix HAS_SCREEN=0

* fix MESHTASTIC_EXCLUDE_GPS
2024-07-05 08:58:16 -05:00
Ben Meadors
c1df621711 Sudo 2024-07-04 08:32:59 -05:00
Ben Meadors
2ba88d305f Only sdk 2024-07-04 08:29:49 -05:00
Ben Meadors
fc63d956e7 Merge hex for wm1110 target(s) 2024-07-04 08:10:40 -05:00
Ben Meadors
4b82634d1a Cleanup buffer 2024-07-03 22:19:01 -05:00
geeksville
8bca3e168d
Add PowerMon support (#4155)
* Turn off vscode cmake prompt - we don't use cmake on meshtastic

* Add rak4631_dap variant for debugging with NanoDAP debug probe device.

* The rak device can also run freertos (which is underneath nrf52 arduino)

* Add semihosting support for nrf52840 devices
Initial platformio.ini file only supports rak4630
Default to non TCP for the semihosting log output for now...
Fixes https://github.com/meshtastic/firmware/issues/4135

* powermon WIP (for https://github.com/meshtastic/firmware/issues/4136 )

* oops - mean't to mark the _dbg variant as an 'extra' board.

* powermon wip

* Make serial port on wio-sdk-wm1110 board work
By disabling the (inaccessible) adafruit USB

* Instrument (radiolib only for now) lora for powermon
per https://github.com/meshtastic/firmware/issues/4136

* powermon gps support
https://github.com/meshtastic/firmware/issues/4136

* Add CPU deep and light sleep powermon states
https://github.com/meshtastic/firmware/issues/4136

* Change the board/swversion bootstring so it is a new "structured" log msg.

* powermon wip

* add example script for getting esp S3 debugging working
Not yet used but I didn't want these nasty tricks to get lost yet.

* Add PowerMon reporting for screen and bluetooth pwr.

* make power.powermon_enables config setting work.

* update to latest protobufs

* fix bogus shellcheck warning

* make powermon optional (but default enabled because tiny and no runtime impact)

* tell vscode, if formatting, use whatever our trunk formatter wants
without this flag if the user has set some other formatter (clang)
in their user level settings, it will be looking in the wrong directory
for the clang options (we want the options in .trunk/clang)

Note: formatOnSave is true in master, which means a bunch of our older
files are non compliant and if you edit them it will generate lots of
formatting related diffs.  I guess I'll start letting that happen with
my future commits ;-).

* add PowerStress module

* nrf52 arduino is built upon freertos, so let platformio debug it

* don't accidentally try to Segger ICE if we are using another ICE

* clean up RedirectablePrint::log so it doesn't have three very different implementations inline.

* remove NoopPrint - it is no longer needed

* when talking to API clients via serial, don't turn off log msgs instead encapsuate them

* fix the build - would loop forever if there were no files to send

* don't use Segger code if not talking to a Segger debugger

* when encapsulating logs, make sure the strings always has nul terminators

* nrf52 soft device will watchdog if you use ICE while BT on...
so have debugger disable bluetooth.

* Important to not print debug messages while writing to the toPhone scratch buffer

* don't include newlines if encapsulating log records as protobufs

* update to latest protobufs (needed for powermon goo)

* PowerStress WIP

* fix linter warning
2024-07-03 18:02:20 -05:00
geeksville
8785adf6e4
minor cleanup proposal (#4169)
* MESHTASTIC_EXCLUDE_WIFI and HAS_WIFI cleanup...
Our code was checking HAS_WIFI and the new MESHTASTIC_EXCLUDE_WIFI
flags in various places (even though EXCLUDE_WIFI forces HAS_WIFI
to 0).  Instead just check HAS_WIFI, only use EXCLUDE_WIFI inside
configuration.h

* cleanup: use HAS_NETWORKING instead of HAS_WIFI || HAS_ETHERNET
We already had HAS_NETWORKING as flag in MQTT to mean 'we have
tcpip'.  Generallize that and move it into configuration.h so that
we can use it elsewhere.

* Use #pragma once, because supported by gcc and all modern compilers
instead of #ifdef DOTHFILE_H etc...

---------

Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
2024-07-03 17:39:09 -05:00
Ben Meadors
9c46bdad1a
New new BLE logging characteristic with LogRecord protos (#4220)
* New UUID

* New log radio characteristic with LogRecord protobuf

* LogRecord

* Merge derp

* How did you get there

* Trunk

* Fix length

* Remove assert
2024-07-03 16:29:07 -05:00
Tom Fifield
10b157a38d
Typo fix in logs - mhz - MHz (#4225)
As reported by karamo, a few different places in our logs had
incorrect capitalization of MHz.

fixes meshtastic/firmware#4126
2024-07-03 09:04:39 -05:00
Tom Fifield
e65c309af6
Fix SHT41 support (#4222)
* Add SHT41 Serial to I2c Detection Code

On the Seeed Wio-WM1110 Dev Kit board, the SHT41 chip was being
incorrectly detected as SHT31.

This patch adds the necessary serial number for the SHT41 chip to
be correctly detected.

fixes meshtastic/firmware#4221

* Add missing sensor read for SHT41
2024-07-02 07:03:51 -05:00
github-actions[bot]
9701f35a83
[create-pull-request] automated change (#4218)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-07-01 06:29:44 -05:00
geeksville
3219d65387
When talking via serial, encapsulate log messages in protobufs if necessary (#4187)
* clean up RedirectablePrint::log so it doesn't have three very different implementations inline.

* remove NoopPrint - it is no longer needed

* when talking to API clients via serial, don't turn off log msgs instead encapsuate them

* fix the build - would loop forever if there were no files to send

* don't use Segger code if not talking to a Segger debugger

* when encapsulating logs, make sure the strings always has nul terminators

* nrf52 soft device will watchdog if you use ICE while BT on...
so have debugger disable bluetooth.

* Important to not print debug messages while writing to the toPhone scratch buffer

* don't include newlines if encapsulating log records as protobufs

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-06-30 18:41:27 -05:00
Manuel
8177329eac
enable colors in platformio serial monitor (#4217) 2024-06-30 16:01:28 -05:00
Ben Meadors
469ae0ff84
Fix flakey phone api transition from file manifest to complete (#4209)
* Try fix flakey phone api transition from file manifest to complete

* Skip
2024-06-30 08:22:24 -05:00
Jonathan Bennett
b5d7718319
Move waypoint (#4202)
* Move waypoint screen draw into the waypoint module

* Get the observer set up for the waypoint screen draw

* Static squashing: screen dimensions
Macros moved back to Screen.cpp, as a band-aid until we eventually move all those static functions into the Screen class.

* Move getCompassDiam into Screen class
(supress compiler warnings)
At this stage, the method is still static, because it's used by drawNodeInfo, which has no tidy reference to our screen instance.
This is probably just another band-aid until these static functions all move.

* Use new getCompassDiam function in AccelerometerThread

* Properly gate display code in WaypointModule

---------

Co-authored-by: Todd Herbert <herbert.todd@gmail.com>
2024-06-29 21:16:07 -05:00
github-actions[bot]
47a94d7a07
[create-pull-request] automated change (#4205)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-06-29 19:04:08 -05:00
Ben Meadors
20c1d71214
Deprecate Router Client role (and make it Client) (#4201) 2024-06-29 19:03:00 -05:00
Jonathan Bennett
6f3d7ca4d2 Trim extra vprintf and filter for unprintable characters 2024-06-28 23:30:39 -05:00
Jonathan Bennett
ca969e26a5
Squash needlessly static functions (#4183) 2024-06-28 21:28:18 -05:00
Jonathan Bennett
5263c738f3
Make the logs Colorful! (#4199) 2024-06-28 20:10:41 -05:00
github-actions[bot]
9c232da00f
[create-pull-request] automated change (#4200)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-06-28 18:46:44 -05:00
Ben Meadors
0016e747e9
Clear vector after complete config state (#4194)
* Clear after complete config

* Don't collect . entries

* Log file name and size
2024-06-28 09:50:22 -05:00
geeksville
ce58a23f9b
Force a compile time failur if FromRadio or ToRadio get larger than (#4190)
a BLE packet size. We are actually very close to this threshold so
important to make sure we don't accidentally pass it.
2024-06-28 06:51:04 -05:00
quimnut
c95b2c2d3c
correct xiao_ble build preventing sx1262 init (#4191) 2024-06-28 06:49:38 -05:00
geeksville
f86a0e5228
nrf52 soft device will watchdog if you use ICE while BT on... (#4189)
so have debugger disable bluetooth.
2024-06-28 06:48:55 -05:00
Alexander
51f3ce5e60
Show owner.short_name on boot (and E-Ink sleep screen) (#4134)
* Show owner.short_name on boot and sleep screen (on e-ink)

* Update Screen.cpp - new line for short_name

Boot screen short_name now below the region setting.
Looks better on small screens.

* Draw short_name on right

---------

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-06-28 18:55:54 +12:00
geeksville
41d633bfd8
fix the build - would loop forever if there were no files to send (#4188) 2024-06-27 20:43:08 -05:00
geeksville
2cb6e7bd37
tell vscode, if formatting, use whatever our trunk formatter wants (#4186)
without this flag if the user has set some other formatter (clang)
in their user level settings, it will be looking in the wrong directory
for the clang options (we want the options in .trunk/clang)

Note: formatOnSave is true in master, which means a bunch of our older
files are non compliant and if you edit them it will generate lots of
formatting related diffs.  I guess I'll start letting that happen with
my future commits ;-).
2024-06-27 13:14:16 -05:00
Ben Meadors
a966d84e3d
Send file system manifest up on want_config (#4176)
* Send file system manifest up on want_config

* Platform specific methods

* Helps to actually make the change

* Clear
2024-06-27 07:07:27 -05:00
Jonathan Bennett
0425551341
Display alerts (#4170)
* Move static functions into Screen.h, show compass during calibration

* Move to _fontHeight macro to avoid collision

* Move some alert functions to new alert handler

* Catch missed reboot code

* ESP32 fixes

* Bump esp8266-oled-ssd1306

* Fixes for when a device has no screen

* Use new startAlert(char*) helper class

* Add EINK bits back to alert handling

* Add noop class for no-display devices

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-06-25 11:26:02 -05:00
github-actions[bot]
626aa762df
[create-pull-request] automated change (#4174)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-06-24 20:27:00 -05:00
geeksville
aa12e28568
Add semihosting support for nrf52 devices (#4137)
* Turn off vscode cmake prompt - we don't use cmake on meshtastic

* Add rak4631_dap variant for debugging with NanoDAP debug probe device.

* The rak device can also run freertos (which is underneath nrf52 arduino)

* Add semihosting support for nrf52840 devices
Initial platformio.ini file only supports rak4630
Default to non TCP for the semihosting log output for now...
Fixes https://github.com/meshtastic/firmware/issues/4135

* fix my botched merge - keep board_level = extra flag for rak3631_dbg

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-06-24 10:27:37 -05:00
github-actions[bot]
58c00d0447
[create-pull-request] automated change (#4171)
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
2024-06-24 08:01:40 -05:00
todd-herbert
64531fa1ae
Show compass on waypoint frame; clear when waypoint deleted (#4116)
* Clear expired or deleted waypoint frame

* Return 0 to CallbackObserver

* Add a missing comment

* Draw compass for waypoint frame

* Display our own waypoints
2024-06-24 02:04:46 -05:00
Warren Guy
23ac6b6514
fix INA3221 sensor (#4168)
- pass wire to begin()
- remove redundant setAddr() (already set in header)
2024-06-23 15:40:13 -05:00
Ben Meadors
f5098dc6d8 Explicitly set characteristic 2024-06-23 14:47:25 -05:00
Ben Meadors
2e0d96cece Esptool is better 2024-06-23 07:54:13 -05:00
GUVWAF
8078e03f5f
Implement replies for all telemetry types based on variant tag (#4164)
* Implement replies for all telemetry types based on variant tag

* Remove check for `ignoreRequest`: modules can set this, don't need to check

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-06-23 07:13:59 -05:00