harmsm / rpyBot

software for controlling an autonomous car via a raspberry pi
MIT License
0 stars 1 forks source link

make the webserver a device #18

Closed harmsm closed 7 years ago

harmsm commented 8 years ago

The webserver is currently treated completely differently from any other device. It takes the device manager as an attribute, making it the webserver "master" in some peculiar ways. The device manager should act as the central router for all messages, completely agnostic to the nature of the devices. This makes the code easier to follow and future-proofs it in case someone decides to replace the web-based user interface with SkyNet.

Best solution is for the webserver to be its own device. It can send and receive messages via the device manager, just like hardware devices. We can then spec the program such that a device with the name "controller" is required, and then have the default destination be "controller" for messages.

harmsm commented 7 years ago

Done.