CallDistanceTransceiver.py: assign a float value to inter_symbol_distance
authorAntonio Ospite <ao2@ao2.it>
Mon, 4 Jan 2016 09:39:54 +0000 (10:39 +0100)
committerAntonio Ospite <ao2@ao2.it>
Mon, 4 Jan 2016 10:13:30 +0000 (11:13 +0100)
For consistency always assign a float value to inter_symbol_distance, as
it is going to be used in calculations with other float values.

This also fixes an pylint message:

  R:101,12: Redefinition of inter_symbol_distance type from float to int
  (redefined-variable-type)

src/savemysugar/CallDistanceTransceiver.py

index 01414a2..ecc0992 100755 (executable)
@@ -98,7 +98,7 @@ class CallDistanceTransceiver(object):
             # ring time makes them happy.
             inter_symbol_distance = ring_time_max
         else:
             # ring time makes them happy.
             inter_symbol_distance = ring_time_max
         else:
-            inter_symbol_distance = 0
+            inter_symbol_distance = 0.0
 
         self.modulator = MorseDistanceModulator(call_setup_time_min,
                                                 call_setup_time_max,
 
         self.modulator = MorseDistanceModulator(call_setup_time_min,
                                                 call_setup_time_max,