RoboidControl-csharp/Sensors/TemperatureSensor.cs
Pascal Serrarens 49f5011823 Bytes -> Binary
2025-01-16 09:24:49 +01:00

16 lines
477 B
C#

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