added settings.h directive for whether to enable sleeping