Commit Graph

147 Commits

Author SHA1 Message Date
todd-herbert
a12b9922ed
Screen changes from time deltas to timestamps after 15 minutes (#3935)
* E-Ink displays sometimes use timestamp instead of delta

* Allow users to disable E-Ink screensaver

* Clarify variable's purpose

* Operator order oopsie

* Picky print problem

* Implement for all display, not just E-Ink

* Align "unknown age" behavior with existing code

* One more use of timestamp, if screen is wide enough
2024-05-21 16:00:04 -05:00
todd-herbert
a01069a549
No more printing power-state changes to screen (#3640) 2024-04-16 07:36:14 -05:00
Manuel
5047468d9f
fix/enhancement: TFT device powersave (part 3) (#3600)
* fix: device TFT powersave (part 3)

* trunk fmt

* trunk fmt

* undo bluetooth deinit from #3596

* revert code for heltec tracker

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-14 09:11:27 -05:00
Manuel
4c9646f7d9
fix: device sleep (part 1) (#3590)
* fix sleep part 1

* always show wakeup reason in debug log

* fix screen turn on issue

* avoid unnecessary reboot when entering light sleep

* set DIO1 based on radio type

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-12 10:01:24 -05:00
todd-herbert
f2ed0f7c8c
Fix Light-sleep for ESP32 (#3521)
* Change wakeup source from EXT0 to GPIO

* Avoid ISR issue on wake

* Detect press from wake reason, instead of digitalRead

* Missing #ifdef

Risky phone-typed commit

* Fix PowerFSM timed transition preventing light sleep
Addresses https://github.com/meshtastic/firmware/issues/3517

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-02 14:55:48 -05:00
Ben Meadors
daa4d387c6
Don't reboot for non-radio lora config changes (#3505) 2024-03-28 18:14:15 -05:00
Ben Meadors
0d1d79b6d1
Extract default intervals and coalesce methods into their own file / static class methods (#3425)
* Extract default intervals and coalesce methods into their own file / static class methods

* Missed pax

* Still managed to miss one
2024-03-17 08:18:30 -05:00
Ben Meadors
a085c3ddb3
Try-fix router missed messages (#3405) 2024-03-14 17:00:57 -05:00
Ben Meadors
730429fc9b
Routers / Repeaters deep sleep default w/ LoRA interrupts (#3251)
* Experimenting with deep sleep routers / repeaters

* Make decision to SDS or LS based on Router/Repeater role

* Don't sleep LoRA on router / repeater deep sleep

* Guards

* Platform guards

* Rename method
2024-02-24 07:55:00 -06:00
Ben Meadors
998013aff3
Add TAK Tracker role behavior (#3233)
* Proto

* Standalone TAK Tracker

* Add log

* Make TAK_Tracker behave like Tracker
2024-02-16 20:04:21 -06:00
Ben Meadors
2a6c8be684
Avoid problematic sleep state transitions for power saving sensors and trackers (#2860)
* Avoid problematic sleep state transitions for power saving sensors and trackers

* Line got duped :-|
2023-10-03 10:09:27 -05:00
Manuel
94c2ade272
make esp32 deepsleep button wakeup functional again (#2854)
* make deepsleep button wakeup functional again

* Remove unused var

* Cleanup comment

* suppress screen wake on button

* add resume screen

* trunk fmt

* added missing #ifdef

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-10-02 16:16:29 -05:00
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
Manuel
e9215a5d70
revert KB_POWERON changes (#2847) 2023-09-30 06:43:36 -05:00
Andre K
350090ec0d
remove residual code for mesh_sds_timeout_secs (#2821)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-09-24 06:49:35 -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
Manuel
d6d51bc3f4
T-Deck/T-Watch: enhancements/fixes (#2786)
* T-Deck: enhancements/fixes

* trunk fmt

* T-Watch board update

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-09-10 06:54:25 -05:00
Manuel
fb5f2e48a5
fix T-Deck trackball crashes (#2714)
* try-fix: nodenum crash during boot

* Revert "try-fix: nodenum crash during boot"

This reverts commit 632012e197.

* fix/workaround: trackball interrupt crashes

* trunk fmt

* add OSThread to trackballInterrupt
2023-08-12 19:44:05 -05:00
mverch67
0fe99b0caa T-Watch fixes 2023-08-08 18:06:39 +02:00
Ben Meadors
cfe5c7f31d
Tweaking Power FSM states (#2676)
* Tweaking Power FSM states

* Turn bluetooth back on after serial disconnected

* Remove references to deprecated mesh_sds_timeout_secs
2023-08-04 06:01:01 -05:00
Jm Casler
794948d7e4 fixing trunk problems 2023-08-03 10:05:38 +02:00
Jm Casler
e9cbe54eca add more documentaiton 2023-08-03 10:05:38 +02: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
Ben Meadors
113026c372
Allow overriding the default Serial console output settings (#2528)
* Implement override_console_serial_port

* It's opposite day in Logictown

* Try to use native serial types for platforms

* Fix for s3

* Trunk

* Screw it... just declare as Print and handle init

* Alright, chatty kathy

* Missed a spot

* I'll take "Kill that FIXME" for 800, Alex

* Badunkadunk

* Refactor out a lot of duplicated code

* Boogers

* Okay I probably should stop changing everything
2023-05-30 05:26:34 -05:00
Ben Meadors
7ef12c77a8
Add initial screen for receiving waypoints (#2452) 2023-05-01 16:10:27 -05:00
Thomas Göttgens
e0bb95ca94 implement dynamic userbutton overwrite. fix #2434 2023-04-21 16:50:22 +02:00
Manuel Verch
82ab38d3e6 Revert changes on wakeup 2023-04-04 23:19:36 +02:00
Manuel Verch
23e6bc32c0 make cpptools happy 2023-04-03 20:14:57 +02:00
Manuel Verch
3c0817340a Fixed blank screen button issue and SX126x wakeup 2023-04-03 19:45:12 +02:00
Manuel Verch
9239698004 make trunk happy 2023-04-03 08:52:21 +02:00
Manuel Verch
71479a6b17 Fix for device display issues 2023-04-02 21:28:12 +02:00
Thomas Göttgens
1398611276 trunk fmt 2023-04-02 11:35:25 +02:00
Vladislav Osmanov
6bf538e26f EXT_PWR_DETECT pin to detect external power source for boards without the power management chip 2023-04-02 11:35:25 +02:00
GUVWAF
8f736c8ecc Remove sending network ping to displayed node on interval 2023-03-26 16:16:01 +02:00
Thomas Göttgens
18442816ef trunk fmt 2023-02-04 17:15:36 +01:00
Thomas Göttgens
c28d469fc6 Change LED Blink time in light sleep to 100ms 2023-02-04 17:13:38 +01:00
Thomas Göttgens
6fdb93cd16 re-add namespacing in protobufs. Let's see what i missed. Portduino likely ...
Checking in generated on purpose.
2023-01-21 21:23:24 +01:00
Thomas Göttgens
51b2c431d9 trunk roundhouse kick 2023-01-21 21:23:24 +01:00
Ben Meadors
f1cdfd163d Replaced all of the logging with proper log levels 2022-12-30 10:27:07 -06:00
Ben Meadors
0b5cae5393 Log levels refactoring 2022-12-29 20:41:37 -06:00
Thomas Göttgens
6978e57991 fix nrf52 build 2022-12-21 13:49:26 +01:00
Ben Meadors
45b518baf2 Move sds transition back into esp32 only 2022-12-12 10:24:51 -06:00
Ben Meadors
0f2a835359 Remove hard coded !isPowered 2022-12-05 10:13:19 -06:00
Ben Meadors
b14289e976 More cleanup 2022-12-05 08:35:54 -06:00
Ben Meadors
aeb9bfa063 Return false 2022-12-04 20:41:00 -06:00
Sacha Weatherstone
b24caa1e06
Update links 2022-10-31 17:32:38 +10:00
Thomas Göttgens
dd8cb1c7fb Small fixes for ESP Serial Init and Power FSM debug garble. 2022-09-19 15:36:48 +02:00
Ben Meadors
0f87adad7b
Power state lies and other fixes (#1698)
* Power interval defaults and factory reset

* Ternary

* Fixes
2022-09-16 11:00:05 -05:00
Thomas Göttgens
7f293bfda3
Merge branch 'master' into master 2022-09-09 21:39:29 +02:00
Thomas Göttgens
f7b12f0695 Adapt to new protobufs - TODO: factory_reset rewire 2022-09-09 12:51:41 +02:00