something and stuff

This commit is contained in:
2021-05-20 21:16:59 +02:00
parent 360a89b25c
commit 3b9b2f19f2
4 changed files with 44 additions and 18 deletions
+42 -8
View File
@@ -6,7 +6,7 @@
<coordinates>
<x>120</x>
<y>670</y>
<w>210</w>
<w>220</w>
<h>510</h>
</coordinates>
<panel_attributes>&lt;&lt;hardware&gt;&gt;
@@ -46,9 +46,9 @@ MotorControl
<element>
<id>UMLClass</id>
<coordinates>
<x>380</x>
<x>360</x>
<y>670</y>
<w>210</w>
<w>220</w>
<h>330</h>
</coordinates>
<panel_attributes>&lt;&lt;hardware&gt;&gt;
@@ -77,13 +77,47 @@ Speedometer
<element>
<id>UMLClass</id>
<coordinates>
<x>900</x>
<y>660</y>
<w>210</w>
<x>120</x>
<y>270</y>
<w>270</w>
<h>370</h>
</coordinates>
<panel_attributes>MoveControl
--
- debug: DebugMqtt*
- left_motor: MotorControl*
- right_motor: MotorControl*
- left_speedometer: Speedometer*
- right_speedometer: Speedometer*
- driving_status: DrivingStatus = stop
- x_speed: double = 0
- rotation_speed: double = 0
- wheelspeed_left_target: double = 0
- wheelspeed_right_target: double = 0
--
+ MoveControl()
+ init(left_motor: MotorControl*,
   right_motor: MotorControl*,
   left_speedometer: Speedometer*,
   right_speedometer: Speedometer*)
+ runMoveControl()
+ setDrivingStatus(status: DrivingStatus)
+ setSpeed(speed: double)
+ setRotationspeed(speed: double)
- calcWheelSpeed()
- regulateMotors()</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>1110</x>
<y>670</y>
<w>220</w>
<h>330</h>
</coordinates>
<panel_attributes>&lt;&lt;hardware&gt;&gt;
Speedometer
<panel_attributes>&lt;&lt;driveModi&gt;&gt;
ManualContro
--
- encoder: ESP32Encoder
- debug: DebugMqtt*
View File
View File
+2 -10
View File
@@ -9,19 +9,11 @@
#include "debugMqtt.h"
enum DrivingStatus {stop,
straightForward,
straightBackward,
arcForwardLeft,
arcForwardRight,
arcBackwardLeft,
arcBackwardRight,
forward,
backward,
rotateLeft,
rotateRight};
// enum regulateStatus {stop,
// drive,
// rotateLeft,
// rotateRight};
class MoveControl {
public: