# HG changeset patch # User Matt Johnston # Date 1351431510 -28800 # Node ID 9091411be8410a4f84b2c91ca0453d0f7083d978 # Parent 94330d90f11f7c98c8d3f06e9b76789a7e4fcb2c - use the right variable for overshoot_factor - make eeprom more robust diff -r 94330d90f11f -r 9091411be841 main.c --- a/main.c Sun Oct 28 07:52:35 2012 +0800 +++ b/main.c Sun Oct 28 21:38:30 2012 +0800 @@ -157,7 +157,6 @@ #define EXPECT_MAGIC 0x67c9 struct __attribute__ ((__packed__)) __eeprom_data { - uint16_t magic; uint16_t measure_wake; uint16_t comms_wake; uint8_t wake_secs; @@ -173,6 +172,8 @@ static uint8_t wort_id[ID_LEN]; static uint8_t fridge_id[ID_LEN]; #endif + + uint16_t magic; }; static const uint8_t fridge_id[ID_LEN] = @@ -676,9 +677,9 @@ return; } - uint8_t old = overshoot_delay; + uint8_t old = overshoot_factor; - overshoot_delay = new_f * 10; + overshoot_factor = new_f * 10; bool written = set_initial_eeprom(); if (!written) {