(gnuradio)有什么方法可以使用“ python block”。成为来源?

发布于 2025-01-28 22:15:49 字数 526 浏览 5 评论 0原文

我的ADC模块具有1 MHz采样率。 这是他的示例程序

我将给他一个40kHz载体信号作为模拟输入。我想将他收到的电压信号写入“ gnuradio”的“ python块”中。让他

output_items[0][:]=adc.readA1Volts()

,但是当我这样做时,它用尽了:

swig director method error: error detected when calling 'feval_p.eval'

有什么办法可以实现这一目标?

(我的英语不是很好,我翻译了Google,对不起)

I have an ADC module with 1 MHZ sampling rate.
Here is the URL of his sample program

I will give him a 40khz carrier signal as an analog input. I want to write the voltage signal he received into the "python block" of "GNURADIO". let his

output_items[0][:]=adc.readA1Volts()

But when I do this it runs out:

swig director method error: error detected when calling 'feval_p.eval'

Is there any way I can achieve this?

(I'm not very good in English, I translated it by Google, sorry)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

野鹿林 2025-02-04 22:15:49

通常,是的。您可以在Python中编写GNU无线电源。

output_items [0] [:] = adc.reada1volts()

说“分配output_items中的许多项目[0]来自adc.reada1volts的值或值()几乎不正确

,可能是由于数组尺寸不匹配或类似的原因,因此您看到这

是对如何误解的 。写一个python块。

Generally, yes. You can write a GNU Radio source in Python.

output_items[0][:]=adc.readA1Volts()

That says "assign the many items in output_items[0] the value or values from adc.readA1Volts(), which is almost certainly not correct.

Possibly, something throws an error here, maybe because of array size mismatch or similar, and hence that error you see arises.

I think this reflects a bit of misunderstanding on how to write a python block. The Official GNU Radio Tutorials might be the best place to start.

我的痛♀有谁懂 2025-02-04 22:15:49

ADC.ReadA1Volts()是单个电压(点),它将读取ADC,我可以将其存储为矩阵,

例如:

ADC=[]
ADC.append(adc.readA1Volts())

然后由output_items [0],
例如:

output_items[0][:]=ADC

这个想法正确吗?
我不知道他的输出形式是什么样的。

adc.readA1Volts() is a single voltage (POINT) that will read adc, I can store it as a matrix,

ex:

ADC=[]
ADC.append(adc.readA1Volts())

Then it is output by output_items[0],
ex:

output_items[0][:]=ADC

Is this thought correct?
I don't know what his output form is like.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文