This repository has been archived on 2025-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
machines-backup/shredder/asterix-pp/firmware/common/ppmath_motor.cpp
T

17 lines
475 B
C++

#include "ppmath_motor.h"
int vfd_calc_vsi(int rpm)
{
return ((rpm * VFD_VSI_MAX_V_SPEED) / MOTOR_FREQ_CMAX);
}
int vfd_calc_vsi_grinder(int rpm){
return VFD_VSI_SCALE *
vfd_calc_vsi(
clamp<int>(rpm * RPM_GRINDER_SHREDDER_SCALE, RPM_GRINDING_MIN, RPM_GRINDING_MAX)
);
}
int vfd_calc_vsi_shredder(int rpm){
return VFD_VSI_SCALE *
vfd_calc_vsi(
clamp<int>(rpm, RPM_SHREDDERING_MIN, RPM_SHREDDERING_MAX)
);
}