Prevent double-enabling sonar and only lock robot when actually changing sonar state