aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-03-18 03:29:21 -0600
committerSelene ToyKeeper2020-03-18 03:29:21 -0600
commit654fab1fa72a2d3a014632779106e57c150296ee (patch)
tree1712d6ecdfd9370573524149817adf893346f0ce /bin
parentremoved more references to THERM_HARD_TURBO_DROP (diff)
parentmerged fsm branch, mostly to get new ADC code (thermal regulation and voltage... (diff)
downloadanduril-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 '')
-rwxr-xr-xbin/level_calc.py8
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):
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.