Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of merged_code2_3rd_nov_2017 by
Diff: display_modules.cpp
- Revision:
- 37:92fcbf22bf91
- Parent:
- 35:43133f017ed4
- Child:
- 38:7238f3531ce9
--- a/display_modules.cpp Sat Jul 29 11:23:19 2017 +0000 +++ b/display_modules.cpp Sat Jul 29 12:12:28 2017 +0000 @@ -497,40 +497,70 @@ } - void bat_screen_nocharge() + void battery_screen_nocharge() { - - /* lcd.FillRect(10,10,20,40,COLOR_RED); - lcd.FillRect(5,127,230,200,COLOR_BLACK); - lcd.FillRoundRect(60,230,180,300,COLOR_BLACK); - lcd.Print( "Low battery",60,130 ,COLOR_RED,COLOR_BLACK, 0); - lcd.Print( "Connect",60,160 ,COLOR_RED,COLOR_BLACK, 0); - lcd.Print( "Charger",30,205,COLOR_RED,COLOR_BLACK,0); */ - + + + backlight = 0 ; + TFT.BusEnable(true) ; + TFT.background(White) ; + TFT.set_font((unsigned char*) Arial12x12); + TFT.foreground(Red); + TFT.locate(10,8) ; + TFT.printf("No Charge") ; + TFT.set_font((unsigned char*) Arial24x23); + TFT.BusEnable(false) ; + backlight = 1 ; + + + } + + void battery_screen_charge() + { backlight = 0 ; TFT.BusEnable(true) ; - TFT.fillrect(10,10,20,40,Red); - TFT.fillrect(5,127,230,200,White); - TFT.fillrect(60,230,180,300,White); - TFT.locate(60,130) ; - TFT.printf("Low battery") ; - - - - TFT.BusEnable(false) ; - backlight = 1 ; - - } - - void bat_screen_charge() -{ - // lcd.FillRect(10,10,20,40,COLOR_GREEN); - backlight = 0 ; + TFT.background(White) ; + TFT.set_font((unsigned char*) Arial12x12); + TFT.foreground(Green); + TFT.locate(10,8) ; + TFT.printf("Battery Charged") ; + TFT.set_font((unsigned char*) Arial24x23); + TFT.BusEnable(false) ; + backlight = 1 ; + + } + + + + void battery_critically_low_charge() + { + backlight = 0 ; TFT.BusEnable(true) ; - TFT.fillrect(10,10,20,40,Green); - TFT.BusEnable(false) ; - backlight = 1 ; -} + TFT.background(White) ; + TFT.set_font((unsigned char*) Arial12x12); + TFT.foreground(Green); + TFT.locate(10,8) ; + TFT.printf("Critically Low") ; + TFT.set_font((unsigned char*) Arial24x23); + TFT.BusEnable(false) ; + backlight = 1 ; + + } + + void battery_low_charge() + { + backlight = 0 ; + TFT.BusEnable(true) ; + TFT.background(White) ; + TFT.set_font((unsigned char*) Arial12x12); + TFT.foreground(Green); + TFT.locate(10,8) ; + TFT.printf("Low Battery") ; + TFT.set_font((unsigned char*) Arial24x23); + TFT.BusEnable(false) ; + backlight = 1 ; + + } void screen_ecg_error() {