RoboidControl-csharp/Sensors/TemperatureSensor.cs
2025-02-19 10:01:22 +01:00

15 lines
492 B
C#

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