Added restering logic

Added logic, ui.c functions, debug queue function. Queue functions,
changed a function a bit by input as it takes motordir i made the
function elev_get_motordir(). Minor changed to sm_macro except added
opendoor state.