Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MechaRaptor - Arduino Controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Aerospace and Mechanical Engineering
tlambert
MechaRaptor - Arduino Controller
Commits
f77c2948
Verified
Commit
f77c2948
authored
2 years ago
by
Thomas Lambert
Browse files
Options
Downloads
Patches
Plain Diff
fix(calib): print of values
parent
e83dfb35
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
controller/calibration.ino
+4
-4
4 additions, 4 deletions
controller/calibration.ino
controller/controller.ino
+2
-2
2 additions, 2 deletions
controller/controller.ino
controller/sensors.ino
+1
-1
1 addition, 1 deletion
controller/sensors.ino
controller/utils.ino
+2
-3
2 additions, 3 deletions
controller/utils.ino
with
9 additions
and
10 deletions
controller/calibration.ino
+
4
−
4
View file @
f77c2948
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
'Calibrate' the wing absolute rotary encoders.
'Calibrate' the wing absolute rotary encoders.
First we unwrap the measured position by shifting the bits in order to avoid
First we unwrap the measured position by shifting the bits in order to avoid
wrapping if this is needed.
wrapping if this is needed.
Then we determine the maximum position so we can make it match the maximum
angle
Then we determine the maximum position so we can make it match the maximum
attainable.
angle
attainable.
-
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
(c) Copyright 2022 University of Liege
(c) Copyright 2022 University of Liege
Author: Thomas Lambert <t.lambert@uliege.be>
Author: Thomas Lambert <t.lambert@uliege.be>
ULiege - Aeroelasticity and Experimental Aerodynamics
ULiege - Aeroelasticity and Experimental Aerodynamics
...
@@ -31,7 +31,7 @@ void Calibrate() {
...
@@ -31,7 +31,7 @@ void Calibrate() {
Serial
.
print
(
"[WARNING]: Setup will run for "
);
Serial
.
print
(
"[WARNING]: Setup will run for "
);
Serial
.
print
(
calibTime
/
1000
);
Serial
.
print
(
calibTime
/
1000
);
Serial
.
print
(
"s to get the offset and maximum value."
);
Serial
.
print
ln
(
"s to get the offset and maximum value."
);
Serial
.
println
(
"[INPUT]: Type 'Y' to begin."
);
Serial
.
println
(
"[INPUT]: Type 'Y' to begin."
);
while
(
Serial
.
available
()
==
0
)
{}
// Wait for serial input
while
(
Serial
.
available
()
==
0
)
{}
// Wait for serial input
...
...
This diff is collapsed.
Click to expand it.
controller/controller.ino
+
2
−
2
View file @
f77c2948
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
/*******************************************************************************
/*******************************************************************************
Globals (for things that I can change manually)
Globals (for things that I can change manually)
*******************************************************************************/
*******************************************************************************/
const
boolean
gSKIP_CALIB
=
tru
e
;
// Skip calibration or not
const
boolean
gSKIP_CALIB
=
fals
e
;
// Skip calibration or not
// Constant values that can be tweaked here or in the ESC before run
// Constant values that can be tweaked here or in the ESC before run
const
uint16_t
gMAX_SIG
=
2000
;
// Max signal to the ESC [ms]
const
uint16_t
gMAX_SIG
=
2000
;
// Max signal to the ESC [ms]
...
@@ -267,7 +267,7 @@ void SerialPrint(String mode, int potent, int esc_val, unsigned int wing_angles[
...
@@ -267,7 +267,7 @@ void SerialPrint(String mode, int potent, int esc_val, unsigned int wing_angles[
Serial
.
print
(
","
);
Serial
.
print
(
","
);
Serial
.
print
(
PosToDeg
(
wing_angles
[
i
])
-
gMaxWingPos
[
i
]
+
TRUE_MAX_ANGLE
);
Serial
.
print
(
PosToDeg
(
wing_angles
[
i
])
-
gMaxWingPos
[
i
]
+
TRUE_MAX_ANGLE
);
}
}
for
(
int
i
=
0
;
i
<
sizeof
(
psu_vol
);
i
++
)
{
for
(
int
i
=
0
;
i
<
sizeof
(
psu_vol
)
/
sizeof
(
psu_vol
[
0
])
;
i
++
)
{
Serial
.
print
(
","
);
Serial
.
print
(
","
);
Serial
.
print
(
psu_vol
[
i
]);
Serial
.
print
(
psu_vol
[
i
]);
Serial
.
print
(
","
);
Serial
.
print
(
","
);
...
...
This diff is collapsed.
Click to expand it.
controller/sensors.ino
+
1
−
1
View file @
f77c2948
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Functions for sensors and acquisition.
Functions for sensors and acquisition.
------------------------------------------------------------------------------
--
------------------------------------------------------------------------------
(c) Copyright 2022 University of Liege
(c) Copyright 2022 University of Liege
Author: Thomas Lambert <t.lambert@uliege.be>
Author: Thomas Lambert <t.lambert@uliege.be>
ULiege - Aeroelasticity and Experimental Aerodynamics
ULiege - Aeroelasticity and Experimental Aerodynamics
...
...
This diff is collapsed.
Click to expand it.
controller/utils.ino
+
2
−
3
View file @
f77c2948
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
Utils
Utils
Miscellaneous utilities.
Miscellaneous utilities.
------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(c) Copyright 2022 University of Liege
(c) Copyright 2022 University of Liege
Author: Thomas Lambert <t.lambert@uliege.be>
Author: Thomas Lambert <t.lambert@uliege.be>
ULiege - Aeroelasticity and Experimental Aerodynamics
ULiege - Aeroelasticity and Experimental Aerodynamics
...
@@ -38,7 +37,7 @@ float PosToDeg(unsigned int pos) {
...
@@ -38,7 +37,7 @@ float PosToDeg(unsigned int pos) {
}
}
void
PrintArray
(
int
array
[])
{
void
PrintArray
(
int
array
[])
{
for
(
int
i
=
0
;
i
<
sizeof
(
array
);
i
++
)
{
for
(
int
i
=
0
;
i
<
sizeof
(
array
)
/
sizeof
(
array
[
0
])
;
i
++
)
{
Serial
.
print
(
array
[
i
]);
Serial
.
print
(
array
[
i
]);
if
(
i
<
sizeof
(
array
)
-
1
)
{
if
(
i
<
sizeof
(
array
)
-
1
)
{
Serial
.
print
(
", "
);
Serial
.
print
(
", "
);
...
...
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