Skip to content
Snippets Groups Projects
Commit 359d8745 authored by Jake's avatar Jake
Browse files

Redid which setpoints are changed

Pressing enter only changes the active setpoint.
To Quad sends all
parent f14af266
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.1.0, 2017-04-19T23:57:31. -->
<!-- Written by QtCreator 4.0.1, 2017-04-21T10:58:17. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{f7736f41-610d-4989-a7d9-6e994afe94ba}</value>
<value type="QByteArray">{ec588c71-c0cc-43f4-8233-a07fa24de8ad}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
......@@ -61,7 +61,7 @@
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{94de1029-defb-4d1d-a0ac-6d51aba06ea3}</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{c6f8ca21-0eb9-4188-b2e8-fae8725afa1b}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
......@@ -184,13 +184,13 @@
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">MicroCART</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/local/ucart/Documents/MicroCART_17-18/groundStation/gui/MicroCART/MicroCART.pro</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/jake/Microcart_17-18/groundStation/gui/MicroCART/MicroCART.pro</value>
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">MicroCART.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/local/ucart/Documents/MicroCART_17-18/groundStation/gui/MicroCART</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/jake/Microcart_17-18/groundStation/gui/MicroCART</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
......
......@@ -97,10 +97,6 @@ MainWindow::MainWindow(QWidget *parent) :
/* Connect various things that can result in sending setpoints */
connect(ui->pbSendSetpoint, SIGNAL (clicked()), this, SLOT (sendSetpoints()));
connect(ui->xSetpoint, SIGNAL (returnPressed()), this, SLOT (sendSetpoints()));
connect(ui->ySetpoint, SIGNAL (returnPressed()), this, SLOT (sendSetpoints()));
connect(ui->zSetpoint, SIGNAL (returnPressed()), this, SLOT (sendSetpoints()));
connect(ui->setpointList, SIGNAL (doubleClicked(QModelIndex)), this, SLOT (sendSelectedSetpoint()));
}
......@@ -400,3 +396,24 @@ void MainWindow::on_socketPath_returnPressed()
{
QProcessEnvironment::systemEnvironment().insert("UCART_SOCKET", ui->socketPath->text());
}
void MainWindow::on_xSetpoint_returnPressed()
{
sp_x = ui->xSetpoint->text().toFloat();
emit (setParamValue(ui->xSetpointSelect->currentText(),
blockDefs[BLOCK_CONSTANT]->param_names[0], sp_x));
}
void MainWindow::on_ySetpoint_returnPressed()
{
sp_y = ui->ySetpoint->text().toFloat();
emit (setParamValue(ui->ySetpointSelect->currentText(),
blockDefs[BLOCK_CONSTANT]->param_names[0], sp_y));
}
void MainWindow::on_zSetpoint_returnPressed()
{
sp_z = ui->zSetpoint->text().toFloat();
emit (setParamValue(ui->zSetpointSelect->currentText(),
blockDefs[BLOCK_CONSTANT]->param_names[0], sp_z));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment