mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 14:35:23 +00:00
implement sweep standby configuration
This commit is contained in:
parent
e35766c7b8
commit
08fa3fa0a0
5 changed files with 32 additions and 6 deletions
|
|
@ -258,12 +258,26 @@ bool VNA::Setup(Protocol::SweepSettings s) {
|
|||
// Enable new data and sweep halt interrupt
|
||||
FPGA::EnableInterrupt(FPGA::Interrupt::NewData);
|
||||
FPGA::EnableInterrupt(FPGA::Interrupt::SweepHalted);
|
||||
// Start the sweep
|
||||
// Start the sweep if not configured for standby
|
||||
firstPoint = true;
|
||||
FPGA::StartSweep();
|
||||
if(!settings.standby){
|
||||
FPGA::StartSweep();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void VNA::InitiateSweep() {
|
||||
// Invoked by a host via InitiateSweep packet
|
||||
if(settings.standby){
|
||||
// make sure that SweepSettings have been configured for standby operation
|
||||
FPGA::StartSweep();
|
||||
}
|
||||
}
|
||||
|
||||
bool VNA::GetStandbyMode() {
|
||||
return settings.standby;
|
||||
}
|
||||
|
||||
static void PassOnData() {
|
||||
Protocol::PacketInfo info;
|
||||
info.type = Protocol::PacketType::VNADatapoint;
|
||||
|
|
@ -330,8 +344,11 @@ void VNA::Work() {
|
|||
Communication::Send(packet);
|
||||
}
|
||||
// do not reset unlevel flag here, as it is calculated only once at the setup of the sweep
|
||||
// Start next sweep
|
||||
FPGA::StartSweep();
|
||||
// Start next sweep if not configured for standby
|
||||
if (!settings.standby){
|
||||
FPGA::StartSweep();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void VNA::SweepHalted() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue