source: trunk/firmware/Src/efficiency.c@ 21

Last change on this file since 21 was 6, checked in by f.jahn, 8 months ago
File size: 311 bytes
RevLine 
[6]1
2#include "sysdata.h"
3#include "efficiency.h"
4
5int16_t EFFICIENCY_Exec(void)
6{
7
8 if (sys_data.s.values.fullCyclesCnt < 1)
9 {
10 return -1;
11 }
12
13
14 double tmp = (double) sys_data.s.values.dischargeTotalWh / sys_data.s.values.chargeTotalWh;
15 return tmp * 100; // Übertragung in promille
16
17
18}
Note: See TracBrowser for help on using the repository browser.