Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Boardcore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
Skyward Boardcore
Commits
99e5fb3d
Commit
99e5fb3d
authored
May 21, 2022
by
Alberto Nidasio
Browse files
Options
Downloads
Patches
Plain Diff
[MAX] Fixed comment typos
parent
1b027757
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/shared/sensors/MAX31855/MAX31855.cpp
+2
-2
2 additions, 2 deletions
src/shared/sensors/MAX31855/MAX31855.cpp
src/shared/sensors/MAX6675/MAX6675.cpp
+3
-3
3 additions, 3 deletions
src/shared/sensors/MAX6675/MAX6675.cpp
with
5 additions
and
5 deletions
src/shared/sensors/MAX31855/MAX31855.cpp
+
2
−
2
View file @
99e5fb3d
...
@@ -81,7 +81,7 @@ TemperatureData MAX31855::sampleImpl()
...
@@ -81,7 +81,7 @@ TemperatureData MAX31855::sampleImpl()
// Extract data bits
// Extract data bits
sample
=
sample
>>
2
;
sample
=
sample
>>
2
;
// Convert the integer and decimal part separe
t
ly
// Convert the integer and decimal part separ
at
ely
result
.
temperature
=
static_cast
<
float
>
(
sample
>>
2
);
result
.
temperature
=
static_cast
<
float
>
(
sample
>>
2
);
result
.
temperature
+=
static_cast
<
float
>
(
sample
&
0x3
)
*
0.25
;
result
.
temperature
+=
static_cast
<
float
>
(
sample
&
0x3
)
*
0.25
;
...
@@ -103,7 +103,7 @@ TemperatureData MAX31855::readInternalTemperature()
...
@@ -103,7 +103,7 @@ TemperatureData MAX31855::readInternalTemperature()
// Extract data bits
// Extract data bits
sample
[
1
]
=
sample
[
1
]
>>
4
;
sample
[
1
]
=
sample
[
1
]
>>
4
;
// Convert the integer and decimal part separe
t
ly
// Convert the integer and decimal part separ
at
ely
result
.
temperature
=
static_cast
<
float
>
(
sample
[
1
]
>>
4
);
result
.
temperature
=
static_cast
<
float
>
(
sample
[
1
]
>>
4
);
result
.
temperature
+=
static_cast
<
float
>
(
sample
[
1
]
&
0xF
)
*
0.0625
;
result
.
temperature
+=
static_cast
<
float
>
(
sample
[
1
]
&
0xF
)
*
0.0625
;
...
...
This diff is collapsed.
Click to expand it.
src/shared/sensors/MAX6675/MAX6675.cpp
+
3
−
3
View file @
99e5fb3d
...
@@ -53,12 +53,12 @@ bool MAX6675::checkConnection()
...
@@ -53,12 +53,12 @@ bool MAX6675::checkConnection()
sample
=
spi
.
read16
();
sample
=
spi
.
read16
();
}
}
// The third bit (D2) indicates wheter the termocouple is connected or not
// The third bit (D2) indicates whet
h
er the t
h
ermocouple is connected or not
// It is high if open
// It is high if open
if
((
sample
&
0x4
)
!=
0
)
if
((
sample
&
0x4
)
!=
0
)
{
{
lastError
=
SensorErrors
::
SELF_TEST_FAIL
;
lastError
=
SensorErrors
::
SELF_TEST_FAIL
;
LOG_ERR
(
logger
,
"Self test failed, the termocouple is not connected"
);
LOG_ERR
(
logger
,
"Self test failed, the t
h
ermocouple is not connected"
);
return
false
;
return
false
;
}
}
...
@@ -81,7 +81,7 @@ TemperatureData MAX6675::sampleImpl()
...
@@ -81,7 +81,7 @@ TemperatureData MAX6675::sampleImpl()
sample
&=
0x7FF8
;
sample
&=
0x7FF8
;
sample
>>=
3
;
sample
>>=
3
;
// Convert the integer and decimal part separe
t
ly
// Convert the integer and decimal part separ
at
ely
result
.
temperature
=
static_cast
<
float
>
(
sample
>>
2
);
result
.
temperature
=
static_cast
<
float
>
(
sample
>>
2
);
result
.
temperature
+=
static_cast
<
float
>
(
sample
&
0x3
)
*
0.25
;
result
.
temperature
+=
static_cast
<
float
>
(
sample
&
0x3
)
*
0.25
;
...
...
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