cd('..'); addpath template addpath param %% Test mavlink_sim fcn = 'hal_template'; feval(fcn, [], [], [], 'compile'); while strcmp(get_param(fcn, 'SimulationStatus'),'paused') feval(fcn, [], [], [], 'term'); end slbuild(fcn);