Browse Source

capped runaway Doodle bandwidth usage

Darren Ranalli 21 years ago
parent
commit
3a528ca0a4
1 changed files with 5 additions and 1 deletions
  1. 5 1
      direct/src/distributed/DistributedSmoothNodeBase.py

+ 5 - 1
direct/src/distributed/DistributedSmoothNodeBase.py

@@ -29,6 +29,10 @@ class DistributedSmoothNodeBase:
         # presumably, we have a doId at this point
         return "sendPosHpr-%s" % self.doId
 
+    def setPosHprBroadcastPeriod(self, period):
+        # call this at any time to change the delay between broadcasts
+        self.__broadcastPeriod = period
+
     def stopPosHprBroadcast(self):
         taskMgr.remove(self.getPosHprBroadcastTaskName())
         # Delete this callback because it maintains a reference to self
@@ -58,7 +62,7 @@ class DistributedSmoothNodeBase:
         # Set up telemetry optimization variables
         self.cnode.initialize(self, self.dclass, self.doId)
 
-        self.__broadcastPeriod = period
+        self.setPosHprBroadcastPeriod(period)
         # Broadcast our initial position
         self.b_clearSmoothing()
         self.cnode.sendEverything()