Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_IKS01A1 MLX90614 d7a_1x wizzi-utils
Fork of D7A_1x_demo_sensors_OS5 by
Diff: files.cpp
- Revision:
- 10:3d3dfc12f674
- Parent:
- 8:01f0225408cf
diff -r 25180d6a4c3a -r 3d3dfc12f674 files.cpp
--- a/files.cpp Mon Feb 06 10:05:25 2017 +0000
+++ b/files.cpp Fri Feb 17 12:53:06 2017 +0000
@@ -36,90 +36,32 @@
.divider = 500, // Boot value
);
-GENERIC_FILE_INIT(mag_cfg,
- .cfg.report_type = REPORT_ON_DIFFERENCE,
- .cfg.period = 1000,
- .cfg.max_period = 300,
- .cfg.max_diff = 500,
- .cfg.threshold_high = 1000,
- .cfg.threshold_low = -1000,
-);
-
-GENERIC_FILE_INIT(acc_cfg,
- .cfg.report_type = REPORT_ON_DIFFERENCE,
- .cfg.period = 1000,
- .cfg.max_period = 300,
- .cfg.max_diff = 100,
- .cfg.threshold_high = 500,
- .cfg.threshold_low = -500,
-);
-GENERIC_FILE_INIT(gyr_cfg,
- .cfg.report_type = REPORT_ON_DIFFERENCE,
- .cfg.period = 1000,
- .cfg.max_period = 300,
- .cfg.max_diff = 1000,
- .cfg.threshold_high = 10000,
- .cfg.threshold_low = -10000,
-);
-
-GENERIC_FILE_INIT(pre_cfg,
- .cfg.report_type = REPORT_ON_DIFFERENCE,
- .cfg.period = 1000,
- .cfg.max_period = 60,
- .cfg.max_diff = 100,
- .cfg.threshold_high = 120000,
- .cfg.threshold_low = 90000,
-);
-
-GENERIC_FILE_INIT(hum_cfg,
- .cfg.report_type = REPORT_ON_DIFFERENCE,
- .cfg.period = 1000,
- .cfg.max_period = 60,
- .cfg.max_diff = 100,
- .cfg.threshold_high = 7000,
- .cfg.threshold_low = 3000,
-);
GENERIC_FILE_INIT(tem1_cfg,
- .cfg.report_type = REPORT_ON_DIFFERENCE,
- .cfg.period = 1000,
- .cfg.max_period = 60,
+ .cfg.report_type = REPORT_ALWAYS,
+ .cfg.period = 5000,
+ .cfg.max_period = 5,
.cfg.max_diff = 100,
.cfg.threshold_high = 3500,
.cfg.threshold_low = 2000,
);
-GENERIC_FILE_INIT(tem2_cfg,
- .cfg.report_type = REPORT_ON_DIFFERENCE,
- .cfg.period = 1000,
- .cfg.max_period = 60,
- .cfg.max_diff = 100,
- .cfg.threshold_high = 9000,
- .cfg.threshold_low = 7000,
-);
-
-GENERIC_FILE_INIT(light_cfg,
- .cfg.report_type = REPORT_ON_DIFFERENCE,
- .cfg.period = 1000, // ms
+GENERIC_FILE_INIT(volt_cfg,
+ .cfg.report_type = REPORT_ALWAYS,
+ .cfg.period = 20000, // ms
.cfg.max_period = 60, // sec
.cfg.max_diff = 10, // percent
.cfg.threshold_high = 0, // disabled
.cfg.threshold_low = 100, // disabled
);
-#define FILE_QTY 9
+#define FILE_QTY 3
static const void* file_map[FILE_QTY][2] = {
- GENERIC_FILE_MAP(MAG_CFG_FILE_ID, mag_cfg),
- GENERIC_FILE_MAP(ACC_CFG_FILE_ID, acc_cfg),
- GENERIC_FILE_MAP(GYR_CFG_FILE_ID, gyr_cfg),
- GENERIC_FILE_MAP(PRE_CFG_FILE_ID, pre_cfg),
- GENERIC_FILE_MAP(HUM_CFG_FILE_ID, hum_cfg),
GENERIC_FILE_MAP(TEM1_CFG_FILE_ID, tem1_cfg),
- GENERIC_FILE_MAP(TEM2_CFG_FILE_ID, tem2_cfg),
- GENERIC_FILE_MAP(LIGHT_CFG_FILE_ID, light_cfg),
GENERIC_FILE_MAP(SIMUL_FILE_ID, simul),
+ GENERIC_FILE_MAP(VOLT_CFG_FILE_ID, volt_cfg),
};
void* file_get( uint8_t file_id )
