Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spy_EveryMessage not called when message on CAN bus #1

Open
lYC92 opened this issue May 17, 2023 · 1 comment
Open

Spy_EveryMessage not called when message on CAN bus #1

lYC92 opened this issue May 17, 2023 · 1 comment

Comments

@lYC92
Copy link

lYC92 commented May 17, 2023

Hello,

I am working on neoVI fire 2 device embedded CCIF. I found the callback function Spy_EveryMessage() is not triggered with there is message on CAN bus. The following is the code snippet I used for testing. The screen shot is the result. The count100 is always 0 although there are other CAN messages.
Please help on this issue. Thanks.

int count100 = 0;

void Spy_EveryMessage(GenericMessage * p_Msg)
{
	count100++;
}

void Spy_EveryLoop(unsigned int uiCurrentTime)
{
	// TODO: add something you want to do every millisecond
	static int cnt = 0;
	cnt++;
	if (cnt > 100)
	{
		cnt = 0;
		GenericMessage msg = { 0 };
		msg.iID = 0x125;
		msg.iNumDataBytes = 8;
		msg.btData[1] = 1;
		msg.btData[2] = 2;
		msg.btData[3] = 3;
		msg.btData[4] = 4;
		msg.btData[5] = 5;
		msg.btData[6] = 6;
		msg.btData[7] = count100;

		// test for iNetwork number
		for (size_t i = 0; i < 100; i++)
		{
			msg.btData[0] = i;
			msg.iNetwork = i;
			GenericMessageTransmit(&msg);
		}

	}
}
@lYC92
Copy link
Author

lYC92 commented May 17, 2023

Snipaste_2023-05-17_11-19-38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant