Skip to content

Commit

Permalink
Bug fix for showing feed counts in the UI
Browse files Browse the repository at this point in the history
Bug fix for showing feed counts in the UI
  • Loading branch information
davepruitt committed Mar 14, 2018
1 parent ebbcb14 commit efc9404
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions MMazeBehavior/MMazeBehaviorSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,16 @@ private void _background_thread_DoWork(object sender, DoWorkEventArgs e)
var time_since_last_feed = DateTime.Now - _most_recent_feed;
_most_recent_feed = DateTime.Now;

switch (latest_event.EventType)
{
case MMazeEventNames.LeftFeederTriggered:
LeftFeedCount++;
break;
case MMazeEventNames.RightFeederTriggered:
RightFeedCount++;
break;
}

FeedList_TimeSincePreviousFeed.Add(Convert.ToInt32(time_since_last_feed.TotalSeconds));
FeedList_TimeSinceSessionStart.Add(Convert.ToInt32(timer.Elapsed.TotalSeconds));
_background_properties_to_update.Add("FeedList");
Expand Down
1 change: 1 addition & 0 deletions MMazeBehavior/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public MainWindow()
Accord.Video.DirectShow.FilterCategory.VideoInputDevice);
List<Accord.Video.DirectShow.FilterInfo> my_list = j.Cast<Accord.Video.DirectShow.FilterInfo>().ToList();
Accord.Video.DirectShow.FilterInfo my_camera = my_list.Where(x => x.Name.Equals("HD USB Camera")).FirstOrDefault();
//Accord.Video.DirectShow.FilterInfo my_camera = my_list.Where(x => x.Name.Contains("Logitech")).FirstOrDefault();
if (my_camera != null)
{
//Set up the camera as the capture devices
Expand Down
Binary file modified MMazeBehavior/bin/Debug/MMazeBehavior.pdb
Binary file not shown.
Binary file modified MMazeBehavior/bin/Release/MMazeBehavior.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,4 @@ Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\bin\Debug\pt\ZedGraph.resources
Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\bin\Debug\sv\ZedGraph.resources.dll
Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\bin\Debug\ru\ZedGraph.resources.dll
Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\obj\Debug\MMazeBehavior_Content.g.cs
Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\obj\Debug\MMazeBehavior.csprojResolveAssemblyReference.cache
Binary file modified MMazeBehavior/obj/Debug/MMazeBehavior.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,3 @@ Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\obj\Release\MMazeBehavior.Prope
Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\obj\Release\MMazeBehavior.csproj.GenerateResource.Cache
Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\obj\Release\MMazeBehavior.exe
Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\obj\Release\MMazeBehavior.pdb
Z:\TBI\Behavior Code\MMazeBehavior\MMazeBehavior\obj\Release\MMazeBehavior.csprojResolveAssemblyReference.cache
Binary file modified MMazeBehavior/obj/Release/MMazeBehavior.pdb
Binary file not shown.

0 comments on commit efc9404

Please sign in to comment.