added function to update power.. but not tested..
This commit is contained in:
@@ -79,6 +79,15 @@ int cm_heatsinkEmul_setFan(cm_heatsinkEmul_t *inst, float fan_speed){
|
|||||||
return 0;
|
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){
|
int cm_heatsinkEmul_init(cm_heatsinkEmul_t *inst, cm_heatsink_thermalElement_t *elements, int elements_Count, float C_th, float power, float ambientTemp){
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ typedef struct {
|
|||||||
|
|
||||||
int cm_heatsinkEmul_iterate(cm_heatsinkEmul_t *inst, float dtime);
|
int cm_heatsinkEmul_iterate(cm_heatsinkEmul_t *inst, float dtime);
|
||||||
float cm_heatsinkEmul_getElementTemp(cm_heatsinkEmul_t *inst, int element_idx);
|
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);
|
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_ */
|
#endif /* CM_HEATSINK_EMULATOR_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user