From 1a7d45b9130251119874df8b15424ec41306d8f2 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 10 Mar 2021 19:42:18 -0500 Subject: support H7 and L4; use second ADC for input --- gui/stmdsp.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gui/stmdsp.cpp') 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(); + } } } -- cgit v1.2.3