~toykeeper/flashlight-firmware/trunk

« back to all changes in this revision

Viewing changes to bin/level_calc.py

  • Committer: Selene Scriven
  • Date: 2018-10-10 01:23:15 UTC
  • mfrom: (188.1.188 fsm)
  • Revision ID: bzr@toykeeper.net-20181010012315-iiaquinemb6y2ysl
merged the past month of updates from fsm branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
interactive = False
8
8
# supported shapes: ninth, fifth, cube, square, log_e, log_2
9
 
ramp_shape = 'cube'
 
9
#ramp_shape = 'cube'
10
10
 
11
11
 
12
12
def main(args):
14
14
    """
15
15
    # Get parameters from the user
16
16
    questions_main = [
 
17
            (str, 'ramp_shape', 'cube', 'Ramp shape? [cube, square, fifth, ninth, log_e, log_2]'),
17
18
            (int, 'num_channels', 1, 'How many power channels?'),
18
19
            (int, 'num_levels', 4, 'How many total levels do you want?'),
19
20
            ]
36
37
 
37
38
    answers = Empty()
38
39
    ask(questions_main, answers)
 
40
 
 
41
    global ramp_shape 
 
42
    ramp_shape = answers.ramp_shape
 
43
 
39
44
    channels = []
40
45
    if not args:
41
46
        print('Describe the channels in order of lowest to highest power.')