diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2020-10-02 11:52:28 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2020-10-02 11:52:28 -0400 |
commit | a64b86aa545d2d11d397dbaa48bf3edf7dba4ddb (patch) | |
tree | fe52df4ec96ae52ef75e93a90eb2281b95f8e910 /gui/stmdsp.cpp | |
parent | 3fa9bbe4255424b9db34b6020177d217ffbe5faa (diff) |
test process_data speed measurement
Diffstat (limited to 'gui/stmdsp.cpp')
-rw-r--r-- | gui/stmdsp.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gui/stmdsp.cpp b/gui/stmdsp.cpp index 5fca940..06f0100 100644 --- a/gui/stmdsp.cpp +++ b/gui/stmdsp.cpp @@ -46,6 +46,21 @@ namespace stmdsp m_serial.write("R"); } + void device::continuous_start_measure() { + if (connected()) + m_serial.write("M"); + } + + uint32_t device::continuous_start_get_measurement() { + uint32_t count = 0; + if (connected()) { + m_serial.write("m"); + m_serial.read(reinterpret_cast<uint8_t *>(&count), sizeof(uint32_t)); + } + + return count; + } + std::vector<adcsample_t> device::continuous_read() { if (connected()) { m_serial.write("s"); |