mirror of
https://github.com/jankae/LibreVNA.git
synced 2025-12-06 07:12:10 +01:00
add support for hardware version 0xD0 device status
Some checks failed
Build / PC_Application_Ubuntu (push) Has been cancelled
Build / PC_Application_RPi5 (push) Has been cancelled
Build / PC_Application_Windows (push) Has been cancelled
Build / PC_Application_OSX (push) Has been cancelled
Build / PC_Application_OSX_13 (push) Has been cancelled
Build / Embedded_Firmware (push) Has been cancelled
HIL_Tests / Get_Repository (push) Has been cancelled
Unit_Tests / Tests (push) Has been cancelled
HIL_Tests / PC_Application_RPi5 (push) Has been cancelled
HIL_Tests / Embedded_Firmware (push) Has been cancelled
HIL_Tests / HIL (push) Has been cancelled
Some checks failed
Build / PC_Application_Ubuntu (push) Has been cancelled
Build / PC_Application_RPi5 (push) Has been cancelled
Build / PC_Application_Windows (push) Has been cancelled
Build / PC_Application_OSX (push) Has been cancelled
Build / PC_Application_OSX_13 (push) Has been cancelled
Build / Embedded_Firmware (push) Has been cancelled
HIL_Tests / Get_Repository (push) Has been cancelled
Unit_Tests / Tests (push) Has been cancelled
HIL_Tests / PC_Application_RPi5 (push) Has been cancelled
HIL_Tests / Embedded_Firmware (push) Has been cancelled
HIL_Tests / HIL (push) Has been cancelled
This commit is contained in:
parent
6e2079fcfb
commit
273dfa8037
|
|
@ -310,6 +310,17 @@ std::set<DeviceDriver::Flag> LibreVNADriver::getFlags()
|
||||||
ret.insert(Flag::Overload);
|
ret.insert(Flag::Overload);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 0xD0:
|
||||||
|
if(!lastStatus.VD0.source_locked || !lastStatus.VD0.LO_locked) {
|
||||||
|
ret.insert(Flag::Unlocked);
|
||||||
|
}
|
||||||
|
if(lastStatus.VD0.unlevel) {
|
||||||
|
ret.insert(Flag::Unlevel);
|
||||||
|
}
|
||||||
|
if(lastStatus.VD0.ADC_overload) {
|
||||||
|
ret.insert(Flag::Overload);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 0xFE:
|
case 0xFE:
|
||||||
if(!lastStatus.VFE.source_locked || !lastStatus.VFE.LO_locked) {
|
if(!lastStatus.VFE.source_locked || !lastStatus.VFE.LO_locked) {
|
||||||
ret.insert(Flag::Unlocked);
|
ret.insert(Flag::Unlocked);
|
||||||
|
|
@ -355,6 +366,19 @@ QString LibreVNADriver::getStatus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 0xD0:
|
||||||
|
ret.append(" Temps MCU: "+QString::number(lastStatus.VD0.temp_MCU)+"°C");
|
||||||
|
ret.append(" Supply: "+Unit::ToString((float) lastStatus.VD0.supply_voltage / 1000.0, "V", "m ", 3) + " " + Unit::ToString((float) lastStatus.VD0.supply_current / 1000.0, "A", "m ", 3));
|
||||||
|
ret.append(" Reference:");
|
||||||
|
if(lastStatus.VD0.extRefInUse) {
|
||||||
|
ret.append("External");
|
||||||
|
} else {
|
||||||
|
ret.append("Internal");
|
||||||
|
if(lastStatus.VD0.extRefAvailable) {
|
||||||
|
ret.append(" (External available)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 0xFE:
|
case 0xFE:
|
||||||
ret.append(" MCU Temp: "+QString::number(lastStatus.VFE.temp_MCU)+"°C");
|
ret.append(" MCU Temp: "+QString::number(lastStatus.VFE.temp_MCU)+"°C");
|
||||||
ret.append(" eCal Temp: "+QString::number(lastStatus.VFE.temp_eCal / 100.0)+"°C");
|
ret.append(" eCal Temp: "+QString::number(lastStatus.VFE.temp_eCal / 100.0)+"°C");
|
||||||
|
|
@ -804,6 +828,7 @@ QString LibreVNADriver::hardwareVersionToString(uint8_t version)
|
||||||
{
|
{
|
||||||
switch(version) {
|
switch(version) {
|
||||||
case 0x01: return "1";
|
case 0x01: return "1";
|
||||||
|
case 0xD0: return "HAR0";
|
||||||
case 0xE0: return "SAP1";
|
case 0xE0: return "SAP1";
|
||||||
case 0xFE: return "P2";
|
case 0xFE: return "P2";
|
||||||
case 0xFF: return "PT";
|
case 0xFF: return "PT";
|
||||||
|
|
|
||||||
|
|
@ -249,6 +249,18 @@ using DeviceStatus = struct _deviceStatus {
|
||||||
uint16_t temp_eCal; // in 1/100 °C
|
uint16_t temp_eCal; // in 1/100 °C
|
||||||
uint16_t power_heater; // in mW
|
uint16_t power_heater; // in mW
|
||||||
} VFE;
|
} VFE;
|
||||||
|
struct {
|
||||||
|
uint8_t extRefAvailable:1;
|
||||||
|
uint8_t extRefInUse:1;
|
||||||
|
uint8_t FPGA_configured:1;
|
||||||
|
uint8_t source_locked:1;
|
||||||
|
uint8_t LO_locked:1;
|
||||||
|
uint8_t ADC_overload:1;
|
||||||
|
uint8_t unlevel:1;
|
||||||
|
uint8_t temp_MCU;
|
||||||
|
uint16_t supply_voltage;
|
||||||
|
uint16_t supply_current;
|
||||||
|
} VD0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue