Skip to content

Commit

Permalink
Added heatsink tempature
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanielDelgado committed Jul 15, 2024
1 parent 2b392a9 commit 773df21
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Apps/Inc/UpdateDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ UpdateDisplayError_t UpdateDisplay_SetBattCurrent(int32_t val);

UpdateDisplayError_t UpdateDisplay_SetHeartbeat(uint32_t val);

UpdateDisplayError_t UpdateDisplay_SetHeatSinkTemp(uint32_t val);

/**
* @brief Clears the display message queue and sets the message counter semaphore value to 0
* @param none
Expand Down
4 changes: 4 additions & 0 deletions Apps/Src/ReadTritium.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ void Task_ReadTritium(void *p_arg){

}

case TEMPERATURE:{
UpdateDisplay_SetHeatSinkTemp(*(float *)(&dataBuf.data[4]));
}

default:{
break; //for cases not handled currently
}
Expand Down
10 changes: 9 additions & 1 deletion Apps/Src/UpdateDisplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ typedef enum{
PACK_VOLTAGE,
PACK_CURRENT,
PACK_TEMP,
HEAT_SINK_TEMP,
GEAR,
// Fault code components
OS_CODE,
Expand All @@ -50,7 +51,7 @@ typedef enum{

static uint32_t componentVals[NUM_COMPONENTS] = {0};

const char* compStrings[16]= {
const char* compStrings[NUM_COMPONENTS]= {
// Boolean components
"arr",
"hb",
Expand All @@ -66,6 +67,7 @@ const char* compStrings[16]= {
"pv",
"pc",
"pt",
"heatsink",
"gear",
// Fault code components
"oserr",
Expand Down Expand Up @@ -251,6 +253,12 @@ UpdateDisplayError_t UpdateDisplay_SetHeartbeat(uint32_t val){
return UPDATEDISPLAY_ERR_NONE;
}

UpdateDisplayError_t UpdateDisplay_SetHeatSinkTemp(uint32_t val){
componentVals[HEAT_SINK_TEMP] = val;

return UPDATEDISPLAY_ERR_NONE;
}


/**
* @brief Loops through the display queue and sends all messages
Expand Down
Binary file modified Config/Display/display.HMI
Binary file not shown.

0 comments on commit 773df21

Please sign in to comment.