Skip to content

Commit 98a604c

Browse files
committed
Travis fixes
1 parent c472273 commit 98a604c

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

PyPortal_EZ_Make_Oven/code.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def __init__(self):
6565
* tone_volume * (2 ** 15 - 1))
6666
self.sine_wave_sample = audioio.RawSample(sine_wave)
6767

68+
# pylint: disable=protected-access
6869
def play(self, duration=0.1):
6970
if not pyportal._speaker_enable.value:
7071
pyportal._speaker_enable.value = True
@@ -421,18 +422,18 @@ def format_time(seconds):
421422
circle = Circle(308, 12, 8, fill=0)
422423
pyportal.splash.append(circle)
423424

424-
graph = Graph()
425-
426-
graph.xstart = 100
427-
graph.ystart = 0
428-
graph.width = 220
429-
graph.height = 160
430-
graph.xmin = oven.sprofile["time_range"][0]
431-
graph.xmax = oven.sprofile["time_range"][1]
432-
graph.ymin = oven.sprofile["temp_range"][0]
433-
graph.ymax = oven.sprofile["temp_range"][1]*1.1
434-
print("x range:", graph.xmin, graph.xmax)
435-
print("y range:", graph.ymin, graph.ymax)
425+
sgraph = Graph()
426+
427+
sgraph.xstart = 100
428+
sgraph.ystart = 0
429+
sgraph.width = 220
430+
sgraph.height = 160
431+
sgraph.xmin = oven.sprofile["time_range"][0]
432+
sgraph.xmax = oven.sprofile["time_range"][1]
433+
sgraph.ymin = oven.sprofile["temp_range"][0]
434+
sgraph.ymax = oven.sprofile["temp_range"][1]*1.1
435+
print("x range:", sgraph.xmin, sgraph.xmax)
436+
print("y range:", sgraph.ymin, sgraph.ymax)
436437
draw_profile(graph, oven.sprofile)
437438
buttons = []
438439
button = Button(x=0, y=200, width=80, height=40,
@@ -515,7 +516,8 @@ def format_time(seconds):
515516
timer_data.text = format_time(timediff)
516517
print(oven.state)
517518
if oven_temp >= 50:
518-
graph.draw_graph_point(int(timediff), oven_temp,
519+
sgraph.draw_graph_point(int(timediff), oven_temp,
519520
size=TEMP_SIZE, color=3)
520521

521522
last_state = oven.state
523+

PyPortal_EZ_Make_Oven/codecalibrate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,5 @@ def oven_control(enable=False):
5858
print("** Calibration Results **")
5959
print("Modify config.json with these values for your oven:")
6060
print("calibrate_temp:", lag_temp)
61-
print("calibrate_seconds:",lag_time)
61+
print("calibrate_seconds:",lag_time)
62+

0 commit comments

Comments
 (0)