diff options
author | Timothy Pearson <tpearson@raptorengineering.com> | 2019-04-28 22:40:28 -0500 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-04-28 22:40:28 -0500 |
commit | febfc4d4a05bd4ed06510a8fb8d62c8fc65b6f1e (patch) | |
tree | 39e74f348ba0b0a40580f7dc93399242a757d0d4 /servers | |
parent | eb6afe10e66825d9275a9b752b40e95cbf6ec830 (diff) | |
download | ulab-febfc4d4a05bd4ed06510a8fb8d62c8fc65b6f1e.tar.gz ulab-febfc4d4a05bd4ed06510a8fb8d62c8fc65b6f1e.zip |
Add options to set up control FPGA on startup and reset user FPGA on connect
Diffstat (limited to 'servers')
-rw-r--r-- | servers/fpga_server_lin/src/fpga_conn.cpp | 15 |
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); } |