~toykeeper/flashlight-firmware/trunk

« back to all changes in this revision

Viewing changes to JonnyC/STAR/STAR_off_time/STAR_off_time.c

  • Committer: Selene Scriven
  • Date: 2015-01-24 06:16:36 UTC
  • mto: This revision was merged to the branch mainline in revision 101.
  • Revision ID: ubuntu@toykeeper.net-20150124061636-ib5dy0iqpbqcqdf5
JCapSolutions   2014-12-13
git commit: ba5fb9efbd5ad11e0edd4008123301532ac0a277
Changed initial define values to make it easier for new users to configure for a stock NANJG

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
//#define TICKS_250MS           // If enabled, ticks are every 250 ms. If disabled, ticks are every 500 ms
72
72
                                                        // Affects turbo timeout/rampdown timing
73
73
 
74
 
// Levels should start around 10 with Fast PWM
75
 
 
76
74
#define MODE_MOON                       3       // Can comment out to remove mode, but should be set through soldering stars
77
75
#define MODE_LOW                        14  // Can comment out to remove mode
78
76
#define MODE_MED                        39      // Can comment out to remove mode
81
79
#define MODE_TURBO_LOW          140     // Level turbo ramps down to if turbo enabled
82
80
#define TURBO_TIMEOUT           240 // How many WTD ticks before before dropping down.  If ticks set for 500 ms, then 240 x .5 = 120 seconds.  Max value of 255 unless you change "ticks"
83
81
                                                                // variable to uint8_t
84
 
#define TURBO_RAMP_DOWN                 // By default we will start to gradually ramp down, once TURBO_TIMEOUT ticks are reached, 1 PWM_LVL each tick until reaching MODE_TURBO_LOW PWM_LVL
 
82
//#define TURBO_RAMP_DOWN                       // By default we will start to gradually ramp down, once TURBO_TIMEOUT ticks are reached, 1 PWM_LVL each tick until reaching MODE_TURBO_LOW PWM_LVL
85
83
                                                                // If commented out, we will step down to MODE_TURBO_LOW once TURBO_TIMEOUT ticks are reached
86
84
 
87
85
#define FAST_PWM_START      8 // Above what output level should we switch from phase correct to fast-PWM?
88
 
#define DUAL_PWM_START          8 // Above what output level should we switch from the alternate PWM output to both PWM outputs?  Comment out to disable alternate PWM output
 
86
//#define DUAL_PWM_START                8 // Above what output level should we switch from the alternate PWM output to both PWM outputs?  Comment out to disable alternate PWM output
89
87
 
90
88
#define ADC_LOW                         130     // When do we start ramping
91
89
#define ADC_CRIT                        120 // When do we shut the light off