Hi,
I'm trying to switch the AEWB's reference camera channel of a four camera system. As I found only how set this channel at creation time, I tried to set the chId by implementing a new control command by doing a call like this:
And in issAewb1Link_algPlugin.h I added:
typedef struct
{
AlgorithmLink_ControlParams baseClassControl;
/**< Base class control params */
UInt32 chId;
/**< Auto Exposure Channel */
} AlgorithmLink_IssAewbChId;
In my display function I added:
static Void switchAewbChannel(chains_xxx_DisplayAppObj *pObj, UInt32 chNum)
{
Int32 status;
static AlgorithmLink_IssAewbChId gActAewbChannel={.chId=0};
gActAewbChannel.chId =chNum;
gActAewbChannel.baseClassControl.size=sizeof(gActAewbChannel);
status = System_linkControl(pObj->ucObj.Alg_IssAewbLinkID,
ALGORITHM_AEWB_LINK_CMD_SET_AEWB_CAMID,
&gActAewbChannel,
sizeof(gActAewbChannel),
TRUE);
UTILS_assert(SYSTEM_LINK_STATUS_SOK == status);
}
And in issAewb1Link_algPlugin.c I added in function
Int32 AlgorithmLink_issAewb1Control(void *pObj, void *pControlParams):
switch(pAlgLinkControlPrm->controlCmd)
{
case ALGORITHM_AEWB_LINK_CMD_SET_AEWB_CAMID:
{
AlgorithmLink_IssAewbChId *cp=(AlgorithmLink_IssAewbChId *)pControlParams;
if(cp->chId<ISS_AEWB1_LINK_MAX_CH)
{
pAlgObj->algLinkCreateParams.chId=cp->chId;
status = SYSTEM_LINK_STATUS_SOK;
}
else
{
status = SYSTEM_LINK_STATUS_EINVALID_PARAMS;
}
break;
(...)
As I did not succeed to transfer the simple parameter (What do I make wrong ???), I tried to set with a fixed value to see if it would work, when the paramter passing problem has been solved. But also this did not work. Isn't there a way to switch the AEWB reference channel on-the-fly?
Regards,
Guenter