From f086bfa6b3fb928b9553f38718fbee04ae4f78b6 Mon Sep 17 00:00:00 2001 From: Alexander Klein Date: Tue, 23 Nov 2021 18:51:52 +0100 Subject: [PATCH] ein bisschen doku --- .vscode/settings.json | 59 ++++++++++++++++++++++++++++++++- doc/classdiagramm.uxf | 57 +++---------------------------- doc/controller.txt | 17 ++++++++++ src/config.h | 3 +- src/driveModi/consolControl.cpp | 2 +- src/main.cpp | 2 ++ 6 files changed, 85 insertions(+), 55 deletions(-) create mode 100644 doc/controller.txt diff --git a/.vscode/settings.json b/.vscode/settings.json index 9a6845d..f363801 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,62 @@ "cSpell.ignoreWords": [ "ledc", "write" - ] + ], + + "todohighlight.isEnable": true, + "todohighlight.isCaseSensitive": true, + "todohighlight.keywords": [ + "DEBUG:", + "REVIEW:", + { + "text": "NOTE:", + "color": "#ff0000", + "backgroundColor": "yellow", + "overviewRulerColor": "grey" + }, + { + "text": "HACK:", + "color": "#000", + "isWholeLine": false, + }, + { + "text": "TODO:", + "color": "red", + "border": "1px solid red", + "borderRadius": "2px", //NOTE: using borderRadius along with `border` or you will see nothing change + "backgroundColor": "rgba(0,0,0,.2)", + //other styling properties goes here ... + } + ], + "todohighlight.keywordsPattern": "TODO:|FIXME:|\\(([^)]+)\\)", //highlight `TODO:`,`FIXME:` or content between parentheses + "todohighlight.defaultStyle": { + "color": "red", + "backgroundColor": "#ffab00", + "overviewRulerColor": "#ffab00", + "cursor": "pointer", + "border": "1px solid #eee", + "borderRadius": "2px", + "isWholeLine": true, + //other styling properties goes here ... + }, + "todohighlight.include": [ + "**/*.h", + "**/*.cpp", + "**/*.c", + "**/*.txt" + ], + "todohighlight.exclude": [ + "**/node_modules/**", + "**/bower_components/**", + "**/dist/**", + "**/build/**", + "**/.vscode/**", + "**/.github/**", + "**/_output/**", + "**/*.min.*", + "**/*.map", + "**/.next/**" + ], + "todohighlight.maxFilesForSearch": 5120, + "todohighlight.toggleURI": false } \ No newline at end of file diff --git a/doc/classdiagramm.uxf b/doc/classdiagramm.uxf index 023ccdf..aa34dcf 100644 --- a/doc/classdiagramm.uxf +++ b/doc/classdiagramm.uxf @@ -1,15 +1,4 @@ - - - 10 - - UMLClass - - 460 - 60 - 220 - 510 - - <<hardware>> +10UMLClass3500220510<<hardware>> MotorControl -- - name: String @@ -40,18 +29,7 @@ MotorControl + isAccelerationPositive(): bool + isAccelerationNegative(): bool - setRealPower(power: int8_t) -- increasePower(power: int8_t) - - - - UMLClass - - 80 - 480 - 220 - 330 - - <<hardware>> +- increasePower(power: int8_t)UMLClass80380220330<<hardware>> Speedometer -- - encoder: ESP32Encoder @@ -71,18 +49,7 @@ Speedometer + getSpeed(): double + getDirection(): uint8_t - addValToBuf(val: int16_t) -- getAverage(): int16_t - - - - UMLClass - - 70 - 60 - 270 - 370 - - MoveControl +- getAverage(): int16_tUMLClass700270370MoveControl -- - debug: DebugMqtt* - left_motor: MotorControl* @@ -105,18 +72,7 @@ Speedometer + setSpeed(speed: double) + setRotationspeed(speed: double) - calcWheelSpeed() -- regulateMotors() - - - - UMLClass - - 700 - 60 - 220 - 330 - - <<driveModi>> +- regulateMotors()UMLClass5800220330<<driveModi>> ManualControl -- - encoder: ESP32Encoder @@ -136,7 +92,4 @@ ManualControl + getSpeed(): double + getDirection(): uint8_t - addValToBuf(val: int16_t) -- getAverage(): int16_t - - - +- getAverage(): int16_t \ No newline at end of file diff --git a/doc/controller.txt b/doc/controller.txt new file mode 100644 index 0000000..33966b5 --- /dev/null +++ b/doc/controller.txt @@ -0,0 +1,17 @@ +Controller + +PS3-Button: Change Mode + +Mode: ManualControl + L3: Joystick Mode + Left Joystick: Drive + + R3: Shoulder Trigger Mode + L2: Spin left side + R2: Spin right side + +Mode: Autopilot + +Mode: CaptureRoute + +Mode: ConsolControl \ No newline at end of file diff --git a/src/config.h b/src/config.h index 60f9229..ba53854 100644 --- a/src/config.h +++ b/src/config.h @@ -1,5 +1,6 @@ // The front is where the boards are + //Pin config //Left #define M_DIR_11 27 @@ -91,7 +92,7 @@ #define WLAN_IP 0x3400a8c0 //192.168.0.67 #define WLAN_SUBNETMASK 0x00FFFFFF //255.255.255.0 #define WLAN_GATEWAY 0x0100a8c0 //192.168.0.1 -#define MQTT_SERVER "dz-pi.hw1.fb4.fh" +#define MQTT_SERVER 0xD84016AC // 172.22.64.216 #define MQTT_PORT 1883 #define MQTT_BUFFER_SITE 128 #define NTP_SERVER "2.de.pool.ntp.org" diff --git a/src/driveModi/consolControl.cpp b/src/driveModi/consolControl.cpp index 5cd64f8..bf0e149 100644 --- a/src/driveModi/consolControl.cpp +++ b/src/driveModi/consolControl.cpp @@ -40,5 +40,5 @@ void ConsolControl::run() { } void ConsolControl::printManual() { - Serial.println("r 12.0 13.0 4.0 // site p i d s r"); + Serial.println("r 12.0 13.0 4.0 1.0 1.0 // site p i d s r"); } \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 8015683..d1c5015 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,6 +16,8 @@ #include "route.h" #include "debugMqtt.h" +//TODO: Mal vernünftig Programmieren lernen. + void callbackControllerAction(); void callbackControllerConnect(); void controllerPrintBattery();