Hello GHI!
We have an error with module EMX and BitConverter on the latest firmware (R5).
Try to reproduce it, please see source bellow:
using System;
using Microsoft.SPOT;
namespace MFConsoleApplication1
{
public class Program
{
public static void Main()
{
float f = 100.101f;
byte[] buf = BitConverter.GetBytes(f); // 182 51 200 66
byte[] buf2 = new byte[17] { 0, 0, 0, 0, 0, 0, 0, 182, 51, 200, 66, 0, 0, 0, 0, 0, 0 };
f = BitConverter.ToSingle(buf, 0); // Correct
Debug.Print(f.ToString());
f = BitConverter.ToSingle(buf2, 7); // Wrong in EMX, correct in Emulator & G120
Debug.Print(f.ToString());
}
}
}