Skip to content
Snippets Groups Projects
Commit 801aa350 authored by Luiz-Fernando Lavado-Villa's avatar Luiz-Fernando Lavado-Villa
Browse files

Fixed a bug on the new opalib_pid_voltage_pid_calculation and the declaration...

Fixed a bug on the new opalib_pid_voltage_pid_calculation and the declaration of the opa_lib_voltage_stop

While debugging, we've noticed that the PID in this repo does not work. The issue was a non-usage of the uint32_t measurement parameter givent to the new opalib_pid_voltage_pid_calculation function. This commit corrects that.

While re-reading the opalib_pid_voltage.h we've noticed that the declaration of the opa_lib_voltage_stop function was done after the endif of the .h creation. This was also corrected.
parent 24e2782b
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,7 @@ void opalib_pid_update_voltage_reference(float32_t vref)
float32_t opalib_pid_voltage_pid_calculation(float32_t voltage_reference, float32_t measurement)
{
V1_value = measurement;
arm_sub_f32(&Vref, &V1_value, &error_pid, 1); // CALCULATING THE ERROR BASED ON THE REFERENCE
......
......@@ -91,14 +91,15 @@ float32_t opalib_pid_voltage_pid_calculation(float32_t voltage_reference, float3
void opalib_pid_voltage_pwm_update(float32_t duty_cycle);
/**
* @brief This function stops the converter by putting both timing
* units outputs low
*/
void opalib_pid_voltage_stop(void);
#ifdef __cplusplus
}
#endif
#endif // OPALIB_PID_VOLTAGE_H_
/**
* @brief This function stops the converter by putting both timing
* units outputs low
*/
void opalib_pid_voltage_stop(void);
\ No newline at end of file
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