Adds test functionallity for displays
This commit is contained in:
@@ -120,7 +120,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ${Threads_LIBRARIES})
|
||||
|
||||
|
||||
if(ENABLE_TESTING)
|
||||
add_subdirectory(tests)
|
||||
#add_subdirectory(tests)
|
||||
message(WARNING "Tests not built!")
|
||||
endif(ENABLE_TESTING)
|
||||
|
||||
if(BUILD_NETWORKING)
|
||||
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
|
||||
void activate_displays() const;
|
||||
void deactivate_displays() const;
|
||||
void rotate_displays() const;
|
||||
|
||||
void activate_all_lamps() const;
|
||||
void deactivate_all_lamps() const;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "output/detail/DisplayBoardPinController.h"
|
||||
|
||||
#include <thread>
|
||||
#include <utility/wiringPiTesting.hpp>
|
||||
|
||||
#include "utility/config.h"
|
||||
|
||||
|
||||
@@ -161,6 +161,19 @@ void OutputDriver::shut_down_driver() const
|
||||
CLOG(INFO, OUTPUT_LOGGER) << "Deactivated all output items.";
|
||||
}
|
||||
|
||||
void OutputDriver::rotate_displays() const
|
||||
{
|
||||
for (auto display : this->get_displays())
|
||||
{
|
||||
for (int i = 8; i < 100000000; i = i*10)
|
||||
{
|
||||
display->write_score(i);
|
||||
sleep(1);
|
||||
}
|
||||
display->write_score(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} /* namespace output */
|
||||
|
||||
Reference in New Issue
Block a user