| New file |
| | |
| | | #include "working_time_calculate.h" |
| | | #include "extern_rtc.h" |
| | | #include "administrator.h" |
| | | #include "system_log.h" |
| | | |
| | | int8_t lith_bat_real_per_g = 100;//ĬÈÏ100%µçÁ¿ |
| | | |
| | | /*¼ÆËãÊ£Ó๤×÷ʱ¼ä*/ |
| | | void Remaining_WorkingTime_CalculateProcess(int8_t lith_vcc_per,float lith_vcc) |
| | | { |
| | | if(((&calendar_g)->Minute == 0x16) && ((&calendar_g)->Second == 0x16) && |
| | | save_realtime_data_g.lith_bat_working_time_remain_hour && sys_display_para_g.sys_and_display_mode != SET_PARA_MODE) |
| | | save_realtime_data_g.lith_bat_working_time_remain_hour--; |
| | | int8_t lith_work_time_per = (float)save_realtime_data_g.lith_bat_working_time_remain_hour / (float)LITH_BAT_WORKING_TIME_MAX * 100; |
| | | if(lith_work_time_per <= 20 && lith_vcc < 3.2f) |
| | | { |
| | | __SYS_STATUS_ALARM_BYTES_SET(lith_low); |
| | | if(lith_work_time_per == 0) |
| | | __SYS_STATUS_ALARM_BYTES_SET(lith_under); |
| | | } |
| | | lith_bat_real_per_g = ((lith_vcc_per > lith_work_time_per) ? lith_work_time_per : lith_vcc_per); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |