add:增加文档和上位机

This commit is contained in:
2026-05-21 12:56:29 +08:00
parent 8ee0849831
commit a1d1f19585
95 changed files with 8594 additions and 43 deletions

View File

@@ -134,7 +134,7 @@ void host_computer_on_get_status(uint8_t id, cJSON *json_pack)
udp_send_to_server(str, strlen(str));
free(str);
cJSON_Delete(root);
printf("get_status 回复已发送 \r\n");
printf("[ 上位机 ] get_status 回复已发送 \r\n");
}
/**
@@ -146,7 +146,7 @@ void host_computer_on_get_status(uint8_t id, cJSON *json_pack)
void host_computer_on_reboot(uint8_t id, cJSON *json)
{
(void) id;
printf("host_computer_on_reboot\r\n");
printf("[ 上位机 ] host_computer_on_reboot\r\n");
__ASM volatile("cpsid i");
HAL_NVIC_SystemReset();
}
@@ -285,11 +285,11 @@ void host_computer_report_data(uint8_t stake_index, uint8_t gun_id)
{
udp_send_to_server(str, strlen(str));
free(str);
printf("南向:主动上报桩 %d 枪 %d 主动上报数据成功 \r\n", stake_index, gun_id);
printf("[ 上位机 ] 南向:主动上报桩 %d 枪 %d 主动上报数据成功 \r\n", stake_index, gun_id);
}
else
{
printf("Failed to print JSON for report_data\r\n");
printf("[ 上位机 ] Failed to print JSON for report_data\r\n");
}
cJSON_Delete(root);