From 6313360a01dddaa80e32de6cbc0fdca6c4193816 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson <cont-frb@ulund.org> Date: Sun, 20 Aug 2017 23:11:20 +0200 Subject: [PATCH] precompile --- README.md | 10 +++++----- src/LabProcesses.jl | 2 ++ src/interface_implementations/ballandbeam.jl | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 938d746..6313208 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,9 @@ with a sample time of `h` seconds. ```julia for (i,t) = enumerate(0:h:duration) @periodically h begin - y[i] = measure(P) - r[i] = reference(t) - u[i] = control(i) + y[i] = measure(P) + r[i] = reference(t) + u[i] = control(i) control(P, u[i]) end end @@ -57,8 +57,8 @@ Usage is demonstrated below ```julia stateC = init_sysfilter(C) function control(i) - e = r[i]-y[i] - u = sysfilter!(stateC, C, e) + e = r[i]-y[i] + u = sysfilter!(stateC, C, e) end ``` `C` must here be represented by a [`StateSpace`](http://juliacontrol.github.io/ControlSystems.jl/latest/lib/constructors/#ControlSystems.ss) type from [`ControlSystems.jl`](https://github.com/JuliaControl/ControlSystems.jl). diff --git a/src/LabProcesses.jl b/src/LabProcesses.jl index df0f70d..e7cc583 100644 --- a/src/LabProcesses.jl +++ b/src/LabProcesses.jl @@ -1,3 +1,5 @@ +__precompile__() + module LabProcesses using ControlSystems diff --git a/src/interface_implementations/ballandbeam.jl b/src/interface_implementations/ballandbeam.jl index 3bbe8f6..e06bda5 100644 --- a/src/interface_implementations/ballandbeam.jl +++ b/src/interface_implementations/ballandbeam.jl @@ -18,7 +18,7 @@ num_inputs(p::BallAndBeamType) = 1 outputrange(p::BallAndBeamType) = [(-10,10),(-1,1)] # Beam angle, Ball position inputrange(p::BallAndBeamType) = [(-10,10)] isstable(p::BallAndBeamType) = false -isstable(p::BallAndBeamType) = false +isasstable(p::BallAndBeamType) = false sampletime(p::BallAndBeamType) = p.h control(p::BallAndBeam, u) = ccall((:comedi_write, comedipath),Int32, -- GitLab