clean.js
/*
 * Sets up event listener for start button and fetches info to make the UI.
 */
Sets up event listener for start button and fetches info to make the UI.
Sets up event listener for start button and fetches info to make the UI .
function initialize(r) {
	roomba = r;
	document.getElementById('clean-start-button').addEventListener('click', cleanSelectedRooms);
	roomba.getRobotState(['pmaps', 'cleanSchedule2'])
	.then((info) => {
		info.pmaps.forEach((each) => console.log(each));
		pmap_id = Object.keys(info.pmaps[0])[0];
		user_pmapv_id = info.pmaps[0][pmap_id];
		makeRoomUI(getRoomsFromSchedule(info.cleanSchedule2));
	})
	.catch(logger.logError);
}
function initialize ( r ) { roomba = r ; document . getElementById ( 'clean-start-button' ) . addEventListener ( 'click' , cleanSelectedRooms ) ; roomba . getRobotState ( [ 'pmaps' , 'cleanSchedule2' ] ) . then ( ( info ) => { info . pmaps . forEach ( ( each ) => console . log ( each ) ) ; pmap_id = Object . keys ( info . pmaps [ 0 ] ) [ 0 ] ; user_pmapv_id = info . pmaps [ 0 ] [ pmap_id ] ; makeRoomUI ( getRoomsFromSchedule ( info . cleanSchedule2 ) ) ; } ) . catch ( logger . logError ) ; }
Sets up event listener for start button and fetches info to make the UI.
Sets up event listener for start button and fetches info to make the UI .