Skip to content

feat(pid-edit): add JavaScript formula validator#190

Merged
tzebrowski merged 1 commit into
masterfrom
feature/pid-edit-formula-validator
Jul 16, 2026
Merged

feat(pid-edit): add JavaScript formula validator#190
tzebrowski merged 1 commit into
masterfrom
feature/pid-edit-formula-validator

Conversation

@tzebrowski

Copy link
Copy Markdown
Owner

Validate the formula field by actually compiling and evaluating it with the same JS engine used at runtime (rhino), binding dummy values only for the letters (A, B, C...) that the configured Parameters count would provide - catching both syntax errors and out-of-range parameter references. Formula is now a required field. Add an inline explanation of how Parameters maps to formula variables, and rename the "Length" field to "Parameters" to better reflect its meaning.

Also regroup the add/edit PID dialog fields into clearer paired rows: Mode+CAN Header, PID Code+CAN Network, Long Description+Value Type, and Parameters+Units / Min+Max.

…g layout

Validate the formula field by actually compiling and evaluating it with
the same JS engine used at runtime (rhino), binding dummy values only for
the letters (A, B, C...) that the configured Parameters count would
provide - catching both syntax errors and out-of-range parameter
references. Formula is now a required field. Add an inline explanation
of how Parameters maps to formula variables, and rename the "Length"
field to "Parameters" to better reflect its meaning.

Also regroup the add/edit PID dialog fields into clearer paired rows:
Mode+CAN Header, PID Code+CAN Network, Long Description+Value Type, and
Parameters+Units / Min+Max.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tzebrowski
tzebrowski merged commit b33a883 into master Jul 16, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant