messages show on ECAM now, but wrong

This commit is contained in:
Jonathan Redpath 2018-06-08 17:08:17 +01:00
parent 8eb1cc72de
commit e69ae365c2

View file

@ -113,12 +113,13 @@ var ECAM_controller = {
# write to ECAM # write to ECAM
foreach(var ewd_messages; active_messages.vector) { foreach(var ewd_messages; active_messages.vector) {
var i = 1; var i = 1;
var x = getprop("/ECAM/msg/line[" ~ i ~ "]"); var x = getprop("/ECAM/msg/line" ~ i);
print("Variable i is:" ~ i); print("Variable i is:" ~ i);
if (x == "") { if (x == "") {
setprop("/ECAM/msg/line[" ~ i ~ "]", ewd_messages); setprop("/ECAM/msg/line" ~ i, ewd_messages);
} else { } else {
i = i + 1; i = i + 1;
setprop("/ECAM/msg/line" ~ i, ewd_messages);
print("Variable i is:" ~ i); print("Variable i is:" ~ i);
} }
} }