laas/morse — pull request #103 by flixr (2012-08-28 13:58:05+00:00)
Title: Frequency property for sensors and actuators

This adds a property (also) called frequency to MorseObjectClass.
It returns the real frequency the Sensor or Actuator action is run at, taking the logic tic rate and the delay (skipped logic steps) into account.
Now you can just use self.frequency in actuators and sensors, instead of getting the logic tics every time and it will be correct as well.

I guess it is a bit useless for robots (which also inherit from MorseObjectClass, but probably better than adding it for the sensor and actuator classes separately.

Possible caveats:
This assumes that the first Game Logic sensor is actually the one used to call the sensor/actuator action. So it will not work as expected if that is not the case... not sure how we could check for that...