aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-09-30 01:25:43 -0600
committerSelene ToyKeeper2018-09-30 01:25:43 -0600
commit5d37cf72cc4632355cd973430e047c9fdff6684d (patch)
tree2528159912ecb8c2425b5e241f34439c61629ec0 /bin
parentApplied recent Anduril updates to RampingIOS V3: (diff)
downloadanduril-5d37cf72cc4632355cd973430e047c9fdff6684d.tar.gz
anduril-5d37cf72cc4632355cd973430e047c9fdff6684d.tar.bz2
anduril-5d37cf72cc4632355cd973430e047c9fdff6684d.zip
Made level_calc.py's ramp shape configurable from the command line, instead of having to edit the source.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/level_calc.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/level_calc.py b/bin/level_calc.py
index 2aa8727..c903800 100755
--- a/bin/level_calc.py
+++ b/bin/level_calc.py
@@ -6,7 +6,7 @@ import math
interactive = False
# supported shapes: ninth, fifth, cube, square, log_e, log_2
-ramp_shape = 'cube'
+#ramp_shape = 'cube'
def main(args):
@@ -14,6 +14,7 @@ def main(args):
"""
# Get parameters from the user
questions_main = [
+ (str, 'ramp_shape', 'cube', 'Ramp shape? [cube, square, fifth, ninth, log_e, log_2]'),
(int, 'num_channels', 1, 'How many power channels?'),
(int, 'num_levels', 4, 'How many total levels do you want?'),
]
@@ -36,6 +37,10 @@ def main(args):
answers = Empty()
ask(questions_main, answers)
+
+ global ramp_shape
+ ramp_shape = answers.ramp_shape
+
channels = []
if not args:
print('Describe the channels in order of lowest to highest power.')
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.