Skip to content

File: generic.js

Hampton edited this page Sep 6, 2015 · 1 revision

##What does it do?

This file acts as a fallback decoder.js file. It should work with every DCC decoder that has ever existed. Literally every single one.

How does it do this? It's very simple: this file is mostly "dummy functions."

The only things that actually do something in this file are the things that every DCC decoder has: speed, direction, and F0 for lights. All the rest of the functions are dummy functions, meaning that they behave correctly for the rest of the program, but do nothing with respect to your locomotive model. This doesn't change any part of how the UI works, it just means that decoder-specific functions (sounds, usually) will not work with this.

There are 2 key uses for this script:

  • Unsupported decoders
  • Fallback for when users don't specify a decoder.js script.
Clone this wiki locally