This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
SummerSchool2-Controller/306-controller_interface.X/app/kartculator.c
2023-08-31 13:42:31 +02:00

40 lines
683 B
C

/**
* @author Rémi Heredero
* @version. 0.0.0
* @date August 2023
* @file kartculator.c
*/
#include "kartculator.h"
void calcTorque(uint8_t joy_pos) {
int32_t calcTorque;
calcTorque = joy_pos; // joystick position
calcTorque *= KART_CST.CONTROL_POWER_FACTOR; // convert by power factor
calcTorque /= 1000; // torque define by joystick
eKart.torque = (int16_t) calcTorque;
}
void calcPosition(uint8_t joy_pos){
int32_t calcPosition;
calcPosition = joy_pos;
}
void calcSpeed(int32_t rpm) {
}
int16_t getTorque() {
}
uint32_t getPosition() {
}
uint8_t getSpeed() {
}