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

Rename library as there is now a "PID Current" library.

parent c0f35565
{
"name": "opalib_pid",
"version": "1.0.1",
"name": "opalib_pid_voltage",
"version": "2.0.0",
"description": "OwnTech Power API Library for PID in voltage mode.",
"keywords": "OwnTech Power API"
}
......@@ -39,7 +39,7 @@
#include "data_conversion.h"
// Current file header
#include "opalib_pid.h"
#include "opalib_pid_voltage.h"
/////
......@@ -80,7 +80,7 @@ static uint16_t pwm_period, pwm_phase_shift, pwm_low_pulse_width, pwm_high_pulse
* This function initializes all the parameters
* needed for the PID calculation for the buck topoligy
*/
void pid_init_buck(float32_t vref, float32_t kp, float32_t ki, float32_t kd, uint32_t task_period_us)
void opalib_pid_voltage_init_buck(float32_t vref, float32_t kp, float32_t ki, float32_t kd, uint32_t task_period_us)
{
pwm_period = leg_period();
pwm_phase_shift = pwm_period / 2;
......@@ -102,7 +102,7 @@ void pid_init_buck(float32_t vref, float32_t kp, float32_t ki, float32_t kd, uin
* This function initializes all the parameters
* needed for the PID calculation for the boost topoligy
*/
void pid_init_boost(float32_t vref, float32_t kp, float32_t ki, float32_t kd, uint32_t task_period_us)
void opalib_pid_voltage_init_boost(float32_t vref, float32_t kp, float32_t ki, float32_t kd, uint32_t task_period_us)
{
pwm_phase_shift = pwm_period / 2;
pwm_low_pulse_width = pwm_period * LOW_DUTY;
......@@ -124,7 +124,7 @@ void pid_init_boost(float32_t vref, float32_t kp, float32_t ki, float32_t kd, ui
* This function calculation of the PID for the chosen
* topology and set the new duty cycle in the hrtim PWM
*/
void pid_calculation_and_pwm_update()
void opalib_pid_voltage_calculation_and_pwm_update()
{
// Conversion of the raw data from measures
data_conversion();
......
......@@ -22,8 +22,8 @@
* @author Antoine Boche <antoine.boche@laas.fr>
*/
#ifndef OPALIB_PID_H_
#define OPALIB_PID_H_
#ifndef OPALIB_PID_VOLTAGE_H_
#define OPALIB_PID_VOLTAGE_H_
#include <arm_math.h> // adds all the CMSIS library
......@@ -40,7 +40,7 @@ extern "C" {
* @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, uint32_t task_period_us);
void opalib_pid_voltage_init_buck(float32_t vref, float32_t kp, float32_t ki, float32_t kd, uint32_t task_period_us);
/**
* @brief This function Initialize all the parameters
......@@ -51,13 +51,13 @@ void pid_init_buck(float32_t vref, float32_t kp, float32_t ki, float32_t kd, uin
* @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, uint32_t task_period_us);
void opalib_pid_voltage_init_boost(float32_t vref, float32_t kp, float32_t ki, float32_t kd, uint32_t task_period_us);
/**
* @brief This function calculation of the PID for the chosen
* topology and set the new duty cycle in the hrtim PWM
*/
void pid_calculation_and_pwm_update();
void opalib_pid_voltage_calculation_and_pwm_update();
void test();
......@@ -65,5 +65,5 @@ void test();
}
#endif
#endif // OPALIB_PID_H_
#endif // OPALIB_PID_VOLTAGE_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