Lines Matching refs:hist
65 struct BatteryHistory hist; in checkAndReport() local
111 hist.tempco = histv2.tempco; in checkAndReport()
112 hist.rcomp0 = histv2.rcomp0; in checkAndReport()
113 hist.timer_h = (uint8_t)histv2.timer_h * 5; in checkAndReport()
114 hist.max_temp = (int8_t)histv2.maxtemp * 3 + 22; in checkAndReport()
115 hist.min_temp = (int8_t)histv2.mintemp * 3 - 20; in checkAndReport()
116 hist.min_ibatt = (int16_t)histv2.maxchgcurr * 500 * (-1); in checkAndReport()
117 hist.max_ibatt = (int16_t)histv2.maxdischgcurr * 500; in checkAndReport()
118 hist.min_vbatt = (uint16_t)histv2.minvolt * 10 + 2500; in checkAndReport()
119 hist.max_vbatt = (uint16_t)histv2.maxvolt * 20 + 4200; in checkAndReport()
120 hist.batt_soc = (uint8_t)histv2.vfsoc * 2; in checkAndReport()
121 hist.msoc = (uint8_t)histv2.mixsoc * 2; in checkAndReport()
122 hist.full_cap = (int16_t)histv2.fullcaprep * 125 / 1000; in checkAndReport()
123 hist.full_rep = (int16_t)histv2.fullcapnom * 125 / 1000; in checkAndReport()
124 hist.cycle_cnt = (i + 1) * 10; in checkAndReport()
126 reportEvent(stats_client, hist); in checkAndReport()
142 &hist.cycle_cnt, &hist.full_cap, &hist.esr, in checkAndReport()
143 &hist.rslow, &hist.batt_temp, &hist.soh, in checkAndReport()
144 &hist.cc_soc, &hist.cutoff_soc, &hist.msoc, in checkAndReport()
145 &hist.sys_soc, &hist.reserve, &hist.batt_soc, in checkAndReport()
146 &hist.min_temp, &hist.max_temp, &hist.max_vbatt, in checkAndReport()
147 &hist.min_vbatt, &hist.max_ibatt, &hist.min_ibatt, in checkAndReport()
148 &hist.checksum); in checkAndReport()
155 if (checkLogEvent(hist)) { in checkAndReport()
156 reportEvent(stats_client, hist); in checkAndReport()
172 bool BatteryEEPROMReporter::checkLogEvent(struct BatteryHistory hist) { in checkLogEvent() argument
175 checksum = hist.cycle_cnt + hist.full_cap + hist.esr + hist.rslow in checkLogEvent()
176 + hist.soh + hist.batt_temp + hist.cutoff_soc + hist.cc_soc in checkLogEvent()
177 + hist.sys_soc + hist.msoc + hist.batt_soc + hist.reserve in checkLogEvent()
178 + hist.max_temp + hist.min_temp + hist.max_vbatt in checkLogEvent()
179 + hist.min_vbatt + hist.max_ibatt + hist.min_ibatt; in checkLogEvent()
181 if (checksum == hist.checksum) { in checkLogEvent()
189 const struct BatteryHistory &hist) { in reportEvent() argument
210 hist.cycle_cnt, hist.full_cap, hist.esr, hist.rslow, hist.soh, hist.batt_temp, in reportEvent()
211 hist.cutoff_soc, hist.cc_soc, hist.sys_soc, hist.msoc, hist.batt_soc, hist.reserve, in reportEvent()
212 hist.max_temp, hist.min_temp, hist.max_vbatt, hist.min_vbatt, hist.max_ibatt, in reportEvent()
213 hist.min_ibatt, hist.checksum, hist.full_rep, hist.tempco, hist.rcomp0, hist.timer_h); in reportEvent()
218 val.set<VendorAtomValue::intValue>(hist.cycle_cnt); in reportEvent()
220 val.set<VendorAtomValue::intValue>(hist.full_cap); in reportEvent()
222 val.set<VendorAtomValue::intValue>(hist.esr); in reportEvent()
224 val.set<VendorAtomValue::intValue>(hist.rslow); in reportEvent()
226 val.set<VendorAtomValue::intValue>(hist.soh); in reportEvent()
228 val.set<VendorAtomValue::intValue>(hist.batt_temp); in reportEvent()
230 val.set<VendorAtomValue::intValue>(hist.cutoff_soc); in reportEvent()
232 val.set<VendorAtomValue::intValue>(hist.cc_soc); in reportEvent()
234 val.set<VendorAtomValue::intValue>(hist.sys_soc); in reportEvent()
236 val.set<VendorAtomValue::intValue>(hist.msoc); in reportEvent()
238 val.set<VendorAtomValue::intValue>(hist.batt_soc); in reportEvent()
240 val.set<VendorAtomValue::intValue>(hist.reserve); in reportEvent()
242 val.set<VendorAtomValue::intValue>(hist.max_temp); in reportEvent()
244 val.set<VendorAtomValue::intValue>(hist.min_temp); in reportEvent()
246 val.set<VendorAtomValue::intValue>(hist.max_vbatt); in reportEvent()
248 val.set<VendorAtomValue::intValue>(hist.min_vbatt); in reportEvent()
250 val.set<VendorAtomValue::intValue>(hist.max_ibatt); in reportEvent()
252 val.set<VendorAtomValue::intValue>(hist.min_ibatt); in reportEvent()
254 val.set<VendorAtomValue::intValue>(hist.checksum); in reportEvent()
256 val.set<VendorAtomValue::intValue>(hist.tempco); in reportEvent()
258 val.set<VendorAtomValue::intValue>(hist.rcomp0); in reportEvent()
260 val.set<VendorAtomValue::intValue>(hist.timer_h); in reportEvent()
262 val.set<VendorAtomValue::intValue>(hist.full_rep); in reportEvent()