.x/100), parseFloat(leftVector.y/100), parseFloat(rightVector.x/100));
		}
		sendFlag = false;
	}
}

function shutdown() {
    if(confirm("This will shutdown the Pi.\nAre you sure?")){
		socket.emit('power', 1);
		alert('Shutting down...\nPlease wait 20s before turning the power off.');
	}
}
// Handle sit/stand button
function handlePoseClick(cb) {
  if (!cb.checked) {
	// stand up
	pose = 1;
  } else {
	// sit down
	pose = 0;
  }
  socket.emit('pos', pose);
}

function handleGaitClick(cb) {
  if (cb.checke