[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11272 - gnuradio/branches/developers/jblum/grc/gr-wxg
From: |
jblum |
Subject: |
[Commit-gnuradio] r11272 - gnuradio/branches/developers/jblum/grc/gr-wxgui/src/python/forms |
Date: |
Tue, 23 Jun 2009 11:53:14 -0600 (MDT) |
Author: jblum
Date: 2009-06-23 11:53:14 -0600 (Tue, 23 Jun 2009)
New Revision: 11272
Modified:
gnuradio/branches/developers/jblum/grc/gr-wxgui/src/python/forms/converters.py
Log:
Fix for internal representation of slider.
Round the slider scaled number because the slider wont.
Modified:
gnuradio/branches/developers/jblum/grc/gr-wxgui/src/python/forms/converters.py
===================================================================
---
gnuradio/branches/developers/jblum/grc/gr-wxgui/src/python/forms/converters.py
2009-06-23 15:34:08 UTC (rev 11271)
+++
gnuradio/branches/developers/jblum/grc/gr-wxgui/src/python/forms/converters.py
2009-06-23 17:53:14 UTC (rev 11272)
@@ -133,7 +133,8 @@
self._scaler = float(maximum - minimum)/num_steps
self._cast = cast
def external_to_internal(self, v):
- return (v - self._offset)/self._scaler
+ #slider's internal representation is an integer
+ return int(round((v - self._offset)/self._scaler))
def internal_to_external(self, v):
return self._cast(v*self._scaler + self._offset)
def help(self):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11272 - gnuradio/branches/developers/jblum/grc/gr-wxgui/src/python/forms,
jblum <=