From 687a1f0c8b2b0617b3b9de974c1ed4d7ecbee820 Mon Sep 17 00:00:00 2001 From: Takuya Sasaki Date: Fri, 30 Aug 2024 17:37:49 +0900 Subject: [PATCH] tests/hwtest/main: Fix CSP ID for ADCS System HK Currently, we are likely facing an issue with the CAN Driver, which is preventing us from enabling Routing on the MAIN Board and performing the HW test. As a workaround, the MAIN Board is transmitting the System HK of the ADCS Board instead. However, the CSP ID of the System HK from the ADCS Board is set to that of the MAIN Board, so this commit fixes this to the CSP ID of the ADCS Board. This fix is only a workaround, and ultimately, these workarounds will be unnecessary once the Routing issue is resolved. Signed-off-by: Takuya Sasaki --- tests/hwtest/main/src/syshk_test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/hwtest/main/src/syshk_test.c b/tests/hwtest/main/src/syshk_test.c index 64ad1e92..15eb3357 100644 --- a/tests/hwtest/main/src/syshk_test.c +++ b/tests/hwtest/main/src/syshk_test.c @@ -42,6 +42,9 @@ struct all_test_result { #define CSP_GET_RW_CMD (6U) #define CSP_GET_RET_CMD (7U) +/* TODO: This is workaround for send ADCS telemetry to GND */ +void csp_send_direct(csp_id_t* idout, csp_packet_t * packet, csp_iface_t * routed_from); + static int send_adcs_syshk(void) { int ret = 0; @@ -90,7 +93,10 @@ static int send_adcs_syshk(void) } /* Send ADCS HK to Ground */ - csp_send(gnd_conn, packet); + /* TODO: This is workaround for send ADCS telemetry to GND */ + packet->id.dst = CSP_ID_GND; + LOG_INF("Send ADCS HK (src:%d dst:%d)", packet->id.src, packet->id.dst); + csp_send_direct(&packet->id, packet, NULL); csp_buffer_free(packet); }