begin a refactor
This commit is contained in:
@@ -1,25 +1,36 @@
|
|||||||
<diagram program="umletino" version="14.4.0-SNAPSHOT"><zoom_level>10</zoom_level><element><id>UMLClass</id><coordinates><x>350</x><y>0</y><w>220</w><h>510</h></coordinates><panel_attributes><<hardware>>
|
<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
|
MotorControl
|
||||||
--
|
--
|
||||||
- name: String
|
- target_power: int8_t
|
||||||
- debug: DebugMqtt*
|
- power: int8_t
|
||||||
- target_power: int8_t = 0
|
- direction: uint8_t
|
||||||
- power: int8_t = 0
|
|
||||||
- direction: uint8_t = 0
|
|
||||||
- last_millis: uint64_t = 0;
|
|
||||||
- pwm_pin: uint8_t
|
- pwm_pin: uint8_t
|
||||||
- pwm_channel: uint8_t
|
- pwm_channel: uint8_t
|
||||||
- direction_pin_1: uint8_t
|
- pwm_res: uint8_t
|
||||||
- direction_pin_2: 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()
|
+ MotorControl()
|
||||||
+ init(pwm_pin: uint8_t,
|
+ init(pwm_pin: uint8_t,
|
||||||
pwm_channel: uint8_t,
|
pwm_channel: uint8_t,
|
||||||
direction_1: uint8_t,
|
dir_1: uint8_t, dir_2: uint8_t)
|
||||||
direction_2: uint8_t,
|
+ loop(): uint16_t
|
||||||
name: String)
|
|
||||||
+ runMotorControl()
|
+ runMotorControl()
|
||||||
+ setTargetPower(power: int8_t)
|
|
||||||
|
+ setMinPwm(uint8_t)
|
||||||
|
+ setMaxPwm(uint8_t)
|
||||||
|
+ setPowerSteps(uint8_t): uint16_t
|
||||||
|
+ setTargetPower(uint8_t)
|
||||||
|
+ setDelay(uint8_t): uint16_t
|
||||||
|
|
||||||
+ stop()
|
+ stop()
|
||||||
+ emergencyStop()
|
+ emergencyStop()
|
||||||
+ toString()
|
+ toString()
|
||||||
@@ -28,8 +39,11 @@ MotorControl
|
|||||||
+ isTargetPowerReached(): bool
|
+ isTargetPowerReached(): bool
|
||||||
+ isAccelerationPositive(): bool
|
+ isAccelerationPositive(): bool
|
||||||
+ isAccelerationNegative(): bool
|
+ isAccelerationNegative(): bool
|
||||||
|
|
||||||
- setRealPower(power: int8_t)
|
- 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>>
|
- 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
|
Speedometer
|
||||||
--
|
--
|
||||||
- encoder: ESP32Encoder
|
- encoder: ESP32Encoder
|
||||||
@@ -72,7 +86,7 @@ Speedometer
|
|||||||
+ setSpeed(speed: double)
|
+ setSpeed(speed: double)
|
||||||
+ setRotationspeed(speed: double)
|
+ setRotationspeed(speed: double)
|
||||||
- calcWheelSpeed()
|
- calcWheelSpeed()
|
||||||
- regulateMotors()</panel_attributes><additional_attributes></additional_attributes></element><element><id>UMLClass</id><coordinates><x>580</x><y>0</y><w>220</w><h>330</h></coordinates><panel_attributes><<driveModi>>
|
- 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
|
ManualControl
|
||||||
--
|
--
|
||||||
- encoder: ESP32Encoder
|
- encoder: ESP32Encoder
|
||||||
@@ -92,4 +106,52 @@ ManualControl
|
|||||||
+ getSpeed(): double
|
+ getSpeed(): double
|
||||||
+ getDirection(): uint8_t
|
+ getDirection(): uint8_t
|
||||||
- addValToBuf(val: int16_t)
|
- addValToBuf(val: int16_t)
|
||||||
- getAverage(): int16_t</panel_attributes><additional_attributes></additional_attributes></element></diagram>
|
- 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>
|
||||||
Reference in New Issue
Block a user