firmware/src/mesh
geeksville c1870f91fc
Finish powermon/powerstress (#4230)
* 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

* for #4154 and #4136 add concept of dependent gpios...
Which is currently only tested with the LED but eventually
will be used for shared GPIO/screen power rail enable
and LED forcing (which is a sanity check in the power stress
testing)

* fix linter warning

* Transformer is a better name for the LED input > operation > output classes

* PMW led changes to work on esp32-s3

* power stress improvements

* 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.

* fix gpio transformer stuff to work correctly with LED_INVERTED

Thanks @todd-herbert for noticing this and the great stack trace.
The root cause was that I had accidentially shadowed outPin in a subclass
with an unneeded override.  It would break on any board that had inverted
LED power.

fixes
https://github.com/meshtastic/firmware/pull/4230#pullrequestreview-2217389099

* Support driving multiple output gpios from one input.

While investigating https://github.com/meshtastic/firmware/pull/4230#pullrequestreview-2217389099
I noticed in variant.h that there are now apparently newer TBEAMs than mine
that have _both_ a GPIO based power LED and the PMU based LED.  Add a splitter
so that we can drive two output GPIOs from one logical signal.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-08-06 12:35:54 -05:00
..
api
compression fix minor type comparison warning that I saw in the build (#4398) 2024-08-05 17:07:43 -05:00
eth Fix build when HAS_NETWORKING is false on nrf52 (#4237) 2024-07-07 07:08:49 -05:00
generated [create-pull-request] automated change (#4400) 2024-08-05 20:14:07 -05:00
http Finish powermon/powerstress (#4230) 2024-08-06 12:35:54 -05:00
raspihttp
wifi minor cleanup proposal (#4169) 2024-07-03 17:39:09 -05:00
Channels.cpp Event mode: Enforce reliable hop limit and disallow default public MQTT (#4343) 2024-07-29 20:16:47 -05:00
Channels.h Let StoreForward server send history to phoneAPI (#4282) 2024-07-13 12:36:44 -05:00
CryptoEngine.cpp
CryptoEngine.h
Default.cpp Event mode: Enforce reliable hop limit and disallow default public MQTT (#4343) 2024-07-29 20:16:47 -05:00
Default.h Event mode: Enforce reliable hop limit and disallow default public MQTT (#4343) 2024-07-29 20:16:47 -05:00
FloodingRouter.cpp Event mode: Enforce reliable hop limit and disallow default public MQTT (#4343) 2024-07-29 20:16:47 -05:00
FloodingRouter.h
InterfacesTemplates.cpp
LLCC68Interface.cpp
LLCC68Interface.h
LR11x0Interface.cpp Make lora radio reset reliable on wio-tracker-1100 and lower lr11x0 power consumption in sleep (#4383) 2024-08-05 06:47:04 -05:00
LR11x0Interface.h
LR1110Interface.cpp
LR1110Interface.h
LR1120Interface.cpp
LR1120Interface.h
MemoryPool.h
mesh-pb-constants.cpp Make STM compile again and update toolchain. (#2960) 2024-07-25 20:16:21 -05:00
mesh-pb-constants.h Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
MeshModule.cpp Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
MeshModule.h Show specific frame when updating screen (#4264) 2024-07-11 18:51:26 -05:00
MeshPacketQueue.cpp
MeshPacketQueue.h
MeshRadio.h
MeshService.cpp Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
MeshService.h Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
MeshTypes.h Remove status topic (#4305) 2024-07-21 07:09:10 -05:00
NodeDB.cpp Output more useful log message when the NodeDB is full (#4389) 2024-08-04 18:52:10 -05:00
NodeDB.h Cleanup - remove unused defines. (#4353) 2024-07-31 06:56:06 -05:00
PacketHistory.cpp
PacketHistory.h
PhoneAPI.cpp Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
PhoneAPI.h Fix flakey phone api transition from file manifest to complete (#4209) 2024-06-30 08:22:24 -05:00
PointerQueue.h
ProtobufModule.cpp
ProtobufModule.h Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
RadioInterface.cpp Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
RadioInterface.h
RadioLibInterface.cpp Add PowerMon support (#4155) 2024-07-03 18:02:20 -05:00
RadioLibInterface.h Add PowerMon support (#4155) 2024-07-03 18:02:20 -05:00
RadioLibRF95.cpp
RadioLibRF95.h
ReliableRouter.cpp Event mode: Enforce reliable hop limit and disallow default public MQTT (#4343) 2024-07-29 20:16:47 -05:00
ReliableRouter.h
RF95Interface.cpp Cleanup - remove unused defines. (#4353) 2024-07-31 06:56:06 -05:00
RF95Interface.h
Router.cpp Missed some includes of userPrefs that would allow behavior we don't want 2024-07-31 08:53:59 -05:00
Router.h
SinglePortModule.h Make SPI frequency and TOPHONE queue size configurable on Native (#4369) 2024-08-01 19:29:49 -05:00
STM32WLE5JCInterface.cpp
STM32WLE5JCInterface.h Make STM compile again and update toolchain. (#2960) 2024-07-25 20:16:21 -05:00
StreamAPI.cpp When talking via serial, encapsulate log messages in protobufs if necessary (#4187) 2024-06-30 18:41:27 -05:00
StreamAPI.h When talking via serial, encapsulate log messages in protobufs if necessary (#4187) 2024-06-30 18:41:27 -05:00
SX126xInterface.cpp Add PowerMon support (#4155) 2024-07-03 18:02:20 -05:00
SX126xInterface.h
SX128xInterface.cpp Add PowerMon support (#4155) 2024-07-03 18:02:20 -05:00
SX128xInterface.h
SX1262Interface.cpp
SX1262Interface.h
SX1268Interface.cpp
SX1268Interface.h
SX1280Interface.cpp
SX1280Interface.h
Throttle.cpp
Throttle.h
TypeConversions.cpp
TypeConversions.h
TypedQueue.h