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

Open and close brackets mismatch in CO_Emergency.c #491

Open
pradyum opened this issue Jan 20, 2024 · 1 comment
Open

Open and close brackets mismatch in CO_Emergency.c #491

pradyum opened this issue Jan 20, 2024 · 1 comment

Comments

@pradyum
Copy link

pradyum commented Jan 20, 2024

The CO_Emergency.c file has total of 72 opened brackets and 71 closed brackets. There is a missing closed bracket in

void CO_EM_process(CO_EM_t *em, bool_t NMTisPreOrOperational, uint32_t timeDifference_us, uint32_t *timerNext_us)

function block.

@CANopenNode
Copy link
Owner

Extra bracket is between pre-processor directives:

#if (CO_CONFIG_EM) & CO_CONFIG_EM_PROD_INHIBIT
if (em->inhibitEmTimer < em->inhibitEmTime_us) {
em->inhibitEmTimer += timeDifference_us;
}
if (fifoPpPtr != em->fifoWrPtr && !em->CANtxBuff->bufferFull
&& em->inhibitEmTimer >= em->inhibitEmTime_us
) {
em->inhibitEmTimer = 0;
#else
if (fifoPpPtr != em->fifoWrPtr && !em->CANtxBuff->bufferFull) {
#endif

This is not an error, just a bit ugly. I can't find more elegant solution.

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

2 participants