Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICBM
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
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
detectors
DSSC
ICBM
Commits
86bd6a47
Commit
86bd6a47
authored
1 month ago
by
Cyril Danilevski
Browse files
Options
Downloads
Patches
Plain Diff
Resend commands on power sequence when no feedback after N polls
parent
4e1ffb0f
No related branches found
Branches containing commit
No related tags found
1 merge request
!4
Add channels for all 4 modules in DEPFET quadrant
Pipeline
#165258
passed
1 month ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mpod.cpp
+22
-1
22 additions, 1 deletion
mpod.cpp
mpod.hpp
+0
-1
0 additions, 1 deletion
mpod.hpp
with
22 additions
and
2 deletions
mpod.cpp
+
22
−
1
View file @
86bd6a47
...
...
@@ -221,13 +221,34 @@ void setChannelStateAndWait(const IPAddress *ipAddr, const uint16_t channel, con
snmp
.
loop
();
// Poll channel until it's settled
uint8_t
loopCount
=
0
;
bool
ramping
=
true
;
bool
settingChannelState
=
true
;
do
{
SNMP
::
Message
*
snmp_msg
=
mpod
.
read
(
channel
);
snmp
.
send
(
snmp_msg
,
*
ipAddr
,
SNMP
::
Port
::
SNMP
);
delete
snmp_msg
;
delay
(
MPOD_UPDATE_LATENCY
);
snmp
.
loop
();
}
while
(
mpod
.
isOn
()
!=
(
bool
)
output
||
mpod
.
isRampingDown
()
||
mpod
.
isRampingUp
());
loopCount
+=
1
;
ramping
=
(
mpod
.
isRampingUp
()
||
mpod
.
isRampingDown
());
if
(
!
ramping
)
{
if
(
mpod
.
isOn
()
==
(
bool
)
output
)
{
settingChannelState
=
false
;
}
else
if
(
loopCount
>=
5
)
{
// Resend set command
Serial
.
print
(
"!Resend command to "
);
Serial
.
println
(
channel
);
SNMP
::
Message
*
snmp_msg
=
mpod
.
setChannelState
(
channel
,
output
);
snmp
.
send
(
snmp_msg
,
*
ipAddr
,
SNMP
::
Port
::
SNMP
);
delete
snmp_msg
;
delay
(
MPOD_UPDATE_LATENCY
);
snmp
.
loop
();
loopCount
=
0
;
}
}
}
while
(
settingChannelState
);
}
void
setChannelVoltageAndWait
(
const
IPAddress
*
ipAddr
,
const
uint16_t
channel
,
...
...
This diff is collapsed.
Click to expand it.
mpod.hpp
+
0
−
1
View file @
86bd6a47
...
...
@@ -59,7 +59,6 @@ class MPOD {
}
};
// Create an SNMP SETREQUEST message to setup MPOD
MPOD
();
SNMP
::
Message
*
read
(
const
uint16_t
);
SNMP
::
Message
*
setChannelState
(
const
uint16_t
,
const
bool
);
...
...
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