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.
Tool/software:
Dear Sir,
With reference to the multi-graph selected camera view query, I am facing an issue related to the use of tivxNodeSendCommand simultaneously in a switch case.
For your reference:
case 'b': channel_prms.active_channel = 2; vxCopyUserDataObject(switch_ch_obj, 0, sizeof(tivx_select_channel_t), &channel_prms, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST); refs1[0] = (vx_reference)switch_ch_obj; tivxNodeSendCommand(obj->imgMosaicObj.node, 0,TIVX_SWITCH_CHANNEL, refs1, 1u); overlay_prms.isFront = vx_false_e; vxCopyUserDataObject(overlay_obj, 0, sizeof(tivx_overlay_select), &overlay_prms, VX_WRITE_ONLY, VX_MEMORY_TYPE_HOST); refs2[0] = (vx_reference)overlay_obj; tivxNodeSendCommand(obj->srvobj.Srvnode, 0,TIVX_OVERLAY_SELECT, refs2, 1u); break;
In the above use case, the first command is for switching the camera view and the next is for the SRV to change the parking line position from the front to the back side of the vehicle. This change of parking lines is a part of the SRV code running on A72 implemented with the same logic as Selectable view.
I expected both to change simultaneously, but only the first command works; the next does not take effect. However, if I keep the second node command in a separate switch case, it happens as expected.
I tried nested switch-case, but it failed.
Could you please let me know, if simultaneous tivxNodeSendCommand is feasible in a single switch case? If yes, where am I getting wrong?
If No, Could you please suggest, how to handle this?
Thanks and Regards,
Vyom Mishra
Hi,
Is the second command reaching the control callback of the node?
Regards,
Nikhil
Dear Sir,
Yes, the second command reaches the control callback of the node.
Note: I have made a mistake in analysing the older selectable camera in the multigraph query, for sensor index=0 ( both graphs are updating) but as soon as another sensor index command is initiated, the SRV graph does not update only the left side camera is changed. That is the reason my second command is not working which is for the SRV node.
The manipulation in the mosaic target process snippet informs the mosaic so copy of the selectable view is not created on top of SRV but there is only one input present so it ignores the second graph and SRV freezes
Can you please suggest a better way to implement it?
Thanks and Regards,
Vyom Mishra
Hi Vyom,
This FAQ does switching in mosaic for one input window.
In case of 2 input window, i think the target implementation needs to modified so that there is no for loop based on number of windows.
If you have 2 windows, then the switch part (i.e. channel select) should only be for first window and the second input with SRV demo should be going unchanged (not affected by this channel update). So looks like the for-loop should be removed in the process callback, and individually processed.
Regards,
Nikhil