@@ -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):
421422circle = Circle (308 , 12 , 8 , fill = 0 )
422423pyportal .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 )
436437draw_profile (graph , oven .sprofile )
437438buttons = []
438439button = 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+
0 commit comments