MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / registerDevices

Function registerDevices

Tactility/Source/hal/Hal.cpp:16–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14static const auto LOGGER = Logger("Hal");
15
16void registerDevices(const Configuration& configuration) {
17 LOGGER.info("Registering devices");
18
19 auto devices = configuration.createDevices();
20 for (auto& device : devices) {
21 registerDevice(device);
22
23 // Register attached devices
24 if (device->getType() == Device::Type::Display) {
25 const auto display = std::static_pointer_cast<display::DisplayDevice>(device);
26 assert(display != nullptr);
27 const std::shared_ptr<Device> touch = display->getTouchDevice();
28 if (touch != nullptr) {
29 registerDevice(touch);
30 }
31 }
32 }
33}
34
35static void startDisplays() {
36 LOGGER.info("Starting displays & touch");

Callers 1

initFunction · 0.85

Calls 4

registerDeviceFunction · 0.85
infoMethod · 0.80
getTypeMethod · 0.45
getTouchDeviceMethod · 0.45

Tested by

no test coverage detected