diff options
| -rw-r--r-- | source/__pycache__/features.cpython-312.pyc | bin | 0 -> 9305 bytes | |||
| -rw-r--r-- | source/__pycache__/hardware_driver.cpython-312.pyc | bin | 0 -> 4078 bytes | |||
| -rw-r--r-- | source/main.py | 15 |
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 | |||
| 10 | from PySide6.QtCore import Qt | 9 | from PySide6.QtCore import Qt |
| 11 | import hardware_driver as lcd | 10 | import hardware_driver as lcd |
| 12 | import features as fe | 11 | import features as fe |
| 13 | import sys | 12 | import sys |
| 14 | 13 | ||
| 15 | F = fe.feat() | 14 | F = fe.feat() # Assuming 'feat' is a class in your 'features' module |
| 16 | L = lcd.LCD() | 15 | L = lcd.LCD() # Assuming 'LCD' is a class in your 'hardware_driver' module |
| 17 | 16 | ||
| 18 | 17 | ||
| 19 | class mainWindow(QMainWindow): | 18 | class 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 | ||
| 47 | if __name__ == "__main__": | 46 | if __name__ == "__main__": |
