Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions tool_services/gate/TinyJSON/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char *
int i = 0;
// this is a trajectory
int size = (int)json_getInteger(json_getChild(jobj));
if (size == 0)
{
// This trajaectory is empty
return;
}
// find the first \r of the current buf
for (i = 0; i < GATE_BUFF_SIZE; i++)
{
Expand Down Expand Up @@ -308,6 +313,11 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char *
int i = 0;
// this is a trajectory
int size = (int)json_getInteger(json_getChild(jobj));
if (size == 0)
{
// This trajaectory is empty
return;
}
// find the first \r of the current buf
for (i = 0; i < GATE_BUFF_SIZE; i++)
{
Expand Down Expand Up @@ -341,6 +351,11 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char *
int i = 0;
// this is a trajectory
int size = (int)json_getInteger(json_getChild(jobj));
if (size == 0)
{
// This trajaectory is empty
return;
}
// find the first \r of the current buf
for (i = 0; i < GATE_BUFF_SIZE; i++)
{
Expand Down Expand Up @@ -492,6 +507,11 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char *
int i = 0;
// This is a binary
int size = (int)json_getInteger(item);
if (size == 0)
{
// This trajaectory is empty
return;
}
// find the first \r of the current buf
for (i = 0; i < GATE_BUFF_SIZE; i++)
{
Expand Down Expand Up @@ -620,6 +640,11 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char *
int i = 0;
// This is a binary
unsigned int size = (int)json_getInteger(jobj);
if (size == 0)
{
// This trajaectory is empty
return;
}
// find the first \r of the current buf
for (i = 0; i < GATE_BUFF_SIZE; i++)
{
Expand Down Expand Up @@ -663,6 +688,11 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char *
int i = 0;
// This is a binary
unsigned int size = (int)json_getInteger(item);
if (size == 0)
{
// This trajaectory is empty
return;
}
// find the first \r of the current buf
for (i = 0; i < GATE_BUFF_SIZE; i++)
{
Expand Down