Skip to content

Commit bf84d62

Browse files
committed
[PitchGain.m] Commented out table updating feature when linearized file is loadad
Deactivated (possibly temporary) the feature intended to automate pitch angle values update of the gain-schedule table due to several issues. Now the user has to update the gain-schedule table's pitch angles manually (somewhat more robust)
1 parent 2f484ff commit bf84d62

1 file changed

Lines changed: 63 additions & 59 deletions

File tree

subfunctions/PitchGain.m

Lines changed: 63 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -787,67 +787,71 @@ function LoadLinMat_pushbutton_Callback(hObject, eventdata, handles)
787787
handles.Control.Pitch.Notch2_wnGS = zeros(14,1);
788788
end
789789

790-
if handles.TableSize ~= length(LinListBoxItemsIndex)
791-
handles.TableSize = length(LinListBoxItemsIndex);
792-
end
793790

794-
% Update the table with the pitch angles data
795-
for i = 1:handles.TableSize
796-
if isnan(Lin.Pitch(LinListBoxItemsIndex(i)))
797-
TableData(i,1) = num2cell([]);
798-
else
799-
TableData(i,1) = num2cell(Lin.Pitch(LinListBoxItemsIndex(i))*180/pi);
800-
end
801-
if isnan(handles.Control.Pitch.KpGS(i))
802-
TableData(i,2) = num2cell([]);
803-
else
804-
TableData(i,2) = num2cell(handles.Control.Pitch.KpGS(i));
805-
end
806-
if isnan(handles.Control.Pitch.KiGS(i))
807-
TableData(i,3) = num2cell([]);
808-
else
809-
TableData(i,3) = num2cell(handles.Control.Pitch.KiGS(i));
810-
end
811-
if isnan(handles.Control.Pitch.Notch_beta1GS(i))
812-
TableData(i,4) = num2cell([]);
813-
else
814-
TableData(i,4) = num2cell(handles.Control.Pitch.Notch_beta1GS(i));
815-
end
816-
if isnan(handles.Control.Pitch.Notch_beta2GS(i))
817-
TableData(i,5) = num2cell([]);
818-
else
819-
TableData(i,5) = num2cell(handles.Control.Pitch.Notch_beta2GS(i));
820-
end
821-
if isnan(handles.Control.Pitch.Notch_wnGS(i))
822-
TableData(i,6) = num2cell([]);
823-
else
824-
TableData(i,6) = num2cell(handles.Control.Pitch.Notch_wnGS(i));
825-
end
826-
% --- Second notch filter
827-
if isnan(handles.Control.Pitch.Notch2_beta1GS(i))
828-
TableData(i,7) = num2cell([]);
829-
else
830-
TableData(i,7) = num2cell(handles.Control.Pitch.Notch2_beta1GS(i));
831-
end
832-
if isnan(handles.Control.Pitch.Notch2_beta2GS(i))
833-
TableData(i,8) = num2cell([]);
834-
else
835-
TableData(i,8) = num2cell(handles.Control.Pitch.Notch2_beta2GS(i));
836-
end
837-
if isnan(handles.Control.Pitch.Notch2_wnGS(i))
838-
TableData(i,9) = num2cell([]);
839-
else
840-
TableData(i,9) = num2cell(handles.Control.Pitch.Notch2_wnGS(i));
841-
end
842-
% ---
843-
if isnan(handles.Control.Pitch.LowPassCutOffFreqGS(i))
844-
TableData(i,10) = num2cell([]);
845-
else
846-
TableData(i,10) = num2cell(handles.Control.Pitch.LowPassCutOffFreqGS(i));
847-
end
848-
end
791+
% TODO: Fix the table updating feature or just revert to
792+
% the previous method (manually updatin the table)
793+
794+
% if handles.TableSize ~= length(LinListBoxItemsIndex)
795+
% handles.TableSize = length(LinListBoxItemsIndex);
796+
% end
797+
%
798+
% % Update the table with the pitch angles data
799+
% for i = 1:handles.TableSize
800+
% if isnan(Lin.Pitch(LinListBoxItemsIndex(i)))
801+
% TableData(i,1) = num2cell([]);
802+
% else
803+
% TableData(i,1) = num2cell(Lin.Pitch(LinListBoxItemsIndex(i))*180/pi);
804+
% end
805+
% if isnan(handles.Control.Pitch.KpGS(i))
806+
% TableData(i,2) = num2cell([]);
807+
% else
808+
% TableData(i,2) = num2cell(handles.Control.Pitch.KpGS(i));
809+
% end
810+
% if isnan(handles.Control.Pitch.KiGS(i))
811+
% TableData(i,3) = num2cell([]);
812+
% else
813+
% TableData(i,3) = num2cell(handles.Control.Pitch.KiGS(i));
814+
% end
815+
% if isnan(handles.Control.Pitch.Notch_beta1GS(i))
816+
% TableData(i,4) = num2cell([]);
817+
% else
818+
% TableData(i,4) = num2cell(handles.Control.Pitch.Notch_beta1GS(i));
819+
% end
820+
% if isnan(handles.Control.Pitch.Notch_beta2GS(i))
821+
% TableData(i,5) = num2cell([]);
822+
% else
823+
% TableData(i,5) = num2cell(handles.Control.Pitch.Notch_beta2GS(i));
824+
% end
825+
% if isnan(handles.Control.Pitch.Notch_wnGS(i))
826+
% TableData(i,6) = num2cell([]);
827+
% else
828+
% TableData(i,6) = num2cell(handles.Control.Pitch.Notch_wnGS(i));
829+
% end
830+
% % --- Second notch filter
831+
% if isnan(handles.Control.Pitch.Notch2_beta1GS(i))
832+
% TableData(i,7) = num2cell([]);
833+
% else
834+
% TableData(i,7) = num2cell(handles.Control.Pitch.Notch2_beta1GS(i));
835+
% end
836+
% if isnan(handles.Control.Pitch.Notch2_beta2GS(i))
837+
% TableData(i,8) = num2cell([]);
838+
% else
839+
% TableData(i,8) = num2cell(handles.Control.Pitch.Notch2_beta2GS(i));
840+
% end
841+
% if isnan(handles.Control.Pitch.Notch2_wnGS(i))
842+
% TableData(i,9) = num2cell([]);
843+
% else
844+
% TableData(i,9) = num2cell(handles.Control.Pitch.Notch2_wnGS(i));
845+
% end
846+
% % ---
847+
% if isnan(handles.Control.Pitch.LowPassCutOffFreqGS(i))
848+
% TableData(i,10) = num2cell([]);
849+
% else
850+
% TableData(i,10) = num2cell(handles.Control.Pitch.LowPassCutOffFreqGS(i));
851+
% end
852+
% end
849853

850-
set(handles.Table, 'Data', TableData);
854+
% set(handles.Table, 'Data', TableData);
851855

852856
% Allow multiple pitch angle selection in listbox
853857
set(handles.LinWindSpeed_listbox, 'Max', 20, 'Min', 0);

0 commit comments

Comments
 (0)