aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2017-08-26 17:15:28 -0600
committerSelene ToyKeeper2017-08-26 17:15:28 -0600
commiteba8d84cfb29f5c7209e2a162497d965bea2ff23 (patch)
treeeeb2aac2830802017cfd93ad2a4c05496ca66505 /spaghetti-monster
parentMade wear-levelling work. Takes a bunch of extra ROM though. (diff)
downloadanduril-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.c30
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() {
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.