Skip to content

Commit 8a8ebbc

Browse files
author
Jasper van Bourgognie
committed
Fix resource loading
1 parent 285da24 commit 8a8ebbc

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Devices/DummyScopeFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static float[] GetWaveFromFile(AnalogChannel channel, uint waveLength, do
2020
{
2121
String filename = Path.GetTempFileName();
2222
FileStream f = new FileStream(filename, FileMode.Create, FileAccess.Write);
23-
byte[] i2cSequence = Resources.Load ("i2c_sequence.mat");
23+
byte[] i2cSequence = Resources.Load ("blobs.i2c_sequence.mat");
2424
f.Write(i2cSequence, 0, i2cSequence.Length);
2525
f.Close();
2626

src/Devices/HackerSpecial.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public HackerSpecial(ISmartScopeInterface iface)
7070
memories.Add(FpgaUserMemory);
7171

7272
//Get FW contents
73-
string fwName = "SmartScopeHackerSpecial.bin";
73+
string fwName = "blobs.SmartScopeHackerSpecial.bin";
7474
byte[] firmware = Resources.Load(fwName);
7575

7676
if (firmware == null)

src/Devices/SmartScope.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ private void InitializeHardware()
229229
try
230230
{
231231
LabNation.Common.SerialNumber s = new SerialNumber(this.Serial);
232-
fwName = String.Format("SmartScope_{0}.bin", Base36.Encode((long)s.model, 3).ToUpper());
232+
fwName = String.Format("blobs.SmartScope_{0}.bin", Base36.Encode((long)s.model, 3).ToUpper());
233233
firmware = Resources.Load(fwName);
234234
}
235235
catch (Exception e)

src/Resources.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal static byte[] Load(string name)
1010
{
1111
Assembly ass = Assembly.GetExecutingAssembly();
1212

13-
using(Stream s = ass.GetManifestResourceStream(String.Format("{0}.{1}", ass.GetName().Name, name)))
13+
using(Stream s = ass.GetManifestResourceStream(String.Format("LabNation.DeviceInterface.{0}", name)))
1414
using(BinaryReader r = new BinaryReader(s))
1515
return r.ReadBytes((int)s.Length);
1616

0 commit comments

Comments
 (0)