X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=int%2Fsds.c;h=c5f69b653a5d23416b9c9534238c55c647976ee9;hb=3c4bbb3cae00cb810107b39b99b8118e9e458a34;hp=80c31f95b9951a2978a86870ad657e9497b295da;hpb=64f379e7446a716257f6030157f2cb254200aa7b;p=mTask.git diff --git a/int/sds.c b/int/sds.c index 80c31f9..c5f69b6 100644 --- a/int/sds.c +++ b/int/sds.c @@ -65,14 +65,14 @@ void sds_publish(int id) if(sdss[cs].used && sdss[cs].id == id){ debug("Publish %d=%d", sdss[cs].id, sdss[cs].value); write_byte('u'); - write_byte(0); - write_byte(sdss[cs].id); - write_byte(sdss[cs].value/265); - write_byte(sdss[cs].value%265); + write16(sdss[cs].id); + write16(sdss[cs].value); + write_byte('\n'); return; } } debug("SDS identifier unknown: %d", id); + die(""); } int sds_fetch(int id) @@ -82,6 +82,7 @@ int sds_fetch(int id) if(sdss[cs].used && sdss[cs].id == id) return sdss[cs].value; debug("SDS identifier unknown: %d", id); + die(""); return 0; } @@ -95,4 +96,5 @@ void sds_store(int id, int val) } } debug("SDS identifier unknown: %d", id); + die(""); }