Skip to content

Commit 10cb035

Browse files
committed
Added more debug logging for decode verification
1 parent e7416b1 commit 10cb035

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

AudioCoder/src/main/java/org/operatorfoundation/audiocoder/WSPRStation.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import org.operatorfoundation.audiocoder.models.WSPRCycleInformation
1010
import org.operatorfoundation.audiocoder.models.WSPRDecodeResult
1111
import org.operatorfoundation.audiocoder.models.WSPRStationConfiguration
1212
import org.operatorfoundation.audiocoder.models.WSPRStationState
13+
import timber.log.Timber
1314
import java.util.*
1415

1516
/**
@@ -238,7 +239,11 @@ class WSPRStation(
238239
{
239240
try
240241
{
242+
Timber.d("=== WSPR Station Loop Iteration ===")
241243
val nextDecodeWindowInfo = timingCoordinator.getTimeUntilNextDecodeWindow()
244+
Timber.d("Next decode window: ${nextDecodeWindowInfo.secondsUntilWindow}s")
245+
Timber.d("Is currently in decode window: ${timingCoordinator.isCurrentlyInValidDecodeWindow()}")
246+
242247
val millisecondsUntilDecodeWindow = nextDecodeWindowInfo.millisecondsUntilWindow
243248

244249
if (millisecondsUntilDecodeWindow > 0)

AudioCoder/src/main/java/org/operatorfoundation/audiocoder/WSPRTimingCoordinator.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import org.operatorfoundation.audiocoder.WSPRTimingConstants.MINUTES_PER_WSPR_CY
99
import org.operatorfoundation.audiocoder.WSPRTimingConstants.SECONDS_PER_MINUTE
1010
import org.operatorfoundation.audiocoder.models.WSPRCycleInformation
1111
import org.operatorfoundation.audiocoder.models.WSPRDecodeWindowInformation
12+
import timber.log.Timber
1213

1314
/**
1415
* Manages WSPR protocol timing and synchronization with the global amateur radio schedule.
@@ -117,7 +118,14 @@ class WSPRTimingCoordinator
117118
val isPastDecodeStartDelay = (cyclePositionSeconds >= DECODE_START_DELAY_SECONDS)
118119
val isBeforeDecodeWindowEnd = (cyclePositionSeconds <= DECODE_WINDOW_END_SECOND)
119120

120-
return isEvenMinute && isPastDecodeStartDelay && isBeforeDecodeWindowEnd
121+
val result = isEvenMinute && isPastDecodeStartDelay && isBeforeDecodeWindowEnd
122+
123+
// Add this logging
124+
Timber.v("Decode window check: minute=$currentMinuteInHour, second=$currentSecondInMinute, " +
125+
"isEven=$isEvenMinute, cyclePos=$cyclePositionSeconds, " +
126+
"pastDelay=$isPastDecodeStartDelay, beforeEnd=$isBeforeDecodeWindowEnd, result=$result")
127+
128+
return result
121129
}
122130

123131
/**

0 commit comments

Comments
 (0)