Commit ccea2a80 authored by Luiz-Fernando Lavado-Villa's avatar Luiz-Fernando Lavado-Villa
Browse files

Backup from the day

parent 42928674
......@@ -28,8 +28,6 @@
* @author Clément Foucher <clement.foucher@laas.fr>
*/
// #include "opalib_pid.h"
// #include "opalib_quick_start.h"
// #include "leg.h"
//#include "data_conversion.h"
......@@ -90,52 +88,55 @@
// }
// void main(void)
// {
// // uint32_t interruption_length = 50; // length of the interruption micro-seconds
// // opalib_quick_start_init_voltage(pid_calculation_and_pwm_update, interruption_length);
#include "opalib_pid.h"
#include "opalib_quick_start.h"
// // float32_t target_voltage = 12;
// // float32_t kp = -0.00000235;
// // float32_t ki = -0.117;
// // float32_t kd = 0.0;
void main(void)
{
uint32_t interruption_length = 50; // length of the interruption micro-seconds
opalib_quick_start_init_voltage(pid_calculation_and_pwm_update, interruption_length);
// // pid_init_buck(target_voltage, kp, ki, kd);
// // opalib_quick_start_launch_task();
float32_t target_voltage = 12;
float32_t kp = -0.00000235;
float32_t ki = -0.117;
float32_t kd = 0.0;
// fixed_duty_init();
pid_init_buck(target_voltage, kp, ki, kd);
opalib_quick_start_launch_task();
// }
}
#include <stdio.h>
// #include <stdio.h>
#include "opalib_quick_start.h"
#include "opalib_pid_current_mode.h"
// #include "opalib_quick_start.h"
// #include "opalib_pid_current_mode.h"
#include "data_acquisition.h"
#include "dac.h"
// #include "data_acquisition.h"
// #include "dac.h"
// void fixed_current_task()
// {
// // void fixed_current_task()
// // {
// dac_function_update_reset(dac1, 1, reset_value);
// dac_function_update_reset(dac3, 1, reset_value);
// }
// // dac_function_update_reset(dac1, 1, reset_value);
// // dac_function_update_reset(dac3, 1, reset_value);
// // }
void main(void)
{
opalib_quick_start_init_current(opalib_pid_current_periodic_task, 50);
opalib_pid_current_init(15, 0.077, 4653.0, 0.0);
// void main(void)
// {
// opalib_quick_start_init_current(opalib_pid_current_periodic_task, 50);
// opalib_pid_current_init(15, 0.077, 4653.0, 0.0);
opalib_quick_start_launch_task();
// opalib_quick_start_launch_task();
printf("Go\n");
}
\ No newline at end of file
// printf("Go\n");
// }
\ No newline at end of file
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