refactored everything
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "DistributingEvent.h"
|
||||
|
||||
FlippR_Driver::Input::DistributingEvent::DistributingEvent(char address, int priority, std::string name,
|
||||
flippR_driver::input::DistributingEvent::DistributingEvent(char address, int priority, std::string name,
|
||||
std::chrono::milliseconds bounce_time, std::shared_ptr<IEventNotifier> event_notifier):
|
||||
Event(address, priority, name),
|
||||
bounce_time(bounce_time),
|
||||
@@ -12,12 +12,12 @@ FlippR_Driver::Input::DistributingEvent::DistributingEvent(char address, int pri
|
||||
activation_state(NOT_ACTIVATED)
|
||||
{}
|
||||
|
||||
void FlippR_Driver::Input::DistributingEvent::distribute()
|
||||
void flippR_driver::input::DistributingEvent::distribute()
|
||||
{
|
||||
event_notifier->distribute_event(*this);
|
||||
}
|
||||
|
||||
void FlippR_Driver::Input::DistributingEvent::active()
|
||||
void flippR_driver::input::DistributingEvent::active()
|
||||
{
|
||||
if(!is_bouncing())
|
||||
{
|
||||
@@ -35,7 +35,7 @@ void FlippR_Driver::Input::DistributingEvent::active()
|
||||
}
|
||||
}
|
||||
|
||||
bool FlippR_Driver::Input::DistributingEvent::is_bouncing()
|
||||
bool flippR_driver::input::DistributingEvent::is_bouncing()
|
||||
{
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> now = std::chrono::high_resolution_clock::now();
|
||||
std::chrono::milliseconds elapsed_time = std::chrono::duration_cast<std::chrono::milliseconds>(now - last_activation);
|
||||
@@ -43,7 +43,7 @@ bool FlippR_Driver::Input::DistributingEvent::is_bouncing()
|
||||
return elapsed_time < bounce_time;
|
||||
}
|
||||
|
||||
void FlippR_Driver::Input::DistributingEvent::inactive()
|
||||
void flippR_driver::input::DistributingEvent::inactive()
|
||||
{
|
||||
if(activation_state == ACTIVATED)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user