diff options
author | Jeff Long <willcode4@gmail.com> | 2021-05-04 09:00:36 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-05-13 19:58:39 -0400 |
commit | 9e32ef0ffab29efe4c52f2e574016cd3d6453484 (patch) | |
tree | cc9af61b2b72556d83ea420e13dc26a208e792ca /gr-qtgui/python/qtgui/msgcheckbox.py | |
parent | e1dfa8c62b31661d249f3d0f6a0395b01a2e21f9 (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/msgcheckbox.py')
-rw-r--r-- | gr-qtgui/python/qtgui/msgcheckbox.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-qtgui/python/qtgui/msgcheckbox.py b/gr-qtgui/python/qtgui/msgcheckbox.py index 8d2a52ae07..f01c78bc02 100644 --- a/gr-qtgui/python/qtgui/msgcheckbox.py +++ b/gr-qtgui/python/qtgui/msgcheckbox.py @@ -93,7 +93,7 @@ class MsgCheckBox(gr.sync_block, QFrame): elif type(self.pressReleasedDict['Pressed']) == float: self.message_port_pub(pmt.intern("state"), pmt.cons(pmt.intern(self.outputmsgname), - pmt.from_float(self.pressReleasedDict['Pressed']))) + pmt.from_double(self.pressReleasedDict['Pressed']))) else: self.message_port_pub(pmt.intern("state"), pmt.cons(pmt.intern(self.outputmsgname), @@ -112,7 +112,7 @@ class MsgCheckBox(gr.sync_block, QFrame): elif type(self.pressReleasedDict['Released']) == float: self.message_port_pub(pmt.intern("state"), pmt.cons(pmt.intern(self.outputmsgname), - pmt.from_float(self.pressReleasedDict['Released']))) + pmt.from_double(self.pressReleasedDict['Released']))) else: self.message_port_pub(pmt.intern("state"), pmt.cons(pmt.intern(self.outputmsgname), |