evaluate AUX3 in standby state
This commit is contained in:
parent
fc8eee58e7
commit
ec5e0e208c
@ -284,6 +284,10 @@ bool FPGA::InitiateSampleRead(ReadCallback cb) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FPGA::IsSweepActive() {
|
||||
return isHigh(AUX3);
|
||||
}
|
||||
|
||||
static int64_t assembleSampleResultValue(uint8_t *raw) {
|
||||
// LOG_DEBUG("Raw: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x", raw[4], raw[5], raw[2], raw[3], raw[1], raw[0]);
|
||||
return sign_extend_64(
|
||||
|
@ -135,6 +135,7 @@ ADCLimits GetADCLimits();
|
||||
void ResetADCLimits();
|
||||
bool ResumeHaltedSweep();
|
||||
uint16_t GetStatus();
|
||||
bool IsSweepActive();
|
||||
|
||||
void OverwriteHardware(uint8_t attenuation, LowpassFilter filter, bool lowband, bool port1_enabled, bool port2_enabled);
|
||||
void DisableHardwareOverwrite();
|
||||
|
@ -303,7 +303,7 @@ bool HW::TimedOut() {
|
||||
auto bufISR = lastISR;
|
||||
uint64_t now = Delay::get_us();
|
||||
uint64_t timeSinceLast = now - bufISR;
|
||||
if(activeMode != Mode::Idle && activeMode != Mode::Generator && !VNA::GetStandbyMode() && timeSinceLast > timeout) {
|
||||
if(activeMode != Mode::Idle && activeMode != Mode::Generator && !VNA::IsWaitingInStandby() && timeSinceLast > timeout) {
|
||||
LOG_WARN("Timed out, last ISR was at %lu%06lu, now %lu%06lu"
|
||||
, (uint32_t) (bufISR / 1000000), (uint32_t)(bufISR%1000000)
|
||||
, (uint32_t) (now / 1000000), (uint32_t)(now%1000000));
|
||||
|
@ -278,6 +278,10 @@ bool VNA::GetStandbyMode() {
|
||||
return settings.standby;
|
||||
}
|
||||
|
||||
bool VNA::IsWaitingInStandby() {
|
||||
return settings.standby && !FPGA::IsSweepActive();
|
||||
}
|
||||
|
||||
static void PassOnData() {
|
||||
Protocol::PacketInfo info;
|
||||
info.type = Protocol::PacketType::VNADatapoint;
|
||||
|
@ -9,6 +9,7 @@ namespace VNA {
|
||||
bool Setup(Protocol::SweepSettings s);
|
||||
void InitiateSweep();
|
||||
bool GetStandbyMode();
|
||||
bool IsWaitingInStandby();
|
||||
bool MeasurementDone(const FPGA::SamplingResult &result);
|
||||
void Work();
|
||||
void SweepHalted();
|
||||
|
Loading…
Reference in New Issue
Block a user