Commit Graph

60 Commits

Author SHA1 Message Date
Mimoja
a60bc91205 ESP: Fix Powermanagement for non-configured POWER
We currently have two ways of undefining the PowerPin in software for the ESP32
For once we can set POWER_NO_SOFT_POWER which will lead to some helpful screen
messages _but_ will still require the definition of the FLASHER_AP_POWER pin.

The second way (which was replaced with POWER_NO_SOFT_POWER) allowed to set the
powerPin array to {-1} to indicate that the pin is undefined. This would then be
handled in pretty far down the call stack right before toggeling the pin in powerControl:

```
 void powerControl(bool powerState, uint8_t* pin, uint8_t pincount) {
    if (pin[0] == -1) return;
```

This however is leading to an error: pin is n pointer (here an array with additional length)
to an uint8_t which can never be -1. Therefore the check wont ever be reached and an invalid
gpio number is passed to the gpio hal.
This caused the error:
```
  E (XXXX) gpio: gpio_set_level(226): GPIO output gpio_num error
```
to show up in the logs.
We are now proposing three seperate changes to mitigate this behaviour:
1) We are addng the POWER_NO_SOFT_POWER to the Wemos and the M5Stack boards default configs
for new users to find.
2) We are replacing the pin[0] check in powerControl with a check on the pincount and a
nullptr check as the zbs_interface->begin() allows for no powerPin to be passed in which
case we are dereferencing a nullptr.
3) ZBS_interface->begin() is losing its powerPin related default configurations and
sanity checks are put in place before every calling.

We have opted to do 3) in this way and not adding the checked into the ZBS_interface->begin()
function which is also passed an uint8_t pointer to keep the API of the class stable
for reuse in other projects. Changing the interface however would be ideal here

Signed-off-by: Mimoja <git@mimoja.de>
2023-07-03 21:39:41 +02:00
Nic Limper
42a3651075 channel id, tag fw version and tag commands integrated in webinterface 2023-06-28 13:11:33 +02:00
Jelmer
da6d783e3b added new larger availdatareq struct for esp32 2023-06-27 23:17:01 +02:00
Mimoja
e45845e00e Add SPIFFSEditor header to match imported source file
The SPIFFSEditor.h header is being imported from the .platformio folder
while the corresponding .cpp is actually stored with the project.
To ensure we can not accidentally edit the wrong file in the future import
the header as well

Signed-off-by: Mimoja <git@mimoja.de>
2023-06-25 13:12:56 +02:00
Mimoja
93639ff8ac Disconnect SDCard if it shares the pins with the flasher
Signed-off-by: Mimoja <git@mimoja.de>
2023-06-20 17:51:10 +02:00
Mimoja
9c83d8b5a5 Use SDCard usage where available
When an SD Card is available it is the more interesing
metric in terms of space usage. We are therefore using
it here.

Signed-off-by: Mimoja <git@mimoja.de>
2023-06-20 17:51:10 +02:00
Mimoja
f487092f7f Add SDCard support
To be able to store more images and never worry about running
out of storage again we are adding support of SDCards.

We are faced with two options:
1) Remove the LittleFS code
2) Allow for both FSs but increase the app partition as we run
out of space.

We have opted for 2 for two reasons:
1) Unformated SDCards can be initialized from the littleFS
2) If the SDCard and the flasher share the same SPI pins
the SDCard needs to be completely disconnected so there needs
to be a FS in that rare case.

Performance wise the SDCard is not slowing the system down.
Writing the AP db with 70 APs takes 2.5 seconds, on the SD
only 800ms. This however is SD and setup depending.

By default the SDCard is expected on pins 18,19,23 however this
is configurable via preprocessor defines.

Globally we replace LittleFS with a new pointer to the currently
used FS allowing for hotswapping where the FS pointer is not saved.
One case which is therefore not working is the SPIFSEditor which
copies the FS interally.

Signed-off-by: Mimoja <git@mimoja.de>
2023-06-20 17:51:10 +02:00
Jelmer
94be1ea3aa Added possibility to xfer tag-side config options 2023-06-15 13:18:12 +02:00
Nic Limper
205dfa0ce2 logging reboots 2023-06-11 13:29:49 +02:00
Jelmer
5c7b53b740 update in power management (multiple pins) 2023-06-10 14:24:50 +02:00
Nic Limper
e7fbaffbab added advanced tag options
- added advanced tag options: image rotation / always use default lut / force refresh / cancel pending
- fixed rx/tx swap in documentation
2023-06-09 12:56:58 +02:00
Nic Limper
c68b582be7 overhaul of contentmanager, 4.2" layouts, bugfixes
- added Swedish å Å to Bahnschrift20 and 30
- option to turn dither on/off in 'static image'
- major overhaul of contentmanager.cpp, content is now generated from json template.
- fallback to 1bpp for 4.2" when no psram
- added 4.2" content layouts
- fixed small apconfig bug
- pause content generation for 60 seconds after crash, to prevent uncontrollable boot loop
2023-06-08 15:41:15 +02:00
Nic Limper
e169dbab6e added äöüßÄÖÜ to fonts + small updates
- fonts re-rendered: added äöüßÄÖÜ.
- shuffled a bit with fonts to optimize disk usage
- ability to delete files during OTA
- prettify tagDB.json
- error handling in get_DB
- small cosmetic changes

* Due to new ability to delete files: After firmware update via OTA, please perform an OTA update of the filesystem again to perform the deletion of unneeded fonts.
* If updating via platform.io: don't forget to update the filesystem image.
2023-06-06 16:04:18 +02:00
Nic Limper
db88de1f75 minor bug fixes
-
2023-06-01 21:42:09 +02:00
Nic Limper
dfde0c0efe ota bugfix 2023-05-30 18:25:03 +02:00
Nic Limper
aaf4f94df7 buienradar (dutch rain predictions) 2023-05-28 01:37:28 +02:00
Nic Limper
3788608e63 first version of OTA firmware updates 2023-05-27 19:25:28 +02:00
Nic Limper
49d86620bd preparations for custom LUT 2023-05-25 14:28:54 +02:00
Nic Limper
f73ce60468 apconfig improvements 2023-05-25 09:22:48 +02:00
Nic Limper
5f3918e882 multi-AP sync improvements
- add: syncing data segment of non-image datatypes between AP's
- add: syncing metadata and deletions between AP's
- sorted tags on the webpage by alias
2023-05-24 17:00:41 +02:00
Nic Limper
0641547d73 8 byte mac addr instead of 6 byte 2023-05-23 21:06:50 +02:00
Nic Limper
6afc2a020e improvements for non-rgb leds 2023-05-23 11:20:03 +02:00
Nic Limper
533f0cec78 set NFC url / new tagtypes / minor fixes 2023-05-23 00:46:32 +02:00
Nic Limper
feb8e7e69c segmented tags content 2023-05-22 13:00:39 +02:00
Jelmer
ecbbff75f8 Merge branch 'master' of https://github.com/jjwbruijn/OpenEPaperLink 2023-05-19 00:40:42 +02:00
Jelmer
ed0189ceb1 Added flash backup for unknown tag types 2023-05-19 00:40:39 +02:00
Nic Limper
19a08de207 re-rendered fonts for uppercase characters in dates 2023-05-16 16:51:23 +02:00
atc1441
0bae760eaa Added content language option, Now supported: English, Dutch and German
New languages can be added by adding it into the language.h file everything else should adapt to it
2023-05-15 23:30:17 +02:00
Jelmer
480b4624d3 Merge branch 'master' into master 2023-05-15 20:42:40 +02:00
Nic Limper
16ebd9194e small fixes
- disable useless compiler warnings in fastled and tft_espi
- web preview thumbnail fix
- faster tag updates while webpage is displayed
- fixed tag fw ota update
2023-05-15 19:35:15 +02:00
foorschtbar
7b662dd65e Added option to control RGB LED brightness 2023-05-15 17:03:13 +02:00
foorschtbar
504d150e7b Added ESL MAC in http image request 2023-05-15 11:33:39 +02:00
Jelmer
40074c6bf9 prevent Mini AP from booting before its time 2023-05-09 16:57:57 +02:00
Jelmer
fd77e0a77c Improved state handling, error messages&led status 2023-05-09 16:34:33 +02:00
Jelmer
e3bfaaa62f fixes compiler errors for other boards 2023-05-08 01:16:41 +02:00
Jelmer
cfee590f01 Added the option to run an AP from another port 2023-05-07 15:42:49 +02:00
Jelmer
117120c0df Better auto-flashing, support for firmware-packs 2023-05-06 18:41:22 +02:00
Jelmer
5a1488c986 Changes in AP-Serial, hopefully more readable 2023-05-03 13:49:06 +02:00
Nic Limper
d9eb97af26 better use of prepareIdleReq 2023-04-28 22:11:10 +02:00
Nic Limper
36d30ee0cb auto channel select, ap config screen 2023-04-28 14:51:51 +02:00
Nic Limper
9158549cb3 cleanup pendingdata vector 2023-04-27 22:37:33 +02:00
Nic Limper
a46678386e Merge remote-tracking branch 'upstream/master' 2023-04-27 10:11:10 +02:00
Jelmer
e3ea9121b4 added support for changing channels 2023-04-27 02:04:18 +02:00
Nic Limper
b7a339c034 caching lat/lon in weather 2023-04-26 19:32:08 +02:00
Nic Limper
0edb93be1a zeroconfig multiAP over UDP 2023-04-26 17:17:02 +02:00
Nic Limper
981fe9f312 Merge remote-tracking branch 'upstream/master' 2023-04-24 18:54:49 +02:00
Jelmer
ad7b75a582 ESP: Added Block-request source 2023-04-23 22:18:32 +02:00
Jelmer
6629b77d3d Added support for the Mini-AP (ESP32-S2) 2023-04-23 16:44:29 +02:00
Nic Limper
7d15f41b56 Merge remote-tracking branch 'upstream/master' 2023-04-15 14:02:06 +02:00
Jonas Niesner
c474c364e6 Update settings.h 2023-04-04 19:40:23 +02:00