Files
CommanderRedYT 0843e4881b Fixes
2022-06-23 19:02:31 +02:00

33 lines
531 B
C++

#include "modes.h"
// local includes
#include "globals.h"
#include "motorpwmlimiter.h"
#include "utils.h"
void initDrivingMode()
{
}
void updateDrivingMode()
{
if (lastMode != currentMode)
{
if (lastMode)
lastMode->stop();
lastMode = currentMode;
if (currentMode)
currentMode->start();
}
if (currentMode)
currentMode->update();
fixCommonParams();
motor_pwm_limiter::update();
// Last, send values to motor controllers
sendCommands();
}