implements and integrates sound factory

This commit is contained in:
Johannes Wendel
2020-01-04 18:54:52 +01:00
parent cbb03fa924
commit c9dc21b3b4
7 changed files with 50 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ Lamp::Lamp(std::shared_ptr<DriverBoardPinController> pin_controller, const uint8
activated(false),
activation_time(10)
{
CLOG(INFO , OUTPUT_LOGGER) << "Created lamp \"" << name << "\" with pin-base " << int(pin_base) << " and address " << int(address);
//CLOG(INFO , OUTPUT_LOGGER) << "Created lamp \"" << name << "\" with pin-base " << int(pin_base) << " and address " << int(address);
}
void Lamp::activate()

View File

@@ -23,7 +23,7 @@ namespace detail
Sound::Sound(std::shared_ptr<SoundBoardPinController> pin_controller, const uint8_t & address, const uint8_t & pin_base, const std::string & name, const std::chrono::milliseconds & deactivation_time, const u_int id)
: detail::Item(std::move(name)), DriverBoardItem(pin_controller, address, pin_base), pin_controller(std::move(pin_controller)), deactivation_time(deactivation_time), id(id)
{
//CLOG(INFO , OUTPUT_LOGGER) << "Created sound \"" << name << "\" with pin-base " << int(pin_base) << " and address " << int(address);
CLOG(INFO , OUTPUT_LOGGER) << "Created sound " << id << " \"" << name << "\" with pin-base " << int(pin_base) << " and address " << int(address) << ". Deactivation time is: " << deactivation_time.count();
}
void Sound::play()