diff options
| author | Selene ToyKeeper | 2019-08-05 21:34:37 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2019-08-05 21:34:37 -0600 |
| commit | a68560963d9dd7a16982bc67d5b5ef100a51c8a6 (patch) | |
| tree | 3b995a6bbe8f6779ec92d7d82d66b06c3ed4a790 /spaghetti-monster/fsm-ramping.h | |
| parent | anduril: allow RGB LEDs to stay on (in voltage mode) while main LEDs are on (diff) | |
| download | anduril-a68560963d9dd7a16982bc67d5b5ef100a51c8a6.tar.gz anduril-a68560963d9dd7a16982bc67d5b5ef100a51c8a6.tar.bz2 anduril-a68560963d9dd7a16982bc67d5b5ef100a51c8a6.zip | |
fixed weird ramp behavior on D1S v2 (by trusting the compiler more)
Diffstat (limited to 'spaghetti-monster/fsm-ramping.h')
| -rw-r--r-- | spaghetti-monster/fsm-ramping.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-ramping.h b/spaghetti-monster/fsm-ramping.h index 7233474..24c19c0 100644 --- a/spaghetti-monster/fsm-ramping.h +++ b/spaghetti-monster/fsm-ramping.h @@ -47,7 +47,10 @@ void gradual_tick(); #define PWM_GET(x,y) pgm_read_byte(x+y) #else #define PWM_DATATYPE uint16_t -#define PWM_GET(x,y) pgm_read_word(x+(2*y)) +// pointer plus 2*y bytes +//#define PWM_GET(x,y) pgm_read_word(x+(2*y)) +// nope, the compiler was already doing the math correctly +#define PWM_GET(x,y) pgm_read_word(x+y) #endif // use UI-defined ramp tables if they exist |
