From 08f2bbde36b5e25725164ba46e4a1732b4624608 Mon Sep 17 00:00:00 2001 From: Fernando Chorney Date: Wed, 10 Apr 2024 14:07:18 -0500 Subject: [PATCH] test --- sdk/smx.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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