Skip to content

Commit

Permalink
Make resetFlash public
Browse files Browse the repository at this point in the history
  • Loading branch information
gmag11 committed Apr 14, 2021
1 parent 5ff5968 commit e329e64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ monitor_rts = 0
platform = espressif8266
board = esp12e
framework = arduino
;board_build.ldscript = eagle.flash.1m64.ld
build_flags = -std=c++11 -D PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122
board_build.ldscript = eagle.flash.1m64.ld
build_flags =
-std=c++11
;-DFS_USE_FLASH=1 ;for failsafe.h
;-DFS_USE_LITTLEFS=1 ;for failsafe.h

src_filter = -<*> +<FailSafeMode/>

[env:esp8266_rtc]
Expand All @@ -43,4 +47,5 @@ build_flags = ${env:esp8266.build_flags} -DFS_USE_FLASH=1

[env:esp8266_litllefs]
extends = env:esp8266
build_flags = ${env:esp8266.build_flags} -DFS_USE_FLASH=1 -DFS_USE_LITTLEFS=1
build_flags = ${env:esp8266.build_flags} -DFS_USE_FLASH=1 -DFS_USE_LITTLEFS=1 -DFAIL_SAFE_DEBUG -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_OTA

4 changes: 2 additions & 2 deletions src/FailSafe.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ class FailSafeClass
*/
void failSafeModeLoop ();

public:

/**
* @brief Reset boot counter to 0 and update storage
*/
void resetFlag ();

public:

/**
* @brief Checks if fail safe mode should be activated. This should be called at the beginning of main setup function
* @param maxBootCycles Number of cycles after device enters in Fail Safe mode
Expand Down

0 comments on commit e329e64

Please sign in to comment.