Skip to content

Commit 8a34a86

Browse files
committed
Implemented version communication.
Fixed #8
1 parent 9322105 commit 8a34a86

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vmix-tally-app",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",

app/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<v-col cols="12" sm="8">
3737
<v-list-item two-line>
3838
<v-list-item-content>
39-
<v-list-item-title class="headline">{{ tally.name }} </v-list-item-title>
39+
<v-list-item-title class="headline">{{ tally.name }} ({{ tally.version }})</v-list-item-title>
4040
<v-list-item-subtitle>{{ getTitle(tally)}}</v-list-item-subtitle>
4141
</v-list-item-content>
4242
</v-list-item>

app/src/store/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ export default new Vuex.Store({
4747
vmixHost: 0,
4848
connection: {},
4949
connectionState: 'CLOSED',
50-
ledState: 0
50+
ledState: 0,
51+
version: 'v?'
5152
}
5253
const connection = new WebSocket('ws:/' + newTally.address + ":" + newTally.port);
5354
newTally.connectionState = 'CONNECTING';
@@ -71,6 +72,9 @@ export default new Vuex.Store({
7172
case "vmixHost":
7273
newTally[data[0]] = data[1];
7374
break;
75+
case "version":
76+
newTally[data[0]] = 'v' + data[1];
77+
break;
7478
}
7579
}
7680

vmix-tally/vmix-tally.ino

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define STATUS_CONNECTVMIX 5
2525

2626
#define CONFIG_FILENAME "/tally-config.cfg"
27-
#define VERSION "0.2.1"
27+
#define VERSION "0.2.2"
2828

2929
// optional arguments fuction need to be defined
3030
void setLedColor(uint32_t color, bool ignoreDisabledLeds=false);
@@ -256,6 +256,9 @@ String getSettingAsString(String settingKey)
256256
if (settingKey == "ledState") {
257257
return settingKey + ":" + String(ledState);
258258
}
259+
if (settingKey == "version") {
260+
return settingKey + ":" + String(VERSION);
261+
}
259262
return "";
260263
}
261264

@@ -365,6 +368,9 @@ void sendAllSettings(uint8_t webSocketClientID)
365368

366369
reply = getSettingAsString("ledState");
367370
webSocket.sendTXT(webSocketClientID, reply);
371+
372+
reply = getSettingAsString("version");
373+
webSocket.sendTXT(webSocketClientID, reply);
368374
}
369375

370376
void setLedColor(uint32_t color, bool ignoreDisabledLeds)

0 commit comments

Comments
 (0)