diff --git a/Changelog.md b/Changelog.md index 3186e1d..ebabd27 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,10 @@ +# Version 1.3.30 +- bug fix if there are only two Routes + +# Version 1.3.29 +- bug fix if there are Turnouts/Points but no Routes +- fix for the knob still being active in 'Stop' + # Version 1.3.28 - send actual eStop diff --git a/css/jquery.rotaryswitch.css b/css/jquery.rotaryswitch.css index 89ceda1..31881d9 100644 --- a/css/jquery.rotaryswitch.css +++ b/css/jquery.rotaryswitch.css @@ -141,7 +141,9 @@ div#knobthrottle.disabled:before { margin-left: 36px; border-radius: 100%; margin-top: 36px; + pointer-events: none; } .speedController.disabled{ position: relative; + pointer-events: none; } \ No newline at end of file diff --git a/index.html b/index.html index 757cddd..4ac78a9 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,7 @@ diff --git a/js/commandController.js b/js/commandController.js index 88f608d..29660e5 100644 --- a/js/commandController.js +++ b/js/commandController.js @@ -396,7 +396,9 @@ function parseResponse(cmd) { // some basic ones only } else { //intialise the routes rosterComplete = true; - writeToStream("JA"); + if (!routesRequested) { + writeToStream("JA"); + } } // -------------------------------------------------------------------- @@ -405,7 +407,8 @@ function parseResponse(cmd) { // some basic ones only last = cmdArray.length-1; if (cmdArrayClean.length > 1) { // if ==1, then no routes if ( (cmdArrayClean.length == 2 ) || - ( (cmdArrayClean.length > 3 ) && (cmdArrayClean[3].charAt(0) != '"' ) ) ) { + (cmdArrayClean.length == 3 ) || + ( (cmdArrayClean.length > 3 ) && (cmdArrayClean[3].charAt(0) != '"' ) ) ) { routesCount = cmdArrayClean.length-1; console.log(getTimeStamp() + ' Processing routes: ' + routesCount); try { @@ -454,6 +457,9 @@ function parseResponse(cmd) { // some basic ones only } } } else { + if (!turnoutsRequested) { + writeToStream("JT"); + } routesComplete = true; } diff --git a/js/exwebthrottle.js b/js/exwebthrottle.js index e77a05e..7b1a1cd 100644 --- a/js/exwebthrottle.js +++ b/js/exwebthrottle.js @@ -791,6 +791,7 @@ $(document).ready(function () { $(".dir-btn").on("click", function () { if (getCV() != 0) { current = $(this); + lastDir = getDirection(); dir = current.attr("aria-label"); $(".dir-btn").removeClass("selected"); current.addClass("selected", 200); @@ -818,10 +819,10 @@ $(document).ready(function () { case "stop": { isStopped = true; isDirectionToggleStopped = true; - dir = getDirection(); + setDirection(lastDir); setSpeed(DIRECTION_FORWARD); setSpeedofControllers(); - sendSpeed(getCV(), 0, dir); + sendSpeed(getCV(), 0, lastDir); break; } }