Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/icomcommander.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public slots:
bool warnedAboutFA=false;
int consecutiveFAErrors=0;
int validResponseCount=0;
QElapsedTimer powerOnTime; // tracks when rigPoweredOn last became true
double frequencyMhz;
quint16 civAddr;
quint16 incomingCIVAddr; // place to store the incoming CIV.
Expand Down
4 changes: 4 additions & 0 deletions resources/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2680,6 +2680,10 @@
if (msg.hasPowerControl) document.getElementById('powerBtn').style.display = 'flex';
if (msg.freedvModes) freedvModes = msg.freedvModes;
updateWarningVisibility();
// After rig identification, request a full status refresh so
// UI elements populate even if the browser connected before
// the radio was identified (LAN power-up scenario, issue #19).
setTimeout(function() { send({ cmd: 'getStatus' }); }, 1500);
break;
case 'audioAvailable':
if (msg.available) { audioAvailable = true; audioSampleRate = msg.sampleRate || 48000; }
Expand Down
6 changes: 5 additions & 1 deletion src/radio/icomcommander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ void icomCommander::parseData(QByteArray dataInput)
qInfo(logRig()) << "Sustained valid responses — radio powered on";
queue->receiveValue(funcPowerControl,QVariant::fromValue<bool>(true),0);
rigPoweredOn = true;
powerOnTime.start();
validResponseCount = 0;
}

Expand All @@ -649,7 +650,10 @@ void icomCommander::parseData(QByteArray dataInput)
// The data are "to 00" and "from E1"
// Don't use it!
// We can use this to indicate power status I think.
if (rigPoweredOn) {
// Suppress echo-based power-off for 5 seconds after power-on
// to avoid oscillation from delayed broadcast echoes
// during LAN boot-up (issue #19).
if (rigPoweredOn && (!powerOnTime.isValid() || powerOnTime.elapsed() > 5000)) {
qDebug(logRig()) << "Echo caught:" << data.toHex(' ');
queue->message("Radio is available but may be powered-off");
queue->receiveValue(funcPowerControl,QVariant::fromValue<bool>(false),0);
Expand Down
Loading