summaryrefslogtreecommitdiff
path: root/source/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'source/main.py')
-rw-r--r--source/main.py15
1 files changed, 7 insertions, 8 deletions
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 (
QVBoxLayout,
QWidget,
)
-
from PySide6.QtCore import Qt
import hardware_driver as lcd
import features as fe
import sys
-F = fe.feat()
-L = lcd.LCD()
+F = fe.feat() # Assuming 'feat' is a class in your 'features' module
+L = lcd.LCD() # Assuming 'LCD' is a class in your 'hardware_driver' module
class mainWindow(QMainWindow):
@@ -24,8 +23,8 @@ class mainWindow(QMainWindow):
self.mainUI()
def mainUI(self):
- central_widget = QWidget(self)
- self.setCentralWidget(central_Widget)
+ central_widget = QWidget(self) # Fixed variable name (capital 'C' to lowercase)
+ self.setCentralWidget(central_widget)
self.label = QLabel("CONNECTED TO I2C DEVICE", self)
self.label.setAlignment(Qt.AlignCenter)
@@ -39,9 +38,9 @@ class mainWindow(QMainWindow):
central_widget.setLayout(layout)
- def clear_screen():
- fe.clear()
- self.label.setText("Cleared the LCD screen", self)
+ def clear_screen(self): # Added 'self' as the first argument
+ F.clear() # Call the clear method from 'feat' object
+ self.label.setText("Cleared the LCD screen") # Update the label text
if __name__ == "__main__":