2 Commits

Author SHA1 Message Date
jonny
77ba81e996 WiFi on in HTTP-mode only, Add batt-threshold to timeout
As initially planned starting wifi only when needed, at change to HTTP mode.
Tested this on breakout board: ESP32 is not getting hot anymore!

Also optimized timeout: only notify "forgot to turn off" when battery is below certain
threshold (e.g. disable when charger is connected over night)

main:
    - dont start wifi at startup anymore
    - remove double-initialization of nvs
      already initialized in wifi.c, thus removed some code
    - optimize comments, logging

control:
    - timeout "forgot to turn off": Add battery threshold
    - start/stop wifi when switching to/from HTTP mode

wifi:
    - split init function to separate functions for NVS and NETIF (more clear in main)
    - optimize log output at nvs init (moved from main)
    - rename start/stop functions, formatting
2024-03-03 22:04:27 +01:00
jonny_jr9
3722b0af74 Add uart templates, send and receive tasks with templates work
both boards compile and send/receive example data using new templates in
common uart code
common/uart_common.hpp
2023-08-30 09:01:31 +02:00