Skip to content

Commit eda552e

Browse files
committed
Fixing deployment examples
1 parent 2a47bce commit eda552e

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

RPI/Top/instances.fpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,18 @@ module RPI {
252252
};
253253
"""
254254

255+
phase Fpp.ToCpp.Phases.configComponents """
256+
// Configure socket server if and only if there is a valid specification
257+
if (state.hostName != nullptr && state.portNumber != 0) {
258+
RPI::comm.configure(state.hostName, state.portNumber);
259+
}
260+
"""
261+
255262
phase Fpp.ToCpp.Phases.startTasks """
256263
// Initialize socket server if and only if there is a valid specification
257264
if (state.hostName != nullptr && state.portNumber != 0) {
258-
Os::TaskString name("ReceiveTask");
259265
// Uplink is configured for receive so a socket task is started
260-
RPI::comm.configure(state.hostName, state.portNumber);
266+
Os::TaskString name("ReceiveTask");
261267
RPI::comm.start(
262268
name,
263269
ConfigConstants::RPI_comm::PRIORITY,

Ref/Top/RefTopology.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ void setupTopology(const TopologyState& state) {
136136
regCommands();
137137
// Autocoded configuration. Function provided by autocoder.
138138
configComponents(state);
139+
if (state.hostname != nullptr && state.port != 0) {
140+
comm.configure(state.hostname, state.port);
141+
}
139142
// Project-specific component configuration. Function provided above. May be inlined, if desired.
140143
configureTopology();
141144
// Autocoded parameter loading. Function provided by autocoder.
@@ -148,8 +151,7 @@ void setupTopology(const TopologyState& state) {
148151
if (state.hostname != nullptr && state.port != 0) {
149152
Os::TaskString name("ReceiveTask");
150153
// Uplink is configured for receive so a socket task is started
151-
comm.configure(state.hostname, state.port);
152-
comm.start(name, true, COMM_PRIORITY, Default::STACK_SIZE);
154+
comm.start(name, COMM_PRIORITY, Default::STACK_SIZE);
153155
}
154156
}
155157

0 commit comments

Comments
 (0)