diff --git a/modules/control/Firmware/src/FreeRTOS/BinarySemaphore.cpp b/modules/control/Firmware/src/FreeRTOS/BinarySemaphore.cpp index 96464ae..a0fb7d6 100644 --- a/modules/control/Firmware/src/FreeRTOS/BinarySemaphore.cpp +++ b/modules/control/Firmware/src/FreeRTOS/BinarySemaphore.cpp @@ -14,11 +14,11 @@ auto freertos::BinarySemaphore::operator=( } auto freertos::BinarySemaphore::take(TickType_t timeout) -> bool { BaseType_t success = xSemaphoreTake(handle, timeout); - return success == pdTRUE ? true : false; + return success == pdTRUE; } auto freertos::BinarySemaphore::give() -> bool { BaseType_t success = xSemaphoreGive(handle); - return success == pdTRUE ? true : false; + return success == pdTRUE; } auto freertos::BinarySemaphore::getCount() -> size_t { diff --git a/modules/control/Firmware/src/FreeRTOS/Mutex.cpp b/modules/control/Firmware/src/FreeRTOS/Mutex.cpp index 7f8683a..b1786a1 100644 --- a/modules/control/Firmware/src/FreeRTOS/Mutex.cpp +++ b/modules/control/Firmware/src/FreeRTOS/Mutex.cpp @@ -12,9 +12,9 @@ auto freertos::Mutex::operator=(const Mutex &&other) noexcept -> Mutex & { } auto freertos::Mutex::lock(TickType_t timeout) -> bool{ BaseType_t success = xSemaphoreTake(handle, timeout); - return success == pdTRUE ? true : false; + return success == pdTRUE; } auto freertos::Mutex::unlock() -> bool { BaseType_t success = xSemaphoreGive(handle); - return success == pdTRUE ? true : false; + return success == pdTRUE; } \ No newline at end of file