Pace the pump on what MMTTY says it has left
The engine probe answered two questions on the air, and they point opposite
ways.
TxBufLen is the number of characters left to transmit. Seventeen characters
pushed, five decoded back, and it read 12, counting down to 0 as the message
went out. So the pump no longer counts character times off the clock: it asks
the engine, feeds while the answer is under Lead, and asks again. The baud rate
is now only the fallback for an engine that will not answer.
A backspace is not an edit. Pushed in as a character it made the count go up by
four and the text went out unchanged, so text the engine has been given cannot
be taken back, only aborted. EngineTypeAhead was built on the opposite belief
and is gone, along with the setting that chose it and the interface that existed
to switch between the two.
A count that stops going down means the engine is holding what it has: MMTTY set
to Word out keeps a word until the space after it. The pump feeds one character
per look while that lasts, so the space arrives and the word goes out rather
than the message sitting there.
The probe kept two bugs of its own that this run showed: it read the count a
millisecond after pushing, saw 0 and called the message finished, and it started
a step while the previous unkey was still in flight, so that step ran with the
engine down. It now needs two empty answers in a row and waits for the engine to
say it has stopped. It also asks what {RX} does to a word the engine is holding,
which decides whether a macro without a trailing space loses its last word.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RtspmWmS7f8kUvcyaHpRWZ
This commit is contained in:
@@ -333,10 +333,7 @@ public sealed class AppSession : IDisposable
|
||||
MmttyEngine started = new(channel, options);
|
||||
await started.StartAsync();
|
||||
digital = started;
|
||||
digitalSender = new DigitalEngineSender(
|
||||
started,
|
||||
Settings.DigitalBaud,
|
||||
Settings.DigitalEngineHoldsBuffer);
|
||||
digitalSender = new DigitalEngineSender(started, Settings.DigitalBaud);
|
||||
Changed?.Invoke(this, EventArgs.Empty);
|
||||
return started;
|
||||
}
|
||||
|
||||
@@ -260,12 +260,6 @@ public sealed record Settings
|
||||
/// MMTTY's own default, and what nearly every RTTY contest runs at.
|
||||
public double DigitalBaud { get; init; } = 45.45;
|
||||
|
||||
/// The engine holds the text waiting to go out instead of Nonemm feeding it
|
||||
/// a couple of characters at a time. MMTTY has a buffer of its own and can
|
||||
/// say how much of it is left; see `docs/unfinished.md` for what has been
|
||||
/// checked against a real engine and what has not.
|
||||
public bool DigitalEngineHoldsBuffer { get; init; }
|
||||
|
||||
/// N1MM caps the receive pane's font at 14 points.
|
||||
public int DigitalFontSize { get; init; } = 12;
|
||||
|
||||
|
||||
@@ -114,10 +114,6 @@
|
||||
<TextBox Name="BaudBox" Width="120" HorizontalAlignment="Left" />
|
||||
<TextBlock Classes="label" TextWrapping="Wrap"
|
||||
Text="The speed the engine transmits at, which paces the transmit pane. Set it to the same speed as the engine: 45.45 baud unless the contest says otherwise." />
|
||||
<CheckBox Name="EngineBufferBox" Margin="0,8,0,0"
|
||||
Content="Let the engine hold the text waiting to go out" />
|
||||
<TextBlock Classes="label" TextWrapping="Wrap"
|
||||
Text="MMTTY keeps its own type-ahead buffer and says how much of it is left, so the transmit pane can push everything to it and take back what has not been transmitted. The baud rate is then MMTTY's business and this setting stops pacing anything. Untested against a real engine." />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</HeaderedContentControl>
|
||||
|
||||
@@ -89,7 +89,6 @@ public sealed partial class DigitalDialog : Window
|
||||
BackgroundHighlightBox.IsChecked = settings.DigitalHighlightBackground;
|
||||
MarkBox.Text = settings.DigitalMarkHertz.ToString(CultureInfo.InvariantCulture);
|
||||
BaudBox.Text = settings.DigitalBaud.ToString(CultureInfo.InvariantCulture);
|
||||
EngineBufferBox.IsChecked = settings.DigitalEngineHoldsBuffer;
|
||||
WindowBox.ItemsSource = WindowSizes;
|
||||
WindowBox.SelectedItem =
|
||||
WindowSizes.FirstOrDefault(s => s == settings.DigitalEngineWindow) ?? WindowSizes[0];
|
||||
@@ -306,7 +305,6 @@ public sealed partial class DigitalDialog : Window
|
||||
out double baud) && baud > 0
|
||||
? baud
|
||||
: settings.DigitalBaud,
|
||||
DigitalEngineHoldsBuffer = EngineBufferBox.IsChecked == true,
|
||||
DigitalEngineWindow = WindowBox.SelectedItem as string ?? "Normal",
|
||||
DigitalEngineOnTop = OnTopBox.IsChecked == true,
|
||||
DigitalEnabled = (EngineBox.Text?.Trim().Length ?? 0) > 0,
|
||||
|
||||
@@ -169,7 +169,7 @@ public sealed partial class DigitalWindow
|
||||
{
|
||||
if (session.DigitalKeyer is { } keyer)
|
||||
{
|
||||
keyer.Buffer.Cursor = TransmitBox.IsFocused ? CursorInBox() : TransmitBuffer.NoCursor;
|
||||
keyer.Buffer.Cursor = TransmitBox.IsFocused ? CursorInBox() : TypeAhead.NoCursor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public sealed partial class DigitalWindow : RefreshableWindow
|
||||
private bool showingBuffer;
|
||||
|
||||
/// The buffer this window is drawing, or null while no engine is running.
|
||||
private TransmitBuffer? buffer;
|
||||
private TypeAhead? buffer;
|
||||
|
||||
/// Where the next line goes in a non-scrolling pane. It walks down the
|
||||
/// window and starts again at the top; -1 is before the first line.
|
||||
@@ -107,9 +107,9 @@ public sealed partial class DigitalWindow : RefreshableWindow
|
||||
SentText.Foreground = Transmitted;
|
||||
SentText.FontSize = Settings.DigitalFontSize;
|
||||
TransmitBox.FontSize = Settings.DigitalFontSize;
|
||||
if (buffer is TypeAhead paced)
|
||||
if (buffer is not null)
|
||||
{
|
||||
paced.Baud = Settings.DigitalBaud;
|
||||
buffer.Baud = Settings.DigitalBaud;
|
||||
}
|
||||
FollowRunAndFrequency();
|
||||
ShowState();
|
||||
@@ -148,12 +148,9 @@ public sealed partial class DigitalWindow : RefreshableWindow
|
||||
Detach();
|
||||
engine = started;
|
||||
buffer = session.DigitalKeyer?.Buffer;
|
||||
if (buffer is TypeAhead paced)
|
||||
{
|
||||
paced.Baud = Settings.DigitalBaud;
|
||||
}
|
||||
if (buffer is not null)
|
||||
{
|
||||
buffer.Baud = Settings.DigitalBaud;
|
||||
buffer.Changed += WhenBufferChanged;
|
||||
}
|
||||
started.Received += WhenReceived;
|
||||
|
||||
Reference in New Issue
Block a user