summaryrefslogtreecommitdiffstats
path: root/Project/IndMotorForm.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2019-07-25 01:11:17 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2019-07-25 01:11:17 -0300
commitc7ef9a883031c68506357f9ef1b1a0b79c79f4da (patch)
tree06646fb4511030daa7fb6426dfab9dc2413a7253 /Project/IndMotorForm.cpp
parent4f434e4a1cccce69e4b680e4734df52244d3a30b (diff)
downloadPSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.tar.gz
PSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.tar.xz
PSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.zip
Motor integration with PF
Newton bug fixed Newton inertia implemented Gauss-Newton implemented
Diffstat (limited to 'Project/IndMotorForm.cpp')
-rw-r--r--Project/IndMotorForm.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/Project/IndMotorForm.cpp b/Project/IndMotorForm.cpp
index 6df1684..8517aef 100644
--- a/Project/IndMotorForm.cpp
+++ b/Project/IndMotorForm.cpp
@@ -78,7 +78,8 @@ IndMotorForm::IndMotorForm(wxWindow* parent, IndMotor* indMotor) : IndMotorFormB
default:
break;
}
-
+
+ m_checkBoxComputeQ->SetValue(data.calcQInPowerFlow);
m_checkBoxUseMachinePower->SetValue(data.useMachinePowerAsBase);
// Stability
@@ -99,6 +100,8 @@ IndMotorForm::IndMotorForm(wxWindow* parent, IndMotor* indMotor) : IndMotorFormB
m_parent = parent;
m_indMotor = indMotor;
+
+ UpdateFields();
}
IndMotorForm::~IndMotorForm() {}
@@ -172,7 +175,8 @@ bool IndMotorForm::ValidateData()
data.reactivePowerUnit = UNIT_MVAr;
} break;
}
-
+
+ data.calcQInPowerFlow = m_checkBoxComputeQ->GetValue();
data.useMachinePowerAsBase = m_checkBoxUseMachinePower->GetValue();
// Stability
@@ -223,7 +227,12 @@ bool IndMotorForm::ValidateData()
m_indMotor->SetElectricalData(data);
return true;
}
-void IndMotorForm::OnCheckboxUseCageFactorClick(wxCommandEvent& event)
+void IndMotorForm::OnCheckboxUseCageFactorClick(wxCommandEvent& event) { UpdateFields(); }
+void IndMotorForm::OnCalcQInPFClick(wxCommandEvent& event) { UpdateFields(); }
+
+void IndMotorForm::UpdateFields()
{
m_textCtrlKf->Enable(m_checkBoxUseKf->GetValue());
+ m_textCtrlReactivePower->Enable(!m_checkBoxComputeQ->GetValue());
+ m_choiceReactivePower->Enable(!m_checkBoxComputeQ->GetValue());
}