-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add measure of traffic light modification level #199
base: main
Are you sure you want to change the base?
Conversation
@@ -319,6 +333,18 @@ | |||
} | |||
} | |||
m_delay = std::move(delay); | |||
if (delay.first < 5 || delay.second < 5) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
m_modTime = 2; | ||
} else if (std::abs(delay.first - delay.second) < 10) { | ||
m_modTime = 0; | ||
} else if ((std::abs(delay.first - delay.second) > 10 || |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
m_modTime = 0; | ||
} else if ((std::abs(delay.first - delay.second) > 10 || | ||
std::abs(delay.first - delay.second) == 10) && | ||
(std::abs(delay.first - delay.second) < 40 || |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
- Coverage 94.77% 94.73% -0.04%
==========================================
Files 17 17
Lines 3004 3345 +341
Branches 294 299 +5
==========================================
+ Hits 2847 3169 +322
- Misses 157 176 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Add a function which returns a measure of the modification level of a traffic light with respect to the initial state.
We can start from @vero-dav-vero implementation and make it more general.