Fixes in Scales

This commit is contained in:
lorenz.stechauner committed 2023-08-11 22:18:28 +02:00
1 parent 041e674af9
commit b11dcd273d
7 files changed
+39 -19

No files matched your search

+3 -2
View File
@@ -74,14 +74,15 @@ namespace Elwig {
foreach (var s in Config.Scales) {
try {
var id = s[0];
var type = s[1].ToLower();
var type = s[1]?.ToLower();
var model = s[2];
var cnx = s[3];
var empty = s[4];
var filling = s[5];
int? limit = s[6] == null ? null : int.Parse(s[6]);
var log = s[7];
if (type == "systec") {
list.Add(new SystecScale(id, model, cnx, empty, filling, limit));
list.Add(new SystecScale(id, model, cnx, empty, filling, limit, log));
} else {
throw new ArgumentException($"Invalid scale type: \"{type}\"");
}