10
UMLClass
120
670
210
510
<<hardware>>
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)
UMLClass
380
670
210
330
<<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
UMLClass
900
660
210
330
<<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