summaryrefslogtreecommitdiff
path: root/gr-qtgui/python/qtgui/msgpushbutton.py
diff options
context:
space:
mode:
authorJeff Long <willcode4@gmail.com>2021-05-04 09:00:36 -0400
committermormj <34754695+mormj@users.noreply.github.com>2021-05-13 19:58:39 -0400
commit9e32ef0ffab29efe4c52f2e574016cd3d6453484 (patch)
treecc9af61b2b72556d83ea420e13dc26a208e792ca /gr-qtgui/python/qtgui/msgpushbutton.py
parente1dfa8c62b31661d249f3d0f6a0395b01a2e21f9 (diff)
qtgui: Use pmt.from_double() instead of pmt.from_float()
Messages should be constructed using double values instead of float to avoid loss of precision. Signed-off-by: Jeff Long <willcode4@gmail.com>
Diffstat (limited to 'gr-qtgui/python/qtgui/msgpushbutton.py')
-rw-r--r--gr-qtgui/python/qtgui/msgpushbutton.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-qtgui/python/qtgui/msgpushbutton.py b/gr-qtgui/python/qtgui/msgpushbutton.py
index bee142cac7..a3ecaf06c5 100644
--- a/gr-qtgui/python/qtgui/msgpushbutton.py
+++ b/gr-qtgui/python/qtgui/msgpushbutton.py
@@ -47,7 +47,7 @@ class MsgPushButton(gr.sync_block, Qt.QPushButton):
pmt.cons(pmt.intern(self.msgName), pmt.from_long(self.msgValue)))
elif type(self.msgValue) == float:
self.message_port_pub(pmt.intern("pressed"),
- pmt.cons(pmt.intern(self.msgName), pmt.from_float(self.msgValue)))
+ pmt.cons(pmt.intern(self.msgName), pmt.from_double(self.msgValue)))
elif type(self.msgValue) == str:
self.message_port_pub(pmt.intern("pressed"),
pmt.cons(pmt.intern(self.msgName), pmt.intern(self.msgValue)))