some output improvements

This commit is contained in:
Robin Müller 2020-05-27 23:43:40 +02:00
parent 08ffe89682
commit 60872f936c

View File

@ -12,19 +12,19 @@ CountingSemaphoreUsingTask::CountingSemaphoreUsingTask(const uint8_t maxCount,
handle = TaskManagement::getCurrentTaskHandle(); handle = TaskManagement::getCurrentTaskHandle();
if(handle == nullptr) { if(handle == nullptr) {
sif::error << "Could not retrieve task handle. Please ensure the" sif::error << "CountingSemaphoreUsingTask: Could not retrieve task "
"constructor was called inside a task." << std::endl; "handle. Please ensure the constructor was called inside a "
"task." << std::endl;
} }
uint32_t oldNotificationValue; uint32_t oldNotificationValue;
xTaskNotifyAndQuery(handle, 0, eSetValueWithOverwrite, xTaskNotifyAndQuery(handle, 0, eSetValueWithOverwrite,
&oldNotificationValue); &oldNotificationValue);
if(oldNotificationValue != 0) { if(oldNotificationValue != 0) {
sif::warning << "Semaphore initiated but current notification value" sif::warning << "CountinSemaphoreUsingTask: Semaphore initiated but "
" is not 0. Please ensure the notification value is not used" "current notification value is not 0. Please ensure the "
"for other purposes!" << std::endl; "notification value is not used for other purposes!" << std::endl;
} }
while(currentCount != initCount) { while(currentCount != initCount) {
xTaskNotifyGive(handle); xTaskNotifyGive(handle);
currentCount++; currentCount++;