mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
22 lines
689 B
JavaScript
22 lines
689 B
JavaScript
// Kinect Service
|
|
// Purpose: Composes Kinect hardware capture and browser socket delivery.
|
|
// Scope: Exposes session-readable state while keeping startup side effects in this service folder.
|
|
const { loadConfig, registerConfigurationHandler } = require('../../configuration');
|
|
const hardware = require('./hardware');
|
|
const { registerKinectSocketGateway, kinectEvents } = require('./socketGateway');
|
|
|
|
const config = loadConfig();
|
|
const gateway = registerKinectSocketGateway({
|
|
config,
|
|
hardware,
|
|
});
|
|
|
|
registerConfigurationHandler('kinect', (kinectConfig) => {
|
|
gateway.reconfigure({ kinect: kinectConfig || {} });
|
|
});
|
|
|
|
module.exports = {
|
|
getState: gateway.getState,
|
|
kinectEvents,
|
|
};
|