Elaniobro / MMM-nyc-transit

MTA transit module for Magic Mirror
MIT License
21 stars 14 forks source link

[🐛 BUG] - upTown and downTown configuration values reversed #63

Closed joolean closed 2 years ago

joolean commented 2 years ago

Describe the bug The upTown and downTown settings seem to have the inverse effect when applied separately. That is, setting upTown to true and downTown to false leads to only "downtown" or outbound trains being displayed, and vice versa.

To Reproduce Steps to reproduce the behavior:

  1. Set upTown to true and downTown to false in the module configuration
  2. Start MagicMirror with an instance of MMM-nyc-transit configured
  3. Compare with MTA real-time data from mta.info

Expected behavior Filtering for only "uptown" trains should lead to only uptown trains being displayed.

Actual behavior Only "downtown" trains are displayed; uptown trains are not displayed.

Configuration

        {
            module: 'MMM-nyc-transit',
            position: "top_left",
            header: "9 Av",
            config: {
                apiKey: '...',
                displayType: 'list',
                mtaType: 'train',
                stations: [
                    {
                        stationId: 59,
                        walkingTime: 0,
                        dir: {
                            upTown: true,
                            downTown: false
                        }
                    }
                ],
                fadeSpeed: 0
            }
        },
Elaniobro commented 2 years ago

@joolean; that's not good, did you want to submit another PR?

joolean commented 2 years ago

Yes! I was planning to.