Skip to content

Commit

Permalink
Merge pull request #102 from flash62au/build
Browse files Browse the repository at this point in the history
Build
  • Loading branch information
flash62au authored May 18, 2024
2 parents df99c81 + a9108c7 commit 3afb077
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 2 additions & 0 deletions css/jquery.rotaryswitch.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<link rel="manifest" href="manifest.json">
<script>
var version = "1.3.28";
var version = "1.3.30";
</script>

<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon">
Expand Down
10 changes: 8 additions & 2 deletions js/commandController.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ function parseResponse(cmd) { // some basic ones only
} else {
//intialise the routes
rosterComplete = true;
writeToStream("JA");
if (!routesRequested) {
writeToStream("JA");
}
}

// --------------------------------------------------------------------
Expand All @@ -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 {
Expand Down Expand Up @@ -454,6 +457,9 @@ function parseResponse(cmd) { // some basic ones only
}
}
} else {
if (!turnoutsRequested) {
writeToStream("JT");
}
routesComplete = true;
}

Expand Down
5 changes: 3 additions & 2 deletions js/exwebthrottle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 3afb077

Please sign in to comment.