mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 22:17:31 +00:00
Bugfixes and speed improvements
This commit is contained in:
parent
199535450d
commit
926392e5b9
37 changed files with 873 additions and 566 deletions
|
|
@ -105,6 +105,18 @@ uint8_t *USBInBuffer::getBuffer() const
|
|||
return buffer;
|
||||
}
|
||||
|
||||
static Protocol::DeviceLimits limits = {
|
||||
.minFreq = 1000000,
|
||||
.maxFreq = 6000000000,
|
||||
.minIFBW = 10,
|
||||
.maxIFBW = 10000,
|
||||
.maxPoints = 4501,
|
||||
.cdbm_min = -4000,
|
||||
.cdbm_max = -1000,
|
||||
.minRBW = 10,
|
||||
.maxRBW = 10000,
|
||||
};
|
||||
|
||||
Device::Device(QString serial)
|
||||
{
|
||||
qDebug() << "Starting device connection...";
|
||||
|
|
@ -162,6 +174,8 @@ Device::Device(QString serial)
|
|||
connect(&transmissionTimer, &QTimer::timeout, this, &Device::transmissionTimeout);
|
||||
transmissionTimer.setSingleShot(true);
|
||||
transmissionActive = false;
|
||||
// got a new connection, request limits
|
||||
SendCommandWithoutPayload(Protocol::PacketType::RequestDeviceLimits);
|
||||
}
|
||||
|
||||
Device::~Device()
|
||||
|
|
@ -251,6 +265,11 @@ std::set<QString> Device::GetDevices()
|
|||
return serials;
|
||||
}
|
||||
|
||||
Protocol::DeviceLimits Device::Limits()
|
||||
{
|
||||
return limits;
|
||||
}
|
||||
|
||||
void Device::USBHandleThread()
|
||||
{
|
||||
qInfo() << "Receive thread started" << flush;
|
||||
|
|
@ -388,6 +407,9 @@ void Device::ReceivedData()
|
|||
emit NackReceived();
|
||||
// transmissionFinished(TransmissionResult::Nack);
|
||||
break;
|
||||
case Protocol::PacketType::DeviceLimits:
|
||||
limits = packet.limits;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,12 +62,13 @@ public:
|
|||
bool SetManual(Protocol::ManualControl manual);
|
||||
bool SendFirmwareChunk(Protocol::FirmwarePacket &fw);
|
||||
bool SendCommandWithoutPayload(Protocol::PacketType type);
|
||||
// Returns serial numbers of all connected devices
|
||||
static std::set<QString> GetDevices();
|
||||
QString serial() const;
|
||||
Protocol::DeviceInfo getLastInfo() const;
|
||||
QString getLastDeviceInfoString();
|
||||
|
||||
// Returns serial numbers of all connected devices
|
||||
static std::set<QString> GetDevices();
|
||||
static Protocol::DeviceLimits Limits();
|
||||
signals:
|
||||
void DatapointReceived(Protocol::Datapoint);
|
||||
void ManualStatusReceived(Protocol::ManualStatus);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue