From 2c9892cc3e68f00e71cf3d3b066a0c7080e1e220 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 22 Oct 2020 09:18:18 -0400 Subject: set sampling rate --- gui/stmdsp.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gui/stmdsp.cpp') diff --git a/gui/stmdsp.cpp b/gui/stmdsp.cpp index 633c61a..3de3324 100644 --- a/gui/stmdsp.cpp +++ b/gui/stmdsp.cpp @@ -52,6 +52,16 @@ namespace stmdsp } } + void device::set_sample_rate(unsigned int id) { + if (connected()) { + uint8_t request[2] = { + 'r', + static_cast(id) + }; + m_serial.write(request, 2); + } + } + void device::continuous_start() { if (connected()) m_serial.write("R"); -- cgit v1.2.3