From caadba420518d041e14570bf6669443fd805c47b Mon Sep 17 00:00:00 2001 From: EmanueleDajko Date: Fri, 24 Nov 2023 15:36:47 +0100 Subject: [PATCH 1/4] Add Temp def. class for temperature sensor --- smart_bridge/src/components/api/Temp.h | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 smart_bridge/src/components/api/Temp.h diff --git a/smart_bridge/src/components/api/Temp.h b/smart_bridge/src/components/api/Temp.h new file mode 100644 index 0000000..7b7f869 --- /dev/null +++ b/smart_bridge/src/components/api/Temp.h @@ -0,0 +1,29 @@ +#ifndef __TEMP__ +#define __TEMP__ + +/** + * @class Temp + * @brief This class represents a temperature sensor. + * + * It provides functionalities to get the temperature. + */ +class Temp +{ + +public: + /** + * @brief Construct a new Temp object + * + * @param pin The pin number where the temperature sensor is connected. + */ + Temp(int pin); + +private: + /** + * @brief The pin number where the temperature sensor is connected. + * + */ + int tempPin; +}; + +#endif // __TEMP__ From 6aaf361f99ae9e018bd6f1593d458b242ab7a1c1 Mon Sep 17 00:00:00 2001 From: EmanueleDajko Date: Fri, 24 Nov 2023 15:37:01 +0100 Subject: [PATCH 2/4] Add Temp class implementation --- smart_bridge/src/components/impl/Temp.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 smart_bridge/src/components/impl/Temp.cpp diff --git a/smart_bridge/src/components/impl/Temp.cpp b/smart_bridge/src/components/impl/Temp.cpp new file mode 100644 index 0000000..4b0e17f --- /dev/null +++ b/smart_bridge/src/components/impl/Temp.cpp @@ -0,0 +1,9 @@ +#include "../api/Temp.h" +#include "config/config.h" +#include "Arduino.h" + +Temp::Temp(int pin) +{ + this->tempPin = TMP_PIN; + pinMode(tempPin, INPUT); +} \ No newline at end of file From ad5cb55a3a8ddb79da578708d5108413de3e95dc Mon Sep 17 00:00:00 2001 From: Davide Di Marco <74374315+davidedimarco00@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:56:12 +0100 Subject: [PATCH 3/4] Update view.py --- smart_bridge/src/UI/view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smart_bridge/src/UI/view.py b/smart_bridge/src/UI/view.py index 32d6cd6..c6213c1 100644 --- a/smart_bridge/src/UI/view.py +++ b/smart_bridge/src/UI/view.py @@ -61,7 +61,7 @@ def configure_dynamic_elements(root): (tk.Label, wash_counter, 1), (tk.Label, progress_status, 4), (tk.Label, current_temperature, 5), - (tk.Label, message, 6) + (tk.Label, ui_message, 6) ] for element_type, text_var, row in dynamic_elements: From e1123ebaacbea78d9c8a52d650f438dc78698b92 Mon Sep 17 00:00:00 2001 From: Davide Di Marco <74374315+davidedimarco00@users.noreply.github.com> Date: Fri, 24 Nov 2023 16:38:00 +0100 Subject: [PATCH 4/4] Update view.py --- smart_bridge/src/UI/view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smart_bridge/src/UI/view.py b/smart_bridge/src/UI/view.py index c6213c1..b3c94ae 100644 --- a/smart_bridge/src/UI/view.py +++ b/smart_bridge/src/UI/view.py @@ -18,9 +18,9 @@ def create_main_window(): root = tk.Tk() root.title("Car Washing Dashboard") - root.geometry("500x500") + root.geometry("600x600") root.configure(bg='lightblue') - root.resizable(False, False) + root.resizable(True, True) return root