We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae29f01 + ede05ba commit fc3d004Copy full SHA for fc3d004
PyPortal_User_Interface/code.py
@@ -338,12 +338,12 @@ def switch_view(what_view):
338
light = light_sensor.value
339
340
if adt: # Only if we have the temperature sensor
341
- tempC = round(adt.temperature)
+ tempC = adt.temperature
342
else: # No temperature sensor
343
- tempC = round(microcontroller.cpu.temperature)
+ tempC = microcontroller.cpu.temperature
344
345
tempF = tempC * 1.8 + 32
346
- sensor_data.text = 'Touch: {}\nLight: {}\n Temp: {}°F'.format(touch, light, tempF)
+ sensor_data.text = 'Touch: {}\nLight: {}\n Temp: {:.0f}°F'.format(touch, light, tempF)
347
348
# ------------- Handle Button Press Detection ------------- #
349
if touch: # Only do this if the screen is touched
0 commit comments