diff options
| author | Selene ToyKeeper | 2017-08-26 17:15:28 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2017-08-26 17:15:28 -0600 |
| commit | eba8d84cfb29f5c7209e2a162497d965bea2ff23 (patch) | |
| tree | eeb2aac2830802017cfd93ad2a4c05496ca66505 /spaghetti-monster | |
| parent | Made wear-levelling work. Takes a bunch of extra ROM though. (diff) | |
| download | anduril-eba8d84cfb29f5c7209e2a162497d965bea2ff23.tar.gz anduril-eba8d84cfb29f5c7209e2a162497d965bea2ff23.tar.bz2 anduril-eba8d84cfb29f5c7209e2a162497d965bea2ff23.zip | |
Revert DarkHorse back to no wear-levelling.
It's smaller, and WL is probably not needed for this UI.
I only converted it as a test, and it worked, so ... woot.
Diffstat (limited to 'spaghetti-monster')
| -rw-r--r-- | spaghetti-monster/darkhorse.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/spaghetti-monster/darkhorse.c b/spaghetti-monster/darkhorse.c index 0d02481..2aa1b7b 100644 --- a/spaghetti-monster/darkhorse.c +++ b/spaghetti-monster/darkhorse.c @@ -28,7 +28,7 @@ #define BATTCHECK_4bars #define DONT_DELAY_AFTER_BATTCHECK #define USE_EEPROM -#define EEPROM_WL_BYTES 5 +#define EEPROM_BYTES 5 #include "spaghetti-monster.h" // FSM states @@ -305,25 +305,25 @@ void strobe(uint8_t level, uint16_t ontime, uint16_t offtime) { } void load_config() { - if (load_wl_eeprom()) { - H1 = !(!(eeprom_wl[0] & 0b00000100)); - M1 = !(!(eeprom_wl[0] & 0b00000010)); - L1 = !(!(eeprom_wl[0] & 0b00000001)); - H2 = eeprom_wl[1]; - M2 = eeprom_wl[2]; - L2 = eeprom_wl[3]; - strobe_beacon_mode = eeprom_wl[4]; + if (load_eeprom()) { + H1 = !(!(eeprom[0] & 0b00000100)); + M1 = !(!(eeprom[0] & 0b00000010)); + L1 = !(!(eeprom[0] & 0b00000001)); + H2 = eeprom[1]; + M2 = eeprom[2]; + L2 = eeprom[3]; + strobe_beacon_mode = eeprom[4]; } } void save_config() { - eeprom_wl[0] = (H1<<2) | (M1<<1) | (L1); - eeprom_wl[1] = H2; - eeprom_wl[2] = M2; - eeprom_wl[3] = L2; - eeprom_wl[4] = strobe_beacon_mode; + eeprom[0] = (H1<<2) | (M1<<1) | (L1); + eeprom[1] = H2; + eeprom[2] = M2; + eeprom[3] = L2; + eeprom[4] = strobe_beacon_mode; - save_wl_eeprom(); + save_eeprom(); } void setup() { |
