Wykres commitów

48 Commity (9d37a8d17fcebfee819986b69104e820ba521994)

Autor SHA1 Wiadomość Data
Ben Meadors 1552aa0081
Tracker role wakeup and sleep cycle when power.is_power_saving true (#2846)
* WIP

* Sleepy sleepy low power tracker

* Sleepy tracker clear

* NRF52 PoC

* Simplify NRF52 "sleep"

* Trackers aren't polite

* Remove unnecessary include

* Removed accidental commit

* Fixed not-so-sleepy T-Beam due to button gpio mask precendence

* Added sleepOnNextExecution for allowing fulfillment of pending messages before shutting down

* Cleanup

* Don't wantResponse for trackers

* Heltec wireless tracker doesn't like the button interrupt (maybe all s3 because user button press doubles as bootloader mode trigger?)
2023-09-30 21:09:17 -05:00
Jonathan Bennett 1a2c7f00e1
Gps cleanup and powersave (#2807)
* Refactor GPS to not probe if pins not defined

* Use Named Constructor to clean up code

* Move doGPSPowerSave to GPS class

* Make sure to set GPS awake on triple-click

* Cleanup and remove dead code

* Rename GPS_PIN_WAKE to GPS_PIN_STANDBY

* Actually put GPS to sleep between fixes

* add GPS_POWER_TOGGLE for heltec-tracker and t-deck

* Change GPS_THREAD_INTERVAL to 200 ms

* More dead code, compiler warnings, and add returns

* Add Number of sats to log output

* Add pgs enable and triple-click config

* Track average GPS fix time to judge low-power time

* Feed PositionModule on GPS fix

* Don't turn off the 3v3_s line on RAK4631
when the rotary is present.

* Add GPS power standbyOnly option

* Delay setting time currentQuality
to avoid strange log message.

* Typos, comments, and remove unused variable

* Short-circuit the setAwake logic on GPS disable

* heltec-tracker 0.3 GPS power saving

* set en_gpio to defined state

* Fix fixed_position logic with GPS disabled

* Don't process GPS serial when not isAwake

* Add quirk for Heltec Tracker GPS powersave

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: mverch67 <manuel.verch@gmx.de>
Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
2023-09-23 23:45:35 -05:00
luzpaz 003047baaf
Fix various typos (#2607)
* Fix various typos

Found via `codespell -q 3 -L acount,clen,dout`

* Trunk reformatting

---------

Co-authored-by: code8buster <communismisgreat@national.shitposting.agency>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-14 16:25:20 -05:00
IhorNehrutsa 9c683f4c87
Fix LOG_DEBUG messages when no DEBUG_PORT. (#2485)
* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.
2023-05-13 05:33:14 -05:00
Thomas Göttgens 4967a16abe - Abstract the memory stats into its own class.
- Fix a bug with debug mqtt
- nrf52 needs more love, there's a strange error while linking. Help appreciated
2023-02-17 12:31:51 +01:00
Thomas Göttgens 61028293b8 move temporary reboot code to blink thread 2023-01-27 14:46:53 +01:00
Thomas Göttgens afb4d141dc remove double endif 2023-01-23 22:42:32 +01:00
Thomas Göttgens 19d864b5ce Also reboot if no heap debugging enabled 2023-01-23 22:42:32 +01:00
Thomas Göttgens 3aebb1ffb3 there's a special place in hell for include paths... 2023-01-23 12:27:16 +01:00
Thomas Göttgens 3b80421403 tempfix: reboot ESP Node if heap runs low.
fixes #2165
2023-01-23 12:27:16 +01:00
Thomas Göttgens 51b2c431d9 trunk roundhouse kick 2023-01-21 21:23:24 +01:00
Thomas Göttgens 03c5dfc7a8 initial cleanup work 2023-01-07 13:16:58 +01:00
Thomas Göttgens 092a753a6f yea, well 2022-12-30 20:27:35 +01:00
Thomas Göttgens 8a9af37d82
Merge branch 'develop' into nice-threads 2022-12-30 20:18:19 +01:00
Thomas Göttgens 115cb05d3b less verbose logging and heap free printing 2022-12-30 14:22:08 +01:00
Ben Meadors 0b5cae5393 Log levels refactoring 2022-12-29 20:41:37 -06:00
Ben Meadors 110c80d045 Make disable return an int32_t for runOnce usage 2022-12-29 16:54:39 -06:00
Ben Meadors 38a1315599 Refactor OSThread consumers to use disable() 2022-12-29 16:26:25 -06:00
Thomas Göttgens a8f93d5f47 Heap Debugging and Thread Disable 2022-12-29 22:42:05 +01:00
Mike Kinney 7c362af3de more warning fixes 2022-01-24 18:39:17 +00:00
Mike Kinney caaa235c5d more cppcheck warnings fixes 2022-01-24 17:24:40 +00:00
Kevin Hester 0d758347af Fix rare assertion failure which could occur due to pending interrupts
* fix assertion failure
```
22:57:36 64409 [PositionPlugin] FIXME-update-db Sniffing packet
22:57:36 64409 [PositionPlugin] Delivering rx packet (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10)
22:57:36 64409 [PositionPlugin] Forwarding to phone (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10)
22:57:36 64409 [PositionPlugin] Update DB node 0x85f4da1, rx_time=1628895456
22:57:36 64409 [PositionPlugin] Plugin routing considered
22:57:36 64409 [PositionPlugin] Add packet record (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0x0 Portnum=3 rxtime=1628895456 priority=10)
22:57:36 64409 [PositionPlugin] Expanding short PSK #1
22:57:36 64409 [PositionPlugin] Installing AES128 key!
22:57:36 64409 [PositionPlugin] enqueuing for send (id=0x5851f437 Fr0xa1 To0xff, WantAck0, HopLim3 Ch0xb1 encrypted rxtime=1628895456 priority=10)
22:57:36 64409 [PositionPlugin] (bw=125, sf=12, cr=4/8) packet symLen=32 ms, payloadSize=22, time 2596 ms
22:57:36 64409 [PositionPlugin] txGood=6,rxGood=10,rxBad=0
22:57:36 64409 [PositionPlugin] AirTime - Packet transmitted : 2596ms
22:57:36 64409 [RadioIf] assert failed src/mesh/RadioLibInterface.cpp: 240, void RadioLibInterface::handleReceiveInterrupt(), test=isReceiving
```
2021-08-17 16:31:01 -07:00
Kevin Hester 17a1262382 pull in new epaper lib (which required importing configuration.h everywhere
for dumb reasons)
2021-06-27 10:56:28 -07:00
Kevin Hester cdb4756d9d fix native build 2021-03-29 20:56:02 +08:00
Kevin Hester 525fe9b96c dramatically speed up message RX in some cases (we were sleeping much too long) 2021-03-28 12:16:37 +08:00
Kevin Hester b20930c111 move streamapi into a thread, saves power and increases responsiveness 2021-03-25 06:15:15 +08:00
Kevin Hester 772f2a15ff check more error codes 2021-03-09 16:45:40 +08:00
Kevin Hester c55074f7fe oops: we should crash if we >MAX_THREADS, also raise max threads 2021-02-14 15:06:49 +08:00
Kevin Hester 7aacfd66ef add assertIsSetup() and use it from OSThread constructor
fixes nasty bug @mc-hamster discovered with plugin order of operations
2021-01-08 13:15:49 +08:00
Kevin Hester 59577b9d79 add real formatted debug logging with timestamps 2020-12-25 15:17:56 +08:00
Kevin Hester a8e4bbbe65 fix my breaking of button press behavior 2020-10-12 08:25:17 +08:00
Kevin Hester 999b292717 fixes for the posix port 2020-10-11 09:18:47 +08:00
Kevin Hester 0c8e0efed2 new threading finished- saves about 10mA for the high activity states 2020-10-11 08:12:53 +08:00
Kevin Hester 49b4ed2a89 coroutine: kinda works now 2020-10-10 18:03:45 +08:00
Kevin Hester c46a884558 concurrency wip 2020-10-10 08:28:00 +08:00
Kevin Hester 2044427e97 coroutines: wip compiles but does not link 2020-10-09 14:16:51 +08:00
Kevin Hester dd6a402ea0 coroutine: wip 2020-10-09 09:10:44 +08:00
Kevin Hester bed7d8a619 threads: begin change to cooperative threading 2020-10-08 13:32:34 +08:00
geeksville f3d38d84c9 fix nrf52 build 2020-09-07 13:03:37 -07:00
geeksville b8d39845cf portduino now links! 2020-09-06 09:24:08 -07:00
geeksville fefd3d78f3 Portduino WIP now compiles but does not link 2020-09-05 12:34:48 -07:00
geeksville 6a475d8288 WIP 2020-09-04 17:23:17 -07:00
geeksville c629b94333 portduino WIP 2020-09-04 15:03:22 -07:00
geeksville ed589727d6 Update NRF52 build to work again 2020-07-09 19:57:55 -07:00
grcasanova 9803141fe7 merged with master 2020-07-06 21:53:10 +02:00
grcasanova 92b30ebec6 fixes now compiles 2020-07-06 10:45:55 +02:00
grcasanova d5b8038457 fixes 2020-07-06 00:54:30 +02:00
grcasanova 0a6059ba13 refactored threading-related classes, code broken 2020-07-05 23:11:40 +02:00