Changeset 24 for trunk/fw_g473rct/SES/src/shunt_temperature.c
- Timestamp:
- Aug 31, 2025, 6:56:29 PM (4 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/fw_g473rct/SES/src/shunt_temperature.c
r20 r24 38 38 void SHUNT_TEMPERATURE_Exec(int32_t adcval) 39 39 { 40 int32_ttemp;40 double temp; 41 41 42 42 43 43 //Umrechnung Spannung in mV 44 temp = (adcval * 3300 ) / 65536;44 temp = (adcval * VREF ) / 65536.0; 45 45 46 //Umrechnung in °C mit PT 1000 Sensor47 // temp = temp - 747;48 // temp = temp * 70.406;49 46 50 47 //Umrechnung in °C mit LM61 Sensor 51 48 temp = temp - 600; 52 temp = temp * 100;49 temp = temp / 10; 53 50 54 51 //2Nackommastellen 55 52 //milli grad in grad * 100 /festkomma 56 sys_data.s.values.shuntTemperature = temp / 10;53 sys_data.s.values.shuntTemperature = temp * 100; 57 54 58 55
Note: See TracChangeset
for help on using the changeset viewer.