Commit 3422c03b authored by Clément Foucher's avatar Clément Foucher
Browse files

Missing call to data conversion.

parent 93f11e79
......@@ -34,13 +34,12 @@
// Drivers
#include "leg.h" // PWM management layer by inverter leg interface
#include "owntech_leg_driver.h" // PWM management layer by inverter leg interface
// Application
#include "data_conversion.h"
// Current file header
#include "pid.h"
#include "opalib_pid.h"
/////
......@@ -51,10 +50,6 @@
#define HIGH_DUTY 0.9
/////
// Global variables
/////
// Local variables
......@@ -119,6 +114,9 @@ void pid_init_boost(float32_t vref, float32_t kp, float32_t ki, float32_t kd)
*/
void pid_calculation_and_pwm_update()
{
// Conversion of the raw data from measures
data_conversion();
// PID CALCUALTIONS
V1_value = get_value_converted(2 , 0);
arm_sub_f32(&V1_value, &Vref, &error_pid, 1); // CALCULATING THE ERROR BASED ON THE REFERENCE
......
......@@ -22,8 +22,8 @@
* @author Antoine Boche <antoine.boche@laas.fr>
*/
#ifndef PID_H_
#define PID_H_
#ifndef OPALIB_PID_H_
#define OPALIB_PID_H_
#include <arm_math.h> // adds all the CMSIS library
......@@ -34,12 +34,22 @@ extern "C" {
/**
* @brief This function Initialize all the parameters
* needed for the PID calculation for the buck topoligy
*
* @param[in] vref Reference voltage for the PID
* @param[in] kp kp for PID
* @param[in] ki ki for PID
* @param[in] kd kd for PID
*/
void pid_init_buck(float32_t vref, float32_t kp, float32_t ki, float32_t kd);
/**
* @brief This function Initialize all the parameters
* needed for the PID calculation for the buck topoligy
*
* @param[in] vref Reference voltage for the PID
* @param[in] kp kp for PID
* @param[in] ki ki for PID
* @param[in] kd kd for PID
*/
void pid_init_boost(float32_t vref, float32_t kp, float32_t ki, float32_t kd);
......@@ -54,4 +64,5 @@ void pid_calculation_and_pwm_update();
}
#endif
#endif // PID_H_
#endif // OPALIB_PID_H_
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment