默认情况下、毫米波雷达演示实验室接受通过 UART 传输的配置命令、以使用所需设置设置器件。 为了提供灵活性、这些文件通常存储在文本文件中并在启动时发送、但这需要 PC 连接并需要很短的时间。 当远程使用器 件或重复测量时、将这些配置值"硬编码"、这样器件将引导、配置、线性调频脉冲并输出数据、而无需用户进一步输入、这会非常有帮助。
使用已经构建的 CLI 驱动程序、可以很容易地将此功能添加到任何现有演示中。 下面的说明说明说明了添加此功能的快速方法。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
默认情况下、毫米波雷达演示实验室接受通过 UART 传输的配置命令、以使用所需设置设置器件。 为了提供灵活性、这些文件通常存储在文本文件中并在启动时发送、但这需要 PC 连接并需要很短的时间。 当远程使用器 件或重复测量时、将这些配置值"硬编码"、这样器件将引导、配置、线性调频脉冲并输出数据、而无需用户进一步输入、这会非常有帮助。
使用已经构建的 CLI 驱动程序、可以很容易地将此功能添加到任何现有演示中。 下面的说明说明说明了添加此功能的快速方法。
#ifdef USE_HARD_CODED_CONFIG
int32_t hardCodedConfigIndex;
char * hardCodedConfigCommands[] =
{
"sensorStop ",
"flushCfg ",
"dfeDataOutputMode 1 ",
…
…
"!!!END_OF_HARD_CODED_COMMANDS"
};
#endif
#ifdef USE_HARD_CODED_CONFIG
hardCodedConfigIndex = 0;
CLI_write ("Wait some time for system to initialize...\n");
Task_sleep(100);
CLI_write ("Performing hard-coded config\n");
#endif
#ifdef USE_HARD_CODED_CONFIG
/* Run hard-coded commands, one at a time until '!!!END_OF_HARD_CODED_COMMANDS' is reached: */
if (hardCodedConfigCommands[hardCodedConfigIndex][0] != '!')
{
//CLI_write (hardCodedConfigCommands[hardCodedConfigIndex]);
CLI_write ("Command\n");
memcpy((void *)&cmdString[0], (void *)hardCodedConfigCommands[hardCodedConfigIndex],
strlen(hardCodedConfigCommands[hardCodedConfigIndex]));
hardCodedConfigIndex++;
}
/* Accept commands from UART after all hard-coded commands done: */
else
{
/* Read the command message from the UART: */
UART_read (gCLI.cfg.cliUartHandle, &cmdString[0], (sizeof(cmdString) - 1));
}
#else
/* Read the command message from the UART: */
UART_read (gCLI.cfg.cliUartHandle, &cmdString[0], (sizeof(cmdString) - 1));
#endif