Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditSystem.c @ 567:1c95f811967c
-Add 12HR Time Support
-Add firmware image only font extensions
-Show english units when required in log's graphs
-Show decompression info with Font84 if 10 characters long
-Remove usage of ' symbol to denote minutes and instead use min abbreviation
-Show english units when required on the simulation configuration screen
-Remove usage of ' symbol to denote feet in in non-metric mode and use ft abbrevation
author | izzni |
---|---|
date | Tue, 24 Nov 2020 13:22:23 -0600 |
parents | 66aef216828b |
children | 0fc1b47d2482 |
comparison
equal
deleted
inserted
replaced
566:7761dd028386 | 567:1c95f811967c |
---|---|
56 //void openEdit_Salinity(void); | 56 //void openEdit_Salinity(void); |
57 | 57 |
58 /* Announced function prototypes -----------------------------------------------*/ | 58 /* Announced function prototypes -----------------------------------------------*/ |
59 uint8_t OnAction_Date (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | 59 uint8_t OnAction_Date (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
60 uint8_t OnAction_Time (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | 60 uint8_t OnAction_Time (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
61 uint8_t OnAction_12HR (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | |
61 uint8_t OnAction_DDMMYY (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | 62 uint8_t OnAction_DDMMYY (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
62 uint8_t OnAction_MMDDYY (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | 63 uint8_t OnAction_MMDDYY (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
63 uint8_t OnAction_YYMMDD (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | 64 uint8_t OnAction_YYMMDD (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
64 uint8_t OnAction_DST (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | 65 uint8_t OnAction_DST (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
65 uint8_t OnAction_English (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); | 66 uint8_t OnAction_English (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); |
191 text[2] = 0; | 192 text[2] = 0; |
192 | 193 |
193 write_topline(text); | 194 write_topline(text); |
194 | 195 |
195 write_label_fix( 20, 340, ME_Y_LINE1, &FontT42, TXT_TimeConfig); | 196 write_label_fix( 20, 340, ME_Y_LINE1, &FontT42, TXT_TimeConfig); |
196 write_label_fix( 20, 340, ME_Y_LINE2, &FontT42, TXT_DateConfig); | 197 write_label_fix( 20, 340, ME_Y_LINE2, &FontT42, TXT_Format); |
197 write_label_var( 600, 800, ME_Y_LINE2, &FontT48, "\016\016DDMMYY\017"); | 198 write_label_fix( 20, 340, ME_Y_LINE3, &FontT42, TXT_DateConfig); |
198 write_label_fix( 20, 790, ME_Y_LINE3, &FontT42, TXT_Format); | 199 write_label_var( 600, 800, ME_Y_LINE4, &FontT48, "\016\016DDMMYY\017"); |
200 write_label_fix( 20, 790, ME_Y_LINE5, &FontT42, TXT_Format); | |
199 // write_label_fix( 350 ,580, 250, &FontT42, TXT_Daylightsaving); | 201 // write_label_fix( 350 ,580, 250, &FontT42, TXT_Daylightsaving); |
200 | 202 |
201 write_field_2digit(StMSYS1_Time, 320, 780, ME_Y_LINE1, &FontT48, "##:##", (uint32_t)hour, (uint32_t)minute, 0, 0); | 203 write_field_2digit(StMSYS1_Time, 320, 780, ME_Y_LINE1, &FontT48, "##:##", (uint32_t)hour, (uint32_t)minute, 0, 0); |
202 write_field_2digit(StMSYS1_Date, 320, 780, ME_Y_LINE2, &FontT48, "##-##-20##", (uint32_t)day, (uint32_t)month, (uint32_t)year, 0); | 204 write_field_on_off(StMSYS1_12HR, 320, 790, ME_Y_LINE2, &FontT48, "12 HR", pSettings->amPMTime); |
203 write_field_on_off(StMSYS1_DDMMYY, 320, 790, ME_Y_LINE3, &FontT48, "DDMMYY", ddmmyy); | 205 write_field_2digit(StMSYS1_Date, 320, 780, ME_Y_LINE3, &FontT48, "##-##-20##", (uint32_t)day, (uint32_t)month, (uint32_t)year, 0); |
204 write_field_on_off(StMSYS1_MMDDYY, 320, 790, ME_Y_LINE4, &FontT48, "MMDDYY", mmddyy); | 206 write_field_on_off(StMSYS1_DDMMYY, 320, 790, ME_Y_LINE4, &FontT48, "DDMMYY", ddmmyy); |
205 write_field_on_off(StMSYS1_YYMMDD, 320, 790, ME_Y_LINE5, &FontT48, "YYMMDD", yymmdd); | 207 write_field_on_off(StMSYS1_MMDDYY, 320, 790, ME_Y_LINE5, &FontT48, "MMDDYY", mmddyy); |
208 write_field_on_off(StMSYS1_YYMMDD, 320, 790, ME_Y_LINE6, &FontT48, "YYMMDD", yymmdd); | |
206 // write_field_on_off(StMSYS1_DST, 350, 580, 310, &FontT48, "Active", daylightsaving); | 209 // write_field_on_off(StMSYS1_DST, 350, 580, 310, &FontT48, "Active", daylightsaving); |
207 | 210 |
208 setEvent(StMSYS1_Date, (uint32_t)OnAction_Date); | 211 setEvent(StMSYS1_Date, (uint32_t)OnAction_Date); |
209 setEvent(StMSYS1_Time, (uint32_t)OnAction_Time); | 212 setEvent(StMSYS1_Time, (uint32_t)OnAction_Time); |
213 setEvent(StMSYS1_12HR, (uint32_t)OnAction_12HR); | |
210 setEvent(StMSYS1_DDMMYY, (uint32_t)OnAction_DDMMYY); | 214 setEvent(StMSYS1_DDMMYY, (uint32_t)OnAction_DDMMYY); |
211 setEvent(StMSYS1_MMDDYY, (uint32_t)OnAction_MMDDYY); | 215 setEvent(StMSYS1_MMDDYY, (uint32_t)OnAction_MMDDYY); |
212 setEvent(StMSYS1_YYMMDD, (uint32_t)OnAction_YYMMDD); | 216 setEvent(StMSYS1_YYMMDD, (uint32_t)OnAction_YYMMDD); |
213 // setEvent(StMSYS1_DST, (uint32_t)OnAction_DST); | 217 // setEvent(StMSYS1_DST, (uint32_t)OnAction_DST); |
214 | 218 |
383 } | 387 } |
384 */ | 388 */ |
385 return UNSPECIFIC_RETURN; | 389 return UNSPECIFIC_RETURN; |
386 } | 390 } |
387 | 391 |
392 uint8_t OnAction_12HR(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | |
393 { | |
394 SSettings *pSettings; | |
395 | |
396 pSettings = settingsGetPointer(); | |
397 pSettings->amPMTime = !(pSettings->amPMTime); | |
398 | |
399 tMenuEdit_set_on_off(editId, pSettings->amPMTime); | |
400 | |
401 return UNSPECIFIC_RETURN; | |
402 } | |
388 | 403 |
389 uint8_t OnAction_DDMMYY(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | 404 uint8_t OnAction_DDMMYY(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
390 { | 405 { |
391 SSettings *pSettings; | 406 SSettings *pSettings; |
392 | 407 |