@@ -36,13 +36,13 @@ function Certification_OpeningFcn(hObject, eventdata, handles, varargin)
3636handles.Control = varargin{6 };
3737handles.CertificationSettings = varargin{7 };
3838
39- % Adjust simulation time if a stepped wind is requested
39+ % Disable simulation time and wind speed if a stepped wind is requested
4040if handles .CertificationSettings .Wind .Type == 2
41- amountOfSteps = ceil(handles .CertificationSettings .Run .WindSpeed(1 ) - handles .CertificationSettings .Wind .Step ) + 1 ;
42- handles.CertificationSettings.Run.Time = amountOfSteps * handles .CertificationSettings .Wind .StepDuration ;
4341 set(handles .Runtime_textbox , ' Enable' , ' off' );
42+ set(handles .WindSpeed_textbox , ' Enable' , ' off' );
4443else
4544 set(handles .Runtime_textbox , ' Enable' , ' on' );
45+ set(handles .WindSpeed_textbox , ' Enable' , ' on' );
4646end
4747
4848% Update input fields
@@ -177,6 +177,17 @@ function WindSettings_Callback(hObject, eventdata, handles)
177177 set(buttons(i ), ' Enable' , ' on' );
178178end
179179
180+ % Disable simulation time and wind speed if a stepped wind is requested
181+ if handles .CertificationSettings .Wind .Type == 2
182+ set(handles .Runtime_textbox , ' Enable' , ' off' );
183+ set(handles .WindSpeed_textbox , ' Enable' , ' off' );
184+ set(handles .Runtime_textbox , ' String' , handles .CertificationSettings .Run .Time );
185+ set(handles .WindSpeed_textbox , ' String' , handles .CertificationSettings .Run .WindSpeed(1 ));
186+ else
187+ set(handles .Runtime_textbox , ' Enable' , ' on' );
188+ set(handles .WindSpeed_textbox , ' Enable' , ' on' );
189+ end
190+
180191% Disable start button
181192if isempty(handles .OutputFile )
182193 set(handles .Start , ' Enable' , ' off' )
@@ -218,16 +229,6 @@ function WindSettings_Callback(hObject, eventdata, handles)
218229 set(hObject , ' TooltipString' , ' Extreme coherent gust (ECD)' )
219230end
220231
221- % Adjust simulation time if a stepped wind is requested
222- if handles .CertificationSettings .Wind .Type == 2
223- amountOfSteps = ceil(handles .CertificationSettings .Run .WindSpeed(1 ) - handles .CertificationSettings .Wind .Step ) + 1 ;
224- handles.CertificationSettings.Run.Time = amountOfSteps * handles .CertificationSettings .Wind .StepDuration ;
225- set(handles .Runtime_textbox , ' Enable' , ' off' );
226- set(handles .Runtime_textbox , ' String' , handles .CertificationSettings .Run .Time );
227- else
228- set(handles .Runtime_textbox , ' Enable' , ' on' );
229- end
230-
231232% Update handles structure
232233guidata(hObject , handles );
233234
@@ -249,6 +250,15 @@ function OperationSettings_Callback(hObject, eventdata, handles)
249250 set(buttons(i ), ' Enable' , ' on' );
250251end
251252
253+ % Disable simulation time and wind speed if a stepped wind is requested
254+ if handles .CertificationSettings .Wind .Type == 2
255+ set(handles .Runtime_textbox , ' Enable' , ' off' );
256+ set(handles .WindSpeed_textbox , ' Enable' , ' off' );
257+ else
258+ set(handles .Runtime_textbox , ' Enable' , ' on' );
259+ set(handles .WindSpeed_textbox , ' Enable' , ' on' );
260+ end
261+
252262% Disable start button
253263if isempty(handles .OutputFile )
254264 set(handles .Start , ' Enable' , ' off' )
@@ -340,6 +350,7 @@ function NSeeds_textbox_Callback(hObject, eventdata, handles)
340350handles.CertificationSettings.Run.Seeds = ceil(str2double(get(hObject ,' String' )));
341351guidata(hObject , handles );
342352UpdateOutputName(handles );
353+
343354function NSeeds_textbox_CreateFcn(hObject , eventdata , handles )
344355if ispc && isequal(get(hObject ,' BackgroundColor' ), get(0 ,' defaultUicontrolBackgroundColor' ))
345356 set(hObject ,' BackgroundColor' ,' white' );
@@ -355,6 +366,7 @@ function Runtime_textbox_Callback(hObject, eventdata, handles)
355366handles.CertificationSettings.Run.Time = str2double(get(hObject ,' String' ));
356367handles.CertificationSettings.Wind.T = handles .CertificationSettings .Run .Time ;
357368guidata(hObject , handles );
369+
358370function Runtime_textbox_CreateFcn(hObject , eventdata , handles )
359371if ispc && isequal(get(hObject ,' BackgroundColor' ), get(0 ,' defaultUicontrolBackgroundColor' ))
360372 set(hObject ,' BackgroundColor' ,' white' );
@@ -619,6 +631,15 @@ function Start_Callback(hObject, eventdata, handles)
619631 set(buttons(i ), ' Enable' , ' on' );
620632end
621633
634+ % Disable simulation time and wind speed if a stepped wind is requested
635+ if handles .CertificationSettings .Wind .Type == 2
636+ set(handles .Runtime_textbox , ' Enable' , ' off' );
637+ set(handles .WindSpeed_textbox , ' Enable' , ' off' );
638+ else
639+ set(handles .Runtime_textbox , ' Enable' , ' on' );
640+ set(handles .WindSpeed_textbox , ' Enable' , ' on' );
641+ end
642+
622643% Turn on warnings
623644warning(' on' ,' all' )
624645disp(' ' )
0 commit comments