Unit for monitoring some value via running of external program
This commit is contained in:
@@ -30,5 +30,12 @@ namespace Barsik
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetFloat(int address, float value)
|
||||
{
|
||||
byte[] bytes = BitConverter.GetBytes(value);
|
||||
registers[address + 1] = (int)bytes[0] + (((int)bytes[1]) << 8);
|
||||
registers[address] = (int)bytes[2] + (((int)bytes[3]) << 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user