summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--servers/fpga_server_lin/src/fpga_conn.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/servers/fpga_server_lin/src/fpga_conn.cpp b/servers/fpga_server_lin/src/fpga_conn.cpp
index 6ab85a2..f83d384 100644
--- a/servers/fpga_server_lin/src/fpga_conn.cpp
+++ b/servers/fpga_server_lin/src/fpga_conn.cpp
@@ -175,6 +175,13 @@ void FPGASocket::finishKerberosHandshake() {
return;
}
+ // If enabled, reset user FPGA to known good state
+ m_config->setGroup("Programming");
+ TQString resetScript = m_config->readEntry("userresetscript");
+ if (resetScript != "") {
+ system(resetScript.ascii());
+ }
+
TQDataStream ds(this);
ds.setPrintableData(true);
ds << TQString("OK");
@@ -474,6 +481,14 @@ FPGAServer::FPGAServer(TQObject* parent, int port, KSimpleConfig* config) :
exit(1);
}
+ // If enabled, setup control FPGA
+ m_config->setGroup("Programming");
+ TQString setupControlFPGAScript = m_config->readEntry("controlstartupscript");
+ if (setupControlFPGAScript != "") {
+ printf("[INFO] Setting up control FPGA\n\r"); fflush(stdout);
+ system(setupControlFPGAScript.ascii());
+ }
+
printf("[INFO] Server started on port %d\n\r", port); fflush(stdout);
}