X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=mTaskSimulation.icl;h=801235ec2e3ed0bb821dd33415014d1c061bb51b;hb=8246c6551faa818be7a58638dbbc2e521f21c454;hp=d28a4fe5fb221ec5c8c0a490e4d4e88456cc45c1;hpb=1c8014ff74afb966b891a4689d8ee3e512300746;p=mTask.git diff --git a/mTaskSimulation.icl b/mTaskSimulation.icl index d28a4fe..801235e 100644 --- a/mTaskSimulation.icl +++ b/mTaskSimulation.icl @@ -1,9 +1,12 @@ implementation module mTaskSimulation +import Generics.gdynamic +import Generics.gCons + import iTasks -import gdynamic, gCons, GenEq, StdMisc, StdArray +import GenEq, StdMisc, StdArray import mTask -//derive class iTask Display +derive class iTask Display eval :: (Main (Eval t p)) -> [String] | toString t eval {main=(E f)} = [toString (fst (f Rd zero))] @@ -152,7 +155,7 @@ instance writePinD AnalogPin where // ----- Interactive Simulation ----- // -derive class iTask DigitalPin, AnalogPin, Dyn, StateInterface, DisplayVar, Pin +derive class iTask StateInterface, DisplayVar simulate :: (Main (Eval a p)) -> Task () simulate {main=(E f)} = setup zero where @@ -252,8 +255,8 @@ instance stringQuotes String where stringQuotes x = c "\"" +.+ x +.+ c "\"" instance stringQuotes t where stringQuotes x = x -derive toGenDynamic (), MTask, DigitalPin, AnalogPin, Pin, [], Long//, Servo -derive fromGenDynamic (), MTask, DigitalPin, AnalogPin, Pin, [], Long//, Servo +derive toGenDynamic (), MTask, DigitalPin, AnalogPin, Pin, [], Long, UserLED//, Servo +derive fromGenDynamic (), MTask, DigitalPin, AnalogPin, Pin, [], Long, UserLED//, Servo instance == () where (==) _ _ = True