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: TS_DISCO_F746NG LCD_DISCO_F746NG BSP_DISCO_F746NG BUTTON_GROUP
Revision 4:b412dc13a88e, committed 2019-01-28
- Comitter:
- gscuttari
- Date:
- Mon Jan 28 09:43:52 2019 +0000
- Parent:
- 3:7b59a5e25dec
- Child:
- 5:0bc53196fbf4
- Commit message:
- New2
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jan 28 09:28:47 2019 +0000
+++ b/main.cpp Mon Jan 28 09:43:52 2019 +0000
@@ -23,8 +23,6 @@
void screen_setup_menu(void);
-
-
void init_lcd(void)
{
lcd_.Clear(LCD_COLOR_WHITE);
@@ -63,77 +61,46 @@
bool exitFromLoop = false;
while (!exitFromLoop) {
if (menu.Touched(8, LCD_COLOR_GREEN)) {
- Thread::wait(200);
+ wait(200);
lcd_.Clear(BACK_COLOR);
- mode = mode_prec;
+
//writeFlash();
exitFromLoop=true;
} else if (menu.Touched(0, LCD_COLOR_GREEN)) {
- screen_setup_display_parameters();
exitFromLoop=true;
} else if (menu.Touched(1, LCD_COLOR_GREEN)) {
- screen_setup_wifi();
exitFromLoop=true;
} else if (menu.Touched(2, LCD_COLOR_GREEN)) {
- screen_setup_Machine_Number();
exitFromLoop=true;
} else if (menu.Touched(3, LCD_COLOR_GREEN)) {
- screen_setup_pressure();
exitFromLoop=true;
} else if (menu.Touched(4, LCD_COLOR_GREEN)) {
- screen_setup_screen_suspended();
exitFromLoop=true;
} else if (menu.Touched(5, LCD_COLOR_GREEN)) {
- screen_setup_liters();
exitFromLoop=true;
} else if (menu.Touched(6, LCD_COLOR_GREEN)) {
- screen_setup_water_pressure();
exitFromLoop=true;
}
- Thread::wait(100);
+ wait(100);
}
return;
}
-
-
-
int main()
{
pc.baud(115200);
printf("START...\n");
- Thread::wait(2000);
+ wait(2000);
init_lcd(); // inizializzazione lcd e touch screen
lcd_.SetFont(&Font16);
- Thread::wait(2000);
+ wait(2000);
}
-void init_lcd(void)
-{
- lcd_.Clear(LCD_COLOR_WHITE);
- printf("********** start INIT_LCD *********\n");
- lcd_.SetBackColor(LCD_COLOR_WHITE);
- lcd_.SetTextColor(LCD_COLOR_BLACK);
- lcd_.DisplayStringAt(0, LINE(1), (uint8_t *)"LEZIONE 1", CENTER_MODE);
- wait(1.5);
-
- lcd_.Clear(LCD_COLOR_BLACK);
- lcd_.SetBackColor(LCD_COLOR_BLACK);
- lcd_.SetTextColor(LCD_COLOR_WHITE);
- lcd_.SetFont(&Font16);
- lcd_.DisplayStringAt(0, LINE(5), (uint8_t *)"TOUCHSCREEN INIT OK", CENTER_MODE);
-
- wait(0.5);
- lcd_.SetFont(&Font16);
- screen_setup_menu(void)
-}
-
-