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

Make sure generated C++ is compatible with STM32 boards #1512

Merged
merged 2 commits into from
Oct 31, 2018

Conversation

evgenykochetkov
Copy link
Contributor

  • Add ability to define PORTs as PA13, PB8 etc
  • Don't redefine dtostrf, the built-in one is fine

@@ -6,7 +6,7 @@ const LEADING_CHAR = 'D';
// :: DataValue -> DataValue
export default input =>
R.unless(
R.test(/^(A|D)\d+/i),
R.test(/^(P[A-F]|A|D)\d+$/),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry a bit about the regex. It is complex and almost matches the one used in packages/xod-project/src/utils.js:220: R.test(/^(P[A-F]|A|D)\d{0,3}$/g, literal). I suggest extracting the test to a function like isValidNumberDataValue we have already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@evgenykochetkov evgenykochetkov force-pushed the fix-cpp-stm32-compatibility branch 2 times, most recently from 23ac933 to d24792c Compare October 30, 2018 14:54
Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@evgenykochetkov evgenykochetkov merged commit 674115e into 0.25.x Oct 31, 2018
@evgenykochetkov evgenykochetkov deleted the fix-cpp-stm32-compatibility branch October 31, 2018 10:02
@nkrkv nkrkv added t:tweak hotfix Issue/PR for a patch release labels Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotfix Issue/PR for a patch release s:client s:rt/c++ t:tweak
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants