Skip to content

Commit

Permalink
Remove garbage result in validated CH
Browse files Browse the repository at this point in the history
i.e. when validated CH get very close to zero
  • Loading branch information
Thales1330 committed Sep 23, 2020
1 parent bd686c1 commit 685f998
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions AvaliadorCAAC/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ void MainFrame::ValidateCH(Activity* activity)
if((accCH > m_chCompActivity * 0.4) && !activity->IsRestrictionsIgnored()) {
double partialCH = m_chCompActivity * 0.4 - oldCH;
if(partialCH > 0) {
if(partialCH < 0.5) partialCH = 0.0; // Remove garbage result (i.e. when "m_chCompActivity * 0.4 - oldCH" get very close to zero)
activity->SetChValidated(partialCH);
activity->SetLimitedCH(true);
} else {
Expand Down
2 changes: 1 addition & 1 deletion AvaliadorCAAC/MainFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "XMLParser.h"
#include "EventList.h"

#define MY_APP_VERSION_STRING "0.3-beta"
#define MY_APP_VERSION_STRING "0.3.1-beta"

class Utils;
class PdfPage;
Expand Down

0 comments on commit 685f998

Please sign in to comment.