Permalink
Browse files

fake track change on click, just for better user feedback

  • Loading branch information...
cbries committed Dec 13, 2017
1 parent 558eae3 commit 286b6a80345e2cf71e2fa09b6ce9b1358410b99b
@@ -192,7 +192,7 @@
"protocol": "DCC",
"type": "ACCESSORY",
"mode": "SWITCH",
"state": 0,
"state": 1,
"switching": 0
},
{
@@ -304,7 +304,7 @@
"protocol": "DCC",
"type": "ACCESSORY",
"mode": "SWITCH",
"state": 1,
"state": 0,
"switching": 0
},
{
@@ -352,7 +352,7 @@
"protocol": "DCC",
"type": "ACCESSORY",
"mode": "SWITCH",
"state": 0,
"state": 1,
"switching": 0
},
{
@@ -432,7 +432,7 @@
"protocol": "DCC",
"type": "ACCESSORY",
"mode": "SWITCH",
"state": 0,
"state": 1,
"switching": 0
},
{
@@ -448,7 +448,7 @@
"protocol": "DCC",
"type": "ACCESSORY",
"mode": "SWITCH",
"state": 0,
"state": 1,
"switching": 0
},
{
@@ -809,86 +809,86 @@
"routes": [
{
"objectId": 30000,
"name1": "S1",
"name2": "Fahrweg",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30001,
"name1": "S2",
"name2": "Fahrweg",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30002,
"name1": "S3",
"name2": "Fahrweg",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30004,
"name1": "S4",
"name2": "Fahrweg",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30005,
"name1": "S5",
"name2": "Fahrweg",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30006,
"name1": "S6",
"name2": "Fahrweg",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30007,
"name1": "S7",
"name2": "Fahrweg",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30008,
"name1": "S8",
"name2": "Fahrweg",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30003,
"name1": "Bhf#1",
"name2": "Durchfahrt",
"name3": "hinten",
"name1": "hinten",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30009,
"name1": "Shbf#2",
"name2": "hinten",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30010,
"name1": "Shbf#2",
"name2": "vorne",
"name3": "",
"name1": "",
"name2": null,
"name3": null,
"type": "ROUTE"
},
{
"objectId": 30011,
"name1": "Bhf#1",
"name2": "Durchfahrt",
"name3": "vorne",
"name1": "vorne",
"name2": null,
"name3": null,
"type": "ROUTE"
}
],
@@ -712,6 +712,8 @@ private async void AfterOpen()
dataProvider.Add(blk);
}
TriggerUpdateUi();
};
foreach (var objFilename in Project.Objects)
@@ -317,10 +317,10 @@ public void DoChange(int index)
OnCommandsReady(this, ctrlCmds);
// create dummy block to trigger trackviewer immediatelly
//<EVENT 11>
// 11 switch[DCC4r]
//<EVENT ObjectID>
// ObjectID state[1|0]
// <END 0(OK)>
var blocks = Utils.GetBlocks($"<EVENT {ObjectId}>\r\n{ObjectId} switch[{Protocol}{s}]\r\n<END 0(OK)>\r\n");
var blocks = Utils.GetBlocks($"<EVENT {ObjectId}>\r\n{ObjectId} state[{index}]\r\n<END 0(OK)>\r\n");
OnFakeCommands(this, blocks);
}
}

0 comments on commit 286b6a8

Please sign in to comment.