aboutsummaryrefslogtreecommitdiff
path: root/src/survive_config.h
diff options
context:
space:
mode:
authorJoshua Allen <axlecrusher@gmail.com>2017-02-25 14:34:10 -0500
committerJoshua Allen <axlecrusher@gmail.com>2017-02-25 14:34:10 -0500
commit3baabd2f8aa69a986bbb29739e6353d9a95336c5 (patch)
tree28b9b6907d71fdf153d70178cd03e15fe18b0195 /src/survive_config.h
parentbf096a3e3dfa67a9776e47eb0e651b46ee4e8319 (diff)
downloadlibsurvive-3baabd2f8aa69a986bbb29739e6353d9a95336c5.tar.gz
libsurvive-3baabd2f8aa69a986bbb29739e6353d9a95336c5.tar.bz2
float to FLT
Diffstat (limited to 'src/survive_config.h')
-rw-r--r--src/survive_config.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/survive_config.h b/src/survive_config.h
index 03e5eb8..24762cd 100644
--- a/src/survive_config.h
+++ b/src/survive_config.h
@@ -15,7 +15,7 @@ typedef enum {
/*
typedef union {
uint32_t i;
- float f;
+ FLT f;
} Numeric;
*/
typedef struct {
@@ -23,7 +23,7 @@ typedef struct {
cval_type type;
union {
uint32_t i;
- float f;
+ FLT f;
} numeric;
char *str;
} config_val;
@@ -33,4 +33,13 @@ void config_open(const char* path, const char* mode);
void config_close();
void config_write_lighthouse(struct BaseStationData* bsd, uint8_t length);
+void config_save(const char* path);
+const FLT config_set_float(const char *tag, const FLT value);
+const uint32_t config_set_uint32(const char *tag, const uint32_t value);
+const char* config_set_str(const char *tag, const char* value);
+FLT config_read_float(const char *tag, const FLT value, const FLT def);
+
+uint32_t config_read_uint32(const char *tag, const uint32_t value, const uint32_t def);
+const char* config_read_str(const char *tag, const char *value, const char *def_str);
+
#endif \ No newline at end of file