diff --git a/sdk/smx.ts b/sdk/smx.ts index c1b814e..80d8801 100644 --- a/sdk/smx.ts +++ b/sdk/smx.ts @@ -59,10 +59,14 @@ class SMXEvents { this.output$ = new Bacon.Bus>(); // Config writes should only happen at most once per second. - const configOutput$ = this.output$.filter((e) => e[0] === API_COMMAND.WRITE_CONFIG_V5).throttle(1000); + const configOutput$ = this.output$.filter((e) => { + return e[0] === API_COMMAND.WRITE_CONFIG || e[0] === API_COMMAND.WRITE_CONFIG_V5 + }).throttle(1000); // All other writes are passed through unchanged - const otherOutput$ = this.output$.filter((e) => e[0] !== API_COMMAND.WRITE_CONFIG_V5); + const otherOutput$ = this.output$.filter((e) => { + return e[0] !== API_COMMAND.WRITE_CONFIG && e[0] !== API_COMMAND.WRITE_CONFIG_V5 + }); // combine together the throttled and unthrottled writes // and only emit one per each "ok" signal we get back following each previous output