#ifndef TACTILEIPC3D_SERIAL_TYPES_H
#define TACTILEIPC3D_SERIAL_TYPES_H

#include <QString>
#include <QtGlobal>


#define DEBUG_MODE 1

enum class DeviceMode {
    Master = 0,
    Slave = 1,
};

struct SerialConfig {
    QString portName;
    int baudRate = 115200;
    int dataBits = 8;
    int stopBits = 1;
    QString parity = QStringLiteral("N");
    quint8 deviceAddress = 0x01;
    DeviceMode mode = DeviceMode::Slave;
    int pollIntervalMs = 50;
};

struct SensorRequest {
    quint8 functionCode = 0x00;
    quint32 startAddress = 0;
    quint16 dataLength = 0;
};

struct SensorSpec {
    QString model;
    QString version;
    int rows = 12;
    int cols = 7;
    float pitch = 0.0f;
    float dotRadius = 0.0f;
    float rangeMin = 0.0f;
    float rangeMax = 0.0f;
};

#endif // TACTILEIPC3D_SERIAL_TYPES_H
