Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CoincellExperimentController
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
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Klemm, Carl Philipp
CoincellExperimentController
Commits
4701b1ef
Commit
4701b1ef
authored
1 year ago
by
Carl Philipp Klemm
Browse files
Options
Downloads
Patches
Plain Diff
improve psu startup checks
parent
8719717b
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
expirament.cpp
+8
-2
8 additions, 2 deletions
expirament.cpp
test.cpp
+9
-2
9 additions, 2 deletions
test.cpp
with
17 additions
and
4 deletions
expirament.cpp
+
8
−
2
View file @
4701b1ef
...
@@ -58,9 +58,15 @@ bool Expirament::preparePsu()
...
@@ -58,9 +58,15 @@ bool Expirament::preparePsu()
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
2
));
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
2
));
ret
=
psu
->
getStatus
(
status
);
ret
=
psu
->
getStatus
(
status
);
if
(
!
ret
||
status
.
curent_limited
)
if
(
!
ret
)
{
Log
(
Log
::
ERROR
)
<<
"Unable to read psu state, abort"
;
psu
->
setEnabled
(
false
);
return
false
;
}
else
if
(
status
.
curent_limited
)
{
{
Log
(
Log
::
ERROR
)
<<
"Psu is overcurrent
,
abort"
;
Log
(
Log
::
ERROR
)
<<
"Psu is overcurrent
at "
<<
status
.
current
<<
"
abort"
;
psu
->
setEnabled
(
false
);
psu
->
setEnabled
(
false
);
return
false
;
return
false
;
}
}
...
...
This diff is collapsed.
Click to expand it.
test.cpp
+
9
−
2
View file @
4701b1ef
...
@@ -53,9 +53,16 @@ bool preparePsu(Vcpps* psu, float voltage, float current)
...
@@ -53,9 +53,16 @@ bool preparePsu(Vcpps* psu, float voltage, float current)
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
2
));
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
2
));
ret
=
psu
->
getStatus
(
status
);
ret
=
psu
->
getStatus
(
status
);
if
(
!
ret
||
status
.
curent_limited
)
ret
=
psu
->
getStatus
(
status
);
if
(
!
ret
)
{
Log
(
Log
::
ERROR
)
<<
"Unable to read psu state, abort"
;
psu
->
setEnabled
(
false
);
return
false
;
}
else
if
(
status
.
curent_limited
)
{
{
Log
(
Log
::
ERROR
,
true
,
false
)
<<
"Psu is overcurrent
,
abort"
;
Log
(
Log
::
ERROR
)
<<
"Psu is overcurrent
at "
<<
status
.
current
<<
"
abort"
;
psu
->
setEnabled
(
false
);
psu
->
setEnabled
(
false
);
return
false
;
return
false
;
}
}
...
...
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