Don't inherit the whole state, just on and feedrate
This commit is contained in:
parent
1117af20e9
commit
a082ed183f
@ -87,7 +87,8 @@ export class Communicator {
|
|||||||
const msgJson = JSON.parse(msgStr);
|
const msgJson = JSON.parse(msgStr);
|
||||||
console.log(`Message received on topic ${topic}: ${msgStr}`);
|
console.log(`Message received on topic ${topic}: ${msgStr}`);
|
||||||
console.log(msgJson);
|
console.log(msgJson);
|
||||||
state[msgJson.name] = msgJson;
|
state[msgJson.name].on = msgJson.on;
|
||||||
|
if (msgJson.feedRate) state[msgJson.name].feedRate = msgJson.feedRate;
|
||||||
window.refreshState(window.document, state);
|
window.refreshState(window.document, state);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user