Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Distributed Autonomous Networked Control Lab
MicroCART
Commits
867fdba5
Commit
867fdba5
authored
1 year ago
by
488_MP-4
Browse files
Options
Downloads
Patches
Plain Diff
any and all changes
parent
7a8ace48
No related branches found
No related tags found
5 merge requests
!106
Adding Pycrocart 2.1
,
!104
adding cflib to this branch
,
!98
Pycrocart 2.1 will
,
!94
Merge cflib adapter into main
,
!88
Bigquad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crazyflie_software/crazyflie-firmware-2021.06/src/drivers/src/motors.c
+4
-4
4 additions, 4 deletions
...tware/crazyflie-firmware-2021.06/src/drivers/src/motors.c
with
4 additions
and
4 deletions
crazyflie_software/crazyflie-firmware-2021.06/src/drivers/src/motors.c
+
4
−
4
View file @
867fdba5
...
@@ -69,22 +69,22 @@ static bool isInit = false;
...
@@ -69,22 +69,22 @@ static bool isInit = false;
static
uint16_t
motorsBLConvBitsTo16
(
uint16_t
bits
)
static
uint16_t
motorsBLConvBitsTo16
(
uint16_t
bits
)
{
{
return
motorsConv16ToBits_uCart23
(
bits
);
//
(0xFFFF * (bits - MOTORS_BL_PWM_CNT_FOR_HIGH) / MOTORS_BL_PWM_CNT_FOR_HIGH);
return
(
0xFFFF
*
(
bits
-
MOTORS_BL_PWM_CNT_FOR_HIGH
)
/
MOTORS_BL_PWM_CNT_FOR_HIGH
);
}
}
static
uint16_t
motorsBLConv16ToBits
(
uint16_t
bits
)
static
uint16_t
motorsBLConv16ToBits
(
uint16_t
bits
)
{
{
return
motorsConv16ToBits_uCart23
(
bits
);
//
(MOTORS_BL_PWM_CNT_FOR_HIGH + ((bits * MOTORS_BL_PWM_CNT_FOR_HIGH) / 0xFFFF));
return
(
MOTORS_BL_PWM_CNT_FOR_HIGH
+
((
bits
*
MOTORS_BL_PWM_CNT_FOR_HIGH
)
/
0xFFFF
));
}
}
static
uint16_t
motorsConvBitsTo16
(
uint16_t
bits
)
static
uint16_t
motorsConvBitsTo16
(
uint16_t
bits
)
{
{
return
motorsConv16ToBits_uCart23
(
bits
);
//
((bits) << (16 - MOTORS_PWM_BITS));
return
((
bits
)
<<
(
16
-
MOTORS_PWM_BITS
));
}
}
static
uint16_t
motorsConv16ToBits
(
uint16_t
bits
)
static
uint16_t
motorsConv16ToBits
(
uint16_t
bits
)
{
{
return
motorsConv16ToBits_uCart23
(
bits
);
//
((bits) >> (16 - MOTORS_PWM_BITS) & ((1 << MOTORS_PWM_BITS) - 1));
return
((
bits
)
>>
(
16
-
MOTORS_PWM_BITS
)
&
((
1
<<
MOTORS_PWM_BITS
)
-
1
));
}
}
static
uint16_t
motorsConv16ToBits_uCart23
(
uint16_t
bits
)
static
uint16_t
motorsConv16ToBits_uCart23
(
uint16_t
bits
)
...
...
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