From 7dbfad496eb22dc1e8ccf98147255dc76a2f7773 Mon Sep 17 00:00:00 2001 From: Vladimir Kotal Date: Thu, 8 Feb 2024 10:27:08 +0100 Subject: [PATCH 1/3] add units, use f-string --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 8cd0bdc..33eb4ef 100644 --- a/README.rst +++ b/README.rst @@ -71,8 +71,8 @@ Usage Example while True: print("-----") - print("Temperature: ", us100.temperature) - print("Distance: ", us100.distance) + print(f"Temperature: {us100.temperature} cm") + print(f"Distance: {us100.distance}°C") time.sleep(0.5) From 58291e1a89d870405455c41855ccfeef939d7376 Mon Sep 17 00:00:00 2001 From: Vladimir Kotal Date: Thu, 8 Feb 2024 10:27:34 +0100 Subject: [PATCH 2/3] fix units --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 33eb4ef..bc05aa1 100644 --- a/README.rst +++ b/README.rst @@ -71,8 +71,8 @@ Usage Example while True: print("-----") - print(f"Temperature: {us100.temperature} cm") - print(f"Distance: {us100.distance}°C") + print(f"Temperature: {us100.temperature}°C") + print(f"Distance: {us100.distance} cm") time.sleep(0.5) From 4bf6e13afa725ca8e2d4a94e62ef47f5fd167117 Mon Sep 17 00:00:00 2001 From: Vladimir Kotal Date: Thu, 8 Feb 2024 10:28:17 +0100 Subject: [PATCH 3/3] add units, use f-string --- examples/us100_simpletest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/us100_simpletest.py b/examples/us100_simpletest.py index fe41d3a..cd85b47 100644 --- a/examples/us100_simpletest.py +++ b/examples/us100_simpletest.py @@ -24,7 +24,7 @@ while True: print("-----") - print("Temperature: ", us100.temperature) + print(f"Temperature: {us100.temperature}°C") time.sleep(0.5) - print("Distance: ", us100.distance) + print(f"Distance: {us100.distance} cm") time.sleep(0.5)