Added SDCardManagerClass, Updated class diagram, Modified app.ino example, Modified definition.h as well as ScreenManager and views

This commit is contained in:
anschrammh 2019-03-03 14:48:51 +01:00
parent 7ea47593a0
commit 72ff0d14a9
10 changed files with 735 additions and 111 deletions

View File

@ -536,7 +536,7 @@
"top": 811, "top": 811,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "-displayInverted: boolean", "text": "-displayColorInverted: boolean",
"horizontalAlignment": 0 "horizontalAlignment": 0
}, },
{ {
@ -672,7 +672,24 @@
"top": 924, "top": 924,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "+invertDisplay(inverted: boolean): void", "text": "+invertDisplayColor(inverted: const boolean): void",
"horizontalAlignment": 0
},
{
"_type": "UMLOperationView",
"_id": "AAAAAAFpQ2Hi6ASQOXs=",
"_parent": {
"$ref": "AAAAAAFpHq11g76xBiU="
},
"model": {
"$ref": "AAAAAAFpQ2HivgSNIGw="
},
"font": "Arial;13;0",
"left": 221,
"top": 939,
"width": 523.16748046875,
"height": 13,
"text": "+orientDisplay(orientation: const Orientation): void",
"horizontalAlignment": 0 "horizontalAlignment": 0
}, },
{ {
@ -686,10 +703,27 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 939, "top": 954,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "+dimDisplay(dimmed: boolean): void", "text": "+dimDisplay(dimmed: const boolean): void",
"horizontalAlignment": 0
},
{
"_type": "UMLOperationView",
"_id": "AAAAAAFpQ2D4yQKxskc=",
"_parent": {
"$ref": "AAAAAAFpHq11g76xBiU="
},
"model": {
"$ref": "AAAAAAFpQ2D4gwKutwk="
},
"font": "Arial;13;0",
"left": 221,
"top": 969,
"width": 523.16748046875,
"height": 13,
"text": "+clearDisplay(bufferOnly: boolean = false): void",
"horizontalAlignment": 0 "horizontalAlignment": 0
}, },
{ {
@ -703,7 +737,7 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 954, "top": 984,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "+const getError(): unsigned char", "text": "+const getError(): unsigned char",
@ -720,10 +754,27 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 969, "top": 999,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "+const isDisplayInverted(): boolean", "text": "+const isDisplayColorInverted(): boolean",
"horizontalAlignment": 0
},
{
"_type": "UMLOperationView",
"_id": "AAAAAAFpQ2y0PyOFwms=",
"_parent": {
"$ref": "AAAAAAFpHq11g76xBiU="
},
"model": {
"$ref": "AAAAAAFpQ2y0FiOCjGA="
},
"font": "Arial;13;0",
"left": 221,
"top": 1014,
"width": 523.16748046875,
"height": 13,
"text": "+const getDisplayOrientation(): Orientation",
"horizontalAlignment": 0 "horizontalAlignment": 0
}, },
{ {
@ -737,7 +788,7 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 984, "top": 1029,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "+const isDisplayDimmed(): boolean", "text": "+const isDisplayDimmed(): boolean",
@ -754,7 +805,7 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 999, "top": 1044,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "+const getCurrentView(): ViewLink*", "text": "+const getCurrentView(): ViewLink*",
@ -771,7 +822,7 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 1014, "top": 1059,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "-addNewLinkAtTheEnd(viewLinkedList: ViewLinkedList *, viewLink: ViewLink): boolean", "text": "-addNewLinkAtTheEnd(viewLinkedList: ViewLinkedList *, viewLink: ViewLink): boolean",
@ -788,7 +839,7 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 1029, "top": 1074,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "-createEmptyList(): void *", "text": "-createEmptyList(): void *",
@ -805,7 +856,7 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 1044, "top": 1089,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "-isListEmpty(ViewLinkedList viewLinkedList): boolean", "text": "-isListEmpty(ViewLinkedList viewLinkedList): boolean",
@ -822,7 +873,7 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 1059, "top": 1104,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "-removeLinkByUID(viewLinkedList: ViewLinkedList *, UID: const unsigned char): boolean", "text": "-removeLinkByUID(viewLinkedList: ViewLinkedList *, UID: const unsigned char): boolean",
@ -839,7 +890,7 @@
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 221, "left": 221,
"top": 1074, "top": 1119,
"width": 523.16748046875, "width": 523.16748046875,
"height": 13, "height": 13,
"text": "-getLinkByUID(viewLinkedList: ViewLinkedList, UID: const unsigned char): ViewLink *", "text": "-getLinkByUID(viewLinkedList: ViewLinkedList, UID: const unsigned char): ViewLink *",
@ -850,7 +901,7 @@
"left": 216, "left": 216,
"top": 859, "top": 859,
"width": 533.16748046875, "width": 533.16748046875,
"height": 233 "height": 278
}, },
{ {
"_type": "UMLReceptionCompartmentView", "_type": "UMLReceptionCompartmentView",
@ -890,7 +941,7 @@
"left": 216, "left": 216,
"top": 736, "top": 736,
"width": 533.16748046875, "width": 533.16748046875,
"height": 371, "height": 416,
"nameCompartment": { "nameCompartment": {
"$ref": "AAAAAAFpHq11gr6ruDw=" "$ref": "AAAAAAFpHq11gr6ruDw="
}, },
@ -928,8 +979,8 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 814, "left": 815,
"top": 907, "top": 918,
"height": 13, "height": 13,
"alpha": 1.5707963267948966, "alpha": 1.5707963267948966,
"distance": 15, "distance": 15,
@ -949,8 +1000,8 @@
}, },
"visible": null, "visible": null,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 815, "left": 817,
"top": 922, "top": 933,
"height": 13, "height": 13,
"alpha": 1.5707963267948966, "alpha": 1.5707963267948966,
"distance": 30, "distance": 30,
@ -970,8 +1021,8 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 813, "left": 812,
"top": 878, "top": 889,
"height": 13, "height": 13,
"alpha": -1.5707963267948966, "alpha": -1.5707963267948966,
"distance": 15, "distance": 15,
@ -991,8 +1042,8 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 853, "left": 854,
"top": 905, "top": 915,
"height": 13, "height": 13,
"alpha": 0.5235987755982988, "alpha": 0.5235987755982988,
"distance": 30, "distance": 30,
@ -1012,8 +1063,8 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 852, "left": 853,
"top": 918, "top": 928,
"height": 13, "height": 13,
"alpha": 0.7853981633974483, "alpha": 0.7853981633974483,
"distance": 40, "distance": 40,
@ -1034,7 +1085,7 @@
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 856, "left": 856,
"top": 877, "top": 887,
"height": 13, "height": 13,
"alpha": -0.5235987755982988, "alpha": -0.5235987755982988,
"distance": 25, "distance": 25,
@ -1053,8 +1104,8 @@
"$ref": "AAAAAAFpHucSu788r0g=" "$ref": "AAAAAAFpHucSu788r0g="
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 759, "left": 760,
"top": 911, "top": 923,
"width": 94.65625, "width": 94.65625,
"height": 13, "height": 13,
"alpha": -0.3058788210270264, "alpha": -0.3058788210270264,
@ -1075,8 +1126,8 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 778, "left": 779,
"top": 923, "top": 936,
"height": 13, "height": 13,
"alpha": -0.7853981633974483, "alpha": -0.7853981633974483,
"distance": 40, "distance": 40,
@ -1096,7 +1147,7 @@
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 769, "left": 769,
"top": 883, "top": 896,
"height": 13, "height": 13,
"alpha": 0.5235987755982988, "alpha": 0.5235987755982988,
"distance": 25, "distance": 25,
@ -1141,7 +1192,7 @@
"$ref": "AAAAAAFpHqCuVb5uVUA=" "$ref": "AAAAAAFpHqCuVb5uVUA="
}, },
"lineStyle": 1, "lineStyle": 1,
"points": "879:895;749:903", "points": "879:904;749:917",
"showVisibility": true, "showVisibility": true,
"nameLabel": { "nameLabel": {
"$ref": "AAAAAAFpHucSvL8/DjI=" "$ref": "AAAAAAFpHucSvL8/DjI="
@ -3804,7 +3855,7 @@
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 495, "left": 495,
"top": 1130, "top": 1152,
"height": 13, "height": 13,
"alpha": 1.5707963267948966, "alpha": 1.5707963267948966,
"distance": 15, "distance": 15,
@ -3825,7 +3876,7 @@
"visible": null, "visible": null,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 510, "left": 510,
"top": 1130, "top": 1152,
"height": 13, "height": 13,
"alpha": 1.5707963267948966, "alpha": 1.5707963267948966,
"distance": 30, "distance": 30,
@ -3846,7 +3897,7 @@
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 466, "left": 466,
"top": 1131, "top": 1153,
"height": 13, "height": 13,
"alpha": -1.5707963267948966, "alpha": -1.5707963267948966,
"distance": 15, "distance": 15,
@ -3867,7 +3918,7 @@
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 496, "left": 496,
"top": 1126, "top": 1171,
"height": 13, "height": 13,
"alpha": 0.5235987755982988, "alpha": 0.5235987755982988,
"distance": 30, "distance": 30,
@ -3888,7 +3939,7 @@
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 509, "left": 509,
"top": 1129, "top": 1174,
"height": 13, "height": 13,
"alpha": 0.7853981633974483, "alpha": 0.7853981633974483,
"distance": 40, "distance": 40,
@ -3909,7 +3960,7 @@
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 468, "left": 468,
"top": 1122, "top": 1167,
"height": 13, "height": 13,
"alpha": -0.5235987755982988, "alpha": -0.5235987755982988,
"distance": 25, "distance": 25,
@ -4015,7 +4066,7 @@
"$ref": "AAAAAAFpHq11gr6quCs=" "$ref": "AAAAAAFpHq11gr6quCs="
}, },
"lineStyle": 1, "lineStyle": 1,
"points": "481:1107;481:1167", "points": "481:1152;481:1167",
"showVisibility": true, "showVisibility": true,
"nameLabel": { "nameLabel": {
"$ref": "AAAAAAFpIVDGIBS5fjw=" "$ref": "AAAAAAFpIVDGIBS5fjw="
@ -4079,8 +4130,7 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": -144, "left": -16,
"top": -112,
"height": 13 "height": 13
}, },
{ {
@ -4090,8 +4140,8 @@
"$ref": "AAAAAAFpKneDch8PyEY=" "$ref": "AAAAAAFpKneDch8PyEY="
}, },
"font": "Arial;13;1", "font": "Arial;13;1",
"left": 885, "left": 949,
"top": 1047, "top": 1103,
"width": 207, "width": 207,
"height": 13, "height": 13,
"text": "SDCardManager" "text": "SDCardManager"
@ -4104,8 +4154,7 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": -144, "left": -16,
"top": -112,
"width": 73.67724609375, "width": 73.67724609375,
"height": 13, "height": 13,
"text": "(from Model)" "text": "(from Model)"
@ -4118,15 +4167,14 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": -144, "left": -16,
"top": -112,
"height": 13, "height": 13,
"horizontalAlignment": 1 "horizontalAlignment": 1
} }
], ],
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 880, "left": 944,
"top": 1040, "top": 1096,
"width": 217, "width": 217,
"height": 25, "height": 25,
"stereotypeLabel": { "stereotypeLabel": {
@ -4152,8 +4200,8 @@
"$ref": "AAAAAAFpKneDcR8MzCI=" "$ref": "AAAAAAFpKneDcR8MzCI="
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 880, "left": 944,
"top": 1065, "top": 1121,
"width": 217, "width": 217,
"height": 10 "height": 10
}, },
@ -4167,8 +4215,8 @@
"$ref": "AAAAAAFpKneDcR8MzCI=" "$ref": "AAAAAAFpKneDcR8MzCI="
}, },
"font": "Arial;13;0", "font": "Arial;13;0",
"left": 880, "left": 944,
"top": 1075, "top": 1131,
"width": 217, "width": 217,
"height": 10 "height": 10
}, },
@ -4183,8 +4231,7 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": -72, "left": -8,
"top": -56,
"width": 10, "width": 10,
"height": 10 "height": 10
}, },
@ -4199,16 +4246,15 @@
}, },
"visible": false, "visible": false,
"font": "Arial;13;0", "font": "Arial;13;0",
"left": -72, "left": -8,
"top": -56,
"width": 10, "width": 10,
"height": 10 "height": 10
} }
], ],
"font": "Arial;13;0", "font": "Arial;13;0",
"containerChangeable": true, "containerChangeable": true,
"left": 880, "left": 944,
"top": 1040, "top": 1096,
"width": 217, "width": 217,
"height": 177, "height": 177,
"nameCompartment": { "nameCompartment": {
@ -4226,6 +4272,366 @@
"templateParameterCompartment": { "templateParameterCompartment": {
"$ref": "AAAAAAFpKneDcx8XVFE=" "$ref": "AAAAAAFpKneDcx8XVFE="
} }
},
{
"_type": "UMLEnumerationView",
"_id": "AAAAAAFpQ2cErBlso3U=",
"_parent": {
"$ref": "AAAAAAFF+qBtyKM79qY="
},
"model": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"subViews": [
{
"_type": "UMLNameCompartmentView",
"_id": "AAAAAAFpQ2cErBltJkI=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlso3U="
},
"model": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"subViews": [
{
"_type": "LabelView",
"_id": "AAAAAAFpQ2cErBluWsY=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBltJkI="
},
"font": "Arial;13;0",
"left": 5,
"top": 869,
"width": 116.34619140625,
"height": 13,
"text": "«enumeration»"
},
{
"_type": "LabelView",
"_id": "AAAAAAFpQ2cErBlvKD8=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBltJkI="
},
"font": "Arial;13;1",
"left": 5,
"top": 884,
"width": 116.34619140625,
"height": 13,
"text": "Orientation"
},
{
"_type": "LabelView",
"_id": "AAAAAAFpQ2cErBlwOhM=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBltJkI="
},
"visible": false,
"font": "Arial;13;0",
"left": -208,
"top": 256,
"width": 73.67724609375,
"height": 13,
"text": "(from Model)"
},
{
"_type": "LabelView",
"_id": "AAAAAAFpQ2cErBlxf0Q=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBltJkI="
},
"visible": false,
"font": "Arial;13;0",
"left": -208,
"top": 256,
"height": 13,
"horizontalAlignment": 1
}
],
"font": "Arial;13;0",
"top": 864,
"width": 126.34619140625,
"height": 38,
"stereotypeLabel": {
"$ref": "AAAAAAFpQ2cErBluWsY="
},
"nameLabel": {
"$ref": "AAAAAAFpQ2cErBlvKD8="
},
"namespaceLabel": {
"$ref": "AAAAAAFpQ2cErBlwOhM="
},
"propertyLabel": {
"$ref": "AAAAAAFpQ2cErBlxf0Q="
}
},
{
"_type": "UMLAttributeCompartmentView",
"_id": "AAAAAAFpQ2cErBly/iI=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlso3U="
},
"model": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"visible": false,
"font": "Arial;13;0",
"left": -104,
"top": 128,
"width": 10,
"height": 10
},
{
"_type": "UMLOperationCompartmentView",
"_id": "AAAAAAFpQ2cErBlz3+g=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlso3U="
},
"model": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"visible": false,
"font": "Arial;13;0",
"left": -104,
"top": 128,
"width": 10,
"height": 10
},
{
"_type": "UMLReceptionCompartmentView",
"_id": "AAAAAAFpQ2cErBl0psc=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlso3U="
},
"model": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"visible": false,
"font": "Arial;13;0",
"left": -104,
"top": 128,
"width": 10,
"height": 10
},
{
"_type": "UMLTemplateParameterCompartmentView",
"_id": "AAAAAAFpQ2cErBl1Ru8=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlso3U="
},
"model": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"visible": false,
"font": "Arial;13;0",
"left": -104,
"top": 128,
"width": 10,
"height": 10
},
{
"_type": "UMLEnumerationLiteralCompartmentView",
"_id": "AAAAAAFpQ2cErBl2w48=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlso3U="
},
"model": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"subViews": [
{
"_type": "UMLEnumerationLiteralView",
"_id": "AAAAAAFpQ2c+lxqMJlU=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBl2w48="
},
"model": {
"$ref": "AAAAAAFpQ2c+WRp65qo="
},
"font": "Arial;13;0",
"left": 5,
"top": 907,
"width": 116.34619140625,
"height": 13,
"text": "OR_0",
"horizontalAlignment": 0
},
{
"_type": "UMLEnumerationLiteralView",
"_id": "AAAAAAFpQ2dzoBxGVrA=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBl2w48="
},
"model": {
"$ref": "AAAAAAFpQ2dzZBw0zAQ="
},
"font": "Arial;13;0",
"left": 5,
"top": 922,
"width": 116.34619140625,
"height": 13,
"text": "OR_90",
"horizontalAlignment": 0
},
{
"_type": "UMLEnumerationLiteralView",
"_id": "AAAAAAFpQ2eOJBy2pmY=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBl2w48="
},
"model": {
"$ref": "AAAAAAFpQ2eN5xykABc="
},
"font": "Arial;13;0",
"left": 5,
"top": 937,
"width": 116.34619140625,
"height": 13,
"text": "OR_180",
"horizontalAlignment": 0
},
{
"_type": "UMLEnumerationLiteralView",
"_id": "AAAAAAFpQ2evZR0m1so=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBl2w48="
},
"model": {
"$ref": "AAAAAAFpQ2evKx0UdVc="
},
"font": "Arial;13;0",
"left": 5,
"top": 952,
"width": 116.34619140625,
"height": 13,
"text": "OR_270",
"horizontalAlignment": 0
}
],
"font": "Arial;13;0",
"top": 902,
"width": 126.34619140625,
"height": 68
}
],
"font": "Arial;13;0",
"containerChangeable": true,
"top": 864,
"width": 126.34619140625,
"height": 106,
"nameCompartment": {
"$ref": "AAAAAAFpQ2cErBltJkI="
},
"suppressAttributes": true,
"suppressOperations": true,
"attributeCompartment": {
"$ref": "AAAAAAFpQ2cErBly/iI="
},
"operationCompartment": {
"$ref": "AAAAAAFpQ2cErBlz3+g="
},
"receptionCompartment": {
"$ref": "AAAAAAFpQ2cErBl0psc="
},
"templateParameterCompartment": {
"$ref": "AAAAAAFpQ2cErBl1Ru8="
},
"enumerationLiteralCompartment": {
"$ref": "AAAAAAFpQ2cErBl2w48="
}
},
{
"_type": "UMLDependencyView",
"_id": "AAAAAAFpQ2gCbx6zhXM=",
"_parent": {
"$ref": "AAAAAAFF+qBtyKM79qY="
},
"model": {
"$ref": "AAAAAAFpQ2gCbx6xF58="
},
"subViews": [
{
"_type": "EdgeLabelView",
"_id": "AAAAAAFpQ2gCbx60qvc=",
"_parent": {
"$ref": "AAAAAAFpQ2gCbx6zhXM="
},
"model": {
"$ref": "AAAAAAFpQ2gCbx6xF58="
},
"visible": false,
"font": "Arial;13;0",
"left": 168,
"top": 931,
"height": 13,
"alpha": 1.5707963267948966,
"distance": 15,
"hostEdge": {
"$ref": "AAAAAAFpQ2gCbx6zhXM="
},
"edgePosition": 1
},
{
"_type": "EdgeLabelView",
"_id": "AAAAAAFpQ2gCbx61zG0=",
"_parent": {
"$ref": "AAAAAAFpQ2gCbx6zhXM="
},
"model": {
"$ref": "AAAAAAFpQ2gCbx6xF58="
},
"visible": null,
"font": "Arial;13;0",
"left": 167,
"top": 946,
"height": 13,
"alpha": 1.5707963267948966,
"distance": 30,
"hostEdge": {
"$ref": "AAAAAAFpQ2gCbx6zhXM="
},
"edgePosition": 1
},
{
"_type": "EdgeLabelView",
"_id": "AAAAAAFpQ2gCbx62wlU=",
"_parent": {
"$ref": "AAAAAAFpQ2gCbx6zhXM="
},
"model": {
"$ref": "AAAAAAFpQ2gCbx6xF58="
},
"visible": false,
"font": "Arial;13;0",
"left": 171,
"top": 902,
"height": 13,
"alpha": -1.5707963267948966,
"distance": 15,
"hostEdge": {
"$ref": "AAAAAAFpQ2gCbx6zhXM="
},
"edgePosition": 1
}
],
"font": "Arial;13;0",
"head": {
"$ref": "AAAAAAFpQ2cErBlso3U="
},
"tail": {
"$ref": "AAAAAAFpHq11gr6quCs="
},
"lineStyle": 1,
"points": "215:926;126:920",
"showVisibility": true,
"nameLabel": {
"$ref": "AAAAAAFpQ2gCbx60qvc="
},
"stereotypeLabel": {
"$ref": "AAAAAAFpQ2gCbx61zG0="
},
"propertyLabel": {
"$ref": "AAAAAAFpQ2gCbx62wlU="
}
} }
] ]
}, },
@ -4606,6 +5012,19 @@
"$ref": "AAAAAAFpIVCM/xPV/bU=" "$ref": "AAAAAAFpIVCM/xPV/bU="
} }
} }
},
{
"_type": "UMLDependency",
"_id": "AAAAAAFpQ2gCbx6xF58=",
"_parent": {
"$ref": "AAAAAAFpHq11gr6oq4M="
},
"source": {
"$ref": "AAAAAAFpHq11gr6oq4M="
},
"target": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
}
} }
], ],
"attributes": [ "attributes": [
@ -4647,7 +5066,7 @@
"_parent": { "_parent": {
"$ref": "AAAAAAFpHq11gr6oq4M=" "$ref": "AAAAAAFpHq11gr6oq4M="
}, },
"name": "displayInverted", "name": "displayColorInverted",
"visibility": "private", "visibility": "private",
"type": "boolean" "type": "boolean"
}, },
@ -4803,7 +5222,7 @@
"_parent": { "_parent": {
"$ref": "AAAAAAFpHq11gr6oq4M=" "$ref": "AAAAAAFpHq11gr6oq4M="
}, },
"name": "invertDisplay", "name": "invertDisplayColor",
"parameters": [ "parameters": [
{ {
"_type": "UMLParameter", "_type": "UMLParameter",
@ -4812,7 +5231,7 @@
"$ref": "AAAAAAFpHuK2fL8ilKQ=" "$ref": "AAAAAAFpHuK2fL8ilKQ="
}, },
"name": "inverted", "name": "inverted",
"type": "boolean" "type": "const boolean"
}, },
{ {
"_type": "UMLParameter", "_type": "UMLParameter",
@ -4825,6 +5244,34 @@
} }
] ]
}, },
{
"_type": "UMLOperation",
"_id": "AAAAAAFpQ2HivgSNIGw=",
"_parent": {
"$ref": "AAAAAAFpHq11gr6oq4M="
},
"name": "orientDisplay",
"parameters": [
{
"_type": "UMLParameter",
"_id": "AAAAAAFpQ2JLTATfkNk=",
"_parent": {
"$ref": "AAAAAAFpQ2HivgSNIGw="
},
"type": "void",
"direction": "return"
},
{
"_type": "UMLParameter",
"_id": "AAAAAAFpQ2nYiiBdFCU=",
"_parent": {
"$ref": "AAAAAAFpQ2HivgSNIGw="
},
"name": "orientation",
"type": "const Orientation"
}
]
},
{ {
"_type": "UMLOperation", "_type": "UMLOperation",
"_id": "AAAAAAFpHuZoKb8sWRY=", "_id": "AAAAAAFpHuZoKb8sWRY=",
@ -4840,7 +5287,7 @@
"$ref": "AAAAAAFpHuZoKb8sWRY=" "$ref": "AAAAAAFpHuZoKb8sWRY="
}, },
"name": "dimmed", "name": "dimmed",
"type": "boolean" "type": "const boolean"
}, },
{ {
"_type": "UMLParameter", "_type": "UMLParameter",
@ -4853,6 +5300,35 @@
} }
] ]
}, },
{
"_type": "UMLOperation",
"_id": "AAAAAAFpQ2D4gwKutwk=",
"_parent": {
"$ref": "AAAAAAFpHq11gr6oq4M="
},
"name": "clearDisplay",
"parameters": [
{
"_type": "UMLParameter",
"_id": "AAAAAAFpQ2G62QMACTU=",
"_parent": {
"$ref": "AAAAAAFpQ2D4gwKutwk="
},
"type": "void",
"direction": "return"
},
{
"_type": "UMLParameter",
"_id": "AAAAAAFpQ3OJASWff6Y=",
"_parent": {
"$ref": "AAAAAAFpQ2D4gwKutwk="
},
"name": "bufferOnly",
"type": "boolean",
"defaultValue": "false"
}
]
},
{ {
"_type": "UMLOperation", "_type": "UMLOperation",
"_id": "AAAAAAFpIXL2kx+t5Ww=", "_id": "AAAAAAFpIXL2kx+t5Ww=",
@ -4878,7 +5354,7 @@
"_parent": { "_parent": {
"$ref": "AAAAAAFpHq11gr6oq4M=" "$ref": "AAAAAAFpHq11gr6oq4M="
}, },
"name": "const isDisplayInverted", "name": "const isDisplayColorInverted",
"parameters": [ "parameters": [
{ {
"_type": "UMLParameter", "_type": "UMLParameter",
@ -4891,6 +5367,27 @@
} }
] ]
}, },
{
"_type": "UMLOperation",
"_id": "AAAAAAFpQ2y0FiOCjGA=",
"_parent": {
"$ref": "AAAAAAFpHq11gr6oq4M="
},
"name": "const getDisplayOrientation",
"parameters": [
{
"_type": "UMLParameter",
"_id": "AAAAAAFpQ2012iPUiFU=",
"_parent": {
"$ref": "AAAAAAFpQ2y0FiOCjGA="
},
"type": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"direction": "return"
}
]
},
{ {
"_type": "UMLOperation", "_type": "UMLOperation",
"_id": "AAAAAAFpKoAXui9uQ2w=", "_id": "AAAAAAFpKoAXui9uQ2w=",
@ -5914,6 +6411,56 @@
"$ref": "AAAAAAFF+qBWK6M3Z8Y=" "$ref": "AAAAAAFF+qBWK6M3Z8Y="
}, },
"name": "SDCardManager" "name": "SDCardManager"
},
{
"_type": "UMLEnumeration",
"_id": "AAAAAAFpQ2T5OgsBzio=",
"_parent": {
"$ref": "AAAAAAFF+qBWK6M3Z8Y="
},
"name": "Rotation"
},
{
"_type": "UMLEnumeration",
"_id": "AAAAAAFpQ2cErBlqAaU=",
"_parent": {
"$ref": "AAAAAAFF+qBWK6M3Z8Y="
},
"name": "Orientation",
"literals": [
{
"_type": "UMLEnumerationLiteral",
"_id": "AAAAAAFpQ2c+WRp65qo=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"name": "OR_0"
},
{
"_type": "UMLEnumerationLiteral",
"_id": "AAAAAAFpQ2dzZBw0zAQ=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"name": "OR_90"
},
{
"_type": "UMLEnumerationLiteral",
"_id": "AAAAAAFpQ2eN5xykABc=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"name": "OR_180"
},
{
"_type": "UMLEnumerationLiteral",
"_id": "AAAAAAFpQ2evKx0UdVc=",
"_parent": {
"$ref": "AAAAAAFpQ2cErBlqAaU="
},
"name": "OR_270"
}
]
} }
] ]
} }

View File

@ -8,7 +8,7 @@ SAB::SAB() : _screenConfig(128, 64, 0x3C), _display(_screenConfig.getWidth(), _s
//We initialize the pins for the I2C communication //We initialize the pins for the I2C communication
Wire.begin(_pinConfig.getI2C_sda(), _pinConfig.getI2C_scl()); Wire.begin(_pinConfig.getI2C_sda(), _pinConfig.getI2C_scl());
if(!_rtc.begin()) _error |= RTC_BEGIN_ERR; if(!_rtc.begin()) _error |= RTC_BEGIN_ERR;
if(!_display.begin(SSD1306_SWITCHCAPVCC, _screenConfig.getAddress())) _error |= DISP_BEGIN_ERR; if(!_display.begin(SSD1306_SWITCHCAPVCC, _screenConfig.getAddress())){ _error |= DISP_BEGIN_ERR; Serial.println("Display begin error");}
} }
SAB::SAB(const PinMapping pinConfig, const ScreenConfig screenConfig) : _pinConfig(pinConfig), _screenConfig(screenConfig), _display(_screenConfig.getWidth(), _screenConfig.getHeight(), &Wire), _screenManager(_display), _rtc(), _rtcManager(_rtc), _error(0) SAB::SAB(const PinMapping pinConfig, const ScreenConfig screenConfig) : _pinConfig(pinConfig), _screenConfig(screenConfig), _display(_screenConfig.getWidth(), _screenConfig.getHeight(), &Wire), _screenManager(_display), _rtc(), _rtcManager(_rtc), _error(0)

View File

@ -0,0 +1,2 @@
#include "SDCardManager.h"

15
src/app/SDCardManager.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef SDCARDMANAGER_H
#define SDCARDMANAGER_H
class SDCardManager
{
friend class SAB;
public:
protected:
private:
};
#endif //SDCARDMANAGER_H

View File

@ -1,8 +1,10 @@
#include "ScreenManager.h" #include "ScreenManager.h"
ScreenManager::ScreenManager(Adafruit_SSD1306 &display) : _displayRef(display), _displayInverted(false), _displayDimmed(false), _currentView(NULL) ScreenManager::ScreenManager(Adafruit_SSD1306 &display) : _displayRef(display), _displayColorInverted(false), _displayDimmed(false), _currentView(NULL)
{ {
_viewLinkedList = (ViewLinkedList) createEmptyList(); _viewLinkedList = (ViewLinkedList) createEmptyList();
_displayRef.setRotation(OR_0);
_displayRef.setTextColor(WHITE);
} }
boolean ScreenManager::addView(boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*), void *pData, const unsigned char UID) boolean ScreenManager::addView(boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*), void *pData, const unsigned char UID)
@ -129,40 +131,88 @@ ViewLink* ScreenManager::getLinkByUID(ViewLinkedList viewLinkedList, const unsig
boolean ScreenManager::displayView(const int UID) boolean ScreenManager::displayView(const int UID)
{ {
boolean result = false;
if(UID == -1 && _currentView == NO_CURRENT_VIEW) if(UID == -1 && _currentView == NO_CURRENT_VIEW)
{ {
//We display an error message on the screen //We display an error message on the screen
Serial.println("No current view to display");
return false; return false;
} }
else if(UID == -1) else if(UID == -1)
return (*_currentView->viewLogicFunction)(_displayRef, _currentView->pData); {
_displayRef.clearDisplay();
_displayRef.setCursor(0,0);
result = (*_currentView->viewLogicFunction)(_displayRef, _currentView->pData);
_displayRef.display();
return result;
}
ViewLink *viewLink = getLinkByUID(_viewLinkedList, UID); ViewLink *viewLink = getLinkByUID(_viewLinkedList, UID);
if(viewLink == NULL) if(viewLink == NULL)
{ {
//We display an error message on the screen //We display an error message on the screen
Serial.println("View not found");
return false; return false;
}else if(viewLink->viewLogicFunction == NULL) }else if(viewLink->viewLogicFunction == NULL)
{ {
//We display an error message on the screen //We display an error message on the screen
Serial.println("View logic undefined");
return false; return false;
} }
_currentView = viewLink; _currentView = viewLink;
return (*viewLink->viewLogicFunction)(_displayRef, viewLink->pData); _displayRef.clearDisplay();
_displayRef.setCursor(0,0);
result = (*viewLink->viewLogicFunction)(_displayRef, viewLink->pData);
_displayRef.display();
return result;
} }
void ScreenManager::invertDisplay(boolean inverted) void ScreenManager::invertDisplayColor(const boolean inverted)
{ {
_displayRef.invertDisplay(inverted); _displayRef.invertDisplay(inverted);
_displayInverted = inverted; _displayColorInverted = inverted;
} }
void ScreenManager::dimDisplay(boolean dimmed) void ScreenManager::dimDisplay(const boolean dimmed)
{ {
_displayRef.dim(dimmed); _displayRef.dim(dimmed);
_displayDimmed = dimmed; _displayDimmed = dimmed;
} }
void ScreenManager::orientDisplay(const Orientation orientation)
{
_displayRef.setRotation(orientation);
}
boolean ScreenManager::isDisplayColorInverted() const
{
return _displayColorInverted;
}
Orientation ScreenManager::getDisplayOrientation() const
{
return (Orientation) _displayRef.getRotation();
}
boolean ScreenManager::isDisplayDimmed() const
{
return _displayDimmed;
}
void ScreenManager::clearDisplay(const boolean bufferOnly)
{
if(bufferOnly)
_displayRef.clearDisplay();
else
{
_displayRef.clearDisplay();
_displayRef.display();
}
}

View File

@ -10,11 +10,14 @@ class ScreenManager
boolean addView(boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*), void *pData, const unsigned char UID); boolean addView(boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*), void *pData, const unsigned char UID);
boolean removeView(const unsigned char UID); boolean removeView(const unsigned char UID);
boolean displayView(const int UID = -1); boolean displayView(const int UID = -1);
void invertDisplay(boolean inverted); void invertDisplayColor(const boolean inverted);
void dimDisplay(boolean dimmed); void orientDisplay(const Orientation orientation);
void dimDisplay(const boolean dimmed);
void clearDisplay(const boolean bufferOnly = false);
unsigned char getError() const; unsigned char getError() const;
boolean isDisplayInverted() const; boolean isDisplayColorInverted() const;
Orientation getDisplayOrientation() const;
boolean isDisplayDimmed() const; boolean isDisplayDimmed() const;
ViewLink* getCurrentView() const; ViewLink* getCurrentView() const;
@ -33,7 +36,7 @@ class ScreenManager
Adafruit_SSD1306 &_displayRef; Adafruit_SSD1306 &_displayRef;
ViewLinkedList _viewLinkedList; ViewLinkedList _viewLinkedList;
unsigned char _error; unsigned char _error;
boolean _displayInverted; boolean _displayColorInverted;
boolean _displayDimmed; boolean _displayDimmed;
ViewLink* _currentView; ViewLink* _currentView;
}; };

View File

@ -2,30 +2,28 @@
#include "PinMapping.h" #include "PinMapping.h"
#include "SAB.h" #include "SAB.h"
#include "views.h" #include "views.h"
#define DEBUG
SAB sab; SAB sab;
unsigned char *memoryEater = NULL;
int i = 42; unsigned long currentMs = 0;
DateTimePacket dtp = {sab.getRtcManager().getDateTime()};
void setup() { void setup() {
// put your setup code here, to run once: // put your setup code here, to run once:
Serial.println("Starting"); Serial.println("Starting setup");
sab.getScreenManager().addView(&(view_1), &i,1);
sab.getScreenManager().addView(&(view_2), NULL, 2); sab.getScreenManager().addView(&(view_1), &dtp, 1);
/*sab.getScreenManager().addView(&(view_1), NULL, 6);
sab.getScreenManager().addView(&(view_1), NULL, 7); Serial.println("End setup");
sab.getScreenManager().iterateThroughList();*/
Serial.println("fin");
} }
void loop() { void loop() {
sab.getScreenManager().iterateThroughList(); if(millis() - currentMs > 1000)
sab.getScreenManager().displayView(2); {
sab.getScreenManager().displayView(LAST_VIEW); currentMs = millis();
sab.getScreenManager().displayView(3); dtp.dateTime = sab.getRtcManager().getDateTime();
sab.getScreenManager().displayView(1); sab.getScreenManager().displayView(1);
sab.getScreenManager().displayView(LAST_VIEW); memoryEater = (unsigned char *) malloc(sizeof(char));
Serial.print("Free memory : ");Serial.println(ESP.getFreeHeap()); }
delay(3000);
} }

View File

@ -17,7 +17,7 @@ typedef enum { GPIO_0 = 0,
GPIO_15 = 15, GPIO_15 = 15,
GPIO_16 = 16, GPIO_16 = 16,
ADC = A0, ADC = A0,
DEFAULT_PIN = -1} Pin; DEFAULT_PIN = -1 } Pin;
#define RTC_BEGIN_ERR B00000001 #define RTC_BEGIN_ERR B00000001
#define DISP_BEGIN_ERR B00000010 #define DISP_BEGIN_ERR B00000010
@ -26,6 +26,7 @@ typedef enum { GPIO_0 = 0,
#define NO_CURRENT_VIEW NULL #define NO_CURRENT_VIEW NULL
#define LAST_VIEW -1 #define LAST_VIEW -1
typedef enum { OR_0 = 2, OR_90 = 3, OR_180 = 0, OR_270 = 1 } Orientation;
//Data structure for the view handling //Data structure for the view handling
typedef struct viewLink{ typedef struct viewLink{

View File

@ -2,12 +2,15 @@
boolean view_1(Adafruit_SSD1306 &display, void *pData) boolean view_1(Adafruit_SSD1306 &display, void *pData)
{ {
int *i = (int *) pData; char time_str[300] = "";
Serial.print("Value : ");Serial.println(*i); DateTimePacket *p = (DateTimePacket *) pData;
sprintf(time_str,"RTC:time--> %d:%d:%d\ndate--> %d/%d/%d\nFree RAM : %d\n",p->dateTime.hour(), p->dateTime.minute(), p->dateTime.second(), p->dateTime.day(), p->dateTime.month(), p->dateTime.year(),ESP.getFreeHeap());
display.println(time_str);
return true;
} }
boolean view_2(Adafruit_SSD1306 &display, void *pData) boolean view_2(Adafruit_SSD1306 &display, void *pData)
{ {
Serial.println("Salut ma gueule");
} }

View File

@ -1,7 +1,12 @@
#ifndef VIEWS_H #ifndef VIEWS_H
#define VIEWS_H #define VIEWS_H
#include <Adafruit_SSD1306.h>
#include "SAB.h"
typedef struct dateTimePacket
{
DateTime dateTime;
} DateTimePacket;
boolean view_1(Adafruit_SSD1306 &display, void *pData); boolean view_1(Adafruit_SSD1306 &display, void *pData);
boolean view_2(Adafruit_SSD1306 &display, void *pData); boolean view_2(Adafruit_SSD1306 &display, void *pData);