Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 627 → Rev 628

/VibrationTest/trunk/VibrationTest/VibrationTestGui.py
732,19 → 732,28
msg = self.mk.getDebugMsg()
voltage = msg.getVoltage()
if (voltage == 0):
# Board is probably fed by USB
minVoltage = 0
maxVoltage = 1
else:
# Determine the n umber of cells
if (voltage > 4.2*3):
nbCells = 4
else:
nbCells = 3
minVoltage = nbCells*3.5
maxVoltage = nbCells*3.9
# Set minimum and maximum voltages
if self.param.minVoltage > 0:
minVoltage = self.param.minVoltage
else:
minVoltage = nbCells*3.5 # auto
if self.param.maxVoltage > 0:
maxVoltage = self.param.maxVoltage
else:
maxVoltage = nbCells*3.9
self._sendEvent("Voltage: %2.1fV" % voltage)
self._sendEvent("Min/Max Voltage: %2.1fV-%2.1fV" % (minVoltage, maxVoltage), parVoltage=(minVoltage, maxVoltage, voltage))
self._sendEvent("Starting motor(s) (speed=%d)... " % self.param.motorStartupSpeed, speed=self.param.motorStartupSpeed)
self._setMotorSpeed(self.param.motorStartupSpeed, self.param.motorStartupSettlingTime)
859,7 → 868,10
self.settings["serialport"] = Setting("Serial Port", "COM1")
self.settings["hpf"] = Setting("HP Filter cutoff (Hz)", 50)
self.settings["lpf"] = Setting("LP Filter cutoff (Hz)", 180)
self.settings["minvoltage"] = Setting("Minimum Bettery Voltage (0=Automatic) (V) ", 0)
self.settings["maxvoltage"] = Setting("Maximum Bettery Voltage (0=Automatic) (V) ", 0)
 
 
self.readSettings()
 
if len(sys.argv)>1:
995,6 → 1007,8
measureParams.serialPort = self.settings["serialport"].value
measureParams.motorStartupSpeed = self.settings["startupspeed"].value
measureParams.motorStartupSettlingTime = self.settings["startupsettling"].value
measureParams.minVoltage = self.settings["minvoltage"].value
measureParams.maxVoltage = self.settings["maxvoltage"].value
self.measureThread = MeasureThread(measureParams, dialog)
self.measureThread.start()
/VibrationTest/trunk/VibrationTest/VibrationTestGui.wxg
1,5 → 1,5
<?xml version="1.0"?>
<!-- generated by wxGlade 0.6.3 on Wed Oct 07 09:18:43 2009 -->
<!-- generated by wxGlade 0.6.3 on Wed Oct 07 10:19:52 2009 -->
 
<application path="C:\DATA\MK\SVN\Projects\VibrationTest\trunk\VibrationTest\VibrationTestGui.py" name="VibrationTestGui" class="App" option="0" language="python" top_window="frame_1" encoding="ISO-8859-15" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.6" is_template="0">
<object class="MainFrame" name="frame_1" base="EditFrame">