diff options
| author | Selene ToyKeeper | 2020-03-18 03:29:21 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-03-18 03:29:21 -0600 |
| commit | 654fab1fa72a2d3a014632779106e57c150296ee (patch) | |
| tree | 1712d6ecdfd9370573524149817adf893346f0ce /bin/level_calc.py | |
| parent | removed more references to THERM_HARD_TURBO_DROP (diff) | |
| parent | merged fsm branch, mostly to get new ADC code (thermal regulation and voltage... (diff) | |
| download | anduril-654fab1fa72a2d3a014632779106e57c150296ee.tar.gz anduril-654fab1fa72a2d3a014632779106e57c150296ee.tar.bz2 anduril-654fab1fa72a2d3a014632779106e57c150296ee.zip | |
merged Noctigon K1 branch, which changes a few things...
- added support for 10-bit PWM
- 10-bit ADC voltage divider calibration values instead of 8-bit
- added ability to use different DIDR channels on different hardware
- made dynamic underclocking configurable per build target
- expanded RGB aux LED support
- increased resolution of RGB voltage readout (6 colors instead of 3)
- made party strobe ontime configurable per build target
- added support for an enable/disable pin for a regulator chip
Diffstat (limited to 'bin/level_calc.py')
| -rwxr-xr-x | bin/level_calc.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/level_calc.py b/bin/level_calc.py index 74385da..a780405 100755 --- a/bin/level_calc.py +++ b/bin/level_calc.py @@ -8,6 +8,8 @@ interactive = False # supported shapes: ninth, seventh, fifth, cube, square, log #ramp_shape = 'cube' +max_pwm = 255 + def main(args): """Calculates PWM levels for visually-linear steps. @@ -22,7 +24,7 @@ def main(args): (str, 'type', '7135', 'Type of channel - 7135 or FET:'), (int, 'pwm_min', 6, 'Lowest visible PWM level:'), (float, 'lm_min', 0.25, 'How bright is the lowest level, in lumens?'), - #(int, 'pwm_max', 255, 'Highest PWM level:'), + #(int, 'pwm_max', max_pwm, 'Highest PWM level:'), (float, 'lm_max', 1000, 'How bright is the highest level, in lumens?'), ] @@ -48,7 +50,7 @@ def main(args): if not args: print('===== Channel %s =====' % (chan_num+1)) chan = Empty() - chan.pwm_max = 255 + chan.pwm_max = max_pwm ask(questions_per_channel, chan) chan.type = chan.type.upper() if chan.type not in ('7135', 'FET'): @@ -160,7 +162,7 @@ def multi_pwm(answers, channels): and (channel.modes[i] >= channel.modes[i-1]) \ and (channels[cnum+1].modes[i] == 0): i += 1 - print('Ch%i max: %i (%.2f/255)' % (cnum, i, channel.modes[i-1])) + print('Ch%i max: %i (%.2f/%s)' % (cnum, i, channel.modes[i-1], max_pwm)) def get_value(text, default, args): |
