So what did you actually do? I'm guessing you did something like go into the hidden "testing" menu (*#*#4636#*#*) and fiddled with the settings, but it would help to know exactly what you changed and where because not all phones are the same.
And when you say you can't change it back, you mean that you cannot change the setting (it is greyed-out, or the change isn't saved)?
Just want to know exactly what the situation is before attempting any suggestions. There are some problems where a factory reset is not a reliable fix, and this may be one of those.