/* Structure to calculate percentage time LCD on during charging */
struct rul_lcd_data {
display_state_e state;
- long on_time;
- long on_start_time;
- long on_stop_time;
+ time_t on_time;
+ time_t on_start_time;
+ time_t on_stop_time;
};
/* Structure to store RUL related charging info */
struct rul_info {
- long charging_start_time;
- long charging_stop_time;
+ time_t charging_start_time;
+ time_t charging_stop_time;
float raw_capacity; /* capacity (mAh) accumulation during charging */
int soc_start; /* SoC(%) value when charging starts */
int soc_stop; /* SoC(%) value when charging stops */
static void rul_charging_cycle_end_work(void)
{
int capacity;
- long total_charging_time;
+ time_t total_charging_time;
bool lcd_on_time_check;
float lcd_on_ratio = 1.0f;
* If capacity = 100%, dump collected data
*/
- long rul_curr_time, rul_time_interval;
- static long prev_charging_time;
+ time_t rul_curr_time, rul_time_interval;
+ static time_t prev_charging_time;
int fg_curr_inst, capacity, ret;
float fg_curr_inst_f;
static float prev_fg_curr_inst_f = 0.0f;