@@ -16,12 +16,13 @@ def graph():
16
16
y5 = []
17
17
y6 = []
18
18
y7 = []
19
+ y8 = []
19
20
20
21
axv_count = 0
21
22
start = time .time ()
22
23
base = scale .tower_wt - scale .min_block_wt * 4
23
24
start_time = time .time ()
24
- input ("Press enter to start graphing" )
25
+ input ("Press enter to start graphing. Press down on tower lightly to end analysis. " )
25
26
print (base )
26
27
27
28
while True :
@@ -35,6 +36,7 @@ def graph():
35
36
y5 .append (scale .on_min )
36
37
y6 .append (scale .on_max )
37
38
y7 .append (scale .std_trigger + base )
39
+ y8 .append (scale .pause )
38
40
39
41
if scale .off () and axv_count == 0 :
40
42
x_vert .append (time .time () - start_time )
@@ -46,17 +48,18 @@ def graph():
46
48
if scale .on ():
47
49
axv_count = 0
48
50
49
- if scale .paused () or scale . current_weight () > 2 :
51
+ if scale .current_weight () > 2 :
50
52
break
51
53
52
54
#plot everything
53
- plt .plot (x ,y7 ,label = 'std trigger' ,color = 'black' )
54
- plt .plot (x ,y1 ,label = 'current weight' ,color = 'blue' ,alpha = .6 )
55
- plt .plot (x ,y2 ,label = 'off range' ,color = 'yellow' ,alpha = 0.2 )
56
- plt .plot (x ,y5 ,label = 'on range' ,color = 'grey' ,alpha = 0.2 )
57
- plt .plot (x ,y4 ,label = 'tower std + 1.68' ,color = 'red' ,alpha = .6 )
58
- plt .plot (x ,y3 ,color = 'yellow' ,alpha = 0.2 )
59
- plt .plot (x ,y6 ,color = 'grey' ,alpha = 0.2 )
55
+ plt .plot (x ,y7 ,label = 'std trigger' , color = 'black' )
56
+ plt .plot (x ,y1 ,label = 'current weight' , color = 'blue' , alpha = .6 )
57
+ plt .plot (x ,y2 ,label = 'off range' , color = 'yellow' , alpha = 0.2 )
58
+ plt .plot (x ,y5 ,label = 'on range' , color = 'grey' , alpha = 0.2 )
59
+ plt .plot (x ,y4 ,label = 'tower std + 1.68' , color = 'red' , alpha = .6 )
60
+ plt .plot (x ,y3 ,color = 'yellow' , alpha = 0.2 )
61
+ plt .plot (x ,y6 ,color = 'grey' , alpha = 0.2 )
62
+ plt .plot (x ,y8 ,label = 'pause line' , color = 'blue' , alpha = 0.2 )
60
63
61
64
for xc in x_vert :
62
65
plt .axvline (x = xc , color = 'k' , linestyle = '--' )
0 commit comments