Skip to content
Snippets Groups Projects
Commit 4605c1cb authored by Jean Alinei's avatar Jean Alinei
Browse files

Added Start/stop function to stop the power flow.

parent c0075d08
No related branches found
No related tags found
No related merge requests found
......@@ -169,17 +169,12 @@ void opalib_pid_voltage_init_boost(float32_t vref, float32_t kp, float32_t ki, f
data_acquisition_start();
}
/**
* DEPRECATED - This function update the voltage reference of the
* control task.
*/
void opalib_pid_update_voltage_reference(float32_t vref)
void opalib_pid_reset_state()
{
Vref=vref;
arm_pid_reset_f32(&PID_variables);
}
/**
* This function does the PID calculation
* The PID has an anti-windup that permits to avoid
......@@ -340,4 +335,14 @@ void opalib_pid_voltage_stop()
{
leg_stop(TIMA);
leg_stop(TIMB);
}
/**
* This stops the converter by putting both timing
* units outputs low
*/
void opalib_pid_voltage_start()
{
leg_start(TIMA);
leg_start(TIMB);
}
\ No newline at end of file
......@@ -53,14 +53,6 @@ void opalib_pid_voltage_init_buck(float32_t vref, float32_t kp, float32_t ki, fl
*/
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 update the voltage reference of the
* control task
*
* @param[in] vref Reference voltage for the PID
*/
void opalib_pid_update_voltage_reference(float32_t vref);
/**
* @brief This function does the PID calculation for the chosen
......@@ -97,6 +89,19 @@ void opalib_pid_voltage_pwm_update(float32_t duty_cycle);
*/
void opalib_pid_voltage_stop(void);
/**
* @brief This function stops the converter by putting both timing
* units outputs
*/
void opalib_pid_voltage_start(void);
/**
* @brief This function reset the pid state
*/
void opalib_pid_reset_state(void);
#ifdef __cplusplus
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment