diff options
| -rw-r--r-- | source/main.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/main.py b/source/main.py index 95c7b0c..5a37a88 100644 --- a/source/main.py +++ b/source/main.py | |||
| @@ -11,8 +11,8 @@ import hardware_driver as lcd | |||
| 11 | import features as fe | 11 | import features as fe |
| 12 | import sys | 12 | import sys |
| 13 | 13 | ||
| 14 | F = fe.feat() # Assuming 'feat' is a class in your 'features' module | 14 | F = fe.feat() |
| 15 | L = lcd.LCD() # Assuming 'LCD' is a class in your 'hardware_driver' module | 15 | L = lcd.LCD() |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | class mainWindow(QMainWindow): | 18 | class mainWindow(QMainWindow): |
| @@ -23,7 +23,7 @@ class mainWindow(QMainWindow): | |||
| 23 | self.mainUI() | 23 | self.mainUI() |
| 24 | 24 | ||
| 25 | def mainUI(self): | 25 | def mainUI(self): |
| 26 | central_widget = QWidget(self) # Fixed variable name (capital 'C' to lowercase) | 26 | central_widget = QWidget(self) |
| 27 | self.setCentralWidget(central_widget) | 27 | self.setCentralWidget(central_widget) |
| 28 | 28 | ||
| 29 | self.label = QLabel("CONNECTED TO I2C DEVICE", self) | 29 | self.label = QLabel("CONNECTED TO I2C DEVICE", self) |
| @@ -38,9 +38,9 @@ class mainWindow(QMainWindow): | |||
| 38 | 38 | ||
| 39 | central_widget.setLayout(layout) | 39 | central_widget.setLayout(layout) |
| 40 | 40 | ||
| 41 | def clear_screen(self): # Added 'self' as the first argument | 41 | def clear_screen(self): |
| 42 | F.clear() # Call the clear method from 'feat' object | 42 | F.clear() |
| 43 | self.label.setText("Cleared the LCD screen") # Update the label text | 43 | self.label.setText("Cleared the LCD screen") |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | if __name__ == "__main__": | 46 | if __name__ == "__main__": |
