Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fred MCU Firmware
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
MSK-SW
Infrastructure and Support
Fred
Fred MCU Firmware
Merge requests
!3
fix/voltage overflow
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix/voltage overflow
fix/voltage_overflow
into
master
Overview
1
Commits
2
Pipelines
0
Changes
1
Merged
Martin Killenberg
requested to merge
fix/voltage_overflow
into
master
3 months ago
Overview
1
Commits
2
Pipelines
0
Changes
1
Expand
fix: include order
fix: integer overrun
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
ea99914a
2 commits,
3 months ago
1 file
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/telnet_protocol.c
+
4
−
4
Options
@@ -32,7 +32,6 @@
#include
"eeprom.h"
#include
"fan_current_monitor_lib.h"
// added by Stanislav Chystiakov
#include
"fan_lib.h"
// added by Stanislav Chystiakov
#include
"version.h"
#include
"hw_info.h"
#include
"mgmt_protocol_master.h"
#include
"overcurrent_detction.h"
@@ -40,6 +39,7 @@
#include
"uptime_tracker.h"
#include
"usart_lib.h"
#include
"user_board.h"
#include
"version.h"
#include
"xport_watchdog.h"
#include
<avr/eeprom.h>
#include
<ctype.h>
@@ -654,12 +654,12 @@ char uppercase(char c) {
*/
void
printChannel
(
int
nr
)
{
uint8_t
status
=
cl_getStatus
(
nr
);
int
voltage
;
int
32_t
voltage
;
uint16_t
current
;
char
name_upper
[
EEPROM_CHNAME_LEN
];
current
=
pm_getCurrent
(
nr
);
voltage
=
(
int
)
pm_getVoltage
(
nr
);
voltage
=
pm_getVoltage
(
nr
);
if
(
current
==
0xffff
||
voltage
==
0x7fffffff
)
{
// I2C error
current
=
0
;
@@ -675,7 +675,7 @@ void printChannel(int nr) {
name_upper
[
i
]
=
uppercase
(
name_upper
[
i
]);
}
printf
(
"
\r\n
%1d %02X %6d %"
PRIu16
" %-20s"
,
nr
,
status
,
voltage
,
current
,
name_upper
);
printf
(
"
\r\n
%1d %02X %6
l
d %"
PRIu16
" %-20s"
,
nr
,
status
,
voltage
,
current
,
name_upper
);
}
void
printAlarmMasks
(
void
)
{
Loading