... | ... | @@ -179,5 +179,13 @@ for(int i = 0; i < 128; i++) |
|
|
</code>
|
|
|
|
|
|
## Powertrain control (HDU_POWERTRAIN.h)
|
|
|
This module enables to control the powertrain on the HighDriveUnit featuring two dc motors. TPM0 channel 0-4 is used for PWM generation.
|
|
|
|
|
|
### Module documentation
|
|
|
#### typedef struct HDU_POWERTRAIN_MotorValues
|
|
|
This struct contains the dutyCycle of a motor from -100% to 100% and the 16-bit ADC values for currentSense and backEMF. There is one instance for each motor.
|
|
|
|
|
|
#### void HDU_POWERTRAIN_init(uint32_t frequencyHz)
|
|
|
initializes the powertrain with a pwm frequency in Hz (about 3 kHz recommended). Both motors will be enabled during initialization.
|
|
|
|
|
|
## Servo control (HDU_SERVO.h) |
|
|
\ No newline at end of file |