aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spaghetti-monster/anduril/smooth-steps.c4
-rw-r--r--spaghetti-monster/fsm-events.h6
-rw-r--r--tk-attiny.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/spaghetti-monster/anduril/smooth-steps.c b/spaghetti-monster/anduril/smooth-steps.c
index b8664bd..d896251 100644
--- a/spaghetti-monster/anduril/smooth-steps.c
+++ b/spaghetti-monster/anduril/smooth-steps.c
@@ -23,12 +23,12 @@ void smooth_steps_iter() {
uint8_t this = diff / smooth_steps_speed;
if (!this) this = 1;
set_level(actual_level + this);
- nice_delay_ms(9);
+ nice_delay_ms(10);
} else {
// ramp-linear descent
// (jump by 1 on each frame, frame rate gives constant total time)
uint8_t diff = smooth_steps_start - smooth_steps_target;
- uint16_t delay = 1 + (22 * smooth_steps_speed / diff);
+ uint16_t delay = 1 + (24 * smooth_steps_speed / diff);
set_level(actual_level - 1);
// TODO? if delay < one PWM cycle, this can look a little weird
nice_delay_ms(delay);
diff --git a/spaghetti-monster/fsm-events.h b/spaghetti-monster/fsm-events.h
index 9692163..575af1b 100644
--- a/spaghetti-monster/fsm-events.h
+++ b/spaghetti-monster/fsm-events.h
@@ -55,9 +55,9 @@ uint8_t push_event(uint8_t ev_type); // only for use by PCINT_inner()
// TODO: Maybe move these to their own file...
// ... this probably isn't the right place for delays.
#ifndef DELAY_FACTOR
-// adjust the timing of delays, lower = shorter delays
-// 90 = 90% delay, 10% for other things
-#define DELAY_FACTOR 92
+ // adjust the timing of delays, lower = shorter delays
+ // 90 = 90% delay, 10% for other things
+ #define DELAY_FACTOR 92
#endif
inline void interrupt_nice_delays();
uint8_t nice_delay_ms(uint16_t ms);
diff --git a/tk-attiny.h b/tk-attiny.h
index ad2ed3b..9532ed5 100644
--- a/tk-attiny.h
+++ b/tk-attiny.h
@@ -58,7 +58,7 @@
#elif (ATTINY == 412) || (ATTINY == 416) || (ATTINY == 417) || (ATTINY == 816) || (ATTINY == 817) || (ATTINY == 1616) || (ATTINY == 1617) || (ATTINY == 3216) || (ATTINY == 3217)
#define AVRXMEGA3
#define F_CPU 10000000UL
- #define BOGOMIPS (F_CPU/4000)
+ #define BOGOMIPS (F_CPU/4700)
#define EEPSIZE 128
#define DELAY_ZERO_TIME 1020
#else