From 96705a7a299bfcc0dee60db8c3e972eb38a6c3a3 Mon Sep 17 00:00:00 2001
From: baggepinnen <cont-frb@ulund.org>
Date: Tue, 29 Aug 2017 16:21:00 +0200
Subject: [PATCH] Move constructors to outer

---
 src/interface_implementations/ballandbeam.jl    | 4 ++--
 src/interface_implementations/eth_helicopter.jl | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/interface_implementations/ballandbeam.jl b/src/interface_implementations/ballandbeam.jl
index 77dbe7f..6b1a5c8 100644
--- a/src/interface_implementations/ballandbeam.jl
+++ b/src/interface_implementations/ballandbeam.jl
@@ -37,7 +37,7 @@ function Beam(;
     stream::LabStream        = ComediStream(),
     measure::AnalogInput10V  = AnalogInput10V(0),
     control::AnalogOutput10V = AnalogOutput10V(1))
-    p = new(Float64(h),Float64(bias),stream,measure,control)
+    p = Beam(Float64(h),Float64(bias),stream,measure,control)
     init_devices!(p.stream, p.measure, p.control)
     p
 end
@@ -66,7 +66,7 @@ function BallAndBeam(;
     measure1::AnalogInput10V = AnalogInput10V(0),
     measure2::AnalogInput10V = AnalogInput10V(1),
     control::AnalogOutput10V = AnalogOutput10V(1))
-    p = new(h,bias,stream,measure1,measure2,control)
+    p = BallAndBeam(h,bias,stream,measure1,measure2,control)
     init_devices!(p.stream, p.measure1, p.measure2, p.control)
     p
 end
diff --git a/src/interface_implementations/eth_helicopter.jl b/src/interface_implementations/eth_helicopter.jl
index 9606f23..b147081 100644
--- a/src/interface_implementations/eth_helicopter.jl
+++ b/src/interface_implementations/eth_helicopter.jl
@@ -38,7 +38,7 @@ function ETHHelicopter(;
     measure2::AnalogInput10V  = AnalogInput10V(1),
     control1::AnalogOutput10V = AnalogOutput10V(0),
     control2::AnalogOutput10V = AnalogOutput10V(1))
-    p = new(h,bias,stream,measure1,measure2,control1,control2)
+    p = ETHHelicopter(h,bias,stream,measure1,measure2,control1,control2)
     init_devices!(p.stream, p.measure1, p.measure2, p.control1, p.control2)
     p
 end
-- 
GitLab