Skip to content

Commit

Permalink
Merge pull request #198 from SainsburyWellcomeCentre/aeon-foraging
Browse files Browse the repository at this point in the history
Clear numeric up down on dispenser events
  • Loading branch information
glopesdev authored Dec 21, 2023
2 parents afea591 + 536bc41 commit 079527b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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;
}
}
}
}

0 comments on commit 079527b

Please sign in to comment.