Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jacques Labaisse
Core
Commits
843ce5a5
Commit
843ce5a5
authored
Sep 08, 2021
by
Jacques Labaisse
Browse files
Remove extern variables replace by functions
parent
4168e4c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main.cpp
View file @
843ce5a5
...
...
@@ -33,15 +33,13 @@
#include
"opalib_quick_start.h"
float32_t
v_ref
=
10.0
F
;
float32_t
v_send
=
0.0
F
;
void
main
(
void
)
{
opalib_quick_start_set_hardware_version
(
v_1_1_2
);
opalib_quick_start_init_voltage
(
opalib_pid_voltage_calculation_and_pwm_update
,
50
);
opalib_pid_voltage_init_buck
(
v_ref
,
0.000215
,
2.86
,
0
,
50
);
opalib_pid_voltage_init_buck
(
10
,
0.000215
,
2.86
,
0
,
50
);
opalib_quick_start_launch_task
();
...
...
zephyr/modules/owntech_can_api/zephyr/src/data_nodes.cpp
View file @
843ce5a5
...
...
@@ -44,8 +44,8 @@ float32_t i2low_out = 0;
float32_t
vhigh_out
=
0
;
float32_t
ihigh_out
=
0
;
extern
float32_t
v_ref
;
extern
float32_t
v_send
;
float32_t
v_ref
;
float32_t
v_send
;
static
float32_t
load_dim
=
1.0
;
bool
loadEnable
=
true
;
...
...
@@ -269,4 +269,9 @@ void uint64_to_base32(uint64_t in, char *out, size_t size, const char *alphabet)
out
[
len
]
=
'\0'
;
}
void
*
get_data_ptr
(
int
nodeRank
){
return
data_nodes
[
nodeRank
].
data
;
}
#endif
/* CUSTOM_DATA_NODES_FILE */
zephyr/modules/owntech_can_api/zephyr/src/data_nodes.h
View file @
843ce5a5
...
...
@@ -68,4 +68,13 @@ const char alphabet_crockford[] = "0123456789abcdefghjkmnpqrstvwxyz";
*/
void
uint64_to_base32
(
uint64_t
in
,
char
*
out
,
size_t
size
,
const
char
*
alphabet
);
/**
* returns the address of
* the variable linked to a
* data node which is stored
* at rank nodeRank in
* data_nodes
*/
void
*
get_data_ptr
(
int
nodeRank
);
#endif // DATA_NODES_H_
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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