X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=client%2Fsds.c;h=c2fdbdea251778bb878b79f4506d5f8bc737c171;hb=184c730e7c9ab350be853218f5e1f9b8866531ce;hp=c5f69b653a5d23416b9c9534238c55c647976ee9;hpb=6c8939998c64aafb8cdfa40e52a227bf72767648;p=mTask.git diff --git a/client/sds.c b/client/sds.c index c5f69b6..c2fdbde 100644 --- a/client/sds.c +++ b/client/sds.c @@ -36,6 +36,20 @@ void sds_register(void) debug("Received sds %d: %d", sdss[cs].id, sdss[cs].value); sdss[cs].used = true; + + write_byte('s'); + write16(sdss[cs].id); + write_byte('\n'); +} + +void sds_delete(void) +{ + uint8_t cs; + cs = read16(); + sdss[cs].used = false; + write_byte('a'); + write16(sdss[cs].id); + write_byte('\n'); } bool sds_update(void) @@ -52,6 +66,9 @@ bool sds_update(void) sdss[cs].value = read16(); debug("Received sds update %d: %d", sdss[cs].id, sdss[cs].value); + write_byte('u'); + write16(sdss[cs].id); + write_byte('\n'); return true; } } @@ -64,7 +81,7 @@ void sds_publish(int id) for(cs = 0; cs