Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Combine the mock-sensor into the daemon via command line option #26

Open
nilbus opened this issue Jan 4, 2014 · 2 comments
Open

Combine the mock-sensor into the daemon via command line option #26

nilbus opened this issue Jan 4, 2014 · 2 comments

Comments

@nilbus
Copy link
Owner

nilbus commented Jan 4, 2014

When starting the daemon with something like:

rake daemon:sensor_watch MOCK=NewboldDt8000

Start the daemon in a thread, and run the mock-sensor in the foreground. Automatically set $TRACK_SENSOR_DEVICE so the user doesn't have to.

@nilbus
Copy link
Owner Author

nilbus commented Jan 19, 2014

Also consider instead combining the daemon into the main app server process as a thread. This may cause performance to suffer because of the GIL and the polling the daemon does so frequently, but maybe not in practice. This wouldn't be a problem if we switch the daemon to an evented model and use EventMachine.

@nilbus
Copy link
Owner Author

nilbus commented Feb 10, 2015

I recently noticed the serial params error reported by @st-atila in #45 happening on Linux with the mock sensor after the 1st run. It seems that on Linux, the kernel doesn't like us to set the serial parameters more than once.

A workaround is to restart the bin/mock-sensor program before each rails server restart.

I am replying under this issue instead, because this issue will no longer occur once the mock-sensor is built into the rails server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant