Mirror of espurna firmware for wireless switches and more
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1016 B

Rework settings (#2282) * wip based on early draft. todo benchmarking * fixup eraser, assume keys are unique * fix cursor copy, test removal at random * small benchmark via permutations. todo lambdas and novirtual * fix empty condition / reset * overwrite optimizations, fix move offsets overflows * ...erase using 0xff instead of 0 * test the theory with code, different length kv were bugged * try to check for out-of-bounds writes / reads * style * trying to fix mover again * clarify length, defend against reading len on edge * fix uncommited rewind change * prove space assumptions * more concise traces, fix move condition (agrh!!!) * slightly more internal knowledge (estimates API?) * make sure cursor is only valid within the range * ensure 0 does not blow things * go back up * cursor comments * comments * rewrite writes through cursor * in del too * estimate kv storage requirements, return available size * move raw erase / move into a method, allow ::set to avoid scanning storage twice * refactor naming, use in code * amend storage slicing test * fix crash handler offsets, cleanup configuration * start -> begin * eeprom readiness * dependencies * unused * SPI_FLASH constants for older Core * vtables -> templates * less include dependencies * gcov help, move estimate outside of the class * writer position can never match, use begin + offset * tweak save_crash to trigger only once in a serious crash * doh, header function should be inline * foreach api, tweak structs for public api * use test helper class * when not using foreach, move cursor reset closer to the loop using read_kv * coverage comments, fix typo in tests decltype * ensure set() does not break with offset * make codacy happy again
4 years ago
  1. /*
  2. If you want to modify the stock configuration but you don't want to touch
  3. the repo files you can define USE_CUSTOM_H in your build settings.
  4. Arduino IDE:
  5. define it in your boards.txt for the board of your choice.
  6. For instance, for the "Generic ESP8266 Module" with prefix "generic" just add:
  7. generic.build.extra_flags=-DESP8266 -DUSE_CUSTOM_H
  8. PlatformIO:
  9. add the setting to your environment or just define global PLATFORMIO_BUILD_FLAGS
  10. export PLATFORMIO_BUILD_FLAGS="'-DUSE_CUSTOM_H'"
  11. Check https://github.com/xoseperez/espurna/issues/104
  12. for an example on how to use this file.
  13. */
  14. #pragma once
  15. #include <Arduino.h>
  16. #include <core_version.h>
  17. #include <pgmspace.h>
  18. #include <spi_flash.h>
  19. #ifdef USE_CUSTOM_H
  20. #include "custom.h"
  21. #endif
  22. #include "version.h"
  23. #include "types.h"
  24. #include "arduino.h"
  25. #include "hardware.h"
  26. #include "general.h"
  27. #include "defaults.h"
  28. #include "deprecated.h"
  29. #include "sensors.h"
  30. #include "dependencies.h"
  31. #include "webui.h"