added function to update power.. but not tested..

This commit is contained in:
Christian Lind Vie Madsen
2026-04-07 14:52:45 +02:00
parent aaeb82d199
commit f624e14ff5
2 changed files with 10 additions and 0 deletions

View File

@@ -79,6 +79,15 @@ int cm_heatsinkEmul_setFan(cm_heatsinkEmul_t *inst, float fan_speed){
return 0;
}
int cm_heatsinkEmul_setPower(cm_heatsinkEmul_t *inst, float power){
if(!isStructOk(inst)) return 1;
inst->power = power;
return 0;
}
int cm_heatsinkEmul_init(cm_heatsinkEmul_t *inst, cm_heatsink_thermalElement_t *elements, int elements_Count, float C_th, float power, float ambientTemp){

View File

@@ -46,6 +46,7 @@ typedef struct {
int cm_heatsinkEmul_iterate(cm_heatsinkEmul_t *inst, float dtime);
float cm_heatsinkEmul_getElementTemp(cm_heatsinkEmul_t *inst, int element_idx);
int cm_heatsinkEmul_setPower(cm_heatsinkEmul_t *inst, float power);
int cm_heatsinkEmul_init(cm_heatsinkEmul_t *inst, cm_heatsink_thermalElement_t *elements, int elements_Count, float C_th, float power, float ambientTemp);
#endif /* CM_HEATSINK_EMULATOR_H_ */