removing TODOs
This commit is contained in:
parent
d02efdb146
commit
06912584b0
@ -70,7 +70,7 @@ std::set<QString> LibreVNATCPDriver::GetAvailableDevices()
|
||||
s->writeDatagram(data.data(), SSDPaddress, SSDPport);
|
||||
}
|
||||
|
||||
// TODO need delay here while still processing events
|
||||
// need delay here while still processing events
|
||||
SynSleep::sleep(100);
|
||||
|
||||
std::set<QString> serials;
|
||||
|
@ -44,7 +44,6 @@ void ReceiverCalDialog::UpdateAmplitude(AmplitudeCalDialog::CorrectionPoint &poi
|
||||
// This point was just received from the device, it is not possible to know the actual amplitude because the
|
||||
// applied power level during the calibration is not saved (only the correction value). This is not a problem
|
||||
// because the correction value is still valid but the missing values look weird in the GUI
|
||||
// TODO change this?
|
||||
point.amplitudePort1 = std::numeric_limits<double>::quiet_NaN();
|
||||
point.amplitudePort2 = std::numeric_limits<double>::quiet_NaN();
|
||||
point.port1set = true;
|
||||
|
@ -35,6 +35,11 @@ void DeviceUSBLog::addPacket(Protocol::PacketInfo &p, QString serial)
|
||||
e.type = LogEntry::Type::Packet;
|
||||
e.p = new Protocol::PacketInfo;
|
||||
*e.p = p;
|
||||
if(p.type == Protocol::PacketType::VNADatapoint) {
|
||||
e.datapoint = new Protocol::VNADatapoint<32>(*p.VNAdatapoint);
|
||||
} else {
|
||||
e.datapoint = nullptr;
|
||||
}
|
||||
addEntry(e);
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
QString serial;
|
||||
std::vector<uint8_t> bytes;
|
||||
Protocol::PacketInfo *p;
|
||||
Protocol::VNADatapoint<32> *datapoint;
|
||||
unsigned int storageSize() const {
|
||||
unsigned long size = sizeof(type) + sizeof(timestamp) + serial.size();
|
||||
switch(type) {
|
||||
|
@ -237,40 +237,39 @@ void DeviceUSBLogView::addEntry(const DeviceUSBLog::LogEntry &e)
|
||||
}
|
||||
break;
|
||||
case Protocol::PacketType::VNADatapoint: {
|
||||
// TODO VNAdatapoint will already be deleted. Create deep copy when creating the log entry?
|
||||
// Protocol::VNADatapoint<32>* s = e.p->VNAdatapoint;
|
||||
// addInteger(item, "Point number", s->pointNum);
|
||||
// addDouble(item, "Frequency/time", s->frequency, "Hz");
|
||||
// addDouble(item, "Power", (double) s->cdBm / 100.0, "dBm");
|
||||
// for(unsigned int i=0;i<s->getNumValues();i++) {
|
||||
// auto v = s->getValue(i);
|
||||
// vector<int> ports;
|
||||
// if(v.flags & 0x01) {
|
||||
// ports.push_back(1);
|
||||
// }
|
||||
// if(v.flags & 0x02) {
|
||||
// ports.push_back(2);
|
||||
// }
|
||||
// if(v.flags & 0x04) {
|
||||
// ports.push_back(3);
|
||||
// }
|
||||
// if(v.flags & 0x08) {
|
||||
// ports.push_back(4);
|
||||
// }
|
||||
// bool reference = v.flags & 0x10;
|
||||
// int stage = v.flags >> 5;
|
||||
// auto vitem = new QTreeWidgetItem;
|
||||
// vitem->setData(2, Qt::DisplayRole, "Measurement "+QString::number(i+1));
|
||||
// vitem->setData(3, Qt::DisplayRole, "Real: "+QString::number(v.value.real())+" Imag: "+QString::number(v.value.imag()));
|
||||
// addInteger(vitem, "Stage", stage);
|
||||
// addBool(vitem, "Reference", reference);
|
||||
// QString sports = QString::number(ports.front());
|
||||
// for(unsigned int j=1;j<ports.size();j++) {
|
||||
// sports += ","+QString::number(ports[j]);
|
||||
// }
|
||||
// addString(vitem, "Ports", sports);
|
||||
// item->addChild(vitem);
|
||||
// }
|
||||
Protocol::VNADatapoint<32>* s = e.datapoint;
|
||||
addInteger(item, "Point number", s->pointNum);
|
||||
addDouble(item, "Frequency/time", s->frequency, "Hz");
|
||||
addDouble(item, "Power", (double) s->cdBm / 100.0, "dBm");
|
||||
for(unsigned int i=0;i<s->getNumValues();i++) {
|
||||
auto v = s->getValue(i);
|
||||
vector<int> ports;
|
||||
if(v.flags & 0x01) {
|
||||
ports.push_back(1);
|
||||
}
|
||||
if(v.flags & 0x02) {
|
||||
ports.push_back(2);
|
||||
}
|
||||
if(v.flags & 0x04) {
|
||||
ports.push_back(3);
|
||||
}
|
||||
if(v.flags & 0x08) {
|
||||
ports.push_back(4);
|
||||
}
|
||||
bool reference = v.flags & 0x10;
|
||||
int stage = v.flags >> 5;
|
||||
auto vitem = new QTreeWidgetItem;
|
||||
vitem->setData(2, Qt::DisplayRole, "Measurement "+QString::number(i+1));
|
||||
vitem->setData(3, Qt::DisplayRole, "Real: "+QString::number(v.value.real())+" Imag: "+QString::number(v.value.imag()));
|
||||
addInteger(vitem, "Stage", stage);
|
||||
addBool(vitem, "Reference", reference);
|
||||
QString sports = QString::number(ports.front());
|
||||
for(unsigned int j=1;j<ports.size();j++) {
|
||||
sports += ","+QString::number(ports[j]);
|
||||
}
|
||||
addString(vitem, "Ports", sports);
|
||||
item->addChild(vitem);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Protocol::PacketType::SpectrumAnalyzerResult: {
|
||||
|
@ -255,9 +255,9 @@ void ImpedanceMatchDialog::calculateMatch()
|
||||
} else if(X < 0 && B < 0) {
|
||||
ui->Image->setPixmap(QPixmap(":/icons/sCpL_small.png"));
|
||||
} else if(X >= 0 && B < 0) {
|
||||
ui->Image->setPixmap(QPixmap(":/icons/sCpC_small.png")); // TODO check
|
||||
ui->Image->setPixmap(QPixmap(":/icons/sCpC_small.png"));
|
||||
} else {
|
||||
ui->Image->setPixmap(QPixmap(":/icons/sLpL_small.png")); // TODO check
|
||||
ui->Image->setPixmap(QPixmap(":/icons/sLpL_small.png"));
|
||||
}
|
||||
} else {
|
||||
if(X >= 0 && B >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user