Skip to content
This repository was archived by the owner on Sep 22, 2023. It is now read-only.

Commit f90b950

Browse files
committed
Protocol: Change '=' to ':'
1 parent e8ed11e commit f90b950

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/data.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ export class SCData {
3232
}, 5000);
3333
}
3434
public set(type, cmd) {
35-
const p = cmd.split("=");
35+
const p = cmd.split(":");
3636
this.setPlain(type, cmd, this.base64toString(p[1]));
3737
}
3838

3939
public setPlain(type, cmd, value : any = true) {
40-
const p = cmd.split("=");
40+
const p = cmd.split(":");
4141
const key = p[0];
4242
// Switch between different set-types
4343
switch (type) {
4444
case "LIVE":
4545
set(this.data, key, value);
46-
PubSub.publish(key, "SET LIVE " + key + "=" + this.stringToBase64(value));
46+
PubSub.publish(key, "SET LIVE " + key + ":" + this.stringToBase64(value));
4747
break;
4848
case "STATIC":
4949
set(this.data, key, value);
50-
PubSub.publish(key, "SET STATIC " + key + "=" + this.stringToBase64(value));
50+
PubSub.publish(key, "SET STATIC " + key + ":" + this.stringToBase64(value));
5151
set(this.static, key, value);
5252
// Save file if necessary and set flags
5353
this.staticChanged = true;
@@ -61,7 +61,7 @@ export class SCData {
6161
break;
6262
case "TICK":
6363
set(this.data, key, value);
64-
PubSub.publish(key, "SET TICK " + key + "=" + this.stringToBase64(value));
64+
PubSub.publish(key, "SET TICK " + key + ":" + this.stringToBase64(value));
6565
break;
6666
}
6767
Logging.debug("SET " + key + " to " + value + " (" + type + ")");
@@ -162,7 +162,7 @@ export class SCData {
162162
parseStream.on("data", (pojo) => {
163163
deepForEach(pojo, (v, k, s, p) => {
164164
if (typeof v !== "object") {
165-
this.set("STATIC", p + "=" + v);
165+
this.setPlain("STATIC", p, v);
166166
}
167167

168168
});

0 commit comments

Comments
 (0)