My patch does not work, but your patch is also not the way to do it. This code is only concerned with the fact that an index is in use or not. Nothing to do with usals. Even a sat on usals can have a rotor position defined. You can check yourself. Define a sat as Disecq 1.2, allocate an index and then change it to usals. The rotor position is kept in the config and the stored value is still there in the rotor. When you switch back to Diseqc 1.2 the user expects to be able to use the same index stored position. In other words this index is still in use even though the sat is using usals.
The only other reason I can see that this code fails is that the line following the for loop fails. The line says: if index <= self.rotorPositions. That would fail if self.rotorPositions is zero or otherwise undefined. You could check for that, e.g. if index <= self.rotorPositions or self.rotorPositions <= 0.
Edited by rhinoceros, 22 April 2014 - 15:31.
"Het enige wat we leren van de geschiedenis is dat we niets leren van geschiedenis.", Georg Wilhelm Friedrich Hegel, 1831 †