update spec, and shares
[mTask.git] / mTaskInterpret.icl
index aeceb92..bd5572a 100644 (file)
@@ -45,6 +45,7 @@ encode (MTTask to data) = "t" +++ toByteCode to +++ to16bit (size data) +++ data
 encode (MTTaskDel i) = "d" +++ to16bit i +++ "\n"
 encode (MTSds i v) = "s" +++ to16bit i +++ v +++ "\n"
 encode (MTUpd i v) = "u" +++ to16bit i +++ v +++ "\n"
+encode (MTSpec) = "c\n"
 
 import StdDebug
 decode :: String -> MTaskMSGRecv
@@ -138,7 +139,7 @@ instance fromByteCode UserLED where fromByteCode s = conses{|*|} !! toInt s.[1]
 instance fromByteCode BCValue where fromByteCode s = parseBCValue s.[0] s
 
 instance toByteCode MTaskInterval where
-       toByteCode OneShot = toByteCode 0
+       toByteCode OneShot = toByteCode (OnInterval 0)
        //Intervals have the first bit 0 and the rest is a 15 bit unsigned int
        toByteCode (OnInterval i) = {toChar $ i/256 bitand 127, toChar $ i rem 256}
        //Intervals have the first bit 1 and the rest is a 15 bit unsigned int