Revise RateGroupDriver XML

Put AC constants variable back in for now
This commit is contained in:
bocchino 2021-06-15 16:45:23 -07:00
parent f62b179046
commit 3a74c310db
2 changed files with 9 additions and 1 deletions

View File

@ -18,7 +18,7 @@ Generated by fpp-to-xml
Cycle input to the rate group driver
</comment>
</port>
<port name="CycleOut" data_type="Svc::Cycle" kind="output" max_number="3">
<port name="CycleOut" data_type="Svc::Cycle" kind="output" max_number="$RateGroupDriverRateGroupPorts">
<comment>
Cycle output from the rate group driver
</comment>

View File

@ -3,3 +3,11 @@
. ./defs.sh
xml_do "$@"
# Put the AcConstants variable back in for now
awk '
/<port name="CycleOut"/ {
sub("max_number=\"[^\"]*\"", "max_number=\"$RateGroupDriverRateGroupPorts\"", $0)
}
{ print }
' < $3/RateGroupDriverComponentAi.xml > $3/RateGroupDriverComponentAi.tmp.xml
mv $3/RateGroupDriverComponentAi.tmp.xml $3/RateGroupDriverComponentAi.xml