From f8d1ad8536f6f57bff2a9c3407e206514fc04215 Mon Sep 17 00:00:00 2001 From: NgDKhanh Date: Thu, 20 Oct 2022 09:35:48 +0700 Subject: [PATCH 1/2] Update HienThiManHinh.h Fixed fuctions' name and add comments --- classLed_BT/HienThiManHinhLCD.h | 50 ++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/classLed_BT/HienThiManHinhLCD.h b/classLed_BT/HienThiManHinhLCD.h index 7960e37..bbf0bb3 100644 --- a/classLed_BT/HienThiManHinhLCD.h +++ b/classLed_BT/HienThiManHinhLCD.h @@ -4,48 +4,60 @@ * */ -void CaiDatManHinh(); -void KhoiTaoHienThi(); -void DieuKhienLCD(); -void HienThiMenu1(); -void HienThiMenu2(); +void LCD_CaiDat(); +void LCD_KhoiTao(); +void LCD_DieuKhien(); +void LCD_Menu1(); +void LCD_Menu2(); - -void CaiDatLCD() +/** + * @brief Cai dat man hinh LCD + * + */ +void LCD_CaiDat() { lcd.begin(); lcd.backlight(); lcd.display(); } - -void KhoiTaoHienThi() +/** + * @brief Khoi tao man hinh, in ra dong 1: SPARC LAB 2, dong 2: hardware team + * + */ +void LCD_KhoiTao() { lcd.setCursor(0, 0); lcd.print("SPARC LAB 2"); lcd.setCursor(0, 1); lcd.print("hardware team"); } - -void DieuKhienLCD() +/** + * @brief dieu khien man hinh dua vao TRANG_THAI DEN + * + */ +void LCD_DieuKhien() { switch(trangThai) { case KHOI_DONG_GIA_TRI: - KhoiTaoHienThi(); + ManHinhLCD_KhoiTao(); break; case BAT_TAT_CA_DEN: - HienThiMenu1(); + ManHinhLCD_Menu1(); break; case BAT_LAN_LUOT: - HienThiMenu2(); + ManHinhLCD_Menu2(); break; } } - -void HienThiMenu1() +/** + * @brief Hien thi menu1: nhiet do, do am + * + */ +void ManHinhLCD_Menu1() { /* --------------------------------- @@ -60,7 +72,11 @@ void HienThiMenu1() lcd.print("do am : "); lcd.print(docDoAm()); } -void HienThiMenu2() +/** + * @brief Hien thi menu2: trang thai den cac mau r, g, b + * + */ +void ManHinhLCD_Menu2() { /* --------------------------------- From 50a178e0750b897e05b305139e40dac1bab1b649 Mon Sep 17 00:00:00 2001 From: NgDKhanh Date: Thu, 20 Oct 2022 09:52:14 +0700 Subject: [PATCH 2/2] Update HienThiManHinhLCD.h --- classLed_BT/HienThiManHinhLCD.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classLed_BT/HienThiManHinhLCD.h b/classLed_BT/HienThiManHinhLCD.h index bbf0bb3..981348c 100644 --- a/classLed_BT/HienThiManHinhLCD.h +++ b/classLed_BT/HienThiManHinhLCD.h @@ -57,7 +57,7 @@ void LCD_DieuKhien() * @brief Hien thi menu1: nhiet do, do am * */ -void ManHinhLCD_Menu1() +void LCD_Menu1() { /* --------------------------------- @@ -76,7 +76,7 @@ void ManHinhLCD_Menu1() * @brief Hien thi menu2: trang thai den cac mau r, g, b * */ -void ManHinhLCD_Menu2() +void LCD_Menu2() { /* ---------------------------------