红外peripherals/rmt/ir_protocols实例有问题
-
- Posts: 19
- Joined: Mon Aug 24, 2020 8:38 am
红外peripherals/rmt/ir_protocols实例有问题
刚烧录进板子里,发信号能接收到,上个厕所回来,再按遥控就没反应了 ,只能重启板子,才能再次接收到信号,这是什么原因?好像是要一直发信号才ok,中间停一段时间再发就收不到了。希望那个大牛能指点一下。
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: 红外peripherals/rmt/ir_protocols实例有问题
我们有用自带的红外收发进行测试,没有发现这个问题...期间我们用障碍物遮挡了发送器让接收器收不到信号,过段时间再移开遮挡物,接收器还是能正常工作
...
I (723620) example: Send command 0x176 to address 0x10
I (723690) example: Scan Code --- addr: 0x0010 cmd: 0x0176
I (723750) example: Scan Code (repeat) --- addr: 0x0010 cmd: 0x0176
I (725730) example: Send command 0x177 to address 0x10
I (725800) example: Scan Code --- addr: 0x0010 cmd: 0x0177
I (725860) example: Scan Code (repeat) --- addr: 0x0010 cmd: 0x0177
...
I (846000) example: Send command 0x1b0 to address 0x10
I (846070) example: Scan Code --- addr: 0x0010 cmd: 0x01b0
I (846130) example: Scan Code (repeat) --- addr: 0x0010 cmd: 0x01b0
...开始遮挡...
I (848110) example: Send command 0x1b1 to address 0x10
I (850220) example: Send command 0x1b2 to address 0x10
I (852330) example: Send command 0x1b3 to address 0x10
I (854440) example: Send command 0x1b4 to address 0x10
I (856550) example: Send command 0x1b5 to address 0x10
...移除遮挡...
I (858660) example: Send command 0x1b6 to address 0x10
I (858730) example: Scan Code --- addr: 0x0010 cmd: 0x01b6
I (858790) example: Scan Code (repeat) --- addr: 0x0010 cmd: 0x01b6
...
I (723620) example: Send command 0x176 to address 0x10
I (723690) example: Scan Code --- addr: 0x0010 cmd: 0x0176
I (723750) example: Scan Code (repeat) --- addr: 0x0010 cmd: 0x0176
I (725730) example: Send command 0x177 to address 0x10
I (725800) example: Scan Code --- addr: 0x0010 cmd: 0x0177
I (725860) example: Scan Code (repeat) --- addr: 0x0010 cmd: 0x0177
...
I (846000) example: Send command 0x1b0 to address 0x10
I (846070) example: Scan Code --- addr: 0x0010 cmd: 0x01b0
I (846130) example: Scan Code (repeat) --- addr: 0x0010 cmd: 0x01b0
...开始遮挡...
I (848110) example: Send command 0x1b1 to address 0x10
I (850220) example: Send command 0x1b2 to address 0x10
I (852330) example: Send command 0x1b3 to address 0x10
I (854440) example: Send command 0x1b4 to address 0x10
I (856550) example: Send command 0x1b5 to address 0x10
...移除遮挡...
I (858660) example: Send command 0x1b6 to address 0x10
I (858730) example: Scan Code --- addr: 0x0010 cmd: 0x01b6
I (858790) example: Scan Code (repeat) --- addr: 0x0010 cmd: 0x01b6
-
- Posts: 19
- Joined: Mon Aug 24, 2020 8:38 am
Re: 红外peripherals/rmt/ir_protocols实例有问题
问题已解决,我发现应该是xRingbufferReceive函数超时,退出while循环,导致任务结束造成的,
将items = (rmt_item32_t *) xRingbufferReceive(rb, &length, 1000);
修改为items = (rmt_item32_t*) xRingbufferReceive(rb, &length, (portTickType)portMAX_DELAY);
将items = (rmt_item32_t *) xRingbufferReceive(rb, &length, 1000);
修改为items = (rmt_item32_t*) xRingbufferReceive(rb, &length, (portTickType)portMAX_DELAY);
-
- Posts: 290
- Joined: Wed Sep 05, 2018 6:23 am
Re: 红外peripherals/rmt/ir_protocols实例有问题
有道理,不错的发现,我们会据此修改一下这个example 的
Who is online
Users browsing this forum: No registered users and 119 guests