|
|
@@ -20,6 +20,8 @@ double f_pd = 200e6;
|
|
|
|
|
|
uint16_t armCode[1] = {0};
|
|
|
uint16_t attCode[1] = {0};
|
|
|
+uint16_t offsetCode[1] = {0};
|
|
|
+uint16_t slopeCode[1] = {0};
|
|
|
|
|
|
//Массив структур Command, который связывает строки команд с соответствующими функциями.
|
|
|
Command commands[] = {
|
|
|
@@ -50,6 +52,7 @@ void handleFreqCmd(const char* recvBuff)
|
|
|
*spi_mode = cfg_reg;
|
|
|
|
|
|
set_cfg_reg(cfg_reg);
|
|
|
+ potentiometer_set_qspi((uint8_t) offsetCode[0], (uint8_t) slopeCode[0]);
|
|
|
lmx_freq = lmx_get_freq(freq[0]);
|
|
|
f_pd = ad9912_set(bar1, lmx_freq, f_pd);
|
|
|
printf("f_pd frequency is set to %.6f MHz\n", f_pd/1e6);
|
|
|
@@ -170,7 +173,6 @@ void handleIdnCmd(const char* recvBuff)
|
|
|
void handleOffsetCmd(const char* recvBuff)
|
|
|
{
|
|
|
printf("\nHandle command \"TMSG44:OFFSET\"\n");
|
|
|
- uint16_t offsetCode[1] = {0};
|
|
|
|
|
|
splitLexeme(recvBuff, offsetCode, sizeof(offsetCode[0]), convertToUInt16);
|
|
|
printf("\n%u\n", offsetCode[0]);
|
|
|
@@ -179,7 +181,6 @@ void handleOffsetCmd(const char* recvBuff)
|
|
|
void handleSlopeCmd(const char* recvBuff)
|
|
|
{
|
|
|
printf("\nHandle command \"TMSG44:SLOPE\"\n");
|
|
|
- uint16_t slopeCode[1] = {0};
|
|
|
|
|
|
splitLexeme(recvBuff, slopeCode, sizeof(slopeCode[0]), convertToUInt16);
|
|
|
printf("\n%u\n", slopeCode[0]);
|