Add sweep2wake toggle
(and try to fix compilation, without reverting some commits :p )