} encoding_map_s;
*/
-#define HISTORY_SIZE_MAX 1000000 // Maximum Allowed History
+#define HISTORY_SIZE_MAX 100000 // Maximum Allowed History
#define TIZEN_DUMP_VERSION "9"
#define DUMP_DATA_TAG "h"
#define DUMP_DATA_TAG_1 "hsp"
struct timeval tv;
gettimeofday(&tv, NULL);
- time_t current_time = tv.tv_sec;
+// time_t current_time = tv.tv_sec;
#ifdef DUMP_DUMMY
history_data[h_count].time_s = nrec->time_s;
h_count++;
else {
// FIXME modify 1st argument (fd)
- int ret = bd_print_history_item_main(-1, 0, current_time, 1);
+/* int ret = bd_print_history_item_main(-1, 0, current_time, 1);
if (ret != BATTERY_MONITOR_ERROR_NONE) {
h_count = 0;
return ret;
}
- ret = bd_free_history_data_memory();
+*/
+ int ret = bd_free_history_data_memory();
if (ret != BATTERY_MONITOR_ERROR_NONE) {
_WARN("Error while memory free %x", ret);
return ret;
}
+ history_item_s ts;
+ ret = bd_print_history_item_reset(&ts);
+ if (ret == BATTERY_MONITOR_ERROR_NONE) {
+ ts.cmd_s = CM_CRR_TIME;
+ ret = bd_store_history_item(&ts);
+ if (ret != BATTERY_MONITOR_ERROR_NONE)
+ _WARN("Init Node addition failed");
+ }
}
EXIT;