diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2021-03-10 19:42:18 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2021-03-10 19:42:18 -0500 |
commit | 1a7d45b9130251119874df8b15424ec41306d8f2 (patch) | |
tree | 6eadd9d6ef2f6ff3e4cf1854088deb8f882a0542 /gui/stmdsp.cpp | |
parent | eeeb04fa1a202c68279d4b4ee0a1e3ff34c62c7f (diff) |
support H7 and L4; use second ADC for input
Diffstat (limited to 'gui/stmdsp.cpp')
-rw-r--r-- | gui/stmdsp.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/stmdsp.cpp b/gui/stmdsp.cpp index 5ea18af..2293c71 100644 --- a/gui/stmdsp.cpp +++ b/gui/stmdsp.cpp @@ -31,8 +31,16 @@ namespace stmdsp { if (m_serial.isOpen()) { m_serial.write("i"); - if (m_serial.read(6) != "stmdsp") + if (auto id = m_serial.read(7); id.starts_with("stmdsp")) { + if (id.back() == 'h') + m_platform = platform::H7; + else if (id.back() == 'l') + m_platform = platform::L4; + else + m_serial.close(); + } else { m_serial.close(); + } } } |