~toykeeper/flashlight-firmware/trunk

« back to all changes in this revision

Viewing changes to ToyKeeper/Ferrero_Rocher/Ferrero_Rocher.c

  • Committer: Selene Scriven
  • Date: 2015-04-04 06:45:28 UTC
  • Revision ID: ubuntu@toykeeper.net-20150404064528-g5nua8qe5gyu1kaq
Recalibrated voltage on blf-a6/* and Ferrero_Rocher/* firmwares
with more accurate values from a bench PSU and DMM.
Noted a bug in soft lock mode on Baton.c.  (not trivial to fix)
Switched Ramping_UI_table to PHASE plus 64 levels by default.
  (significantly better behavior on lowest modes with med-low battery)
  (less sensitive to voltage drop)
Tested LVP on blf-a6/* to make sure it works,
  and tested LVP on at least some of Ferrero_Rocher/*.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
                        // 90  = 5625
60
60
                        // 120 = 7500
61
61
 
62
 
#define ADC_42          185 // the ADC value we expect for 4.20 volts
63
 
#define ADC_100         185 // the ADC value for 100% full (4.2V resting)
 
62
#define ADC_42          184 // the ADC value we expect for 4.20 volts
 
63
#define ADC_100         184 // the ADC value for 100% full (4.2V resting)
64
64
#define ADC_75          175 // the ADC value for 75% full (4.0V resting)
65
 
#define ADC_50          164 // the ADC value for 50% full (3.8V resting)
66
 
#define ADC_25          154 // the ADC value for 25% full (3.6V resting)
67
 
#define ADC_0           139 // the ADC value for 0% full (3.3V resting)
68
 
#define VOLTAGE_FULL    169 // 3.9 V under load
69
 
#define VOLTAGE_GREEN   154 // 3.6 V under load
70
 
#define VOLTAGE_YELLOW  139 // 3.3 V under load
71
 
#define VOLTAGE_RED     124 // 3.0 V under load
72
 
#define ADC_LOW         123 // When do we start ramping down
73
 
#define ADC_CRIT        113 // When do we shut the light off
 
65
#define ADC_50          165 // the ADC value for 50% full (3.8V resting)
 
66
#define ADC_25          151 // the ADC value for 25% full (3.5V resting)
 
67
#define ADC_0           128 // the ADC value for 0% full (3.0V resting)
 
68
#define VOLTAGE_FULL    170 // 3.9 V under load
 
69
#define VOLTAGE_GREEN   156 // 3.6 V under load
 
70
#define VOLTAGE_YELLOW  142 // 3.3 V under load
 
71
#define VOLTAGE_RED     128 // 3.0 V under load
 
72
#define ADC_LOW         124 // When do we start ramping down (2.9V)
 
73
#define ADC_CRIT        114 // When do we shut the light off (2.7V)
74
74
// these two are just for testing low-batt behavior w/ a CR123 cell
75
75
//#define ADC_LOW         139 // When do we start ramping down
76
76
//#define ADC_CRIT        138 // When do we shut the light off