Added Mqtt messages buffer to help unload frontend

This commit is contained in:
2020-11-22 10:39:51 +01:00
parent d75e9d378d
commit 9d55c39e33
5 changed files with 54 additions and 10 deletions

View File

@ -20,11 +20,18 @@ export default class MapContainer extends Component {
};
this.probabilityHandler = this.probabilityHandler.bind(this);
this.handlePoint = this.handlePoint.bind(this);
}
static contextType = DevicesContext;
probabilityHandler(point) {
probabilityHandler(points) {
for (var point of points) {
this.handlePoint(point);
}
}
handlePoint(point) {
if (point.prob > 0.5) {
this.setState({