Skip to content
Snippets Groups Projects
Commit 75f3c370 authored by leprob001's avatar leprob001
Browse files

Bugfix, reloading another rfb did not update artoa accordingly.

parent 2d32e3b3
No related branches found
No related tags found
No related merge requests found
194
\ No newline at end of file
195
\ No newline at end of file
function [] = initialize()
function [] = initialize(pForceOverwrite)
%INITIALIZE Summary of this function goes here
% Detailed explanation goes here
global artoaGui;
%% Initialize default variables
if ~exist('pForceOverwrite', 'var')
pForceOverwrite = false;
end
%% Initialize
callbacks = artoaGui.callbacks.main;
......@@ -27,7 +31,7 @@ for i = 1:length(availableCallbacks) % check if a callback is undefined
end
artoa.controller.edit.offsets.initializeSoundspeedTable();
artoa.controller.edit.offsets.updateWorkspaceOffsetsTable();
artoa.controller.edit.offsets.updateWorkspaceOffsetsTable(pForceOverwrite);
end
function [] = updateWorkspaceOffsetsTable()
function [] = updateWorkspaceOffsetsTable(pForceOverwrite)
%UPDATEOFFSETSTABLE Summary of this function goes here
% Detailed explanation goes here
global artoaWorkspace;
%% Initialize default variables
if ~exist('pForceOverwrite', 'var')
pForceOverwrite = false;
end
%% Check if edit offsets already exist
if ~artoa.data.hasMember(artoaWorkspace, {'editOffsets'})
return;
......@@ -13,7 +18,7 @@ end
soundsources = artoa.controller.getSoundsourcesWithAppliedToa();
%% Initialize if not available
if ~artoa.data.hasMember(artoaWorkspace, {'editOffsets', 'offsets'})
if pForceOverwrite || ~artoa.data.hasMember(artoaWorkspace, {'editOffsets', 'offsets'})
% initialize sound source offsets
artoaWorkspace.editOffsets.offsets = ...
artoa.offsets.generateOffsetTable(artoaWorkspace.float, soundsources);
......
......@@ -35,12 +35,15 @@ artoa.controller.track.trajectoryOutput.close();
artoaDataInput.rfb = artoa.load.rfb(filepath);
%% Update workspace
artoa.controller.initializeArtoa4();
artoa.controller.copyRfbToWorkspace();
%% Initialize tracking parameter
artoa.controller.track.parameter.initialize();
artoa.controller.track.parameter.initialize(true);
artoa.controller.track.parameter.updateGui();
%% Initialize offsets
artoa.controller.edit.offsets.initialize();
artoa.controller.edit.offsets.initialize(true);
artoa.controller.edit.offsets.updateGui();
%% Update menu buttons
artoa.controller.updateMenuButtons();
......
function [] = initialize()
function [] = initialize(pForceOverwrite)
%INITIALIZE Summary of this function goes here
% Detailed explanation goes here
global artoaWorkspace artoaGui;
%% Initialize default variables
if ~exist('pForceOverwrite', 'var')
pForceOverwrite = false;
end
callbacks = artoaGui.callbacks.main;
%% Create workspace variables
if ~isfield(artoaWorkspace, 'trackParameter')
if pForceOverwrite || ~isfield(artoaWorkspace, 'trackParameter')
artoaWorkspace.trackParameter = struct();
% setup sound source combinations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment