From aa7eadb382340cef5886aad69d53122e7e966983 Mon Sep 17 00:00:00 2001 From: Thorsten von Eicken Date: Wed, 19 Aug 2015 19:30:59 -0700 Subject: [PATCH] small flash config improvement plus more comments Conflicts: user/config.c --- user/config.c | 2 +- user/config.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/user/config.c b/user/config.c index c15f2ef..835e74f 100644 --- a/user/config.c +++ b/user/config.c @@ -17,7 +17,7 @@ FlashConfig flashDefault = { "esp-link\0 ", // hostname 0, 0x00ffffff, 0, // static ip, netmask, gateway 0, // log mode - 0, // swap_uart + 0, // swap_uart (don't by default) 1, 0, // tcp_enable, rssi_enable "\0", // api_key }; diff --git a/user/config.h b/user/config.h index 51b0995..18284a5 100644 --- a/user/config.h +++ b/user/config.h @@ -1,6 +1,10 @@ #ifndef CONFIG_H #define CONFIG_H +// Flash configuration settings. When adding new items always add them at the end and formulate +// them such that a value of zero is an appropriate default or backwards compatible. Existing +// modules that are upgraded will have zero in the new fields. This ensures that an upgrade does +// not wipe out the old settings. typedef struct { uint32_t seq; // flash write sequence number uint16_t magic, crc;