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