rtc
Ecran.cpp@1:2babe1d342dc, 2016-10-14 (annotated)
- Committer:
- Asoumy
- Date:
- Fri Oct 14 11:55:53 2016 +0000
- Revision:
- 1:2babe1d342dc
- Child:
- 2:7ace46b4f4f3
nouveau
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Asoumy | 1:2babe1d342dc | 1 | |
Asoumy | 1:2babe1d342dc | 2 | #include "mbed.h" |
Asoumy | 1:2babe1d342dc | 3 | #include "Ecran.h" |
Asoumy | 1:2babe1d342dc | 4 | #include "LCD_DISCO_F746NG.h" |
Asoumy | 1:2babe1d342dc | 5 | #include "TS_DISCO_F746NG.h" |
Asoumy | 1:2babe1d342dc | 6 | #include "ds1338.h" |
Asoumy | 1:2babe1d342dc | 7 | |
Asoumy | 1:2babe1d342dc | 8 | LCD_DISCO_F746NG lcd; |
Asoumy | 1:2babe1d342dc | 9 | |
Asoumy | 1:2babe1d342dc | 10 | |
Asoumy | 1:2babe1d342dc | 11 | ///////////////////////////// AFFICHAGE_DES_ECRANS//////////////////////////////////////////// |
Asoumy | 1:2babe1d342dc | 12 | |
Asoumy | 1:2babe1d342dc | 13 | |
Asoumy | 1:2babe1d342dc | 14 | void horloge(); |
Asoumy | 1:2babe1d342dc | 15 | char jour[6]; |
Asoumy | 1:2babe1d342dc | 16 | char mois[6]; |
Asoumy | 1:2babe1d342dc | 17 | char annee[6]; |
Asoumy | 1:2babe1d342dc | 18 | char heure[6]; |
Asoumy | 1:2babe1d342dc | 19 | char minute[6]; |
Asoumy | 1:2babe1d342dc | 20 | char seconde[6]; |
Asoumy | 1:2babe1d342dc | 21 | |
Asoumy | 1:2babe1d342dc | 22 | //////////////////premier ecran/////////////////////// |
Asoumy | 1:2babe1d342dc | 23 | void principal() |
Asoumy | 1:2babe1d342dc | 24 | { |
Asoumy | 1:2babe1d342dc | 25 | LCD_DISCO_F746NG lcd; |
Asoumy | 1:2babe1d342dc | 26 | lcd.Clear(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 27 | lcd.SetBackColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 28 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 29 | lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"WELCOME TO LAOS PROJET", CENTER_MODE); |
Asoumy | 1:2babe1d342dc | 30 | } |
Asoumy | 1:2babe1d342dc | 31 | ///////FONTCTION QUI AFFICHE LE MODE UTILISATEUR ET LE MODE ADMINISTRATEUR/// |
Asoumy | 1:2babe1d342dc | 32 | void Ecranprincipal() |
Asoumy | 1:2babe1d342dc | 33 | { |
Asoumy | 1:2babe1d342dc | 34 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 35 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 36 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 37 | lcd.FillRect(0,0,239,272); |
Asoumy | 1:2babe1d342dc | 38 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 39 | lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"ADMINISTRATOR", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 40 | |
Asoumy | 1:2babe1d342dc | 41 | |
Asoumy | 1:2babe1d342dc | 42 | lcd.SetBackColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 43 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 44 | lcd.FillRect(240,0,240,272); |
Asoumy | 1:2babe1d342dc | 45 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 46 | lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"USER ACCOUNT", RIGHT_MODE); |
Asoumy | 1:2babe1d342dc | 47 | } |
Asoumy | 1:2babe1d342dc | 48 | |
Asoumy | 1:2babe1d342dc | 49 | |
Asoumy | 1:2babe1d342dc | 50 | ////FONTCTION QUI AFFICHE LE MENU PRINCIPAL/////// |
Asoumy | 1:2babe1d342dc | 51 | |
Asoumy | 1:2babe1d342dc | 52 | void EcranAdminis() |
Asoumy | 1:2babe1d342dc | 53 | { |
Asoumy | 1:2babe1d342dc | 54 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 55 | |
Asoumy | 1:2babe1d342dc | 56 | |
Asoumy | 1:2babe1d342dc | 57 | //AFFICHAGE DU BOUTON POUR REGLER L'HEURE ET LA DATE |
Asoumy | 1:2babe1d342dc | 58 | |
Asoumy | 1:2babe1d342dc | 59 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 60 | lcd.DrawRect(10,50,155,130); |
Asoumy | 1:2babe1d342dc | 61 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 62 | lcd.SetTextColor(LCD_COLOR_DARKCYAN); |
Asoumy | 1:2babe1d342dc | 63 | lcd.DisplayStringAt(13, LINE(3), (uint8_t *)"Adjust", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 64 | lcd.DisplayStringAt(13, LINE(4), (uint8_t *)"the date", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 65 | lcd.DisplayStringAt(13, LINE(5), (uint8_t *)"and time", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 66 | |
Asoumy | 1:2babe1d342dc | 67 | |
Asoumy | 1:2babe1d342dc | 68 | //AFFICHAGE DU BOUTON POUR REGLER LA FREQUENCE D'ENVOI SUR LA CARTE SD |
Asoumy | 1:2babe1d342dc | 69 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 70 | lcd.DrawRect(170,50,158,130); |
Asoumy | 1:2babe1d342dc | 71 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 72 | lcd.SetTextColor(LCD_COLOR_DARKRED); |
Asoumy | 1:2babe1d342dc | 73 | lcd.DisplayStringAt(173, LINE(3), (uint8_t *)"Adjust ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 74 | lcd.DisplayStringAt(173, LINE(4), (uint8_t *)"the ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 75 | lcd.DisplayStringAt(173, LINE(5), (uint8_t *)"Delivery", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 76 | lcd.DisplayStringAt(173, LINE(6), (uint8_t *)"frequency", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 77 | |
Asoumy | 1:2babe1d342dc | 78 | //AFFICHAGE DU BOUTON POUR AFFICHAGER LES DONNEES ARRIVEES SUR LA CARTE |
Asoumy | 1:2babe1d342dc | 79 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 80 | lcd.DrawRect(332, 50, 145,130); |
Asoumy | 1:2babe1d342dc | 81 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 82 | lcd.SetTextColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 83 | lcd.DisplayStringAt(333, LINE(3), (uint8_t *)"The ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 84 | lcd.DisplayStringAt(333, LINE(4), (uint8_t *)"data", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 85 | lcd.DisplayStringAt(333, LINE(5), (uint8_t *)"display", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 86 | |
Asoumy | 1:2babe1d342dc | 87 | //AFFICHAGE DU BOUTON RETOUR |
Asoumy | 1:2babe1d342dc | 88 | lcd.SetTextColor(LCD_COLOR_DARKRED); |
Asoumy | 1:2babe1d342dc | 89 | lcd.FillRect(30, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 90 | lcd.SetBackColor(LCD_COLOR_DARKRED); |
Asoumy | 1:2babe1d342dc | 91 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 92 | lcd.DisplayStringAt(30, LINE(9), (uint8_t *)"BACK", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 93 | |
Asoumy | 1:2babe1d342dc | 94 | } |
Asoumy | 1:2babe1d342dc | 95 | |
Asoumy | 1:2babe1d342dc | 96 | void EcranUtilis() |
Asoumy | 1:2babe1d342dc | 97 | { |
Asoumy | 1:2babe1d342dc | 98 | lcd.Clear(LCD_COLOR_DARKGRAY); |
Asoumy | 1:2babe1d342dc | 99 | lcd.SetBackColor(LCD_COLOR_DARKGRAY); |
Asoumy | 1:2babe1d342dc | 100 | lcd.SetTextColor(LCD_COLOR_YELLOW); |
Asoumy | 1:2babe1d342dc | 101 | lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"THE DATA DISPLAY", CENTER_MODE); |
Asoumy | 1:2babe1d342dc | 102 | |
Asoumy | 1:2babe1d342dc | 103 | //AFFICHAGE DU BOUTON POUR AFFICHAGER LES DONNEES ARRIVEES SUR LA CARTE |
Asoumy | 1:2babe1d342dc | 104 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 105 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 106 | |
Asoumy | 1:2babe1d342dc | 107 | //AFFICHAGE DU BOUTON RETOUR |
Asoumy | 1:2babe1d342dc | 108 | lcd.SetTextColor(LCD_COLOR_RED); |
Asoumy | 1:2babe1d342dc | 109 | lcd.FillRect(30, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 110 | lcd.SetBackColor(LCD_COLOR_RED); |
Asoumy | 1:2babe1d342dc | 111 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 112 | lcd.DisplayStringAt(30, LINE(9), (uint8_t *)"BACK", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 113 | } |
Asoumy | 1:2babe1d342dc | 114 | ///////FONCTION QUI AFFICHE LE NOUVEL ECRAN APRES L'APPUIE DE SUR TIME DATE |
Asoumy | 1:2babe1d342dc | 115 | |
Asoumy | 1:2babe1d342dc | 116 | |
Asoumy | 1:2babe1d342dc | 117 | void Ecran2() |
Asoumy | 1:2babe1d342dc | 118 | { |
Asoumy | 1:2babe1d342dc | 119 | struct tm time; |
Asoumy | 1:2babe1d342dc | 120 | time.tm_sec=0; |
Asoumy | 1:2babe1d342dc | 121 | time.tm_min=0; |
Asoumy | 1:2babe1d342dc | 122 | time.tm_hour=14; |
Asoumy | 1:2babe1d342dc | 123 | time.tm_mday=10; |
Asoumy | 1:2babe1d342dc | 124 | time.tm_year=116; |
Asoumy | 1:2babe1d342dc | 125 | time.tm_mon=0; |
Asoumy | 1:2babe1d342dc | 126 | time.tm_wday=2; |
Asoumy | 1:2babe1d342dc | 127 | time.tm_yday=0; |
Asoumy | 1:2babe1d342dc | 128 | time.tm_isdst=0; |
Asoumy | 1:2babe1d342dc | 129 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 130 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 131 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 132 | |
Asoumy | 1:2babe1d342dc | 133 | lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 134 | sprintf(jour,"%02d",time.tm_mday); |
Asoumy | 1:2babe1d342dc | 135 | lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 136 | lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 137 | sprintf(mois,"%02d",time.tm_mon); |
Asoumy | 1:2babe1d342dc | 138 | lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 139 | lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 140 | sprintf(annee,"%04d",time.tm_year); |
Asoumy | 1:2babe1d342dc | 141 | lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 142 | |
Asoumy | 1:2babe1d342dc | 143 | lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 144 | sprintf(heure,"%02d",time.tm_hour); |
Asoumy | 1:2babe1d342dc | 145 | lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 146 | lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 147 | sprintf(minute,"%02d",time.tm_min); |
Asoumy | 1:2babe1d342dc | 148 | lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 149 | lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 150 | sprintf(seconde,"%02d",time.tm_sec); |
Asoumy | 1:2babe1d342dc | 151 | lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 152 | |
Asoumy | 1:2babe1d342dc | 153 | |
Asoumy | 1:2babe1d342dc | 154 | //AFFICHAGE DU BOUTON QUITTER |
Asoumy | 1:2babe1d342dc | 155 | lcd.SetTextColor(LCD_COLOR_DARKRED); |
Asoumy | 1:2babe1d342dc | 156 | lcd.FillRect(30, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 157 | lcd.SetBackColor(LCD_COLOR_DARKRED); |
Asoumy | 1:2babe1d342dc | 158 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 159 | lcd.DisplayStringAt(30,LINE(9), (uint8_t *)"BACK", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 160 | |
Asoumy | 1:2babe1d342dc | 161 | } |
Asoumy | 1:2babe1d342dc | 162 | |
Asoumy | 1:2babe1d342dc | 163 | void Ecran2_Day() |
Asoumy | 1:2babe1d342dc | 164 | { |
Asoumy | 1:2babe1d342dc | 165 | struct tm time; |
Asoumy | 1:2babe1d342dc | 166 | time.tm_sec=0; |
Asoumy | 1:2babe1d342dc | 167 | time.tm_min=28; |
Asoumy | 1:2babe1d342dc | 168 | time.tm_hour=14; |
Asoumy | 1:2babe1d342dc | 169 | time.tm_mday=10; |
Asoumy | 1:2babe1d342dc | 170 | time.tm_year=116; |
Asoumy | 1:2babe1d342dc | 171 | time.tm_mon=0; |
Asoumy | 1:2babe1d342dc | 172 | time.tm_wday=2; |
Asoumy | 1:2babe1d342dc | 173 | time.tm_yday=0; |
Asoumy | 1:2babe1d342dc | 174 | time.tm_isdst=0; |
Asoumy | 1:2babe1d342dc | 175 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 176 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 177 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 178 | lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 179 | lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 180 | sprintf(mois,"%02d",time.tm_mon); |
Asoumy | 1:2babe1d342dc | 181 | lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 182 | lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 183 | sprintf(annee,"%04d",time.tm_year); |
Asoumy | 1:2babe1d342dc | 184 | lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 185 | |
Asoumy | 1:2babe1d342dc | 186 | lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 187 | sprintf(heure,"%02d",time.tm_hour); |
Asoumy | 1:2babe1d342dc | 188 | lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 189 | lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 190 | sprintf(minute,"%02d",time.tm_min); |
Asoumy | 1:2babe1d342dc | 191 | lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 192 | lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 193 | sprintf(seconde,"%02d ",time.tm_sec); |
Asoumy | 1:2babe1d342dc | 194 | lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 195 | |
Asoumy | 1:2babe1d342dc | 196 | lcd.SetBackColor(LCD_COLOR_BLUE); |
Asoumy | 1:2babe1d342dc | 197 | sprintf(jour,"%02d",time.tm_mday); |
Asoumy | 1:2babe1d342dc | 198 | lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 199 | |
Asoumy | 1:2babe1d342dc | 200 | |
Asoumy | 1:2babe1d342dc | 201 | |
Asoumy | 1:2babe1d342dc | 202 | //AFFICHAGE DU BOUTON POUR AUGMENTER |
Asoumy | 1:2babe1d342dc | 203 | lcd.SetTextColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 204 | lcd.FillRect(145, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 205 | lcd.SetBackColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 206 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 207 | lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 208 | |
Asoumy | 1:2babe1d342dc | 209 | |
Asoumy | 1:2babe1d342dc | 210 | //AFFICHAGE DU BOUTON POUR DIMINUER |
Asoumy | 1:2babe1d342dc | 211 | lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 212 | lcd.FillRect(245, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 213 | lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 214 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 215 | lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 216 | |
Asoumy | 1:2babe1d342dc | 217 | //AFFICHAGE DU BOUTON OK |
Asoumy | 1:2babe1d342dc | 218 | lcd.SetTextColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 219 | lcd.FillRect(360, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 220 | lcd.SetBackColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 221 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 222 | lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 223 | |
Asoumy | 1:2babe1d342dc | 224 | } |
Asoumy | 1:2babe1d342dc | 225 | |
Asoumy | 1:2babe1d342dc | 226 | void Ecran2_Month() |
Asoumy | 1:2babe1d342dc | 227 | { |
Asoumy | 1:2babe1d342dc | 228 | struct tm time; |
Asoumy | 1:2babe1d342dc | 229 | time.tm_sec=0; |
Asoumy | 1:2babe1d342dc | 230 | time.tm_min=28; |
Asoumy | 1:2babe1d342dc | 231 | time.tm_hour=14; |
Asoumy | 1:2babe1d342dc | 232 | time.tm_mday=10; |
Asoumy | 1:2babe1d342dc | 233 | time.tm_year=116; |
Asoumy | 1:2babe1d342dc | 234 | time.tm_mon=0; |
Asoumy | 1:2babe1d342dc | 235 | time.tm_wday=2; |
Asoumy | 1:2babe1d342dc | 236 | time.tm_yday=0; |
Asoumy | 1:2babe1d342dc | 237 | time.tm_isdst=0; |
Asoumy | 1:2babe1d342dc | 238 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 239 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 240 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 241 | lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 242 | sprintf(jour,"%02d",time.tm_mday); |
Asoumy | 1:2babe1d342dc | 243 | lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 244 | lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 245 | lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 246 | sprintf(annee,"%04d",time.tm_year); |
Asoumy | 1:2babe1d342dc | 247 | lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 248 | lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 249 | sprintf(heure,"%02d",time.tm_hour); |
Asoumy | 1:2babe1d342dc | 250 | lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 251 | lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 252 | sprintf(minute,"%02d",time.tm_min); |
Asoumy | 1:2babe1d342dc | 253 | lcd.DisplayStringAt(65, 115, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 254 | lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 255 | sprintf(seconde,"%02d",time.tm_sec); |
Asoumy | 1:2babe1d342dc | 256 | lcd.DisplayStringAt(115, 164, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 257 | lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 258 | |
Asoumy | 1:2babe1d342dc | 259 | lcd.SetBackColor(LCD_COLOR_BLUE); |
Asoumy | 1:2babe1d342dc | 260 | sprintf(mois,"%02d",time.tm_mon); |
Asoumy | 1:2babe1d342dc | 261 | lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 262 | |
Asoumy | 1:2babe1d342dc | 263 | |
Asoumy | 1:2babe1d342dc | 264 | //AFFICHAGE DU BOUTON POUR AUGMENTER |
Asoumy | 1:2babe1d342dc | 265 | lcd.SetTextColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 266 | lcd.FillRect(145, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 267 | lcd.SetBackColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 268 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 269 | lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 270 | |
Asoumy | 1:2babe1d342dc | 271 | |
Asoumy | 1:2babe1d342dc | 272 | //AFFICHAGE DU BOUTON POUR DIMINUER |
Asoumy | 1:2babe1d342dc | 273 | lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 274 | lcd.FillRect(245, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 275 | lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 276 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 277 | lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 278 | |
Asoumy | 1:2babe1d342dc | 279 | //AFFICHAGE DU BOUTON OK |
Asoumy | 1:2babe1d342dc | 280 | lcd.SetTextColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 281 | lcd.FillRect(360, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 282 | lcd.SetBackColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 283 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 284 | lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 285 | |
Asoumy | 1:2babe1d342dc | 286 | |
Asoumy | 1:2babe1d342dc | 287 | } |
Asoumy | 1:2babe1d342dc | 288 | |
Asoumy | 1:2babe1d342dc | 289 | void Ecran2_Year() |
Asoumy | 1:2babe1d342dc | 290 | { |
Asoumy | 1:2babe1d342dc | 291 | struct tm time; |
Asoumy | 1:2babe1d342dc | 292 | time.tm_sec=0; |
Asoumy | 1:2babe1d342dc | 293 | time.tm_min=28; |
Asoumy | 1:2babe1d342dc | 294 | time.tm_hour=14; |
Asoumy | 1:2babe1d342dc | 295 | time.tm_mday=10; |
Asoumy | 1:2babe1d342dc | 296 | time.tm_year=116; |
Asoumy | 1:2babe1d342dc | 297 | time.tm_mon=0; |
Asoumy | 1:2babe1d342dc | 298 | time.tm_wday=2; |
Asoumy | 1:2babe1d342dc | 299 | time.tm_yday=0; |
Asoumy | 1:2babe1d342dc | 300 | time.tm_isdst=0; |
Asoumy | 1:2babe1d342dc | 301 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 302 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 303 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 304 | lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 305 | sprintf(jour,"%02d",time.tm_mday); |
Asoumy | 1:2babe1d342dc | 306 | lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 307 | lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 308 | sprintf(mois,"%02d",time.tm_mon); |
Asoumy | 1:2babe1d342dc | 309 | lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 310 | lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 311 | lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 312 | sprintf(heure,"%02d",time.tm_hour); |
Asoumy | 1:2babe1d342dc | 313 | lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 314 | lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 315 | sprintf(minute,"%02d",time.tm_min); |
Asoumy | 1:2babe1d342dc | 316 | lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 317 | lcd.DisplayStringAt(115, 164, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 318 | sprintf(seconde,"%02d",time.tm_sec); |
Asoumy | 1:2babe1d342dc | 319 | lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 320 | |
Asoumy | 1:2babe1d342dc | 321 | lcd.SetBackColor(LCD_COLOR_BLUE); |
Asoumy | 1:2babe1d342dc | 322 | sprintf(annee,"%04d",time.tm_year); |
Asoumy | 1:2babe1d342dc | 323 | lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 324 | |
Asoumy | 1:2babe1d342dc | 325 | |
Asoumy | 1:2babe1d342dc | 326 | |
Asoumy | 1:2babe1d342dc | 327 | //AFFICHAGE DU BOUTON POUR AUGMENTER |
Asoumy | 1:2babe1d342dc | 328 | lcd.SetTextColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 329 | lcd.FillRect(145, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 330 | lcd.SetBackColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 331 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 332 | lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 333 | |
Asoumy | 1:2babe1d342dc | 334 | |
Asoumy | 1:2babe1d342dc | 335 | //AFFICHAGE DU BOUTON POUR DIMINUER |
Asoumy | 1:2babe1d342dc | 336 | lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 337 | lcd.FillRect(245, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 338 | lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 339 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 340 | lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 341 | |
Asoumy | 1:2babe1d342dc | 342 | //AFFICHAGE DU BOUTON OK |
Asoumy | 1:2babe1d342dc | 343 | lcd.SetTextColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 344 | lcd.FillRect(360, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 345 | lcd.SetBackColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 346 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 347 | lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 348 | |
Asoumy | 1:2babe1d342dc | 349 | |
Asoumy | 1:2babe1d342dc | 350 | } |
Asoumy | 1:2babe1d342dc | 351 | |
Asoumy | 1:2babe1d342dc | 352 | void Ecran2_Hour() |
Asoumy | 1:2babe1d342dc | 353 | { |
Asoumy | 1:2babe1d342dc | 354 | struct tm time; |
Asoumy | 1:2babe1d342dc | 355 | time.tm_sec=0; |
Asoumy | 1:2babe1d342dc | 356 | time.tm_min=28; |
Asoumy | 1:2babe1d342dc | 357 | time.tm_hour=14; |
Asoumy | 1:2babe1d342dc | 358 | time.tm_mday=10; |
Asoumy | 1:2babe1d342dc | 359 | time.tm_year=116; |
Asoumy | 1:2babe1d342dc | 360 | time.tm_mon=0; |
Asoumy | 1:2babe1d342dc | 361 | time.tm_wday=2; |
Asoumy | 1:2babe1d342dc | 362 | time.tm_yday=0; |
Asoumy | 1:2babe1d342dc | 363 | time.tm_isdst=0; |
Asoumy | 1:2babe1d342dc | 364 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 365 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 366 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 367 | lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 368 | sprintf(jour,"%02d",time.tm_mday); |
Asoumy | 1:2babe1d342dc | 369 | lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 370 | lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 371 | sprintf(mois,"%02d",time.tm_mon); |
Asoumy | 1:2babe1d342dc | 372 | lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 373 | lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 374 | sprintf(annee,"%04d",time.tm_year); |
Asoumy | 1:2babe1d342dc | 375 | lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 376 | lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 377 | lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 378 | sprintf(minute,"%02d",time.tm_min); |
Asoumy | 1:2babe1d342dc | 379 | lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 380 | lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 381 | sprintf(seconde,"%02d",time.tm_sec); |
Asoumy | 1:2babe1d342dc | 382 | lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 383 | |
Asoumy | 1:2babe1d342dc | 384 | lcd.SetBackColor(LCD_COLOR_BLUE); |
Asoumy | 1:2babe1d342dc | 385 | sprintf(heure,"%02d",time.tm_hour); |
Asoumy | 1:2babe1d342dc | 386 | lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 387 | |
Asoumy | 1:2babe1d342dc | 388 | |
Asoumy | 1:2babe1d342dc | 389 | |
Asoumy | 1:2babe1d342dc | 390 | //AFFICHAGE DU BOUTON POUR AUGMENTER |
Asoumy | 1:2babe1d342dc | 391 | lcd.SetTextColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 392 | lcd.FillRect(145, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 393 | lcd.SetBackColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 394 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 395 | lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 396 | |
Asoumy | 1:2babe1d342dc | 397 | |
Asoumy | 1:2babe1d342dc | 398 | //AFFICHAGE DU BOUTON POUR DIMINUER |
Asoumy | 1:2babe1d342dc | 399 | lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 400 | lcd.FillRect(245, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 401 | lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 402 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 403 | lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 404 | |
Asoumy | 1:2babe1d342dc | 405 | //AFFICHAGE DU BOUTON OK |
Asoumy | 1:2babe1d342dc | 406 | lcd.SetTextColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 407 | lcd.FillRect(360, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 408 | lcd.SetBackColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 409 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 410 | lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 411 | |
Asoumy | 1:2babe1d342dc | 412 | |
Asoumy | 1:2babe1d342dc | 413 | } |
Asoumy | 1:2babe1d342dc | 414 | |
Asoumy | 1:2babe1d342dc | 415 | void Ecran2_Minutes() |
Asoumy | 1:2babe1d342dc | 416 | { |
Asoumy | 1:2babe1d342dc | 417 | struct tm time; |
Asoumy | 1:2babe1d342dc | 418 | time.tm_sec=0; |
Asoumy | 1:2babe1d342dc | 419 | time.tm_min=28; |
Asoumy | 1:2babe1d342dc | 420 | time.tm_hour=14; |
Asoumy | 1:2babe1d342dc | 421 | time.tm_mday=10; |
Asoumy | 1:2babe1d342dc | 422 | time.tm_year=116; |
Asoumy | 1:2babe1d342dc | 423 | time.tm_mon=0; |
Asoumy | 1:2babe1d342dc | 424 | time.tm_wday=2; |
Asoumy | 1:2babe1d342dc | 425 | time.tm_yday=0; |
Asoumy | 1:2babe1d342dc | 426 | time.tm_isdst=0; |
Asoumy | 1:2babe1d342dc | 427 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 428 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 429 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 430 | lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"DATE:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 431 | sprintf(jour,"%02d",time.tm_mday); |
Asoumy | 1:2babe1d342dc | 432 | lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 433 | lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 434 | sprintf(mois,"%02d",time.tm_mon); |
Asoumy | 1:2babe1d342dc | 435 | lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 436 | lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 437 | sprintf(annee,"%04d",time.tm_year); |
Asoumy | 1:2babe1d342dc | 438 | lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 439 | lcd.DisplayStringAt(30, 135, (uint8_t *)"TIME:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 440 | sprintf(heure,"%02d",time.tm_hour); |
Asoumy | 1:2babe1d342dc | 441 | lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 442 | lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 443 | lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 444 | sprintf(seconde,"%02d",time.tm_sec); |
Asoumy | 1:2babe1d342dc | 445 | lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 446 | |
Asoumy | 1:2babe1d342dc | 447 | lcd.SetBackColor(LCD_COLOR_BLUE); |
Asoumy | 1:2babe1d342dc | 448 | sprintf(minute,"%02d",time.tm_min); |
Asoumy | 1:2babe1d342dc | 449 | lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 450 | |
Asoumy | 1:2babe1d342dc | 451 | |
Asoumy | 1:2babe1d342dc | 452 | |
Asoumy | 1:2babe1d342dc | 453 | //AFFICHAGE DU BOUTON POUR AUGMENTER |
Asoumy | 1:2babe1d342dc | 454 | lcd.SetTextColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 455 | lcd.FillRect(145, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 456 | lcd.SetBackColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 457 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 458 | lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 459 | |
Asoumy | 1:2babe1d342dc | 460 | |
Asoumy | 1:2babe1d342dc | 461 | //AFFICHAGE DU BOUTON POUR DIMINUER |
Asoumy | 1:2babe1d342dc | 462 | lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 463 | lcd.FillRect(245, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 464 | lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 465 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 466 | lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 467 | |
Asoumy | 1:2babe1d342dc | 468 | //AFFICHAGE DU BOUTON OK |
Asoumy | 1:2babe1d342dc | 469 | lcd.SetTextColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 470 | lcd.FillRect(360, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 471 | lcd.SetBackColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 472 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 473 | lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 474 | |
Asoumy | 1:2babe1d342dc | 475 | |
Asoumy | 1:2babe1d342dc | 476 | } |
Asoumy | 1:2babe1d342dc | 477 | |
Asoumy | 1:2babe1d342dc | 478 | void Ecran2_Seconde() |
Asoumy | 1:2babe1d342dc | 479 | { |
Asoumy | 1:2babe1d342dc | 480 | struct tm time; |
Asoumy | 1:2babe1d342dc | 481 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 482 | lcd.SetTextColor(LCD_COLOR_BLACK); |
Asoumy | 1:2babe1d342dc | 483 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 484 | lcd.DisplayStringAt(30, LINE(2), (uint8_t *)"TIME:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 485 | sprintf(jour,"%02d",time.tm_mday); |
Asoumy | 1:2babe1d342dc | 486 | lcd.DisplayStringAt(30, 82, (uint8_t *)jour, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 487 | lcd.DisplayStringAt(65, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 488 | sprintf(mois,"%02d",time.tm_mon); |
Asoumy | 1:2babe1d342dc | 489 | lcd.DisplayStringAt(80, 82, (uint8_t *) mois, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 490 | lcd.DisplayStringAt(115, 82, (uint8_t *)"/", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 491 | sprintf(annee," %04d",time.tm_year); |
Asoumy | 1:2babe1d342dc | 492 | lcd.DisplayStringAt(130, 82, (uint8_t *)annee, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 493 | lcd.DisplayStringAt(30, 135, (uint8_t *)"DATE:", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 494 | sprintf(heure,"%02d",time.tm_hour); |
Asoumy | 1:2babe1d342dc | 495 | lcd.DisplayStringAt(30, 164, (uint8_t *)heure, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 496 | lcd.DisplayStringAt(65, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 497 | sprintf(minute,"%02d",time.tm_min); |
Asoumy | 1:2babe1d342dc | 498 | lcd.DisplayStringAt(80, 164, (uint8_t *)minute, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 499 | lcd.DisplayStringAt(115, 164, (uint8_t *)":", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 500 | |
Asoumy | 1:2babe1d342dc | 501 | lcd.SetBackColor(LCD_COLOR_BLUE); |
Asoumy | 1:2babe1d342dc | 502 | sprintf(seconde,"%02d ",time.tm_sec); |
Asoumy | 1:2babe1d342dc | 503 | lcd.DisplayStringAt(130, 164, (uint8_t *)seconde, LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 504 | |
Asoumy | 1:2babe1d342dc | 505 | |
Asoumy | 1:2babe1d342dc | 506 | |
Asoumy | 1:2babe1d342dc | 507 | //AFFICHAGE DU BOUTON POUR AUGMENTER |
Asoumy | 1:2babe1d342dc | 508 | lcd.SetTextColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 509 | lcd.FillRect(145, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 510 | lcd.SetBackColor(LCD_COLOR_DARKBLUE); |
Asoumy | 1:2babe1d342dc | 511 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 512 | lcd.DisplayStringAt(145, LINE(9), (uint8_t *)" - ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 513 | |
Asoumy | 1:2babe1d342dc | 514 | |
Asoumy | 1:2babe1d342dc | 515 | //AFFICHAGE DU BOUTON POUR DIMINUER |
Asoumy | 1:2babe1d342dc | 516 | lcd.SetTextColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 517 | lcd.FillRect(245, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 518 | lcd.SetBackColor(LCD_COLOR_DARKMAGENTA); |
Asoumy | 1:2babe1d342dc | 519 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 520 | lcd.DisplayStringAt(245, LINE(9), (uint8_t *)" + ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 521 | |
Asoumy | 1:2babe1d342dc | 522 | //AFFICHAGE DU BOUTON OK |
Asoumy | 1:2babe1d342dc | 523 | lcd.SetTextColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 524 | lcd.FillRect(360, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 525 | lcd.SetBackColor(LCD_COLOR_DARKGREEN); |
Asoumy | 1:2babe1d342dc | 526 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 527 | lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 528 | } |
Asoumy | 1:2babe1d342dc | 529 | |
Asoumy | 1:2babe1d342dc | 530 | |
Asoumy | 1:2babe1d342dc | 531 | ///////FONCTION QUI AFFICHE LE NOUVEL ECRAN APRES L'APPUIE DE SUR FREQ |
Asoumy | 1:2babe1d342dc | 532 | void Ecran3() |
Asoumy | 1:2babe1d342dc | 533 | { |
Asoumy | 1:2babe1d342dc | 534 | |
Asoumy | 1:2babe1d342dc | 535 | lcd.Clear(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 536 | lcd.SetBackColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 537 | lcd.SetTextColor(LCD_COLOR_DARKGRAY); |
Asoumy | 1:2babe1d342dc | 538 | lcd.DisplayStringAt(10, LINE(1), (uint8_t *)"Select the frequency of", CENTER_MODE); |
Asoumy | 1:2babe1d342dc | 539 | lcd.DisplayStringAt(10, LINE(2), (uint8_t *)"sending of the data on the", CENTER_MODE); |
Asoumy | 1:2babe1d342dc | 540 | lcd.DisplayStringAt(10, LINE(3), (uint8_t *)"SD card: ", CENTER_MODE); |
Asoumy | 1:2babe1d342dc | 541 | |
Asoumy | 1:2babe1d342dc | 542 | lcd.DisplayStringAt(30,120, (uint8_t *)"Per hour ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 543 | lcd.DisplayStringAt(250, 120, (uint8_t *)"Per day", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 544 | lcd.DisplayStringAt(30, 160, (uint8_t *)"Per week ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 545 | lcd.DisplayStringAt(250, 160, (uint8_t *)"Per month", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 546 | |
Asoumy | 1:2babe1d342dc | 547 | |
Asoumy | 1:2babe1d342dc | 548 | lcd.SetTextColor(LCD_COLOR_DARKRED); |
Asoumy | 1:2babe1d342dc | 549 | lcd.DrawRect(25, 115, 160, 30); |
Asoumy | 1:2babe1d342dc | 550 | lcd.DrawRect(245, 115, 160,30); |
Asoumy | 1:2babe1d342dc | 551 | lcd.DrawRect(25, 155, 160, 30); |
Asoumy | 1:2babe1d342dc | 552 | lcd.DrawRect(245, 155, 160,30); |
Asoumy | 1:2babe1d342dc | 553 | |
Asoumy | 1:2babe1d342dc | 554 | //AFFICHAGE DU BOUTON RETOUR |
Asoumy | 1:2babe1d342dc | 555 | |
Asoumy | 1:2babe1d342dc | 556 | lcd.SetBackColor(LCD_COLOR_DARKRED); |
Asoumy | 1:2babe1d342dc | 557 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 558 | lcd.DisplayStringAt(30, LINE(9), (uint8_t *)"BACK", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 559 | } |
Asoumy | 1:2babe1d342dc | 560 | |
Asoumy | 1:2babe1d342dc | 561 | void Ecran3_PerHour() |
Asoumy | 1:2babe1d342dc | 562 | { |
Asoumy | 1:2babe1d342dc | 563 | |
Asoumy | 1:2babe1d342dc | 564 | } |
Asoumy | 1:2babe1d342dc | 565 | void Ecran3_PerDay() |
Asoumy | 1:2babe1d342dc | 566 | { |
Asoumy | 1:2babe1d342dc | 567 | |
Asoumy | 1:2babe1d342dc | 568 | } |
Asoumy | 1:2babe1d342dc | 569 | void Ecran3_PerWeek() |
Asoumy | 1:2babe1d342dc | 570 | { |
Asoumy | 1:2babe1d342dc | 571 | |
Asoumy | 1:2babe1d342dc | 572 | } |
Asoumy | 1:2babe1d342dc | 573 | void Ecran3_PerMonth() |
Asoumy | 1:2babe1d342dc | 574 | { |
Asoumy | 1:2babe1d342dc | 575 | |
Asoumy | 1:2babe1d342dc | 576 | } |
Asoumy | 1:2babe1d342dc | 577 | |
Asoumy | 1:2babe1d342dc | 578 | |
Asoumy | 1:2babe1d342dc | 579 | ///////FONCTION QUI AFFICHE LE NOUVEL ECRAN APRES L'APPUIE DE SUR AFFICHAGE |
Asoumy | 1:2babe1d342dc | 580 | |
Asoumy | 1:2babe1d342dc | 581 | void Ecran4() |
Asoumy | 1:2babe1d342dc | 582 | { |
Asoumy | 1:2babe1d342dc | 583 | |
Asoumy | 1:2babe1d342dc | 584 | //AFFICHAGE DU BOUTON QUITTER |
Asoumy | 1:2babe1d342dc | 585 | lcd.SetTextColor(LCD_COLOR_RED); |
Asoumy | 1:2babe1d342dc | 586 | lcd.FillRect(30, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 587 | lcd.SetBackColor(LCD_COLOR_RED); |
Asoumy | 1:2babe1d342dc | 588 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 589 | lcd.DisplayStringAt(30, LINE(9), (uint8_t *)"QUIT", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 590 | |
Asoumy | 1:2babe1d342dc | 591 | |
Asoumy | 1:2babe1d342dc | 592 | //AFFICHAGE DU BOUTON RETOUR |
Asoumy | 1:2babe1d342dc | 593 | lcd.SetTextColor(LCD_COLOR_CYAN); |
Asoumy | 1:2babe1d342dc | 594 | lcd.FillRect(145, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 595 | lcd.SetBackColor(LCD_COLOR_CYAN); |
Asoumy | 1:2babe1d342dc | 596 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 597 | lcd.DisplayStringAt(145, LINE(9), (uint8_t *)"BACK", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 598 | |
Asoumy | 1:2babe1d342dc | 599 | //AFFICHAGE DU BOUTON SUIVANT |
Asoumy | 1:2babe1d342dc | 600 | lcd.SetTextColor(LCD_COLOR_CYAN); |
Asoumy | 1:2babe1d342dc | 601 | lcd.FillRect(245, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 602 | lcd.SetBackColor(LCD_COLOR_CYAN); |
Asoumy | 1:2babe1d342dc | 603 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 604 | lcd.DisplayStringAt(245, LINE(9), (uint8_t *)"NEXT", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 605 | |
Asoumy | 1:2babe1d342dc | 606 | //AFFICHAGE DU BOUTON OK |
Asoumy | 1:2babe1d342dc | 607 | lcd.SetTextColor(LCD_COLOR_GREEN); |
Asoumy | 1:2babe1d342dc | 608 | lcd.FillRect(360, 210, 80,30); |
Asoumy | 1:2babe1d342dc | 609 | lcd.SetBackColor(LCD_COLOR_GREEN); |
Asoumy | 1:2babe1d342dc | 610 | lcd.SetTextColor(LCD_COLOR_WHITE); |
Asoumy | 1:2babe1d342dc | 611 | lcd.DisplayStringAt(360, LINE(9), (uint8_t *)" OK ", LEFT_MODE); |
Asoumy | 1:2babe1d342dc | 612 | } |