more refactor bug fixes

This commit is contained in:
2023-10-13 14:17:51 +02:00
parent f0474027be
commit a7930e2915
14 changed files with 21 additions and 655 deletions
-157
View File
@@ -1,157 +0,0 @@
<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>&lt;&lt;hardware&gt;&gt;
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>&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></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>&lt;&lt;driveModi&gt;&gt;
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&lt;MenuAction*&gt;
- selectedEntry: list&lt;MenuAction*&gt;::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=&lt;&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>
-390
View File
@@ -1,390 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.3.0">
<zoom_level>10</zoom_level>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>40</x>
<y>20</y>
<w>20</w>
<h>20</h>
</coordinates>
<panel_attributes>type=initial</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>40</x>
<y>20</y>
<w>130</w>
<h>30</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>110.0;10.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>150</x>
<y>10</y>
<w>100</w>
<h>40</h>
</coordinates>
<panel_attributes>search next point
bg=green</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>180</x>
<y>90</y>
<w>40</w>
<h>40</h>
</coordinates>
<panel_attributes>bg=green
type=decision</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>190</x>
<y>40</y>
<w>30</w>
<h>70</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;50.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>150</x>
<y>180</y>
<w>100</w>
<h>40</h>
</coordinates>
<panel_attributes>detect alignment
bg=green</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>190</x>
<y>120</y>
<w>130</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;-
[distance &lt;= 5m]</panel_attributes>
<additional_attributes>10.0;60.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>UMLObject</id>
<coordinates>
<x>20</x>
<y>0</y>
<w>840</w>
<h>590</h>
</coordinates>
<panel_attributes>Autopilot
valign=top</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>210</x>
<y>90</y>
<w>140</w>
<h>40</h>
</coordinates>
<panel_attributes>lt=&lt;-
[distance &gt; 5m]</panel_attributes>
<additional_attributes>120.0;20.0;10.0;20.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>330</x>
<y>90</y>
<w>100</w>
<h>40</h>
</coordinates>
<panel_attributes>Error
bg=red</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>150</x>
<y>270</y>
<w>100</w>
<h>40</h>
</coordinates>
<panel_attributes>correct alignment
bg=green</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>150</x>
<y>360</y>
<w>100</w>
<h>40</h>
</coordinates>
<panel_attributes>drive to point
bg=green</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>190</x>
<y>210</y>
<w>30</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;60.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>190</x>
<y>300</y>
<w>30</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;60.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>90</x>
<y>280</y>
<w>80</w>
<h>120</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>60.0;10.0;10.0;10.0;10.0;100.0;60.0;100.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>440</x>
<y>10</y>
<w>410</w>
<h>300</h>
</coordinates>
<panel_attributes>detect alignment
valign=top</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>460</x>
<y>60</y>
<w>20</w>
<h>20</h>
</coordinates>
<panel_attributes>type=final</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>470</x>
<y>60</y>
<w>90</w>
<h>30</h>
</coordinates>
<panel_attributes>lt=-&gt;</panel_attributes>
<additional_attributes>10.0;10.0;70.0;10.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>540</x>
<y>50</y>
<w>110</w>
<h>40</h>
</coordinates>
<panel_attributes>drive 1m forward</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>540</x>
<y>140</y>
<w>110</w>
<h>40</h>
</coordinates>
<panel_attributes>drive 2m backward</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>540</x>
<y>230</y>
<w>110</w>
<h>40</h>
</coordinates>
<panel_attributes>drive 1m forward</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>700</x>
<y>230</y>
<w>120</w>
<h>40</h>
</coordinates>
<panel_attributes>calculate straight line</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>580</x>
<y>80</y>
<w>30</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;60.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>580</x>
<y>170</y>
<w>30</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;60.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>750</x>
<y>150</y>
<w>20</w>
<h>20</h>
</coordinates>
<panel_attributes>type=termination</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>750</x>
<y>160</y>
<w>30</w>
<h>90</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;70.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>440</x>
<y>320</y>
<w>410</w>
<h>260</h>
</coordinates>
<panel_attributes>correct alignment
valign=top</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>540</x>
<y>370</y>
<w>190</w>
<h>40</h>
</coordinates>
<panel_attributes>calculate relativ target position</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>470</x>
<y>380</y>
<w>90</w>
<h>30</h>
</coordinates>
<panel_attributes>lt=-&gt;</panel_attributes>
<additional_attributes>10.0;10.0;70.0;10.0</additional_attributes>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>460</x>
<y>380</y>
<w>20</w>
<h>20</h>
</coordinates>
<panel_attributes>type=final</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>580</x>
<y>460</y>
<w>120</w>
<h>40</h>
</coordinates>
<panel_attributes>rotate x degree</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>630</x>
<y>400</y>
<w>30</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;60.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>630</x>
<y>490</y>
<w>30</w>
<h>80</h>
</coordinates>
<panel_attributes>lt=&lt;-</panel_attributes>
<additional_attributes>10.0;60.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>630</x>
<y>550</y>
<w>20</w>
<h>20</h>
</coordinates>
<panel_attributes>type=termination</panel_attributes>
<additional_attributes/>
</element>
</diagram>
-39
View File
@@ -1,45 +1,6 @@
Maybe:
-> Time Measurement in component interface
-> Time warnings
Do later:
-> Program underfloorLighting
-> Add an beeper
-> Program the beeper
-> Engine slow down without curve in motorControl
-> Network clean up (Mqtt remove?)
-> Extra class for maneuver, autopilot should inherit from int16_t
-> Remote Control
- Leds for gnss rtk etc
- what happens exactly when no data is arriving
-> Test Menu for big curve driving
-> Api with Names and show on Maps in Browser
-> Menu structure mit add functions for each menu mit pointer return to config (additional not replace)
-> Menu Display from parent as run() to make Menu as Component
-> Racing Mode
-> ConsolControl
-> Menü für Einstellungen
- WiFi (save in Flash)
-> Battery
- tabelle mit eigenen Werten übergeben und nicht in header (wiederverwendbarkeit)
- kalibrierungsmethode mit Menü
- Daten in flash speichern können
-> Check speration between Ui and Route (RouteMenu)
-> update sparkfun gnss auf v3 für SPI korrekturdatenüvbetragung
-> Rover Objekt mit Error zustand freeze, damit das wenn möglich auch auf dem Display angezeigt wird.
-> ESP und Sensoren in den DeepSleep für Auschalten oder Akkuschutz
-> Doxygen comments
- navigation
- autopilot
Do now:
Code:
Fernbedienung!
Latex:
Anhang: Liste mit allen Komponenten und Kurzbeschreibung
Unterschied funktionale und nicht funktionale Anforderungen
Overfull H-Boxen
Test Motor, Zeiten kontrolieren. Wenn einfach so dann bezug auf fehler bei Timing und freeRtos
Was mit den nicht erfüllten Anforderungen machen?