Commit Graph

22 Commits

Author SHA1 Message Date
Nic Limper
aa484575b8 update update screen to new design; ability to choose repo source for OTA 2023-09-28 11:40:29 +02:00
Nic Limper
a91dd5c2a2 fix hangs on esp32-s2; refactor task runner; moved some json objects from the stack to the heap
temporary, there's some extra debug info on the terminal. Will be removed again in the near future.
2023-09-23 18:40:28 +02:00
Nic Limper
0ba287f734 mutex on file write; prevent other AP from stealing tag content; bigger heap for timeTask 2023-09-22 19:42:36 +02:00
Jelmer
9ce9abd59e new flasher, support for nRF 2023-07-22 00:02:33 +02:00
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
Mimoja
dbf76e2176 Expose flasher speed to config via define
Signed-off-by: Mimoja <git@mimoja.de>
2023-06-20 17:51:10 +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
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
5c7b53b740 update in power management (multiple pins) 2023-06-10 14:24:50 +02:00
Nic Limper
f1df44fbb1 Merge branch 'master' of https://github.com/jjwbruijn/OpenEPaperLink 2023-05-23 11:20:28 +02:00
Nic Limper
6afc2a020e improvements for non-rgb leds 2023-05-23 11:20:03 +02:00
Jelmer
4545a7a504 fixed no-display AP flashing 2023-05-23 11:14:48 +02:00
Jelmer
ed0189ceb1 Added flash backup for unknown tag types 2023-05-19 00:40:39 +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
bf66a49038 small fixes 2023-03-28 16:39:28 +02:00
Jelmer
d92681ef02 fixed flasher, DMA handling 2023-03-27 17:13:12 +02:00
Jelmer
27ecf54fb6 fixed incompatibility, broke something else 2023-03-23 11:44:58 +01:00
Jelmer
2bb7a8c7b5 Renamed folders 2023-03-23 09:51:50 +01:00