Commit Graph

12 Commits

Author SHA1 Message Date
Maurice Makaay e48e44f287 Implemented the calibration mode and introduced a 'height' value in the mqtt stream, which is (container height - distance measurement). First implementation, so much might still change. I'm thinking about introducing a virtual sensor, but I'm not sure yet what the cleanest implementation will look like. 2020-07-20 02:13:10 +02:00
Maurice Makaay e416dab9dd Temperature and humidity are now propagated to the distance sensor. 2020-07-20 00:38:03 +02:00
Maurice Makaay 02e5cc2e14 Implemented state change handling using a plugin mechanism for the new AppStateController class. This way, I now have a class that handles all state changes, combined with a loosely coupled plugin for it, which takes care of notifying an communicating the state changes. 2020-07-19 16:49:20 +02:00
Maurice Makaay 4c5ea8c001 Backup work on making the application state a separate class, so I can keep all state knowledge in one place. 2020-07-19 01:14:28 +02:00
Maurice Makaay f20ff5a4bb Code cleanup. 2020-07-18 16:58:04 +02:00
Maurice Makaay 09f3be6dcb More shuffling of functionality, getting things to match with my standards for 'clean code'. 2020-07-18 14:55:41 +02:00
Maurice Makaay 7f5f60a6ac Moved callbacks (which live in the top-level namespace) into a separate file, so I have a clear overview of all these. 2020-07-15 16:03:16 +02:00
Maurice Makaay 578c0aa626 Made the physical led entries private in the UI class, now they are shielded by logical functions. 2020-07-15 03:07:08 +02:00
Maurice Makaay fd1363dd45 Further cleanup. Most noticably is moving all physical LED logic into the Dough::UI class, providing app-state-dependent logical functions for letting the LEDs represent a given application state. 2020-07-15 02:48:44 +02:00
Maurice Makaay 52b33de7aa Ahhh.. stupid Maurice, forgot to call setup() on the sensors from the new SensorBase. Sensors are back in order now. 2020-07-14 22:05:31 +02:00
Maurice Makaay 19f754b577 Okay, got some things working again. At least the device doesn't crash anymore :-) The sensors need some work to give correct readings in the new setup. It looks like I'm initializing them twice or so. Fix will follow in the next commit. 2020-07-14 15:28:20 +02:00
Maurice Makaay 49115a0545 Stashing this as a feature branch, something's broken in the MQTT department and I first have to find out what. 2020-07-14 01:21:07 +02:00