Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bioloid_stm32_fw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
humanoides
bioloid_stm32_fw
Commits
c13794a9
Commit
c13794a9
authored
9 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Corrected some misspelling errors and missing headers.
parent
380e0132
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bioloid_dyn_slave.c
+1
-0
1 addition, 0 deletions
src/bioloid_dyn_slave.c
src/bioloid_gyro.c
+8
-7
8 additions, 7 deletions
src/bioloid_gyro.c
with
9 additions
and
7 deletions
src/bioloid_dyn_slave.c
+
1
−
0
View file @
c13794a9
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include
"bioloid_gyro.h"
#include
"bioloid_gyro.h"
#include
"motion_manager.h"
#include
"motion_manager.h"
#include
"action.h"
#include
"action.h"
#include
"walking.h"
/* external interrupt pin */
/* external interrupt pin */
#define DYN_SLAVE_EXT_INT_PIN GPIO_PIN_8
#define DYN_SLAVE_EXT_INT_PIN GPIO_PIN_8
...
...
This diff is collapsed.
Click to expand it.
src/bioloid_gyro.c
+
8
−
7
View file @
c13794a9
#include
"bioloid_gyro.h"
#include
"bioloid_gyro.h"
#include
"bioloid_registers.h"
#include
"ram.h"
#include
"ram.h"
#define GYRO_MAX_CAL_SAMPLES 256
#define GYRO_MAX_CAL_SAMPLES 256
...
@@ -21,17 +22,17 @@ void gyro_init(void)
...
@@ -21,17 +22,17 @@ void gyro_init(void)
inline
adc_ch_t
gyro_get_fb_adc_channel
(
void
)
inline
adc_ch_t
gyro_get_fb_adc_channel
(
void
)
{
{
return
ram_data
[
BIOL
I
OD_GYRO_FB_ADC_CH
];
return
ram_data
[
BIOLO
I
D_GYRO_FB_ADC_CH
];
}
}
inline
adc_ch_t
gyro_get_lr_adc_channel
(
void
)
inline
adc_ch_t
gyro_get_lr_adc_channel
(
void
)
{
{
return
ram_data
[
BIOL
I
OD_GYRO_LR_ADC_CH
];
return
ram_data
[
BIOLO
I
D_GYRO_LR_ADC_CH
];
}
}
void
gyro_calibrate
(
void
)
void
gyro_calibrate
(
void
)
{
{
adc_ch_t
fb_ch
=
ram_data
[
BIOL
I
OD_GYRO_FB_ADC_CH
],
lr_ch
=
ram_data
[
BIOL
I
OD_GYRO_LR_ADC_CH
];
adc_ch_t
fb_ch
=
ram_data
[
BIOLO
I
D_GYRO_FB_ADC_CH
],
lr_ch
=
ram_data
[
BIOLO
I
D_GYRO_LR_ADC_CH
];
uint16_t
i
;
uint16_t
i
;
gyro_fb_offset
=
0x0000
;
gyro_fb_offset
=
0x0000
;
...
@@ -73,9 +74,9 @@ void gyro_process_read_cmd(unsigned short int address,unsigned short int length,
...
@@ -73,9 +74,9 @@ void gyro_process_read_cmd(unsigned short int address,unsigned short int length,
void
gyro_process_write_cmd
(
unsigned
short
int
address
,
unsigned
short
int
length
,
unsigned
char
*
data
)
void
gyro_process_write_cmd
(
unsigned
short
int
address
,
unsigned
short
int
length
,
unsigned
char
*
data
)
{
{
// gyro channels
// gyro channels
if
(
ram_in_range
(
BIOL
I
OD_GYRO_FB_ADC_CH
,
address
,
length
))
if
(
ram_in_range
(
BIOLO
I
D_GYRO_FB_ADC_CH
,
address
,
length
))
ram_data
[
BIOL
I
OD_GYRO_FB_ADC_CH
]
=
data
[
BIOL
I
OD_GYRO_FB_ADC_CH
-
address
];
ram_data
[
BIOLO
I
D_GYRO_FB_ADC_CH
]
=
data
[
BIOLO
I
D_GYRO_FB_ADC_CH
-
address
];
if
(
ram_in_range
(
BIOL
I
OD_GYRO_LR_ADC_CH
,
address
,
length
))
if
(
ram_in_range
(
BIOLO
I
D_GYRO_LR_ADC_CH
,
address
,
length
))
ram_data
[
BIOL
I
OD_GYRO_LR_ADC_CH
]
=
data
[
BIOL
I
OD_GYRO_LR_ADC_CH
-
address
];
ram_data
[
BIOLO
I
D_GYRO_LR_ADC_CH
]
=
data
[
BIOLO
I
D_GYRO_LR_ADC_CH
-
address
];
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment