颜色映射图例,规格尺寸修改

This commit is contained in:
2026-01-15 16:13:36 +08:00
parent f700dd360e
commit 354552dc88
21 changed files with 1200 additions and 223 deletions

View File

@@ -18,8 +18,6 @@ SerialBackend::SerialBackend(QObject* parent)
, m_decodeThread(&m_packetQueue, &m_frameQueue) {
m_request.dataLength = 24;
m_spec.model = QStringLiteral("PZR-A");
m_spec.rows = 3;
m_spec.cols = 4;
auto codec = std::make_shared<PiezoresistiveACodec>();
auto decoder = std::make_shared<PiezoresistiveADecoder>();
@@ -270,6 +268,16 @@ void SerialBackend::feedBytes(const QByteArray& data) {
m_readThread.enqueueBytes(data);
}
void SerialBackend::setSensorWidth(int w) {
m_spec.cols = w;
syncSendConfig_();
}
void SerialBackend::setSensorHeight(int h) {
m_spec.rows = h;
syncSendConfig_();
}
void SerialBackend::drainFrames_() {
if (!m_frameCallback)
return;