// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include #include #include #include #include #include #include #include namespace sys { class Service; } // namespace sys void EventManagerServiceAPI::vibrationPulseOnce(sys::Service *serv) { serv->bus.sendUnicast(std::make_shared(bsp::vibrator::Action::pulse), service::name::evt_manager); } void EventManagerServiceAPI::vibrationStop(sys::Service *serv) { serv->bus.sendUnicast(std::make_shared(bsp::vibrator::Action::stop), service::name::evt_manager); } void EventManagerServiceAPI::vibrationPulseRepeat(sys::Service *serv, std::chrono::milliseconds time) { serv->bus.sendUnicast(std::make_shared(bsp::vibrator::Action::pulseRepeat, time), service::name::evt_manager); } void EventManagerServiceAPI::vibrationPulseRepeatUntilStop(sys::Service *serv) { serv->bus.sendUnicast(std::make_shared(bsp::vibrator::Action::pulseRepeatInfinite), service::name::evt_manager); } void EventManagerServiceAPI::setVibrationLevel(sys::Service *serv, unsigned int vibrationLevel) { serv->bus.sendUnicast(std::make_shared(vibrationLevel), service::name::evt_manager); }