From 8f979250f0082006e034f4ef33bfe784abe2d856 Mon Sep 17 00:00:00 2001 From: FrancoisGrondin Date: Wed, 16 Aug 2017 11:52:00 -0400 Subject: [PATCH] Fixed JSON syntax --- src/sink/snk_pots.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sink/snk_pots.c b/src/sink/snk_pots.c index 150d0a3..4de8189 100644 --- a/src/sink/snk_pots.c +++ b/src/sink/snk_pots.c @@ -17,7 +17,7 @@ switch (obj->format->type) { - case format_float: break; + case format_json: break; default: printf("Invalid format.\n"); @@ -192,7 +192,7 @@ switch(obj->format->type) { - case format_float: + case format_json: obj->smessage[0] = 0x00; @@ -202,7 +202,7 @@ for (iPot = 0; iPot < obj->nPots; iPot++) { - sprintf(obj->smessage,"%s { x = %+1.3f, y = %+1.3f, z = %+1.3f, E = %+1.3f }", obj->smessage, + sprintf(obj->smessage,"%s { \"x\": %1.3f, \"y\": %1.3f, \"z\": %1.3f, \"E\": %1.3f }", obj->smessage, obj->in->pots->array[iPot*4+0], obj->in->pots->array[iPot*4+1], obj->in->pots->array[iPot*4+2], obj->in->pots->array[iPot*4+3]); if (iPot != (obj->nPots - 1)) { -- 2.34.1