diff --git a/documentation/Robot.docx b/documentation/Robot.docx index 45c7b27..e3d84c2 100644 Binary files a/documentation/Robot.docx and b/documentation/Robot.docx differ diff --git a/documentation/SmartGardeningProjekt.mdj b/documentation/SmartGardeningProjekt.mdj index 557ecd6..ccbb515 100644 --- a/documentation/SmartGardeningProjekt.mdj +++ b/documentation/SmartGardeningProjekt.mdj @@ -61,9 +61,9 @@ "$ref": "AAAAAAGHA6OtsNB4UQo=" }, "font": "Arial;13;0", - "left": 40.72998046875, + "left": 38.55908203125, "top": 13, - "width": 58.07177734375, + "width": 52.9873046875, "height": 13, "text": "Messfahrt" }, @@ -76,7 +76,7 @@ "font": "Arial;13;1", "left": 21, "top": 13, - "width": 14.72998046875, + "width": 12.55908203125, "height": 13, "text": "sd" } @@ -2196,9 +2196,9 @@ "$ref": "AAAAAAGHMigXU5G+9zU=" }, "font": "Arial;13;0", - "left": 48.72998046875, + "left": 46.55908203125, "top": 13, - "width": 108.65625, + "width": 97.73828125, "height": 13, "text": "Raspy-ev3-Thread" }, @@ -2211,7 +2211,7 @@ "font": "Arial;13;1", "left": 29, "top": 13, - "width": 14.72998046875, + "width": 12.55908203125, "height": 13, "text": "sd" } @@ -10237,7 +10237,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -392, + "left": -360, "top": -128, "height": 13 }, @@ -10248,7 +10248,7 @@ "$ref": "AAAAAAGH3FFPcavXEQo=" }, "font": "Arial;13;1", - "left": 357, + "left": 373, "top": 407, "width": 182, "height": 13, @@ -10262,7 +10262,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -392, + "left": -360, "top": -128, "width": 122.103515625, "height": 13, @@ -10276,14 +10276,14 @@ }, "visible": false, "font": "Arial;13;0", - "left": -392, + "left": -360, "top": -128, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 352, + "left": 368, "top": 400, "width": 192, "height": 25, @@ -10310,7 +10310,7 @@ "$ref": "AAAAAAGH3FFPcavUI4g=" }, "font": "Arial;13;0", - "left": 352, + "left": 368, "top": 425, "width": 192, "height": 10 @@ -10325,7 +10325,7 @@ "$ref": "AAAAAAGH3FFPcavUI4g=" }, "font": "Arial;13;0", - "left": 352, + "left": 368, "top": 435, "width": 192, "height": 10 @@ -10341,7 +10341,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -196, + "left": -180, "top": -64, "width": 10, "height": 10 @@ -10357,7 +10357,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -196, + "left": -180, "top": -64, "width": 10, "height": 10 @@ -10365,7 +10365,7 @@ ], "font": "Arial;13;0", "containerChangeable": true, - "left": 352, + "left": 368, "top": 400, "width": 192, "height": 264, @@ -11766,7 +11766,8 @@ "_parent": { "$ref": "AAAAAAGH3EMsNkqHBBI=" }, - "name": "userdata" + "name": "userdata", + "type": "" }, { "_type": "UMLParameter", @@ -11774,7 +11775,8 @@ "_parent": { "$ref": "AAAAAAGH3EMsNkqHBBI=" }, - "name": "message" + "name": "message", + "type": "" } ] }, @@ -11801,7 +11803,8 @@ "_parent": { "$ref": "AAAAAAGJAjEaTtNHMvw=" }, - "name": "userdata" + "name": "userdata", + "type": "" }, { "_type": "UMLParameter", @@ -11809,7 +11812,8 @@ "_parent": { "$ref": "AAAAAAGJAjEaTtNHMvw=" }, - "name": "message" + "name": "message", + "type": "" } ] }, @@ -11836,7 +11840,8 @@ "_parent": { "$ref": "AAAAAAGH3EMxj0qorZA=" }, - "name": "userdata" + "name": "userdata", + "type": "" }, { "_type": "UMLParameter", @@ -11844,7 +11849,8 @@ "_parent": { "$ref": "AAAAAAGH3EMxj0qorZA=" }, - "name": "message" + "name": "message", + "type": "" } ] }, @@ -11871,7 +11877,8 @@ "_parent": { "$ref": "AAAAAAGH3EM1BkrJ200=" }, - "name": "userdata" + "name": "userdata", + "type": "" }, { "_type": "UMLParameter", @@ -11879,7 +11886,8 @@ "_parent": { "$ref": "AAAAAAGH3EM1BkrJ200=" }, - "name": "message" + "name": "message", + "type": "" } ] }, @@ -12002,7 +12010,7 @@ "_parent": { "$ref": "AAAAAAGH3D2ih0dk35I=" }, - "name": "Roboter", + "name": "EV3-Roboter", "operations": [ { "_type": "UMLOperation", @@ -12306,7 +12314,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -1521, + "left": -1409, "top": -543, "height": 13 }, @@ -12317,11 +12325,11 @@ "$ref": "AAAAAAGH4UEkiyY0BiY=" }, "font": "Arial;13;1", - "left": 181, + "left": 237, "top": 63, - "width": 348.638671875, + "width": 295, "height": 13, - "text": "mainProg" + "text": "RaspberryPi" }, { "_type": "LabelView", @@ -12331,7 +12339,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -1521, + "left": -1409, "top": -543, "width": 122.103515625, "height": 13, @@ -12345,16 +12353,16 @@ }, "visible": false, "font": "Arial;13;0", - "left": -1521, + "left": -1409, "top": -543, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 176, + "left": 232, "top": 56, - "width": 358.638671875, + "width": 305, "height": 25, "stereotypeLabel": { "$ref": "AAAAAAGH4UEkiyY1rO0=" @@ -12379,9 +12387,9 @@ "$ref": "AAAAAAGH3D4F30e9Sco=" }, "font": "Arial;13;0", - "left": 176, + "left": 232, "top": 81, - "width": 358.638671875, + "width": 305, "height": 10 }, { @@ -12394,6 +12402,23 @@ "$ref": "AAAAAAGH3D4F30e9Sco=" }, "subViews": [ + { + "_type": "UMLOperationView", + "_id": "AAAAAAGH4UPAcCwkWuI=", + "_parent": { + "$ref": "AAAAAAGH4UEkiyY61xw=" + }, + "model": { + "$ref": "AAAAAAGH4UPAXywhJ1c=" + }, + "font": "Arial;13;0", + "left": 237, + "top": 96, + "width": 295, + "height": 13, + "text": "+main()", + "horizontalAlignment": 0 + }, { "_type": "UMLOperationView", "_id": "AAAAAAGH4UEkiyY7ZTQ=", @@ -12404,13 +12429,85 @@ "$ref": "AAAAAAGH3EEdiklS30M=" }, "font": "Arial;13;0", - "left": 181, - "top": 96, - "width": 348.638671875, + "left": 237, + "top": 111, + "width": 295, "height": 13, "text": "+on_connect(client: mqtt.Client, userdata, flags, rc)", "horizontalAlignment": 0 }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGH4UEkiyY+seY=", + "_parent": { + "$ref": "AAAAAAGH4UEkiyY61xw=" + }, + "model": { + "$ref": "AAAAAAGH3EMsNkqHBBI=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 293, + "top": 111, + "width": 348.638671875, + "height": 13, + "text": "+drive_plant(client: mqtt.Client, userdata, message)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGJtaEp8wgwGw0=", + "_parent": { + "$ref": "AAAAAAGH4UEkiyY61xw=" + }, + "model": { + "$ref": "AAAAAAGJAjEaTtNHMvw=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 293, + "top": 126, + "width": 350.81591796875, + "height": 13, + "text": "+drive_plant_all(client: mqtt.Client, userdata, message)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGH4UEkiyY/ce4=", + "_parent": { + "$ref": "AAAAAAGH4UEkiyY61xw=" + }, + "model": { + "$ref": "AAAAAAGH3EMxj0qorZA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 293, + "top": 111, + "width": 348.638671875, + "height": 13, + "text": "+get_position(client: mqtt.Client, userdata, message)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGH4UEkiyZALIQ=", + "_parent": { + "$ref": "AAAAAAGH4UEkiyY61xw=" + }, + "model": { + "$ref": "AAAAAAGH3EM1BkrJ200=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 293, + "top": 111, + "width": 348.638671875, + "height": 13, + "text": "+get_batteryStatus(client: mqtt.Client, userdata, message)", + "horizontalAlignment": 0 + }, { "_type": "UMLOperationView", "_id": "AAAAAAGH4UEkiyY8ftw=", @@ -12422,7 +12519,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 181, + "left": 293, "top": 111, "width": 348.638671875, "height": 13, @@ -12440,7 +12537,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 181, + "left": 293, "top": 111, "width": 348.638671875, "height": 13, @@ -12449,80 +12546,27 @@ }, { "_type": "UMLOperationView", - "_id": "AAAAAAGH4UEkiyY+seY=", + "_id": "AAAAAAGJtaEp+Qgz1WI=", "_parent": { "$ref": "AAAAAAGH4UEkiyY61xw=" }, "model": { - "$ref": "AAAAAAGH3EMsNkqHBBI=" + "$ref": "AAAAAAGJAjP+sRpxSo8=" }, "visible": false, "font": "Arial;13;0", - "left": 181, - "top": 111, - "width": 348.638671875, + "left": 293, + "top": 126, + "width": 350.81591796875, "height": 13, - "text": "+drive_plant(clients: mqtt.Client, userdata, message)", - "horizontalAlignment": 0 - }, - { - "_type": "UMLOperationView", - "_id": "AAAAAAGH4UEkiyY/ce4=", - "_parent": { - "$ref": "AAAAAAGH4UEkiyY61xw=" - }, - "model": { - "$ref": "AAAAAAGH3EMxj0qorZA=" - }, - "visible": false, - "font": "Arial;13;0", - "left": 181, - "top": 111, - "width": 348.638671875, - "height": 13, - "text": "+get_position(clients: mqtt.Client, userdata, message)", - "horizontalAlignment": 0 - }, - { - "_type": "UMLOperationView", - "_id": "AAAAAAGH4UEkiyZALIQ=", - "_parent": { - "$ref": "AAAAAAGH4UEkiyY61xw=" - }, - "model": { - "$ref": "AAAAAAGH3EM1BkrJ200=" - }, - "visible": false, - "font": "Arial;13;0", - "left": 181, - "top": 111, - "width": 348.638671875, - "height": 13, - "text": "+get_batteryStatus(clients: mqtt.Clients, userdata, message)", - "horizontalAlignment": 0 - }, - { - "_type": "UMLOperationView", - "_id": "AAAAAAGH4UPAcCwkWuI=", - "_parent": { - "$ref": "AAAAAAGH4UEkiyY61xw=" - }, - "model": { - "$ref": "AAAAAAGH4UPAXywhJ1c=" - }, - "font": "Arial;13;0", - "left": 181, - "top": 111, - "width": 348.638671875, - "height": 13, - "text": "+main()", + "text": "+drive_plant_all_thread(plantIDs, actionID, client: mqtt.client)", "horizontalAlignment": 0 } ], "font": "Arial;13;0", - "left": 176, + "left": 232, "top": 91, - "width": 358.638671875, + "width": 305, "height": 38 }, { @@ -12536,7 +12580,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -840, + "left": -784, "top": -128, "width": 10, "height": 10 @@ -12552,7 +12596,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -840, + "left": -784, "top": -128, "width": 10, "height": 10 @@ -12560,10 +12604,10 @@ ], "font": "Arial;13;0", "containerChangeable": true, - "left": 176, + "left": 232, "top": 56, - "width": 358.638671875, - "height": 264, + "width": 305, + "height": 169, "nameCompartment": { "$ref": "AAAAAAGH4UEkiyY0BiY=" }, @@ -12608,7 +12652,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 528, + "left": 64, "top": -287, "height": 13 }, @@ -12619,7 +12663,7 @@ "$ref": "AAAAAAGH4UFHSSjv7mU=" }, "font": "Arial;13;1", - "left": 1181, + "left": 949, "top": 63, "width": 206, "height": 13, @@ -12633,7 +12677,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 528, + "left": 64, "top": -287, "width": 122.103515625, "height": 13, @@ -12647,14 +12691,14 @@ }, "visible": false, "font": "Arial;13;0", - "left": 528, + "left": 64, "top": -287, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 1176, + "left": 944, "top": 56, "width": 216, "height": 25, @@ -12681,7 +12725,7 @@ "$ref": "AAAAAAGH3FRA/NhynDA=" }, "font": "Arial;13;0", - "left": 1176, + "left": 944, "top": 81, "width": 216, "height": 10 @@ -12696,57 +12740,6 @@ "$ref": "AAAAAAGH3FRA/NhynDA=" }, "subViews": [ - { - "_type": "UMLOperationView", - "_id": "AAAAAAGH4UFHSSj3p18=", - "_parent": { - "$ref": "AAAAAAGH4UFHSSj1vbw=" - }, - "model": { - "$ref": "AAAAAAGH3FSgmd+KRe4=" - }, - "font": "Arial;13;0", - "left": 1181, - "top": 96, - "width": 206, - "height": 13, - "text": "+readSesnors(sensorData)", - "horizontalAlignment": 0 - }, - { - "_type": "UMLOperationView", - "_id": "AAAAAAGH4UFHSSj4LP4=", - "_parent": { - "$ref": "AAAAAAGH4UFHSSj1vbw=" - }, - "model": { - "$ref": "AAAAAAGH3FUGTeL1xTE=" - }, - "font": "Arial;13;0", - "left": 1181, - "top": 111, - "width": 206, - "height": 13, - "text": "+takePicture()", - "horizontalAlignment": 0 - }, - { - "_type": "UMLOperationView", - "_id": "AAAAAAGH4UFHSSj5kJA=", - "_parent": { - "$ref": "AAAAAAGH4UFHSSj1vbw=" - }, - "model": { - "$ref": "AAAAAAGH3FWOReapIIQ=" - }, - "font": "Arial;13;0", - "left": 1181, - "top": 126, - "width": 206, - "height": 13, - "text": "+readPosition(): Position", - "horizontalAlignment": 0 - }, { "_type": "UMLOperationView", "_id": "AAAAAAGH+qAzW25pf0M=", @@ -12757,8 +12750,8 @@ "$ref": "AAAAAAGH+qAzBm5mP44=" }, "font": "Arial;13;0", - "left": 1181, - "top": 141, + "left": 949, + "top": 96, "width": 206, "height": 13, "text": "+readDHT22(): float; float", @@ -12774,8 +12767,8 @@ "$ref": "AAAAAAGH+qC2A2+bFng=" }, "font": "Arial;13;0", - "left": 1181, - "top": 156, + "left": 949, + "top": 111, "width": 206, "height": 13, "text": "+readTSL2561(): int", @@ -12791,16 +12784,67 @@ "$ref": "AAAAAAGIca3ek0K+EG8=" }, "font": "Arial;13;0", - "left": 1181, - "top": 171, + "left": 949, + "top": 126, "width": 206, "height": 13, "text": "+readMCP3008(): float", "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGH4UFHSSj3p18=", + "_parent": { + "$ref": "AAAAAAGH4UFHSSj1vbw=" + }, + "model": { + "$ref": "AAAAAAGH3FSgmd+KRe4=" + }, + "font": "Arial;13;0", + "left": 949, + "top": 141, + "width": 206, + "height": 13, + "text": "+readSesnors(sensorData)", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGH4UFHSSj4LP4=", + "_parent": { + "$ref": "AAAAAAGH4UFHSSj1vbw=" + }, + "model": { + "$ref": "AAAAAAGH3FUGTeL1xTE=" + }, + "font": "Arial;13;0", + "left": 949, + "top": 156, + "width": 206, + "height": 13, + "text": "+takePicture()", + "horizontalAlignment": 0 + }, + { + "_type": "UMLOperationView", + "_id": "AAAAAAGH4UFHSSj5kJA=", + "_parent": { + "$ref": "AAAAAAGH4UFHSSj1vbw=" + }, + "model": { + "$ref": "AAAAAAGH3FWOReapIIQ=" + }, + "font": "Arial;13;0", + "left": 949, + "top": 171, + "width": 206, + "height": 13, + "text": "+readPosition(): Position", + "horizontalAlignment": 0 } ], "font": "Arial;13;0", - "left": 1176, + "left": 944, "top": 91, "width": 216, "height": 98 @@ -12816,7 +12860,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -16, + "left": -248, "width": 10, "height": 10 }, @@ -12831,17 +12875,17 @@ }, "visible": false, "font": "Arial;13;0", - "left": -16, + "left": -248, "width": 10, "height": 10 } ], "font": "Arial;13;0", "containerChangeable": true, - "left": 1176, + "left": 944, "top": 56, "width": 216, - "height": 264, + "height": 169, "nameCompartment": { "$ref": "AAAAAAGH4UFHSSjv7mU=" }, @@ -12886,8 +12930,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -1074, - "top": -87, + "left": -1138, + "top": -487, "height": 13 }, { @@ -12897,11 +12941,11 @@ "$ref": "AAAAAAGH4UFt8isPshg=" }, "font": "Arial;13;1", - "left": 485, - "top": 447, + "left": 453, + "top": 247, "width": 191.8388671875, "height": 13, - "text": "Roboter" + "text": "EV3-Roboter" }, { "_type": "LabelView", @@ -12911,8 +12955,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -1074, - "top": -87, + "left": -1138, + "top": -487, "width": 122.103515625, "height": 13, "text": "(from Collaboration1)" @@ -12925,15 +12969,15 @@ }, "visible": false, "font": "Arial;13;0", - "left": -1074, - "top": -87, + "left": -1138, + "top": -487, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 480, - "top": 440, + "left": 448, + "top": 240, "width": 201.8388671875, "height": 25, "stereotypeLabel": { @@ -12959,8 +13003,8 @@ "$ref": "AAAAAAGH3D4gT0fn5xE=" }, "font": "Arial;13;0", - "left": 480, - "top": 465, + "left": 448, + "top": 265, "width": 201.8388671875, "height": 10 }, @@ -12984,8 +13028,8 @@ "$ref": "AAAAAAGH3D5JLkgRdhU=" }, "font": "Arial;13;0", - "left": 485, - "top": 480, + "left": 453, + "top": 280, "width": 191.8388671875, "height": 13, "text": "+plant_1.py()", @@ -13001,8 +13045,8 @@ "$ref": "AAAAAAGH3D7drkgY+xE=" }, "font": "Arial;13;0", - "left": 485, - "top": 495, + "left": 453, + "top": 295, "width": 191.8388671875, "height": 13, "text": "+plant_2.py()", @@ -13018,8 +13062,8 @@ "$ref": "AAAAAAGH3D757kgfr+s=" }, "font": "Arial;13;0", - "left": 485, - "top": 510, + "left": 453, + "top": 310, "width": 191.8388671875, "height": 13, "text": "+plant_3.py()", @@ -13035,8 +13079,8 @@ "$ref": "AAAAAAGH3D79XUglW/0=" }, "font": "Arial;13;0", - "left": 485, - "top": 525, + "left": 453, + "top": 325, "width": 191.8388671875, "height": 13, "text": "+plant_4.py()", @@ -13052,8 +13096,8 @@ "$ref": "AAAAAAGH3D8Fv0gr7us=" }, "font": "Arial;13;0", - "left": 485, - "top": 540, + "left": 453, + "top": 340, "width": 191.8388671875, "height": 13, "text": "+plant_5.py()", @@ -13069,8 +13113,8 @@ "$ref": "AAAAAAGH3D8JfkgxRkw=" }, "font": "Arial;13;0", - "left": 485, - "top": 555, + "left": 453, + "top": 355, "width": 191.8388671875, "height": 13, "text": "+plant_6.py()", @@ -13086,8 +13130,8 @@ "$ref": "AAAAAAGH3D8NZUg3DpE=" }, "font": "Arial;13;0", - "left": 485, - "top": 570, + "left": 453, + "top": 370, "width": 191.8388671875, "height": 13, "text": "+drive_back.py(plantNumber: int)", @@ -13103,8 +13147,8 @@ "$ref": "AAAAAAGIcawCCjubWmE=" }, "font": "Arial;13;0", - "left": 485, - "top": 585, + "left": 453, + "top": 385, "width": 191.8388671875, "height": 13, "text": "+drive_arm.py(plantNumber)", @@ -13120,8 +13164,8 @@ "$ref": "AAAAAAGIcaycHD2RFTc=" }, "font": "Arial;13;0", - "left": 485, - "top": 600, + "left": 453, + "top": 400, "width": 191.8388671875, "height": 13, "text": "+drive_back_straight.py()", @@ -13137,8 +13181,8 @@ "$ref": "AAAAAAGIcaziEz6gmiQ=" }, "font": "Arial;13;0", - "left": 485, - "top": 615, + "left": 453, + "top": 415, "width": 191.8388671875, "height": 13, "text": "+drive_plant.py(plantNumber)", @@ -13146,8 +13190,8 @@ } ], "font": "Arial;13;0", - "left": 480, - "top": 475, + "left": 448, + "top": 275, "width": 201.8388671875, "height": 158 }, @@ -13162,8 +13206,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": -619, - "top": -96, + "left": -651, + "top": -296, "width": 10, "height": 10 }, @@ -13178,18 +13222,18 @@ }, "visible": false, "font": "Arial;13;0", - "left": -619, - "top": -96, + "left": -651, + "top": -296, "width": 10, "height": 10 } ], "font": "Arial;13;0", "containerChangeable": true, - "left": 480, - "top": 440, + "left": 448, + "top": 240, "width": 201.8388671875, - "height": 264, + "height": 201, "nameCompartment": { "$ref": "AAAAAAGH4UFt8isPshg=" }, @@ -13234,7 +13278,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -144, + "left": -336, "top": -32, "height": 13 }, @@ -13245,7 +13289,7 @@ "$ref": "AAAAAAGH4UHyHitGPjs=" }, "font": "Arial;13;1", - "left": 669, + "left": 573, "top": 63, "width": 348.638671875, "height": 13, @@ -13259,7 +13303,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -144, + "left": -336, "top": -32, "width": 80.9072265625, "height": 13, @@ -13273,14 +13317,14 @@ }, "visible": false, "font": "Arial;13;0", - "left": -144, + "left": -336, "top": -32, "height": 13, "horizontalAlignment": 1 } ], "font": "Arial;13;0", - "left": 664, + "left": 568, "top": 56, "width": 358.638671875, "height": 25, @@ -13307,7 +13351,7 @@ "$ref": "AAAAAAGH4UHyHStDgNY=" }, "font": "Arial;13;0", - "left": 664, + "left": 568, "top": 81, "width": 358.638671875, "height": 10 @@ -13332,7 +13376,7 @@ "$ref": "AAAAAAGH4UKiQyvayxg=" }, "font": "Arial;13;0", - "left": 669, + "left": 573, "top": 96, "width": 348.638671875, "height": 13, @@ -13349,7 +13393,7 @@ "$ref": "AAAAAAGH4ULP+ivopF4=" }, "font": "Arial;13;0", - "left": 669, + "left": 573, "top": 111, "width": 348.638671875, "height": 13, @@ -13366,7 +13410,7 @@ "$ref": "AAAAAAGIcak45DEvXBY=" }, "font": "Arial;13;0", - "left": 669, + "left": 573, "top": 126, "width": 348.638671875, "height": 13, @@ -13383,7 +13427,7 @@ "$ref": "AAAAAAGH4UL+iiv2rNQ=" }, "font": "Arial;13;0", - "left": 669, + "left": 573, "top": 141, "width": 348.638671875, "height": 13, @@ -13400,7 +13444,7 @@ "$ref": "AAAAAAGIcaoT1zPHj/M=" }, "font": "Arial;13;0", - "left": 669, + "left": 573, "top": 156, "width": 348.638671875, "height": 13, @@ -13417,7 +13461,7 @@ "$ref": "AAAAAAGH4UNkjywE/3M=" }, "font": "Arial;13;0", - "left": 669, + "left": 573, "top": 171, "width": 348.638671875, "height": 13, @@ -13434,7 +13478,7 @@ "$ref": "AAAAAAGH4UN7RywRjek=" }, "font": "Arial;13;0", - "left": 669, + "left": 573, "top": 186, "width": 348.638671875, "height": 13, @@ -13451,7 +13495,7 @@ "$ref": "AAAAAAGIcash3zZSHnI=" }, "font": "Arial;13;0", - "left": 669, + "left": 573, "top": 201, "width": 348.638671875, "height": 13, @@ -13460,7 +13504,7 @@ } ], "font": "Arial;13;0", - "left": 664, + "left": 568, "top": 91, "width": 358.638671875, "height": 128 @@ -13476,7 +13520,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -72, + "left": -168, "top": -16, "width": 10, "height": 10 @@ -13492,7 +13536,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": -72, + "left": -168, "top": -16, "width": 10, "height": 10 @@ -13500,10 +13544,10 @@ ], "font": "Arial;13;0", "containerChangeable": true, - "left": 664, + "left": 568, "top": 56, "width": 358.638671875, - "height": 264, + "height": 169, "nameCompartment": { "$ref": "AAAAAAGH4UHyHitGPjs=" }, @@ -13541,7 +13585,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 599, + "left": 552, "top": 166, "height": 13, "alpha": 1.5707963267948966, @@ -13562,7 +13606,7 @@ }, "visible": null, "font": "Arial;13;0", - "left": 599, + "left": 552, "top": 151, "height": 13, "alpha": 1.5707963267948966, @@ -13583,7 +13627,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 599, + "left": 552, "top": 196, "height": 13, "alpha": -1.5707963267948966, @@ -13604,7 +13648,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 559, + "left": 561, "top": 166, "height": 13, "alpha": 0.5235987755982988, @@ -13625,7 +13669,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 562, + "left": 564, "top": 152, "height": 13, "alpha": 0.7853981633974483, @@ -13646,7 +13690,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 555, + "left": 557, "top": 193, "height": 13, "alpha": -0.5235987755982988, @@ -13667,7 +13711,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 638, + "left": 542, "top": 166, "height": 13, "alpha": -0.5235987755982988, @@ -13687,7 +13731,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 635, + "left": 539, "top": 152, "height": 13, "alpha": -0.7853981633974483, @@ -13707,7 +13751,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 642, + "left": 546, "top": 193, "height": 13, "alpha": 0.5235987755982988, @@ -13752,7 +13796,7 @@ "tail": { "$ref": "AAAAAAGH4UEkiyYzZg4=" }, - "points": "534:187;664:187", + "points": "536:187;568:187", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAGH4UQbuSwvHpg=" @@ -13810,7 +13854,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1099, + "left": 935, "top": 166, "height": 13, "alpha": 1.5707963267948966, @@ -13831,7 +13875,7 @@ }, "visible": null, "font": "Arial;13;0", - "left": 1099, + "left": 935, "top": 151, "height": 13, "alpha": 1.5707963267948966, @@ -13852,7 +13896,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1099, + "left": 935, "top": 196, "height": 13, "alpha": -1.5707963267948966, @@ -13873,7 +13917,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1047, + "left": 951, "top": 166, "height": 13, "alpha": 0.5235987755982988, @@ -13894,7 +13938,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1050, + "left": 954, "top": 152, "height": 13, "alpha": 0.7853981633974483, @@ -13915,7 +13959,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1043, + "left": 947, "top": 193, "height": 13, "alpha": -0.5235987755982988, @@ -13936,7 +13980,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1150, + "left": 918, "top": 166, "height": 13, "alpha": -0.5235987755982988, @@ -13956,7 +14000,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1147, + "left": 915, "top": 152, "height": 13, "alpha": -0.7853981633974483, @@ -13976,7 +14020,7 @@ }, "visible": false, "font": "Arial;13;0", - "left": 1154, + "left": 922, "top": 193, "height": 13, "alpha": 0.5235987755982988, @@ -14021,7 +14065,7 @@ "tail": { "$ref": "AAAAAAGH4UHyHitFzP8=" }, - "points": "1022:187;1176:187", + "points": "926:187;944:187", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAGH4UQrASzhzR0=" @@ -14080,7 +14124,7 @@ "visible": false, "font": "Arial;13;0", "left": 353, - "top": 555, + "top": 323, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -14101,7 +14145,7 @@ "visible": null, "font": "Arial;13;0", "left": 353, - "top": 540, + "top": 308, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -14122,7 +14166,7 @@ "visible": false, "font": "Arial;13;0", "left": 353, - "top": 585, + "top": 353, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -14143,7 +14187,7 @@ "visible": false, "font": "Arial;13;0", "left": 368, - "top": 338, + "top": 243, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -14164,7 +14208,7 @@ "visible": false, "font": "Arial;13;0", "left": 381, - "top": 341, + "top": 246, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -14185,7 +14229,7 @@ "visible": false, "font": "Arial;13;0", "left": 340, - "top": 334, + "top": 239, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -14205,8 +14249,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 454, - "top": 555, + "left": 422, + "top": 323, "height": 13, "alpha": -0.5235987755982988, "distance": 30, @@ -14225,8 +14269,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 451, - "top": 541, + "left": 419, + "top": 309, "height": 13, "alpha": -0.7853981633974483, "distance": 40, @@ -14245,8 +14289,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 458, - "top": 582, + "left": 426, + "top": 350, "height": 13, "alpha": 0.5235987755982988, "distance": 25, @@ -14290,7 +14334,7 @@ "tail": { "$ref": "AAAAAAGH4UEkiyYzZg4=" }, - "points": "353:319;353:576;480:576", + "points": "353:224;353:344;448:344", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAGH4UQ+Gi7YRhg=" @@ -14349,7 +14393,7 @@ "visible": false, "font": "Arial;13;0", "left": 749, - "top": 580, + "top": 353, "height": 13, "alpha": 1.5707963267948966, "distance": 15, @@ -14370,7 +14414,7 @@ "visible": null, "font": "Arial;13;0", "left": 749, - "top": 595, + "top": 368, "height": 13, "alpha": 1.5707963267948966, "distance": 30, @@ -14391,7 +14435,7 @@ "visible": false, "font": "Arial;13;0", "left": 750, - "top": 550, + "top": 323, "height": 13, "alpha": -1.5707963267948966, "distance": 15, @@ -14412,7 +14456,7 @@ "visible": false, "font": "Arial;13;0", "left": 765, - "top": 338, + "top": 243, "height": 13, "alpha": 0.5235987755982988, "distance": 30, @@ -14433,7 +14477,7 @@ "visible": false, "font": "Arial;13;0", "left": 778, - "top": 341, + "top": 246, "height": 13, "alpha": 0.7853981633974483, "distance": 40, @@ -14454,7 +14498,7 @@ "visible": false, "font": "Arial;13;0", "left": 737, - "top": 334, + "top": 239, "height": 13, "alpha": -0.5235987755982988, "distance": 25, @@ -14474,8 +14518,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 706, - "top": 579, + "left": 674, + "top": 352, "height": 13, "alpha": -0.5235987755982988, "distance": 30, @@ -14494,8 +14538,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 709, - "top": 593, + "left": 677, + "top": 366, "height": 13, "alpha": -0.7853981633974483, "distance": 40, @@ -14514,8 +14558,8 @@ }, "visible": false, "font": "Arial;13;0", - "left": 702, - "top": 552, + "left": 670, + "top": 325, "height": 13, "alpha": 0.5235987755982988, "distance": 25, @@ -14559,7 +14603,7 @@ "tail": { "$ref": "AAAAAAGH4UHyHitFzP8=" }, - "points": "750:319;750:571;681:571", + "points": "750:224;750:344;649:344", "showVisibility": true, "nameLabel": { "$ref": "AAAAAAGH4UT84TJLLpY=" diff --git a/software/roboter/raspy/functions.py b/software/roboter/raspy/functions.py index 267abbb..5e967d9 100644 --- a/software/roboter/raspy/functions.py +++ b/software/roboter/raspy/functions.py @@ -50,7 +50,7 @@ def drive_plant_thread(plantID, actionID, client: mqtt.Client): Meassure and publish data via MQTT Drive home to starting point - ***If color codes are working properly this function is not needed anymore*** + ***Function is only neccessary for driving without color codes*** Args: plantID (_type_): plant to measure @@ -116,7 +116,7 @@ def drive_plant_all_thread(plantIDs: list, actionID, client: mqtt.Client): client (mqtt.Client): current MQTT client """ - allPlantData = { + allPlantData = { # Sensordata for all plants "SensorData": [], "ActionID": "" } @@ -168,11 +168,12 @@ def drive_plant_all_thread(plantIDs: list, actionID, client: mqtt.Client): else: errorMessage = "Motor or Sensor unplugged" - logging.info(f"{errorMessage}, Drive Plant aborted, Robot at starting position") + logging.info(f"{errorMessage}, Drive Plant aborted, Robot at plant {plant}") client.publish(Topics["ROBOT_DATA_ERROR"], f"{errorMessage}, Drive Plant aborted, Robot at plant {plant}", qos=1) client.publish(Topics["ROBOT_DATA_ROBOTREADY"], "True", qos=1) return + # End of drive and measure operation logging.info("All Plants measured, sending data") client.publish(Topics["ROBOT_DATA_ALL"], json.dumps(allPlantData, indent=4), qos=1) @@ -206,7 +207,7 @@ def drive_plant(client: mqtt.Client, userdata, message: mqtt.MQTTMessage): Function to drive to plant according to request Starting Drive in Thread to not block main programm - ***If color codes are working properly this function is not needed anymore*** + ***Function is only neccessary for driving without color codes*** Args: client (mqtt.Client): current mqtt client diff --git a/software/roboter/raspy/raspy_sensors.py b/software/roboter/raspy/raspy_sensors.py index 8047a5b..17d7ab7 100644 --- a/software/roboter/raspy/raspy_sensors.py +++ b/software/roboter/raspy/raspy_sensors.py @@ -42,7 +42,7 @@ def readDHT22(): def readTSL2561(): """ - Reads TSL2561 brightness in Lux and returns integer value + Reads TSL2561 brightness via I2C in Lux and returns integer value Raises: Exception: If TSL2561 not connected properly @@ -67,7 +67,7 @@ def readTSL2561(): def readMCP3008(): """ - Reads YL-69 via MCP3008 ADC soil moisture in percent and returns float value + Reads YL-69 via MCP3008 ADC and SPI soil moisture in percent and returns float value Raises: Exception: If YL-69 not connected properly @@ -133,7 +133,7 @@ def readSensors(sensorData): sensorData["SoilMoisture"] = 0 # No value returend if error occurs -> setting safe value errorMessage = errorMessage + str(e) + "\n" # Appending received error message to later forward all occured errors - # raise combined error message + # raise combined error message, successfull values still available if errorMessage != "": raise Exception(errorMessage)