aboutsummaryrefslogtreecommitdiffstats
path: root/gui/stmdsp.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2020-10-02 11:52:28 -0400
committerClyne Sullivan <clyne@bitgloo.com>2020-10-02 11:52:28 -0400
commita64b86aa545d2d11d397dbaa48bf3edf7dba4ddb (patch)
treefe52df4ec96ae52ef75e93a90eb2281b95f8e910 /gui/stmdsp.cpp
parent3fa9bbe4255424b9db34b6020177d217ffbe5faa (diff)
test process_data speed measurement
Diffstat (limited to 'gui/stmdsp.cpp')
-rw-r--r--gui/stmdsp.cpp15
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");