From cff39e31064616a108dbe1f4a0065df97819e0bf Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 16 Oct 2025 20:33:40 -0400 Subject: [PATCH 01/28] Implement task creation for version sending Added task creation for sending version information. --- source/bootloader/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/bootloader/main.c b/source/bootloader/main.c index 417ed669e..b9955568a 100644 --- a/source/bootloader/main.c +++ b/source/bootloader/main.c @@ -88,6 +88,8 @@ int main(void) { { BL_CANPoll(); } + /* task creation */ + taskCreate(sendVersion, 5000); } static void BL_CANPoll(void) { @@ -149,7 +151,11 @@ void CAN1_RX0_IRQHandler() { qSendToBack(&q_rx_can, &rx); // Add to queue (qSendToBack is interrupt safe) } } - +void sendVersion() { + char git_hash[8] = GIT_HASH; + uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); + SEND_DASH_VERSION(git_hash_num); +} void SysTick_Handler(void) { bootloader_ms++; } From aad07b6b7bf84cad32e1e13dd069276a7065f15e Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 16 Oct 2025 20:34:00 -0400 Subject: [PATCH 02/28] Add sendVersion task to main function Added a new task to send version information with the current git hash. --- source/pdu/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/pdu/main.c b/source/pdu/main.c index edd413774..0dde1e48f 100644 --- a/source/pdu/main.c +++ b/source/pdu/main.c @@ -208,6 +208,8 @@ int main() { taskCreate(checkSwitchFaults, 100); taskCreate(send_flowrates, 200); schedStart(); + // code added for send version task + taskCreate(sendVersion, 5000); return 0; } @@ -260,6 +262,12 @@ void preflightChecks(void) { } } +// code added for send version +void sendVersion() { + char git_hash[8] = GIT_HASH; + uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); + SEND_DASH_VERSION(git_hash_num); +} void preflightAnimation(void) { static uint32_t time; static int led_number; From 38b60aedfacfa66d4be0f8bddb08a19784162b84 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 16 Oct 2025 20:34:07 -0400 Subject: [PATCH 03/28] Implement sendVersion function for git hash transmission Added sendVersion function to send the git hash. --- source/torque_vector/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/torque_vector/main.c b/source/torque_vector/main.c index 099fa0699..3d1e9425b 100644 --- a/source/torque_vector/main.c +++ b/source/torque_vector/main.c @@ -180,7 +180,9 @@ int main(void) { taskCreateBackground(canTxUpdate); taskCreateBackground(canRxUpdate); - + // task created with send version: + taskCreate(sendVersion, 5000); + ///////////////////////////////// taskCreate(heartBeatLED, 500); taskCreate(heartBeatTask, 100); taskCreate(parseIMU, 20); @@ -271,7 +273,12 @@ void preflightChecks(void) { break; } } - +//change made for send version +void sendVersion() { + char git_hash[8] = GIT_HASH; + uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); + SEND_DASH_VERSION(git_hash_num); +} void preflightAnimation(void) { static uint32_t time; From 7adfdc6bdeafbfcc275987538b551661f1267064 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 16 Oct 2025 20:34:15 -0400 Subject: [PATCH 04/28] Implement sendVersion task for version reporting Added a new task to send version information with the git hash. --- source/a_box/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/a_box/main.c b/source/a_box/main.c index 3432e8183..08b6f61e4 100644 --- a/source/a_box/main.c +++ b/source/a_box/main.c @@ -174,6 +174,9 @@ int main(void) { taskCreate(monitorStatus, 50); taskCreate(orionChargePeriodic, 50); taskCreate(heartBeatTask, 100); + // task created with send version: + taskCreate(sendVersion, 5000); + taskCreate(sendhbmsg, 500); taskCreate(daqPeriodic, DAQ_UPDATE_PERIOD); taskCreate(readCurrents, 50); @@ -219,7 +222,12 @@ void preflightChecks(void) { break; } } - +/// change made for send version +void sendVersion() { + char git_hash[8] = GIT_HASH; + uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); + SEND_DASH_VERSION(git_hash_num); +} void sendhbmsg() { bool imd_status = !PHAL_readGPIO(IMD_STATUS_GPIO_Port, IMD_STATUS_Pin); From 67b89aecf0468fb6db819437c3fd85f8ec91ea86 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 16 Oct 2025 20:34:31 -0400 Subject: [PATCH 05/28] Add task creation for sendVersion function Added task creation for sending version information. --- source/daq/main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/daq/main.c b/source/daq/main.c index 5aaf9c00b..004ecd316 100644 --- a/source/daq/main.c +++ b/source/daq/main.c @@ -137,6 +137,7 @@ bool can_parse_error_status(uint32_t err, timestamped_frame_t* frame); void shutdown(void); int main() { + osKernelInitialize(); bConstruct(&b_rx_can, sizeof(*can_rx_buffer), sizeof(can_rx_buffer)); @@ -178,7 +179,9 @@ int main() { daq_create_threads(); osKernelStart(); - + // code added + /* Task Creation */ + taskCreate(sendVersion, 5000); return 0; } @@ -369,7 +372,11 @@ bool can_parse_error_status(uint32_t err, timestamped_frame_t* frame) { return true; } - +void sendVersion() { + char git_hash[8] = GIT_HASH; + uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); + SEND_DASH_VERSION(git_hash_num); +} /** * @brief Disables high power consumption devices * If file open, flushes it to the sd card From 78ae0b032c3192ae8c8a97d90fe748ebcffce5a4 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 30 Oct 2025 19:44:58 -0400 Subject: [PATCH 06/28] Remove task creation for sendVersion Removed task creation for sendVersion function. --- source/daq/main.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/source/daq/main.c b/source/daq/main.c index 004ecd316..5307ca1a5 100644 --- a/source/daq/main.c +++ b/source/daq/main.c @@ -180,8 +180,7 @@ int main() { osKernelStart(); // code added - /* Task Creation */ - taskCreate(sendVersion, 5000); + return 0; } @@ -372,11 +371,7 @@ bool can_parse_error_status(uint32_t err, timestamped_frame_t* frame) { return true; } -void sendVersion() { - char git_hash[8] = GIT_HASH; - uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); - SEND_DASH_VERSION(git_hash_num); -} + /** * @brief Disables high power consumption devices * If file open, flushes it to the sd card From 1a9694c2e8d815120a4627c9c2fa174779fb3891 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 30 Oct 2025 19:48:40 -0400 Subject: [PATCH 07/28] Change sendVersion to use SEND_ABOX_VERSION --- source/a_box/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/a_box/main.c b/source/a_box/main.c index 08b6f61e4..32bf28c7a 100644 --- a/source/a_box/main.c +++ b/source/a_box/main.c @@ -226,7 +226,7 @@ void preflightChecks(void) { void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); - SEND_DASH_VERSION(git_hash_num); + SEND_ABOX_VERSION(git_hash_num); } void sendhbmsg() { bool imd_status = !PHAL_readGPIO(IMD_STATUS_GPIO_Port, IMD_STATUS_Pin); From 6719683551902aeaa9043f390f7ba69c4014ec6c Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 30 Oct 2025 21:18:47 -0400 Subject: [PATCH 08/28] Add task creation for sendVersion Added task creation for sendVersion function. --- source/daq/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/daq/main.c b/source/daq/main.c index 5307ca1a5..f39006bc6 100644 --- a/source/daq/main.c +++ b/source/daq/main.c @@ -180,7 +180,8 @@ int main() { osKernelStart(); // code added - + /* Task Creation */ + taskCreate(sendVersion, 5000); return 0; } @@ -371,7 +372,10 @@ bool can_parse_error_status(uint32_t err, timestamped_frame_t* frame) { return true; } - +void sendVersion() { + char git_hash[8] = GIT_HASH; + uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); + SEND_DAQ_VERSION(git_hash_num); /** * @brief Disables high power consumption devices * If file open, flushes it to the sd card From 0dc2eaec4c2556ea5671e67657e5fdb4d5b97ece Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 30 Oct 2025 21:31:22 -0400 Subject: [PATCH 09/28] Change SEND_DASH_VERSION to SEND_pdu_VERSION --- source/pdu/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdu/main.c b/source/pdu/main.c index 0dde1e48f..5578751f4 100644 --- a/source/pdu/main.c +++ b/source/pdu/main.c @@ -266,7 +266,7 @@ void preflightChecks(void) { void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); - SEND_DASH_VERSION(git_hash_num); + SEND_pdu_VERSION(git_hash_num); } void preflightAnimation(void) { static uint32_t time; From 7087ed12471fb41bbe63a6acfb1db24625d44ee9 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 30 Oct 2025 21:33:36 -0400 Subject: [PATCH 10/28] Change sendVersion function to use SEND_torque_vector_VERSION --- source/torque_vector/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/torque_vector/main.c b/source/torque_vector/main.c index 3d1e9425b..d14e67558 100644 --- a/source/torque_vector/main.c +++ b/source/torque_vector/main.c @@ -277,7 +277,7 @@ void preflightChecks(void) { void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); - SEND_DASH_VERSION(git_hash_num); + SEND_torque_vector_VERSION(git_hash_num); } void preflightAnimation(void) { static uint32_t time; From 413c8f33a3fab4cfc004ccb2dc1345449c66a986 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Tue, 4 Nov 2025 18:12:23 -0500 Subject: [PATCH 11/28] Remove sendVersion task and function Removed task creation and sendVersion function from bootloader. --- source/bootloader/main.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/source/bootloader/main.c b/source/bootloader/main.c index b9955568a..c7a9255b2 100644 --- a/source/bootloader/main.c +++ b/source/bootloader/main.c @@ -88,8 +88,7 @@ int main(void) { { BL_CANPoll(); } - /* task creation */ - taskCreate(sendVersion, 5000); + } static void BL_CANPoll(void) { @@ -151,11 +150,7 @@ void CAN1_RX0_IRQHandler() { qSendToBack(&q_rx_can, &rx); // Add to queue (qSendToBack is interrupt safe) } } -void sendVersion() { - char git_hash[8] = GIT_HASH; - uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); - SEND_DASH_VERSION(git_hash_num); -} + void SysTick_Handler(void) { bootloader_ms++; } From 0c5566b82ce0c18643974642f7a04765ef0bff5d Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Tue, 4 Nov 2025 19:30:09 -0500 Subject: [PATCH 12/28] Fix function name casing for SEND_PDU_VERSION --- source/pdu/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdu/main.c b/source/pdu/main.c index 5578751f4..c306ce0bc 100644 --- a/source/pdu/main.c +++ b/source/pdu/main.c @@ -266,7 +266,7 @@ void preflightChecks(void) { void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); - SEND_pdu_VERSION(git_hash_num); + SEND_PDU_VERSION(git_hash_num); } void preflightAnimation(void) { static uint32_t time; From b93785b3d949b6be4e9fdf32652b385492368b7c Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Tue, 4 Nov 2025 19:30:34 -0500 Subject: [PATCH 13/28] Add sendVersion task to periodically send version info --- source/main_module/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/main_module/main.c b/source/main_module/main.c index 87db5dc95..0badf7497 100644 --- a/source/main_module/main.c +++ b/source/main_module/main.c @@ -194,6 +194,8 @@ int main(void) { taskCreate(update_lights, 500); taskCreate(parseMCDataPeriodic, 15); taskCreate(daqPeriodic, DAQ_UPDATE_PERIOD); + taskCreate(sendVersion, 5000); + /* Background Tasks */ taskCreateBackground(canTxUpdate); @@ -307,7 +309,11 @@ void preflightAnimation(void) { break; } } - +void sendVersion() { + char git_hash[8] = GIT_HASH; + uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); + SEND_MAIN_VERSION(git_hash_num); +} void heartBeatLED(void) { static uint8_t trig; PHAL_toggleGPIO(HEARTBEAT_GPIO_Port, HEARTBEAT_Pin); From b93edc2cc9a7073938e50416d158d48757b06e38 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Tue, 4 Nov 2025 19:31:18 -0500 Subject: [PATCH 14/28] Rename SEND_torque_vector_VERSION to SEND_TV_VERSION --- source/torque_vector/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/torque_vector/main.c b/source/torque_vector/main.c index d14e67558..7e2074e3f 100644 --- a/source/torque_vector/main.c +++ b/source/torque_vector/main.c @@ -277,7 +277,7 @@ void preflightChecks(void) { void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); - SEND_torque_vector_VERSION(git_hash_num); + SEND_TV_VERSION(git_hash_num); } void preflightAnimation(void) { static uint32_t time; From a5f9bcd2ba15bfdcafcbf77fdf85207c4a225342 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Wed, 5 Nov 2025 11:29:06 -0500 Subject: [PATCH 15/28] Remove commented task for sendVersion Removed commented-out task creation for sendVersion. --- source/a_box/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/a_box/main.c b/source/a_box/main.c index 32bf28c7a..350d8641f 100644 --- a/source/a_box/main.c +++ b/source/a_box/main.c @@ -174,7 +174,6 @@ int main(void) { taskCreate(monitorStatus, 50); taskCreate(orionChargePeriodic, 50); taskCreate(heartBeatTask, 100); - // task created with send version: taskCreate(sendVersion, 5000); taskCreate(sendhbmsg, 500); @@ -222,12 +221,13 @@ void preflightChecks(void) { break; } } -/// change made for send version + void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); SEND_ABOX_VERSION(git_hash_num); } + void sendhbmsg() { bool imd_status = !PHAL_readGPIO(IMD_STATUS_GPIO_Port, IMD_STATUS_Pin); From 25d0150eebcc69f78f45247597e58b73394a424f Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Wed, 5 Nov 2025 11:32:33 -0500 Subject: [PATCH 16/28] Add task creation for sendVersion Added task creation for sendVersion function. --- source/daq/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/daq/main.c b/source/daq/main.c index f39006bc6..d34644368 100644 --- a/source/daq/main.c +++ b/source/daq/main.c @@ -179,8 +179,7 @@ int main() { daq_create_threads(); osKernelStart(); - // code added - /* Task Creation */ + taskCreate(sendVersion, 5000); return 0; } @@ -376,6 +375,8 @@ void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); SEND_DAQ_VERSION(git_hash_num); +} + /** * @brief Disables high power consumption devices * If file open, flushes it to the sd card From a075a4757d3a88e8d80b9125fb5fbaecb977f26d Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Wed, 5 Nov 2025 11:35:31 -0500 Subject: [PATCH 17/28] Remove commented code for sendVersion task --- source/pdu/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/pdu/main.c b/source/pdu/main.c index c306ce0bc..bbb59b399 100644 --- a/source/pdu/main.c +++ b/source/pdu/main.c @@ -208,8 +208,7 @@ int main() { taskCreate(checkSwitchFaults, 100); taskCreate(send_flowrates, 200); schedStart(); - // code added for send version task - taskCreate(sendVersion, 5000); + taskCreate(sendVersion, 5000); return 0; } @@ -262,12 +261,12 @@ void preflightChecks(void) { } } -// code added for send version void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); SEND_PDU_VERSION(git_hash_num); } + void preflightAnimation(void) { static uint32_t time; static int led_number; From 2dbebe569912426b6cb246e132414d768001645b Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Wed, 5 Nov 2025 11:36:48 -0500 Subject: [PATCH 18/28] Clean up commented code in main.c Removed commented lines related to sendVersion task creation. --- source/torque_vector/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/torque_vector/main.c b/source/torque_vector/main.c index 7e2074e3f..00bccd7d5 100644 --- a/source/torque_vector/main.c +++ b/source/torque_vector/main.c @@ -180,9 +180,7 @@ int main(void) { taskCreateBackground(canTxUpdate); taskCreateBackground(canRxUpdate); - // task created with send version: taskCreate(sendVersion, 5000); - ///////////////////////////////// taskCreate(heartBeatLED, 500); taskCreate(heartBeatTask, 100); taskCreate(parseIMU, 20); @@ -273,12 +271,13 @@ void preflightChecks(void) { break; } } -//change made for send version + void sendVersion() { char git_hash[8] = GIT_HASH; uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); SEND_TV_VERSION(git_hash_num); } + void preflightAnimation(void) { static uint32_t time; From 359cb03496ac2b0fee93edce967ae637b3dc9ff5 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 6 Nov 2025 19:43:11 -0500 Subject: [PATCH 19/28] Remove unnecessary blank lines in main.c --- source/bootloader/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/bootloader/main.c b/source/bootloader/main.c index c7a9255b2..5f1681409 100644 --- a/source/bootloader/main.c +++ b/source/bootloader/main.c @@ -88,7 +88,6 @@ int main(void) { { BL_CANPoll(); } - } static void BL_CANPoll(void) { @@ -154,7 +153,6 @@ void CAN1_RX0_IRQHandler() { void SysTick_Handler(void) { bootloader_ms++; } - void HardFault_Handler() { NVIC_SystemReset(); while (1) From 8f6f00e9d2eb91783b9d5c2ad1740d7e4c8d0243 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 13 Nov 2025 21:48:03 -0500 Subject: [PATCH 20/28] Use macro in send version taskCreate() --- source/a_box/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/a_box/main.c b/source/a_box/main.c index 350d8641f..39516b25d 100644 --- a/source/a_box/main.c +++ b/source/a_box/main.c @@ -174,7 +174,7 @@ int main(void) { taskCreate(monitorStatus, 50); taskCreate(orionChargePeriodic, 50); taskCreate(heartBeatTask, 100); - taskCreate(sendVersion, 5000); + taskCreate(sendVersion, PERIOD_MILLISECONDS_DASH_VERSION); taskCreate(sendhbmsg, 500); taskCreate(daqPeriodic, DAQ_UPDATE_PERIOD); From 5c4b5089c5e1315c8c928c5dfc6346bf1ac25be1 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 13 Nov 2025 22:17:02 -0500 Subject: [PATCH 21/28] Use macro in taskCreate sendVersion --- source/daq/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/daq/main.c b/source/daq/main.c index d34644368..8aa4c7aa1 100644 --- a/source/daq/main.c +++ b/source/daq/main.c @@ -180,7 +180,7 @@ int main() { osKernelStart(); - taskCreate(sendVersion, 5000); + taskCreate(sendVersion, PERIOD_MILLISECONDS_DAQ_VERSION); return 0; } From be24daa61adc2e3f52003bf1b3d0f7d399d9212b Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 13 Nov 2025 22:18:14 -0500 Subject: [PATCH 22/28] Update taskCreate for sendVersion --- source/a_box/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/a_box/main.c b/source/a_box/main.c index 39516b25d..5ecb8f29d 100644 --- a/source/a_box/main.c +++ b/source/a_box/main.c @@ -174,7 +174,7 @@ int main(void) { taskCreate(monitorStatus, 50); taskCreate(orionChargePeriodic, 50); taskCreate(heartBeatTask, 100); - taskCreate(sendVersion, PERIOD_MILLISECONDS_DASH_VERSION); + taskCreate(sendVersion, PERIOD_MILLISECONDS_ABOX_VERSION); taskCreate(sendhbmsg, 500); taskCreate(daqPeriodic, DAQ_UPDATE_PERIOD); From 1aae683989ad7ae4df3e6e39a5e11de3e01f5043 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Fri, 14 Nov 2025 10:59:59 -0500 Subject: [PATCH 23/28] Update taskCreate for sendVersion --- source/dashboard/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dashboard/main.c b/source/dashboard/main.c index 81aa34ba8..1e3ef869e 100644 --- a/source/dashboard/main.c +++ b/source/dashboard/main.c @@ -203,7 +203,7 @@ int main(void) { taskCreate(handleDashboardInputs, 50); taskCreate(heartBeatTask, 100); taskCreate(sendShockpots, 15); - taskCreate(sendVersion, 5000); + taskCreate(sendVersion, PERIOD_MILLISECONDS_DASH_VERSION); // taskCreate(interpretLoadSensor, 15); taskCreate(updateTelemetryPages, 200); taskCreate(pollBrakeStatus, 1000); From 85d0ac2f0a87bb1ac44cc8bc616020cdaac1a3dc Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Fri, 14 Nov 2025 11:02:05 -0500 Subject: [PATCH 24/28] Update taskCreate for sendVersion --- source/main_module/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/main_module/main.c b/source/main_module/main.c index 0badf7497..350e9df16 100644 --- a/source/main_module/main.c +++ b/source/main_module/main.c @@ -194,8 +194,7 @@ int main(void) { taskCreate(update_lights, 500); taskCreate(parseMCDataPeriodic, 15); taskCreate(daqPeriodic, DAQ_UPDATE_PERIOD); - taskCreate(sendVersion, 5000); - + taskCreate(sendVersion, PERIOD_MILLISECONDS_MAIN_VERSION); /* Background Tasks */ taskCreateBackground(canTxUpdate); From f01be8233f77b4e3752ab8c478e9f8458aa3760f Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Fri, 14 Nov 2025 11:03:46 -0500 Subject: [PATCH 25/28] Update taskCreate sendVersion --- source/pdu/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdu/main.c b/source/pdu/main.c index bbb59b399..76e78545b 100644 --- a/source/pdu/main.c +++ b/source/pdu/main.c @@ -208,7 +208,7 @@ int main() { taskCreate(checkSwitchFaults, 100); taskCreate(send_flowrates, 200); schedStart(); - taskCreate(sendVersion, 5000); + taskCreate(sendVersion, PERIOD_MILLISECONDS_PDU_VERSION); return 0; } From 9e3a90d50229f355f33e6415b1b3d0c13465a1bd Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Fri, 14 Nov 2025 11:05:04 -0500 Subject: [PATCH 26/28] Update taskCreate for sendVersion --- source/torque_vector/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/torque_vector/main.c b/source/torque_vector/main.c index 00bccd7d5..1f60f69f1 100644 --- a/source/torque_vector/main.c +++ b/source/torque_vector/main.c @@ -180,7 +180,7 @@ int main(void) { taskCreateBackground(canTxUpdate); taskCreateBackground(canRxUpdate); - taskCreate(sendVersion, 5000); + taskCreate(sendVersion, PERIOD_MILLISECONDS_TV_VERSION); taskCreate(heartBeatLED, 500); taskCreate(heartBeatTask, 100); taskCreate(parseIMU, 20); From e46644510a7d886be199e66da134dde7535a69e3 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 27 Nov 2025 21:29:34 -0500 Subject: [PATCH 27/28] draft sendVersion and sendVersionTask functions --- source/daq/daq_hub/daq_hub.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/daq/daq_hub/daq_hub.c b/source/daq/daq_hub/daq_hub.c index 4b5335ab1..4abdf9ab1 100644 --- a/source/daq/daq_hub/daq_hub.c +++ b/source/daq/daq_hub/daq_hub.c @@ -33,6 +33,8 @@ defineThreadStack(daq_heartbeat, 500, osPriorityNormal, 128); // HB defineThreadStack(sd_update_periodic, 100, osPriorityNormal, 4096); // SD WRITE defineThreadStack(eth_update_periodic, 50, osPriorityNormal, 4096); // SD WRITE defineThreadStack(can_send_periodic, 50, osPriorityNormal, 128); // CAN1 TX +defineThreadStack(sendVersionTask, PERIOD_MILLISECONDS_DAQ_VERSION, osPriorityLow, 128); + //defineThreadStack(uds_receive_periodic, 50, osPriorityHigh, 2048); // DAQ CAN RX @@ -70,6 +72,7 @@ void daq_create_threads(void) { createThread(sd_update_periodic); // SD WRITE // createThread(eth_update_periodic); // SD WRITE createThread(can_send_periodic); // CAN1 TX + createThread(sendVersionTask); //createThread(uds_receive_periodic); // DAQ CAN RX } @@ -80,7 +83,21 @@ static void daq_heartbeat(void) { SEND_DAQ_QUEUE_STATS(dh.bcan_rx_overflow, dh.can1_rx_overflow, dh.sd_rx_overflow, dh.tcp_tx_overflow); // TODO reset & only send once? } } +// added +void sendVersion() { + char git_hash[8] = GIT_HASH; + uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); + SEND_DAQ_VERSION(git_hash_num); +} +void sendVersionTask(void *pvParameters) +{ + (void) pvParameters; + + sendVersion(); + vTaskDelay(pdMS_TO_TICKS(PERIOD_MILLISECONDS_DAQ_VERSION)); +} +// static void can_send_periodic(void) { canTxUpdate(); } From a864e21f8b918ac4e6661eefef003202290177b5 Mon Sep 17 00:00:00 2001 From: Pris1320 Date: Thu, 27 Nov 2025 21:33:30 -0500 Subject: [PATCH 28/28] remove sendVersion function and task --- source/daq/main.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/source/daq/main.c b/source/daq/main.c index 8aa4c7aa1..9509386f5 100644 --- a/source/daq/main.c +++ b/source/daq/main.c @@ -179,8 +179,6 @@ int main() { daq_create_threads(); osKernelStart(); - - taskCreate(sendVersion, PERIOD_MILLISECONDS_DAQ_VERSION); return 0; } @@ -371,11 +369,6 @@ bool can_parse_error_status(uint32_t err, timestamped_frame_t* frame) { return true; } -void sendVersion() { - char git_hash[8] = GIT_HASH; - uint64_t git_hash_num = EIGHT_CHAR_TO_U64_LE(git_hash); - SEND_DAQ_VERSION(git_hash_num); -} /** * @brief Disables high power consumption devices