diff --git a/documentation/app_class_diagram.mdj b/documentation/app_class_diagram.mdj index 356e38f..42ae770 100644 --- a/documentation/app_class_diagram.mdj +++ b/documentation/app_class_diagram.mdj @@ -536,7 +536,7 @@ "top": 811, "width": 523.16748046875, "height": 13, - "text": "-displayInverted: boolean", + "text": "-displayColorInverted: boolean", "horizontalAlignment": 0 }, { @@ -672,7 +672,24 @@ "top": 924, "width": 523.16748046875, "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 }, { @@ -686,10 +703,27 @@ }, "font": "Arial;13;0", "left": 221, - "top": 939, + "top": 954, "width": 523.16748046875, "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 }, { @@ -703,7 +737,7 @@ }, "font": "Arial;13;0", "left": 221, - "top": 954, + "top": 984, "width": 523.16748046875, "height": 13, "text": "+const getError(): unsigned char", @@ -720,10 +754,27 @@ }, "font": "Arial;13;0", "left": 221, - "top": 969, + "top": 999, "width": 523.16748046875, "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 }, { @@ -737,7 +788,7 @@ }, "font": "Arial;13;0", "left": 221, - "top": 984, + "top": 1029, "width": 523.16748046875, "height": 13, "text": "+const isDisplayDimmed(): boolean", @@ -754,7 +805,7 @@ }, "font": "Arial;13;0", "left": 221, - "top": 999, + "top": 1044, "width": 523.16748046875, "height": 13, "text": "+const getCurrentView(): ViewLink*", @@ -771,7 +822,7 @@ }, "font": "Arial;13;0", "left": 221, - "top": 1014, + "top": 1059, "width": 523.16748046875, "height": 13, "text": "-addNewLinkAtTheEnd(viewLinkedList: ViewLinkedList *, viewLink: ViewLink): boolean", @@ -788,7 +839,7 @@ }, "font": "Arial;13;0", "left": 221, - "top": 1029, + "top": 1074, "width": 523.16748046875, "height": 13, "text": "-createEmptyList(): void *", @@ -805,7 +856,7 @@ }, "font": "Arial;13;0", "left": 221, - "top": 1044, + "top": 1089, "width": 523.16748046875, "height": 13, "text": "-isListEmpty(ViewLinkedList viewLinkedList): boolean", @@ -822,7 +873,7 @@ }, "font": "Arial;13;0", "left": 221, - "top": 1059, + "top": 1104, "width": 523.16748046875, "height": 13, "text": "-removeLinkByUID(viewLinkedList: ViewLinkedList *, UID: const unsigned char): boolean", @@ -839,7 +890,7 @@ }, "font": "Arial;13;0", "left": 221, - "top": 1074, + "top": 1119, "width": 523.16748046875, "height": 13, "text": "-getLinkByUID(viewLinkedList: ViewLinkedList, UID: const unsigned char): ViewLink *", @@ -850,7 +901,7 @@ "left": 216, "top": 859, "width": 533.16748046875, - "height": 233 + "height": 278 }, { "_type": "UMLReceptionCompartmentView", @@ -890,7 +941,7 @@ "left": 216, "top": 736, "width": 533.16748046875, - "height": 371, + "height": 416, "nameCompartment": { "$ref": "AAAAAAFpHq11gr6ruDw=" }, @@ -928,8 +979,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 814, - "top": 907, + "left": 815, + "top": 918, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -949,8 +1000,8 @@ }, "visible": null, "font": "Arial;13;0", - "left": 815, - "top": 922, + "left": 817, + "top": 933, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -970,8 +1021,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 813, - "top": 878, + "left": 812, + "top": 889, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -991,8 +1042,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 853, - "top": 905, + "left": 854, + "top": 915, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -1012,8 +1063,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 852, - "top": 918, + "left": 853, + "top": 928, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -1034,7 +1085,7 @@ "visible": false, "font": "Arial;13;0", "left": 856, - "top": 877, + "top": 887, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -1053,8 +1104,8 @@ "$ref": "AAAAAAFpHucSu788r0g=" }, "font": "Arial;13;0", - "left": 759, - "top": 911, + "left": 760, + "top": 923, "width": 94.65625, "height": 13, "alpha": -0.3058788210270264, @@ -1075,8 +1126,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 778, - "top": 923, + "left": 779, + "top": 936, "height": 13, "alpha": -0.7853981633974483, "distance": 40, @@ -1096,7 +1147,7 @@ "visible": false, "font": "Arial;13;0", "left": 769, - "top": 883, + "top": 896, "height": 13, "alpha": 0.5235987755982988, "distance": 25, @@ -1141,7 +1192,7 @@ "$ref": "AAAAAAFpHqCuVb5uVUA=" }, "lineStyle": 1, - "points": "879:895;749:903", + "points": "879:904;749:917", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAFpHucSvL8/DjI=" @@ -3804,7 +3855,7 @@ "visible": false, "font": "Arial;13;0", "left": 495, - "top": 1130, + "top": 1152, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -3825,7 +3876,7 @@ "visible": null, "font": "Arial;13;0", "left": 510, - "top": 1130, + "top": 1152, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -3846,7 +3897,7 @@ "visible": false, "font": "Arial;13;0", "left": 466, - "top": 1131, + "top": 1153, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -3867,7 +3918,7 @@ "visible": false, "font": "Arial;13;0", "left": 496, - "top": 1126, + "top": 1171, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -3888,7 +3939,7 @@ "visible": false, "font": "Arial;13;0", "left": 509, - "top": 1129, + "top": 1174, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -3909,7 +3960,7 @@ "visible": false, "font": "Arial;13;0", "left": 468, - "top": 1122, + "top": 1167, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -4015,7 +4066,7 @@ "$ref": "AAAAAAFpHq11gr6quCs=" }, "lineStyle": 1, - "points": "481:1107;481:1167", + "points": "481:1152;481:1167", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAFpIVDGIBS5fjw=" @@ -4079,8 +4130,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -144, - "top": -112, + "left": -16, "height": 13 }, { @@ -4090,8 +4140,8 @@ "$ref": "AAAAAAFpKneDch8PyEY=" }, "font": "Arial;13;1", - "left": 885, - "top": 1047, + "left": 949, + "top": 1103, "width": 207, "height": 13, "text": "SDCardManager" @@ -4104,8 +4154,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -144, - "top": -112, + "left": -16, "width": 73.67724609375, "height": 13, "text": "(from Model)" @@ -4118,15 +4167,14 @@ }, "visible": false, "font": "Arial;13;0", - "left": -144, - "top": -112, + "left": -16, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 880, - "top": 1040, + "left": 944, + "top": 1096, "width": 217, "height": 25, "stereotypeLabel": { @@ -4152,8 +4200,8 @@ "$ref": "AAAAAAFpKneDcR8MzCI=" }, "font": "Arial;13;0", - "left": 880, - "top": 1065, + "left": 944, + "top": 1121, "width": 217, "height": 10 }, @@ -4167,8 +4215,8 @@ "$ref": "AAAAAAFpKneDcR8MzCI=" }, "font": "Arial;13;0", - "left": 880, - "top": 1075, + "left": 944, + "top": 1131, "width": 217, "height": 10 }, @@ -4183,8 +4231,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -72, - "top": -56, + "left": -8, "width": 10, "height": 10 }, @@ -4199,16 +4246,15 @@ }, "visible": false, "font": "Arial;13;0", - "left": -72, - "top": -56, + "left": -8, "width": 10, "height": 10 } ], "font": "Arial;13;0", "containerChangeable": true, - "left": 880, - "top": 1040, + "left": 944, + "top": 1096, "width": 217, "height": 177, "nameCompartment": { @@ -4226,6 +4272,366 @@ "templateParameterCompartment": { "$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=" } } + }, + { + "_type": "UMLDependency", + "_id": "AAAAAAFpQ2gCbx6xF58=", + "_parent": { + "$ref": "AAAAAAFpHq11gr6oq4M=" + }, + "source": { + "$ref": "AAAAAAFpHq11gr6oq4M=" + }, + "target": { + "$ref": "AAAAAAFpQ2cErBlqAaU=" + } } ], "attributes": [ @@ -4647,7 +5066,7 @@ "_parent": { "$ref": "AAAAAAFpHq11gr6oq4M=" }, - "name": "displayInverted", + "name": "displayColorInverted", "visibility": "private", "type": "boolean" }, @@ -4803,7 +5222,7 @@ "_parent": { "$ref": "AAAAAAFpHq11gr6oq4M=" }, - "name": "invertDisplay", + "name": "invertDisplayColor", "parameters": [ { "_type": "UMLParameter", @@ -4812,7 +5231,7 @@ "$ref": "AAAAAAFpHuK2fL8ilKQ=" }, "name": "inverted", - "type": "boolean" + "type": "const boolean" }, { "_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", "_id": "AAAAAAFpHuZoKb8sWRY=", @@ -4840,7 +5287,7 @@ "$ref": "AAAAAAFpHuZoKb8sWRY=" }, "name": "dimmed", - "type": "boolean" + "type": "const boolean" }, { "_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", "_id": "AAAAAAFpIXL2kx+t5Ww=", @@ -4878,7 +5354,7 @@ "_parent": { "$ref": "AAAAAAFpHq11gr6oq4M=" }, - "name": "const isDisplayInverted", + "name": "const isDisplayColorInverted", "parameters": [ { "_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", "_id": "AAAAAAFpKoAXui9uQ2w=", @@ -5914,6 +6411,56 @@ "$ref": "AAAAAAFF+qBWK6M3Z8Y=" }, "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" + } + ] } ] } diff --git a/src/app/SAB.cpp b/src/app/SAB.cpp index 1a27693..670d21f 100644 --- a/src/app/SAB.cpp +++ b/src/app/SAB.cpp @@ -8,7 +8,7 @@ SAB::SAB() : _screenConfig(128, 64, 0x3C), _display(_screenConfig.getWidth(), _s //We initialize the pins for the I2C communication Wire.begin(_pinConfig.getI2C_sda(), _pinConfig.getI2C_scl()); 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) diff --git a/src/app/SDCardManager.cpp b/src/app/SDCardManager.cpp new file mode 100644 index 0000000..2b10fef --- /dev/null +++ b/src/app/SDCardManager.cpp @@ -0,0 +1,2 @@ +#include "SDCardManager.h" + diff --git a/src/app/SDCardManager.h b/src/app/SDCardManager.h new file mode 100644 index 0000000..bba652c --- /dev/null +++ b/src/app/SDCardManager.h @@ -0,0 +1,15 @@ +#ifndef SDCARDMANAGER_H +#define SDCARDMANAGER_H + +class SDCardManager +{ + friend class SAB; + public: + + protected: + + private: + +}; + +#endif //SDCARDMANAGER_H diff --git a/src/app/ScreenManager.cpp b/src/app/ScreenManager.cpp index 496856e..9b9cfe0 100644 --- a/src/app/ScreenManager.cpp +++ b/src/app/ScreenManager.cpp @@ -1,8 +1,10 @@ #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(); + _displayRef.setRotation(OR_0); + _displayRef.setTextColor(WHITE); } 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 result = false; + if(UID == -1 && _currentView == NO_CURRENT_VIEW) { //We display an error message on the screen + Serial.println("No current view to display"); return false; } 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); if(viewLink == NULL) { //We display an error message on the screen + Serial.println("View not found"); return false; }else if(viewLink->viewLogicFunction == NULL) { //We display an error message on the screen + Serial.println("View logic undefined"); return false; } _currentView = viewLink; + + _displayRef.clearDisplay(); + _displayRef.setCursor(0,0); + result = (*viewLink->viewLogicFunction)(_displayRef, viewLink->pData); + _displayRef.display(); - return (*viewLink->viewLogicFunction)(_displayRef, viewLink->pData); + return result; } -void ScreenManager::invertDisplay(boolean inverted) +void ScreenManager::invertDisplayColor(const boolean inverted) { _displayRef.invertDisplay(inverted); - _displayInverted = inverted; + _displayColorInverted = inverted; } -void ScreenManager::dimDisplay(boolean dimmed) +void ScreenManager::dimDisplay(const boolean dimmed) { _displayRef.dim(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(); + } +} + diff --git a/src/app/ScreenManager.h b/src/app/ScreenManager.h index 805ff9e..c3adb2b 100644 --- a/src/app/ScreenManager.h +++ b/src/app/ScreenManager.h @@ -10,11 +10,14 @@ class ScreenManager boolean addView(boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*), void *pData, const unsigned char UID); boolean removeView(const unsigned char UID); boolean displayView(const int UID = -1); - void invertDisplay(boolean inverted); - void dimDisplay(boolean dimmed); + void invertDisplayColor(const boolean inverted); + void orientDisplay(const Orientation orientation); + void dimDisplay(const boolean dimmed); + void clearDisplay(const boolean bufferOnly = false); unsigned char getError() const; - boolean isDisplayInverted() const; + boolean isDisplayColorInverted() const; + Orientation getDisplayOrientation() const; boolean isDisplayDimmed() const; ViewLink* getCurrentView() const; @@ -33,7 +36,7 @@ class ScreenManager Adafruit_SSD1306 &_displayRef; ViewLinkedList _viewLinkedList; unsigned char _error; - boolean _displayInverted; + boolean _displayColorInverted; boolean _displayDimmed; ViewLink* _currentView; }; diff --git a/src/app/app.ino b/src/app/app.ino index e5bcb98..b119c4c 100644 --- a/src/app/app.ino +++ b/src/app/app.ino @@ -2,30 +2,28 @@ #include "PinMapping.h" #include "SAB.h" #include "views.h" -#define DEBUG SAB sab; +unsigned char *memoryEater = NULL; -int i = 42; +unsigned long currentMs = 0; +DateTimePacket dtp = {sab.getRtcManager().getDateTime()}; void setup() { // put your setup code here, to run once: - Serial.println("Starting"); - sab.getScreenManager().addView(&(view_1), &i,1); - sab.getScreenManager().addView(&(view_2), NULL, 2); - /*sab.getScreenManager().addView(&(view_1), NULL, 6); - sab.getScreenManager().addView(&(view_1), NULL, 7); - sab.getScreenManager().iterateThroughList();*/ - Serial.println("fin"); + Serial.println("Starting setup"); + + sab.getScreenManager().addView(&(view_1), &dtp, 1); + + Serial.println("End setup"); } void loop() { - sab.getScreenManager().iterateThroughList(); - sab.getScreenManager().displayView(2); - sab.getScreenManager().displayView(LAST_VIEW); - sab.getScreenManager().displayView(3); - sab.getScreenManager().displayView(1); - sab.getScreenManager().displayView(LAST_VIEW); - Serial.print("Free memory : ");Serial.println(ESP.getFreeHeap()); - delay(3000); + if(millis() - currentMs > 1000) + { + currentMs = millis(); + dtp.dateTime = sab.getRtcManager().getDateTime(); + sab.getScreenManager().displayView(1); + memoryEater = (unsigned char *) malloc(sizeof(char)); + } } diff --git a/src/app/definition.h b/src/app/definition.h index 512d79c..ef9deb6 100644 --- a/src/app/definition.h +++ b/src/app/definition.h @@ -5,19 +5,19 @@ #include typedef enum { GPIO_0 = 0, - GPIO_1_TX = 1, - GPIO_2 = 2, - GPIO_3_RX = 3, - GPIO_4_SDA = 4, - GPIO_5_SCL = 5, - GPIO_10 = 10, - GPIO_12_MISO = 12, - GPIO_13_MOSI = 13, - GPIO_14_CLK = 14, - GPIO_15 = 15, - GPIO_16 = 16, - ADC = A0, - DEFAULT_PIN = -1} Pin; + GPIO_1_TX = 1, + GPIO_2 = 2, + GPIO_3_RX = 3, + GPIO_4_SDA = 4, + GPIO_5_SCL = 5, + GPIO_10 = 10, + GPIO_12_MISO = 12, + GPIO_13_MOSI = 13, + GPIO_14_CLK = 14, + GPIO_15 = 15, + GPIO_16 = 16, + ADC = A0, + DEFAULT_PIN = -1 } Pin; #define RTC_BEGIN_ERR B00000001 #define DISP_BEGIN_ERR B00000010 @@ -26,6 +26,7 @@ typedef enum { GPIO_0 = 0, #define NO_CURRENT_VIEW NULL #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 typedef struct viewLink{ diff --git a/src/app/views.cpp b/src/app/views.cpp index d9b3c2d..9a300b2 100644 --- a/src/app/views.cpp +++ b/src/app/views.cpp @@ -2,12 +2,15 @@ boolean view_1(Adafruit_SSD1306 &display, void *pData) { - int *i = (int *) pData; - Serial.print("Value : ");Serial.println(*i); + char time_str[300] = ""; + 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) { - Serial.println("Salut ma gueule"); } diff --git a/src/app/views.h b/src/app/views.h index 2b2c21c..5864902 100644 --- a/src/app/views.h +++ b/src/app/views.h @@ -1,7 +1,12 @@ #ifndef VIEWS_H #define VIEWS_H -#include +#include "SAB.h" + +typedef struct dateTimePacket +{ + DateTime dateTime; +} DateTimePacket; boolean view_1(Adafruit_SSD1306 &display, void *pData); boolean view_2(Adafruit_SSD1306 &display, void *pData);