Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear numeric up down on dispenser events #198

Merged
merged 1 commit into from
Dec 21, 2023
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
2 changes: 1 addition & 1 deletion src/Aeon.Foraging/Aeon.Foraging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageTags>Bonsai Rx Project Aeon Foraging</PackageTags>
<TargetFramework>net472</TargetFramework>
<VersionPrefix>0.1.0</VersionPrefix>
<VersionSuffix>build231201</VersionSuffix>
<VersionSuffix>build231202</VersionSuffix>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions src/Aeon.Foraging/DispenserEventControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ private void resetButton_Click(object sender, EventArgs e)

private void OnDispenserEvent(decimal value, DispenserEventType eventType)
{
var metadata = new DispenserEventArgs((int)value, eventType);
Source.OnNext(metadata);
if (value != 0)
{
var metadata = new DispenserEventArgs((int)value, eventType);
Source.OnNext(metadata);
refillUpDown.Value = 0;
}
}
}
}
Loading