sendToDevice :: String (Main (ByteCode () Stmt)) (MTaskDevice, MTaskInterval) -> Task ()
sendToDevice wta mTask (device, timeout) =
- get bcStateStore @ toMessages timeout o toRealByteCode (unMain mTask)
+ get bcStateStore
+ @ (\st->toMessages timeout (toRealByteCode (unMain mTask) {st & sdss=[]}))
>>= \(msgs, st1)->set st1 bcStateStore @ toSDSRecords
>>= \sdss->upd ((++)sdss) sdsStore//MTaskShareaddToSDSShare
>>| makeShares sdss