-
Notifications
You must be signed in to change notification settings - Fork 119
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
Conversation
@@ -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+$/), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
ff70c8c
to
9ab4fee
Compare
23ac933
to
d24792c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…\d` form For example, `PA13` or `PB8`
d24792c
to
0e18309
Compare
PA13
,PB8
etcdtostrf
, the built-in one is fine