diff options
author | Justin Berger <jdavidberger@gmail.com> | 2018-07-01 04:13:34 +0000 |
---|---|---|
committer | Justin Berger <jdavidberger@gmail.com> | 2018-07-01 04:13:34 +0000 |
commit | 47141c873ffd3d7af62bfba40b1adbcce0df6574 (patch) | |
tree | 245575a52f46b7fdd163b264eb17ee74863d0c28 /redist/json_helpers.h | |
parent | 70ac578a3edfdac2223bb0419445621cfb153c72 (diff) | |
download | libsurvive-47141c873ffd3d7af62bfba40b1adbcce0df6574.tar.gz libsurvive-47141c873ffd3d7af62bfba40b1adbcce0df6574.tar.bz2 |
Finalized reading in and transforming of accel/gyro data
Diffstat (limited to 'redist/json_helpers.h')
-rw-r--r-- | redist/json_helpers.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/redist/json_helpers.h b/redist/json_helpers.h index 3ebf66b..2152d85 100644 --- a/redist/json_helpers.h +++ b/redist/json_helpers.h @@ -3,9 +3,10 @@ #ifndef JSON_HELPERS_H #define JSON_HELPERS_H -#include <stdint.h> -#include <jsmn.h> #include "survive_types.h" +#include <jsmn.h> +#include <stdint.h> +#include <stdio.h> void json_write_float_array(FILE* f, const char* tag, float* v, uint8_t count); void json_write_double_array(FILE* f, const char* tag, double* v, uint8_t count); @@ -13,6 +14,7 @@ void json_write_uint32(FILE* f, const char* tag, uint32_t v); void json_write_float(FILE* f, const char* tag, float v); void json_write_str(FILE* f, const char* tag, const char* v); +int parse_float_array_in_place(char *str, jsmntok_t *token, FLT *values, uint8_t count); int parse_float_array(char* str, jsmntok_t* token, FLT** values, uint8_t count); void json_load_file(const char* path); @@ -20,5 +22,4 @@ extern void (*json_begin_object)(char* tag); extern void (*json_end_object)(); extern void (*json_tag_value)(char* tag, char** values, uint8_t count); - -#endif
\ No newline at end of file +#endif |