-
Notifications
You must be signed in to change notification settings - Fork 12
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
[BUG] Correct basic_formula so formula like f12/2 + rerun work #31
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
previously it was possible to do f32+f12/2 but not f12/2. this was really weird from the user side so this commit tries to correct things. Basic testing was done Dont know why I did not go into that solution first so I am still not 100% sure. should be tested by users at OEM forum
alexandrecuer
changed the title
BUG CORRECTION - Improve basic_formula so you can make f12/2 alone
[BUG] Improve basic_formula so you can make f12/2 alone
Jan 24, 2025
without those tests, duplicates are generated when pressing run
alexandrecuer
changed the title
[BUG] Improve basic_formula so you can make f12/2 alone
[BUG] Correct basic_formula so formula like f12/2 + rerun work
Jan 24, 2025
from is not possible, it should be all but it is not needed
alexandrecuer
commented
Jan 25, 2025
@@ -42,7 +42,7 @@ public function process($processitem) | |||
// regexp for starting a formula with an operator or with nothing | |||
$XSop="(?:-|\+|)"; | |||
// regexp for a basic formula, ie something like f12-f43 or 2.056*f42+f45 | |||
$Xbf="$XSop(?:$Xnbr$Xop)*$Xf(?:$Xop(?:$Xnbr$Xop)*$Xf(?:$Xop$Xnbr)*)*"; | |||
$Xbf="$XSop(?:$Xnbr$Xop)*$Xf(?:$Xop$Xnbr)*(?:$Xop(?:$Xnbr$Xop)*$Xf(?:$Xop$Xnbr)*)*"; |
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.
this is to render possible things like f12/2.
@@ -61,9 +61,13 @@ public function process($processitem) | |||
$original=$formula; | |||
|
|||
//checking the output feed | |||
$fopen_mode='ab'; | |||
if ($processitem->process_mode=='all') { |
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.
this is to correct the behaviour when editing the formula and pressing run
Thanks a lot @alexandrecuer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@TrystanLea :
should be merged into master to be tested asap by users at OEM forum !
thanks
cf https://community.openenergymonitor.org/t/display-temperature-in-fahrenheit/13652/15