Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DIOT Monitoring Module
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Monitor
Incidents
Service Desk
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
Projects
DIOT Monitoring Module
Commits
dd1774be
Commit
dd1774be
authored
3 years ago
by
Christos Gentsos
Browse files
Options
Downloads
Patches
Plain Diff
Main: report current in A, not mA
parent
2ee76336
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main_fw/src/main.c
+3
-3
3 additions, 3 deletions
main_fw/src/main.c
with
3 additions
and
3 deletions
main_fw/src/main.c
+
3
−
3
View file @
dd1774be
...
...
@@ -85,7 +85,7 @@ uint16_t temp_control_on __xMR = 0;
// Voltages: P12V, P1V2, P3V3, PPERIPH
const
float
volt_scaling_coeff
[
4
]
=
{(
10
.
0
+
2
.
0
)
/
2
.
0
,
1
.
0
/
(
1
.
0
+
(
1
.
0
/
1
.
0
)),
(
4
.
7
+
10
.
0
)
/
10
.
0
,
(
4
.
7
+
2
.
0
)
/
2
.
0
};
// Current: P12V
const
float
curr_scaling_coeff
[
3
]
=
{
1000
.
0
*
(
1
.
0
/
10
.
0
)
/
0
.
05
,
0
,
0
};
const
float
curr_scaling_coeff
[
3
]
=
{(
1
.
0
/
10
.
0
)
/
0
.
05
,
0
,
0
};
// Temperatures: ambient, 2.5V LDO, FPGA
const
float
temp_coeff_a
[
3
]
=
{
0
,
0
,
0
};
const
float
temp_coeff_b
[
3
]
=
{
100
.
0
/
(
1
.
0
+
10
.
0
/
10
.
0
),
100
.
0
/
(
1
.
0
+
10
.
0
/
10
.
0
),
100
.
0
/
(
1
.
0
+
10
.
0
/
10
.
0
)};
...
...
@@ -100,7 +100,7 @@ const float temp_coeff_b[3] = {0, 0, 0};
// Voltages: P12V, P5V
const
float
volt_scaling_coeff
[
3
]
=
{(
10
.
0
+
2
.
0
)
/
2
.
0
,
(
16
.
0
+
10
.
0
)
/
10
.
0
,
0
.
0
};
// Currents: P12V, P5V
const
float
curr_scaling_coeff
[
3
]
=
{
1000
.
0
*
(
(
16
.
0
+
10
.
0
)
/
10
.
0
)
,
1000
.
0
*
(
(
16
.
0
+
10
.
0
)
/
10
.
0
)
,
0
.
0
};
const
float
curr_scaling_coeff
[
3
]
=
{(
16
.
0
+
10
.
0
)
/
10
.
0
,
(
16
.
0
+
10
.
0
)
/
10
.
0
,
0
.
0
};
// Temperatures: ambient
const
float
temp_coeff_a
[
3
]
=
{
0
,
0
,
0
};
const
float
temp_coeff_b
[
3
]
=
{
100
.
0
/
(
1
.
0
+
10
.
0
/
10
.
0
),
0
,
0
};
...
...
@@ -109,7 +109,7 @@ const float temp_coeff_b[3] = {100.0/(1.0+10.0/10.0), 0, 0};
// Voltages: P12V, P5V, P5V
const
float
volt_scaling_coeff
[
3
]
=
{(
10
.
0
+
2
.
0
)
/
2
.
0
,
(
18
.
0
+
10
.
0
)
/
10
.
0
,
(
10
.
0
+
10
.
0
)
/
10
.
0
};
// Currents: P12V, P5V, P5V
const
float
curr_scaling_coeff
[
3
]
=
{
1000
.
0
*
(
1
.
0
/
10
)
/
0
.
1
,
1000
.
0
*
(
1
.
0
/
10
)
/
10
.
0
,
1000
*
(
1
.
0
/
10
)
/
10
.
0
};
const
float
curr_scaling_coeff
[
3
]
=
{(
1
.
0
/
10
.
0
)
/
0
.
1
,
(
1
.
0
/
10
.
0
)
/
10
.
0
,
(
1
.
0
/
10
.
0
)
/
10
.
0
};
const
float
temp_coeff_a
[
3
]
=
{
0
,
-
1e-3
*
100
.
0
*
19
.
0
,
-
1e-3
*
100
.
0
*
19
.
0
};
const
float
temp_coeff_b
[
3
]
=
{
100
.
0
,
100
.
0
/
(
1e-3
*
19
.
0
*
(
138
.
5
-
100
.
0
)),
100
.
0
/
(
1e-3
*
19
.
0
*
(
138
.
5
-
100
.
0
))};
#else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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