Skip to content

Commit

Permalink
Bump versions of liboni and clroni
Browse files Browse the repository at this point in the history
- Up to date device and Hub IDs
- Fix small issue on clroni-repl when displaying hub information
  • Loading branch information
jonnew committed May 2, 2024
1 parent 2f4b09b commit dababf0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
21 changes: 10 additions & 11 deletions api/clroni/clroni-repl/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ static internal class Helpers

public static string HubTableString(Context ctx)
{
var hubs = ctx.DeviceTable.Select(d => ctx.GetHub(d.Value.Address)).Distinct();
var hubs = ctx.DeviceTable.Where(d => d.Value.ID != 0)
.Select(d => ctx
.GetHub(d.Value.Address))
.GroupBy(h => h.Address)
.Select(g => g
.First());

var builder = new StringBuilder();

foreach (var hub in hubs)
foreach (var hub in hubs )
{
builder.AppendLine(string.Format("\tHub {0}) {1}",
hub.Address,
hub.Description));
builder.AppendLine($"\tHub { hub.Address}) {hub.Description}");
}

return builder.ToString();
Expand All @@ -29,12 +33,7 @@ public static string DeviceTableString(Context ctx)

foreach (var dev in ctx.DeviceTable.Values)
{
builder.AppendLine(string.Format("\t{0}) ID: {1}, Read size: {2}, Write size: {3}, Hub: {4}",
dev.Address,
dev.ID,
dev.ReadSize,
dev.WriteSize,
ctx.GetHub(dev.Address).Description));
builder.AppendLine($"\t{dev.Address}) ID: {dev.ID}, Read size: {dev.ReadSize}, Write size: {dev.WriteSize}, {dev.Description}");
}

return builder.ToString();
Expand Down
2 changes: 1 addition & 1 deletion api/clroni/clroni-repl/clroni-repl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description>Test application for clroni.</Description>
<PackageTags>ONI Open Ephys</PackageTags>
<TargetFramework>net472</TargetFramework>
<Version>1.2.1</Version>
<Version>1.2.2</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>Copyright © Open Ephys, Inc.</Copyright>
<Authors>Jon Newman</Authors>
Expand Down
2 changes: 1 addition & 1 deletion api/clroni/clroni/clroni.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageTags>ONI Open Ephys ONIX</PackageTags>
<TargetFramework>net472</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<Version>6.1.1</Version>
<Version>6.1.2</Version>
<Authors>Jon Newman</Authors>
<Company>Open Ephys, Inc.</Company>
<Copyright>©Open Ephys, Inc.</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion api/liboni/oni.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// NB: see https://semver.org/
#define ONI_VERSION_MAJOR 4
#define ONI_VERSION_MINOR 3
#define ONI_VERSION_PATCH 11
#define ONI_VERSION_PATCH 12

#define ONI_MAKE_VERSION(major, minor, patch) \
((major) * 10000 + (minor) * 100 + (patch))
Expand Down

0 comments on commit dababf0

Please sign in to comment.