From: Mart Lubbers Date: Thu, 16 Mar 2017 18:39:27 +0000 (+0100) Subject: spec X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=514de0f92039fee5032c694985b113925bee4ace;p=mTask.git spec --- diff --git a/client/spec.c b/client/spec.c index 6fb66be..81ed9ff 100644 --- a/client/spec.c +++ b/client/spec.c @@ -5,6 +5,6 @@ void spec_send(void) { write_byte(0 | HAVELED << 0 | HAVEAIO << 1 | HAVEDIO << 2); - write_byte(MAXTASKS); - write_byte(MAXSDSS); + write16(MAXTASKS); + write16(MAXSDSS); } diff --git a/mTaskInterpret.icl b/mTaskInterpret.icl index b6ab929..16abbd0 100644 --- a/mTaskInterpret.icl +++ b/mTaskInterpret.icl @@ -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