Skip to content

Commit

Permalink
tests/hwtest/main: Fix CSP ID for ADCS System HK
Browse files Browse the repository at this point in the history
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 <takuya.sasaki@spacecubics.com>
  • Loading branch information
sasataku committed Sep 15, 2024
1 parent 526ad00 commit 687a1f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/hwtest/main/src/syshk_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 687a1f0

Please sign in to comment.