Skip to content

Commit

Permalink
Update dispenser state formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Oct 17, 2023
1 parent 7b4d5e4 commit 820e8f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Aeon.Foraging/FormatDispenserState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ namespace Aeon.Foraging
[WorkflowElementCategory(ElementCategory.Transform)]
public class FormatDispenserState
{
const int Address = 200;
[Description("The address of the virtual Harp register.")]
public int Address { get; set; } = 200;

public IObservable<HarpMessage> Process(IObservable<Timestamped<DispenserEventArgs>> source)
public IObservable<HarpMessage> Process(IObservable<Timestamped<DispenserStateRecovery>> source)
{
return source.Select(input => HarpMessage.FromSingle(
Address,
input.Seconds,
MessageType.Event,
input.Value.Value));
input.Value.Count));
}
}
}

0 comments on commit 820e8f0

Please sign in to comment.