14 lines
461 B
C#
14 lines
461 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);
|
|
Console.WriteLine($"temperature {this.name} = {temp} C");
|
|
}
|
|
}
|
|
|
|
} |