157 lines
4.8 KiB
Plaintext
157 lines
4.8 KiB
Plaintext
<diagram program="umletino" version="14.4.0-SNAPSHOT"><zoom_level>10</zoom_level><element><id>UMLClass</id><coordinates><x>750</x><y>10</y><w>220</w><h>650</h></coordinates><panel_attributes><<hardware>>
|
||
MotorControl
|
||
--
|
||
- target_power: int8_t
|
||
- power: int8_t
|
||
- direction: uint8_t
|
||
|
||
|
||
- pwm_pin: uint8_t
|
||
- pwm_channel: uint8_t
|
||
- pwm_res: uint8_t
|
||
- dutycycle_min: uint8_t
|
||
- dutycycle_max: uint8_t
|
||
- direction_1: uint8_t
|
||
- direction_2: uint8_t
|
||
- delay: uint8_t
|
||
- powersteps: uint8_t
|
||
|
||
- last_millis: uint32_t
|
||
--
|
||
+ MotorControl()
|
||
+ init(pwm_pin: uint8_t,
|
||
pwm_channel: uint8_t,
|
||
dir_1: uint8_t, dir_2: uint8_t)
|
||
+ loop(): uint16_t
|
||
+ runMotorControl()
|
||
|
||
+ setMinPwm(uint8_t)
|
||
+ setMaxPwm(uint8_t)
|
||
+ setPowerSteps(uint8_t): uint16_t
|
||
+ setTargetPower(uint8_t)
|
||
+ setDelay(uint8_t): uint16_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></additional_attributes></element><element><id>UMLClass</id><coordinates><x>80</x><y>380</y><w>220</w><h>330</h></coordinates><panel_attributes><<hardware>>
|
||
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></additional_attributes></element><element><id>UMLClass</id><coordinates><x>70</x><y>0</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></additional_attributes></element><element><id>UMLClass</id><coordinates><x>370</x><y>10</y><w>220</w><h>330</h></coordinates><panel_attributes><<driveModi>>
|
||
ManualControl
|
||
--
|
||
- 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></additional_attributes></element><element><id>UMLClass</id><coordinates><x>1270</x><y>10</y><w>210</w><h>240</h></coordinates><panel_attributes>MenuControl
|
||
--
|
||
# parentMenu: MenuControl*
|
||
# lcd: LiquidCrystal_I2C*
|
||
--
|
||
/+down()/
|
||
/+up()/
|
||
/+right()/
|
||
/+left()/
|
||
/+yes()/
|
||
/+no()/
|
||
|
||
/+update()/
|
||
/+printMenu()/
|
||
|
||
+ setParentMenu(MenuControl*)
|
||
+ setLcd(LiquidCrystal_I2C*)</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>980</x><y>10</y><w>280</w><h>270</h></coordinates><panel_attributes>MenuAction
|
||
--
|
||
- name: char*
|
||
|
||
- *function: void
|
||
- *callback: void
|
||
|
||
- isMenu: bool
|
||
- menu: MenuControl
|
||
--
|
||
+ MenuAction(const char*, (*function), (*callback))
|
||
+ MenuAction(const char*, (*function))
|
||
+ MenuAction(const char*, MenuControl* menu)
|
||
|
||
+ runAction()
|
||
|
||
+ getName(): const char*
|
||
+ getIsMenu(): bool
|
||
+ getMenu(): MenuControl*
|
||
</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>1220</x><y>360</y><w>280</w><h>160</h></coordinates><panel_attributes>Menu
|
||
--
|
||
- inSubmenu: bool
|
||
|
||
- entrys: list<MenuAction*>
|
||
- selectedEntry: list<MenuAction*>::iterator
|
||
|
||
- isMenu: bool
|
||
- menu: MenuControl
|
||
--
|
||
+ addEntry(MenuAction* entry)
|
||
</panel_attributes><additional_attributes></additional_attributes></element><element><id>Relation</id><coordinates><x>1350</x><y>240</y><w>30</w><h>140</h></coordinates><panel_attributes>lt=<<-</panel_attributes><additional_attributes>10;10;10;120</additional_attributes></element><element><id>Relation</id><coordinates><x>1080</x><y>270</y><w>160</w><h>190</h></coordinates><panel_attributes>lt=-
|
||
m1=*
|
||
m2=0..1</panel_attributes><additional_attributes>10;10;10;160;140;160</additional_attributes></element></diagram> |