refactored everything

This commit is contained in:
Johannes Wendel
2018-11-09 01:16:35 +01:00
parent c53b6af33e
commit 3ea37e4e53
70 changed files with 202 additions and 177 deletions

View File

@@ -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)
{