Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Luiz Fernando Lavado Villa
Core
Commits
ccea2a80
Commit
ccea2a80
authored
Jul 23, 2021
by
Luiz-Fernando Lavado-Villa
Browse files
Backup from the day
parent
42928674
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main.cpp
View file @
ccea2a80
...
...
@@ -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;
// // pid_init_buck(target_voltage, kp, ki, kd);
// // opalib_quick_start_launch_task();
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
);
// fixed_duty_init();
float32_t
target_voltage
=
12
;
float32_t
kp
=
-
0.00000235
;
float32_t
ki
=
-
0.117
;
float32_t
kd
=
0.0
;
// }
pid_init_buck
(
target_voltage
,
kp
,
ki
,
kd
);
opalib_quick_start_launch_task
();
}
#include
<stdio.h>
#include
"opalib_quick_start.h"
#include
"opalib_pid_current_mode.h"
#include
"data_acquisition.h"
#include
"dac.h"
// #include <stdio.h>
// #include "opalib_quick_start.h"
// #include "opalib_pid_current_mode.h"
// #include "data_acquisition.h"
// #include "dac.h"
// void fixed_current_task()
// {
// dac_function_update_reset(dac1, 1, reset_value);
// dac_function_update_reset(dac3, 1, reset_value);
// }
// // void fixed_current_task()
// // {
// // 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
);
opalib_quick_start_launch_task
();
// 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);
printf
(
"Go
\n
"
);
}
\ No newline at end of file
// opalib_quick_start_launch_task();
// printf("Go\n");
// }
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment