Seems to calculate correctly now. I need to implement the plot script to verify operation against LT_spice.
This commit is contained in:
Submodule cm_heatsink_emulator updated: ab53feccc5...f8451ba27c
10
main.c
10
main.c
@@ -7,7 +7,7 @@
|
||||
#include "cm_heatsink_emulator/cm_heatsink_emulator.h"
|
||||
|
||||
#define POWER 600 // Watts
|
||||
#define AMBIENT_TEMPERATURE 25 // degC
|
||||
#define AMBIENT_TEMPERATURE 23 // degC
|
||||
#define C_TH 32688.36649 // Thermal capacity
|
||||
|
||||
cm_heatsink_thermalElement_t thermElements[3] = {
|
||||
@@ -28,7 +28,11 @@ cm_heatsinkEmul_t thermEmul;
|
||||
int main(void ){
|
||||
|
||||
// Init Thermal emulator
|
||||
cm_heatsinkEmul_init(&thermEmul, thermElements, 1/*(sizeof(thermElements) / sizeof(thermElements[0]))*/, POWER, AMBIENT_TEMPERATURE);
|
||||
cm_heatsinkEmul_init(&thermEmul, thermElements,(sizeof(thermElements) / sizeof(thermElements[0])), C_TH, POWER, AMBIENT_TEMPERATURE);
|
||||
|
||||
cm_heatsinkEmul_iterate(&thermEmul, 32688.36649);
|
||||
float t = cm_heatsinkEmul_getElementTemp(&thermEmul, 2);
|
||||
printf("temp: %f\r\n", t);
|
||||
return 0;
|
||||
|
||||
cm_heatsinkEmul_getRespon(&thermEmul, 0.1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user