From c7ef9a883031c68506357f9ef1b1a0b79c79f4da Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Thu, 25 Jul 2019 01:11:17 -0300 Subject: Motor integration with PF Newton bug fixed Newton inertia implemented Gauss-Newton implemented --- Project/IndMotorForm.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Project/IndMotorForm.cpp') 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()); } -- cgit