moving files

This commit is contained in:
2021-12-13 18:25:47 +01:00
parent a7940c887b
commit 3aa3789e36
18 changed files with 22 additions and 41 deletions
@@ -94,14 +94,14 @@ void MotorControl::runMotorControl() {
void MotorControl::setMinPwm(uint8_t min) {
if (min > 80) min = 80;
//transform percentage to real pwm value
min = (uint8_t) ((1 >> pwm_res - 1) * (min / 100));
min = (uint8_t) (((1 >> pwm_res) - 1) * (min / 100));
this->dutycycle_min = min;
}
void MotorControl::setMaxPwm(uint8_t max) {
if (max > 100) max = 100;
//transform percentage to real pwm value
max = (uint8_t) ((1 >> pwm_res - 1) * (max / 100));
max = (uint8_t) (((1 >> pwm_res) - 1) * (max / 100));
this->dutycycle_max = max;
}
@@ -25,7 +25,7 @@
* @brief Default value for min Millisseconds between each loop
* @see setDelay(uint8_t val)
*/
#define DELAY 30
#define DELAY_SPEEDOMETER 30
#define PI 3.1415926535897932384626433832795
/**
@@ -57,7 +57,7 @@ class Speedometer {
* This function should be called every mainloop. If the delay is not reached, than the
* functions returns immediately.
* @see runSpeedometer()
* @see DELAY
* @see DELAY_SPEEDOMETER
*/
void loop();
@@ -112,7 +112,7 @@ class Speedometer {
uint8_t bufSize = BUFSIZE;
uint16_t steps;
uint8_t delay = DELAY;
uint8_t delay = DELAY_SPEEDOMETER;
int16_t *buf;
};