Unit for monitoring some value via running of external program

This commit is contained in:
ftc
2021-01-08 17:39:23 +03:00
parent 2e0b96ff7a
commit 624a6e1505
4 changed files with 94 additions and 1 deletions
+7
View File
@@ -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);
}
}
}