clean main.cpp, clean moveControl.cpp

added classdiagramm and ManualControl
This commit is contained in:
2021-05-12 13:54:51 +02:00
parent 4c2cdcb040
commit 360a89b25c
12 changed files with 341 additions and 288 deletions
+108
View File
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.3.0">
<zoom_level>10</zoom_level>
<element>
<id>UMLClass</id>
<coordinates>
<x>120</x>
<y>670</y>
<w>210</w>
<h>510</h>
</coordinates>
<panel_attributes>&lt;&lt;hardware&gt;&gt;
MotorControl
--
- name: String
- debug: DebugMqtt*
- target_power: int8_t = 0
- power: int8_t = 0
- direction: uint8_t = 0
- last_millis: uint64_t = 0;
- pwm_pin: uint8_t
- pwm_channel: uint8_t
- direction_pin_1: uint8_t
- direction_pin_2: uint8_t
--
+ MotorControl()
+ init(pwm_pin: uint8_t,
   pwm_channel: uint8_t,
   direction_1: uint8_t,
   direction_2: uint8_t,
   name: String)
+ runMotorControl()
+ setTargetPower(power: int8_t)
+ stop()
+ emergencyStop()
+ toString()
+ getPower(): int8_t
+ getTargetPower(): int8_t
+ isTargetPowerReached(): bool
+ isAccelerationPositive(): bool
+ isAccelerationNegative(): bool
- setRealPower(power: int8_t)
- increasePower(power: int8_t)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>380</x>
<y>670</y>
<w>210</w>
<h>330</h>
</coordinates>
<panel_attributes>&lt;&lt;hardware&gt;&gt;
Speedometer
--
- encoder: ESP32Encoder
- debug: DebugMqtt*
- name: String
- speed: double = 0
- last_millis: uint64_t = 0;
- bufPos: uint8_t
- buf: int16_t[BUF_SIZE]
--
+ Speedometer()
+ init(pinA: uint8_t,
   pinB: uint8_t,
   name: String)
+ runSpeedometer()
+ setTargetPower(power: int8_t)
+ getSpeed(): double
+ getDirection(): uint8_t
- addValToBuf(val: int16_t)
- getAverage(): int16_t</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>900</x>
<y>660</y>
<w>210</w>
<h>330</h>
</coordinates>
<panel_attributes>&lt;&lt;hardware&gt;&gt;
Speedometer
--
- encoder: ESP32Encoder
- debug: DebugMqtt*
- name: String
- speed: double = 0
- last_millis: uint64_t = 0;
- bufPos: uint8_t
- buf: int16_t[BUF_SIZE]
--
+ Speedometer()
+ init(pinA: uint8_t,
   pinB: uint8_t,
   name: String)
+ runSpeedometer()
+ setTargetPower(power: int8_t)
+ getSpeed(): double
+ getDirection(): uint8_t
- addValToBuf(val: int16_t)
- getAverage(): int16_t</panel_attributes>
<additional_attributes/>
</element>
</diagram>