Skip to content

Commit

Permalink
Added Mario Static Port Information
Browse files Browse the repository at this point in the history
#91 non-breaking
  • Loading branch information
tthiery committed Oct 4, 2020
1 parent f1bce21 commit 1023deb
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/SharpBrick.PoweredUp/Devices/MarioHubAccelerometer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ public MarioHubAccelerometer(ILegoWirelessProtocol protocol, byte hubId, byte po

public IEnumerable<byte[]> GetStaticPortInfoMessages(Version softwareVersion, Version hardwareVersion)
=> @"
0B-00-43-00-01-06-02-03-00-00-00
07-00-43-00-02-03-00
11-00-44-00-00-00-52-41-57-00-00-00-00-00-00-00-00
0E-00-44-00-00-01-00-00-00-00-00-00-C8-42
0E-00-44-00-00-02-00-00-00-00-00-00-C8-42
0E-00-44-00-00-03-00-00-00-00-00-00-C8-42
0A-00-44-00-00-04-63-6E-74-00
08-00-44-00-00-05-84-00
0A-00-44-00-00-80-03-00-03-00
11-00-44-00-01-00-47-45-53-54-00-00-00-00-00-00-00
0E-00-44-00-01-01-00-00-00-00-00-00-C8-42
0E-00-44-00-01-02-00-00-00-00-00-00-C8-42
0E-00-44-00-01-03-00-00-00-00-00-00-C8-42
0A-00-44-00-01-04-63-6E-74-00
08-00-44-00-01-05-84-00
0A-00-44-00-01-80-02-01-03-00
".Trim().Split("\n").Select(s => BytesStringUtil.StringToData(s));
}
}
30 changes: 30 additions & 0 deletions src/SharpBrick.PoweredUp/Devices/MarioHubDebug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,36 @@ public MarioHubDebug(ILegoWirelessProtocol protocol, byte hubId, byte portId)

public IEnumerable<byte[]> GetStaticPortInfoMessages(Version softwareVersion, Version hardwareVersion)
=> @"
0B-00-43-03-01-02-04-0F-00-00-00
05-00-43-03-02
11-00-44-03-00-00-43-48-41-4C-00-00-00-00-00-00-00
0E-00-44-03-00-01-00-00-00-00-00-FF-7F-47
0E-00-44-03-00-02-00-00-00-00-00-00-C8-42
0E-00-44-03-00-03-00-00-00-00-00-FF-7F-47
0A-00-44-03-00-04-6E-61-00-00
08-00-44-03-00-05-84-00
0A-00-44-03-00-80-02-01-03-00
11-00-44-03-01-00-56-45-52-53-00-00-00-00-00-00-00
0E-00-44-03-01-01-00-00-00-00-00-00-7F-43
0E-00-44-03-01-02-00-00-00-00-00-00-C8-42
0E-00-44-03-01-03-00-00-00-00-00-00-7F-43
0A-00-44-03-01-04-6E-61-00-00
08-00-44-03-01-05-84-00
0A-00-44-03-01-80-04-02-0A-00
11-00-44-03-02-00-45-56-45-4E-54-53-00-00-00-00-00
0E-00-44-03-02-01-00-00-00-00-00-FF-7F-47
0E-00-44-03-02-02-00-00-00-00-00-00-C8-42
0E-00-44-03-02-03-00-00-00-00-00-FF-7F-47
0A-00-44-03-02-04-6E-61-00-00
08-00-44-03-02-05-84-00
0A-00-44-03-02-80-02-01-0A-00
11-00-44-03-03-00-44-45-42-55-47-00-00-00-00-00-00
0E-00-44-03-03-01-00-00-00-00-00-FF-7F-47
0E-00-44-03-03-02-00-00-00-00-00-00-C8-42
0E-00-44-03-03-03-00-00-00-00-00-FF-7F-47
0A-00-44-03-03-04-6E-61-00-00
08-00-44-03-03-05-84-00
0A-00-44-03-03-80-04-02-0A-00
".Trim().Split("\n").Select(s => BytesStringUtil.StringToData(s));
}
}
9 changes: 9 additions & 0 deletions src/SharpBrick.PoweredUp/Devices/MarioHubPants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ public MarioHubPants(ILegoWirelessProtocol protocol, byte hubId, byte portId)

public IEnumerable<byte[]> GetStaticPortInfoMessages(Version softwareVersion, Version hardwareVersion)
=> @"
0B-00-43-02-01-02-01-01-00-00-00
05-00-43-02-02
11-00-44-02-00-00-50-41-4E-54-00-00-00-00-00-00-00
0E-00-44-02-00-01-00-00-00-00-00-00-7C-42
0E-00-44-02-00-02-00-00-00-00-00-00-C8-42
0E-00-44-02-00-03-00-00-00-00-00-00-7C-42
0A-00-44-02-00-04-69-64-78-00
08-00-44-02-00-05-84-00
0A-00-44-02-00-80-01-00-03-00
".Trim().Split("\n").Select(s => BytesStringUtil.StringToData(s));
}
}
16 changes: 16 additions & 0 deletions src/SharpBrick.PoweredUp/Devices/MarioHubTagSensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ public MarioHubTagSensor(ILegoWirelessProtocol protocol, byte hubId, byte portId

public IEnumerable<byte[]> GetStaticPortInfoMessages(Version softwareVersion, Version hardwareVersion)
=> @"
0B-00-43-01-01-06-02-03-00-00-00
07-00-43-01-02-03-00
11-00-44-01-00-00-54-41-47-00-00-00-00-00-00-00-00
0E-00-44-01-00-01-00-00-00-00-00-00-20-41
0E-00-44-01-00-02-00-00-00-00-00-00-C8-42
0E-00-44-01-00-03-00-00-00-00-00-00-20-41
0A-00-44-01-00-04-69-64-78-00
08-00-44-01-00-05-84-00
0A-00-44-01-00-80-02-01-03-00
11-00-44-01-01-00-52-47-42-00-00-00-00-00-00-00-00
0E-00-44-01-01-01-00-00-00-00-00-00-20-41
0E-00-44-01-01-02-00-00-00-00-00-00-C8-42
0E-00-44-01-01-03-00-00-00-00-00-00-20-41
0A-00-44-01-01-04-72-61-77-00
08-00-44-01-01-05-84-00
0A-00-44-01-01-80-03-00-03-00
".Trim().Split("\n").Select(s => BytesStringUtil.StringToData(s));
}
}

0 comments on commit 1023deb

Please sign in to comment.