Skip to content

Conversation

@dpfrey
Copy link
Contributor

@dpfrey dpfrey commented Jan 22, 2021

Issue #41 describes a problem where an enum value of -1 causes a failure
of an assertion in erpcgen. The new version of hasValue uses a bool
member variable to track when the value is set rather than using a
sentinel value of -1.

Issue EmbeddedRPC#41 describes a problem where an enum value of -1 causes a failure
of an assertion in erpcgen. The new version of hasValue uses a bool
member variable to track when the value is set rather than using a
sentinel value of -1.
@dpfrey dpfrey mentioned this pull request Jan 22, 2021
@MichalPrincNXP
Copy link
Member

Hello @dpfrey , I am sorry for late response, please give me some time for the review, I would like to have a look at it next week.

@MichalPrincNXP MichalPrincNXP self-requested a review February 10, 2021 15:19
@MichalPrincNXP MichalPrincNXP self-assigned this Feb 10, 2021
@MichalPrincNXP
Copy link
Member

Thank you, @dpfrey , your changes seem to be reasonable. @Hadatko , do you support this PR integration?

@Hadatko
Copy link
Member

Hadatko commented Feb 10, 2021

I never saw negative numbers in enums before, that was why it was solved that way. But now i know that it wasn't best solution. So thank you for this PR. Looks correct.

@MichalPrincNXP
Copy link
Member

Thank you @dpfrey for this bugfix and @Hadatko for the review. I will merge this PR and in addition I will add some new test case to cover this use case.

@MichalPrincNXP MichalPrincNXP merged commit f8110fb into EmbeddedRPC:develop Feb 11, 2021
MichalPrincNXP added a commit that referenced this pull request May 7, 2021
-- Update erpcgen and unit tests to cover the case when enum member value is negative (Github #159 PR / #41 issue solving).
-- Update (D)SPI transport layers to avoid busy loops in rtos environments, introduce semaphores.
-- Introduced new transports: i2c_slave_transport (C/C++), LIBUSBSIOSPITransport (Python), LIBUSBSIOI2CTransport (Python).
-- Remove const qualifier from InterThreadBufferTransport::send method parameter to align with parent Transport class (GitHub issue #172).
-- Allow conditional compilation of message_loggers and pre_post_action to help to reduce the code size when compiler does not correctly strip unused code.
-- Minor documentation updates.
-- Version changed to 1.8.1.
@dpfrey dpfrey deleted the pr_EnumMember_hasValue branch May 13, 2021 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants