spec
[mTask.git] / mTaskInterpret.icl
index b6ab929..16abbd0 100644 (file)
@@ -159,8 +159,8 @@ instance fromByteCode MTaskDeviceSpec where
                |haveLed=c bitand 1 > 0
                ,haveAio=c bitand 2 > 0
                ,haveDio=c bitand 4 > 0
-               ,maxTask=toInt s.[1]
-               ,maxSDS =toInt s.[2]
+               ,maxTask=from16bit $ s % (1,3)
+               ,maxSDS=from16bit $ s % (3,5)
                }
 
 derive gPrint Long, UserLED, Button, AnalogPin, DigitalPin, PinMode, Pin, BC, MTaskDeviceSpec