mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 06:53:37 +00:00
Timeout handling in FPGA communication (better recovery from missing reference)
This commit is contained in:
parent
f0c5962878
commit
00f0de43f2
9 changed files with 58 additions and 9 deletions
|
|
@ -123,6 +123,19 @@ void Manual::Work() {
|
|||
p.status.refmax = limits.Rmax;
|
||||
HW::GetTemps(&p.status.temp_source, &p.status.temp_LO);
|
||||
Communication::Send(p);
|
||||
HW::Ref::update();
|
||||
Protocol::PacketInfo packet;
|
||||
packet.type = Protocol::PacketType::DeviceInfo;
|
||||
// Enable PLL chips for temperature reading
|
||||
bool srcEn = FPGA::IsEnabled(FPGA::Periphery::SourceChip);
|
||||
bool LOEn = FPGA::IsEnabled(FPGA::Periphery::LO1Chip);
|
||||
FPGA::Enable(FPGA::Periphery::SourceChip);
|
||||
FPGA::Enable(FPGA::Periphery::LO1Chip);
|
||||
HW::fillDeviceInfo(&packet.info, true);
|
||||
// restore PLL state
|
||||
FPGA::Enable(FPGA::Periphery::SourceChip, srcEn);
|
||||
FPGA::Enable(FPGA::Periphery::LO1Chip, LOEn);
|
||||
Communication::Send(packet);
|
||||
// Trigger next status update
|
||||
FPGA::StartSweep();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue