Skip to content

Commit

Permalink
Add Thermal Management Task
Browse files Browse the repository at this point in the history
  • Loading branch information
elsaigh committed Oct 20, 2024
1 parent d89fad2 commit 0f42b97
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions Testing/Temporary/CTestCostData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
3 changes: 3 additions & 0 deletions Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Start testing: Oct 12 13:35 EDT
----------------------------------------------------------
End testing: Oct 12 13:35 EDT
19 changes: 18 additions & 1 deletion services/thermal_mgr/thermal_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "errors.h"
#include "lm75bd.h"
#include "console.h"
#include "logging.h"

#include <FreeRTOS.h>
#include <os_task.h>
Expand Down Expand Up @@ -51,10 +52,26 @@ void osHandlerLM75BD(void) {
/* Implement this function */
}

static void thermalMgr(void *pvParameters) {
static void thermalMgr(void *pvParameters) { // what is pvParameters used for?
/* Implement this task */
thermal_mgr_event_t queueEventItemBuffer = {0};

while (1) {

printConsole("Here 1\n");

if (xQueueReceive(thermalMgrQueueHandle,
&queueEventItemBuffer,
(TickType_t) 10) == pdPASS) {

printConsole("Here 2\n");

if (queueEventItemBuffer.type == THERMAL_MGR_EVENT_MEASURE_TEMP_CMD) {
float tempC;
readTempLM75BD(LM75BD_OBC_I2C_ADDR, &tempC);
addTemperatureTelemetry(tempC);
}
}
}
}

Expand Down

0 comments on commit 0f42b97

Please sign in to comment.