k4kfh / ZephyrCab

Drive a model train with prototypical controls, realistic behavior, and simulated physics; uses JMRI's WebSockets interface for layout connection
http://k4kfh.github.io/ZephyrCab
GNU Affero General Public License v3.0
10 stars 4 forks source link

Sending speed:undefined to JMRI? #25

Closed k4kfh closed 7 years ago

k4kfh commented 7 years ago

For some reason ZephyrCab is sending "speed":undefined as part of the JSON it sends to JMRI's WebSockets server. This causes JMRI to log errors to the console and eventually terminate the websocket, requiring JMRI to be restarted in order to connect properly.

k4kfh commented 7 years ago

This is a bug because of the .model.speed() function not returning anything. Should be an easy fix with a single commit.