Skip to content

Commit

Permalink
Arduino Sketch: fix auto accessory off (was not working properly, and
Browse files Browse the repository at this point in the history
accessories remained on forever).
  • Loading branch information
elafargue committed Mar 18, 2015
1 parent 20ff036 commit 3acd20d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* 2013.06.23: Add support for MC33879 rather than MC33880
* 2013.06.25: Add command to trigger a software reset
* 2013.06.27: Add commands to control relays that are present on v3.0 controller
* 2015.03.18: Accessory Auto off: tests and bugfix (works fine now)
*
* (c) 2013 Edouard Lafargue, edouard@lafargue.name
*
Expand Down Expand Up @@ -1033,9 +1034,10 @@ void loop() {
// on for too long
///////
if (accessory_on_id > -1) {
if (millis() - accessory_on_timestamp > turnoutMaxOn)
if (millis() - accessory_on_timestamp > turnoutMaxOn) {
accessoryCommand(accessory_on_id,accessory_on_port, OP_OFF);
accessory_on_id = -1;
}
}

///////
Expand Down
9 changes: 9 additions & 0 deletions server/ldb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
accessories
cars
layouts
controllers
locomotives
settings
logbookentries*


0 comments on commit 3acd20d

Please sign in to comment.