Compare commits
No commits in common. "12b2d399d699594d355ab7a381e45d592563e7b5" and "cd4f1433a3515250320e211f34f4b527712af8b4" have entirely different histories.
12b2d399d6
...
cd4f1433a3
2 changed files with 0 additions and 17 deletions
|
@ -1,17 +0,0 @@
|
|||
#include <cjson/cJSON.h>
|
||||
#include <stdio.h>
|
||||
|
||||
char *build_set_level_command(int level) {
|
||||
cJSON *root = cJSON_CreateObject();
|
||||
cJSON_AddStringToObject(root, "cmd", "set_level");
|
||||
cJSON_AddNumberToObject(root, "level", level);
|
||||
|
||||
char *message = cJSON_PrintUnformatted(root);
|
||||
cJSON_Delete(root);
|
||||
return message; // Remember to free this when done!
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
printf("%s\n", build_set_level_command(10));
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue