diff --git a/openauto/Service/InputService.cpp b/openauto/Service/InputService.cpp index 9a0a502..e1c3733 100644 --- a/openauto/Service/InputService.cpp +++ b/openauto/Service/InputService.cpp @@ -169,7 +169,7 @@ void InputService::sendButtonPress(aasdk::proto::enums::ButtonCode::Enum buttonC if(buttonCode == aasdk::proto::enums::ButtonCode::SCROLL_WHEEL) { onButtonEvent({projection::ButtonEventType::NONE, wheelDirection, buttonCode}); - + OPENAUTO_LOG(info) << "[InputService] SENDING WHEEL "; } else { diff --git a/openauto/Service/ServiceFactory.cpp b/openauto/Service/ServiceFactory.cpp index 65e531f..681d8b7 100644 --- a/openauto/Service/ServiceFactory.cpp +++ b/openauto/Service/ServiceFactory.cpp @@ -266,7 +266,13 @@ void ServiceFactory::sendButtonPressFromString(const std::string& btn, const int { aasdk::proto::enums::ButtonCode::Enum buttonCode; projection::WheelDirection wheelDirection = projection::WheelDirection::NONE; - projection::ButtonEventType buttonEventType = state == 0 ? projection::ButtonEventType::PRESS : projection::ButtonEventType::RELEASE; + projection::ButtonEventType buttonEventType = buttonEventType; + if (state == 2) { + buttonEventType = projection::ButtonEventType::NONE; + } + else { + buttonEventType = state == 0 ? projection::ButtonEventType::PRESS : projection::ButtonEventType::RELEASE; + } if (btn == "ENTER") { buttonCode = aasdk::proto::enums::ButtonCode::ENTER;