summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/__pycache__/features.cpython-312.pycbin0 -> 9305 bytes
-rw-r--r--source/__pycache__/hardware_driver.cpython-312.pycbin0 -> 4078 bytes
-rw-r--r--source/main.py15
3 files changed, 7 insertions, 8 deletions
diff --git a/source/__pycache__/features.cpython-312.pyc b/source/__pycache__/features.cpython-312.pyc
new file mode 100644
index 0000000..f4fb57d
--- /dev/null
+++ b/source/__pycache__/features.cpython-312.pyc
Binary files differ
diff --git a/source/__pycache__/hardware_driver.cpython-312.pyc b/source/__pycache__/hardware_driver.cpython-312.pyc
new file mode 100644
index 0000000..0ff8d39
--- /dev/null
+++ b/source/__pycache__/hardware_driver.cpython-312.pyc
Binary files differ
diff --git a/source/main.py b/source/main.py
index c587c6e..95c7b0c 100644
--- a/source/main.py
+++ b/source/main.py
@@ -6,14 +6,13 @@ from PySide6.QtWidgets import (
6 QVBoxLayout, 6 QVBoxLayout,
7 QWidget, 7 QWidget,
8) 8)
9
10from PySide6.QtCore import Qt 9from PySide6.QtCore import Qt
11import hardware_driver as lcd 10import hardware_driver as lcd
12import features as fe 11import features as fe
13import sys 12import sys
14 13
15F = fe.feat() 14F = fe.feat() # Assuming 'feat' is a class in your 'features' module
16L = lcd.LCD() 15L = lcd.LCD() # Assuming 'LCD' is a class in your 'hardware_driver' module
17 16
18 17
19class mainWindow(QMainWindow): 18class mainWindow(QMainWindow):
@@ -24,8 +23,8 @@ class mainWindow(QMainWindow):
24 self.mainUI() 23 self.mainUI()
25 24
26 def mainUI(self): 25 def mainUI(self):
27 central_widget = QWidget(self) 26 central_widget = QWidget(self) # Fixed variable name (capital 'C' to lowercase)
28 self.setCentralWidget(central_Widget) 27 self.setCentralWidget(central_widget)
29 28
30 self.label = QLabel("CONNECTED TO I2C DEVICE", self) 29 self.label = QLabel("CONNECTED TO I2C DEVICE", self)
31 self.label.setAlignment(Qt.AlignCenter) 30 self.label.setAlignment(Qt.AlignCenter)
@@ -39,9 +38,9 @@ class mainWindow(QMainWindow):
39 38
40 central_widget.setLayout(layout) 39 central_widget.setLayout(layout)
41 40
42 def clear_screen(): 41 def clear_screen(self): # Added 'self' as the first argument
43 fe.clear() 42 F.clear() # Call the clear method from 'feat' object
44 self.label.setText("Cleared the LCD screen", self) 43 self.label.setText("Cleared the LCD screen") # Update the label text
45 44
46 45
47if __name__ == "__main__": 46if __name__ == "__main__":