diff options
-rw-r--r-- | readme.txt | 2 | ||||
-rw-r--r-- | src/chvt.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/readme.txt b/readme.txt index 5c3163a41..7607cc93d 100644 --- a/readme.txt +++ b/readme.txt @@ -75,6 +75,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, *** 1.1.2unstable ***
- FIX: Fixed priority inheritance problem with condvars (bug 2674756) and
added a specific test case to the test suite (backported in stable branch).
+- FIX: Fixed a problem in time ranges (bug 2680425)(backported in stable
+ branch).
- FIX: Fixed a wrong parameter check in chVTSetI() (bug 2679155).
- FIX: Build error with options CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED
(bug 2678928).
diff --git a/src/chvt.c b/src/chvt.c index 9d4fec138..ce322e35f 100644 --- a/src/chvt.c +++ b/src/chvt.c @@ -102,12 +102,14 @@ void chVTResetI(VirtualTimer *vtp) { * @param[in] end the end of the time window (non inclusive)
* @retval TRUE current time within the specified time window.
* @retval FALSE current time not within the specified time window.
+ * @note When start==end then the function returns always true because the
+ * whole time range is specified.
*/
bool_t chTimeIsWithin(systime_t start, systime_t end) {
systime_t time = chTimeNow();
- return end >= start ? (time >= start) && (time < end) :
- (time >= start) || (time < end);
+ return end > start ? (time >= start) && (time < end) :
+ (time >= start) || (time < end);
}
/** @} */
|