diff options
Diffstat (limited to 'spaghetti-monster/fsm-ramping.c')
| -rw-r--r-- | spaghetti-monster/fsm-ramping.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index 017a5b8..54ca45c 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -24,6 +24,18 @@ #ifdef USE_RAMPING void set_level(uint8_t level) { + #ifdef USE_JUMP_START + // maybe "jump start" the engine, if it's prone to slow starts + // (pulse the output high for a moment to wake up the power regulator) + // (only do this when starting from off and going to a low level) + if ((! actual_level) + && level + && (level < jump_start_level)) { + set_level(jump_start_level); + delay_4ms(JUMP_START_TIME/4); + } + #endif // ifdef USE_JUMP_START + actual_level = level; #ifdef USE_SET_LEVEL_GRADUALLY |
