RoboidControl-csharp/Sensors/TemperatureSensor.cs
Pascal Serrarens dc165edf79 NW PoC works
2025-01-08 17:11:54 +01:00

14 lines
465 B
C#

namespace Passer.Control.Core {
public class TemperatureSensor : Thing {
public TemperatureSensor(byte networkId, byte thingId) : base(null, networkId, thingId, (byte)Type.TemperatureSensor) {
}
public override void ProcessBytes(byte[] bytes) {
byte ix = 0;
float temp = LowLevelMessages.ReceiveFloat16(bytes, ref ix);
UnityEngine.Debug.Log($"temperature {this.name} = {temp} C");
}
}
}