Skip to content

Commit 1d8acb1

Browse files
InnovationInnovation
authored andcommitted
Basic things work
1 parent 4d3b322 commit 1d8acb1

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

SpatializationRemapper.qml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ ApplicationWindow {
3434
}
3535

3636
function onInputValueReceived(address, value) {
37-
// Update monitor
3837
messageMonitor.append(`IN: ${address} = ${JSON.stringify(value)}`)
39-
if (messageMonitor.lineCount > 100) {
38+
// Update monitor
39+
if (messageMonitor.lineCount > 15) {
4040
messageMonitor.remove(0, messageMonitor.text.indexOf('\n') + 1)
4141
}
4242

@@ -62,7 +62,6 @@ ApplicationWindow {
6262
// Send each mapped message to output device
6363
for (let msg of mapped) {
6464
let full_address = `${output.name}:${msg.address}`
65-
console.log(full_address, " => ", msg.address, msg.value)
6665
Device.write(full_address, msg.value)
6766
}
6867
}
@@ -161,26 +160,26 @@ ApplicationWindow {
161160
const admElevation = elevation * 180.0 / Math.PI
162161

163162
messages.push({
164-
address: `/adm/obj/${sourceIndex}/azimuth`,
163+
address: `/adm/obj/${sourceIndex}/azim`,
165164
value: admAzimuth
166165
})
167166
messages.push({
168-
address: `/adm/obj/${sourceIndex}/elevation`,
167+
address: `/adm/obj/${sourceIndex}/elev`,
169168
value: admElevation
170169
})
171170
messages.push({
172-
address: `/adm/obj/${sourceIndex}/distance`,
171+
address: `/adm/obj/${sourceIndex}/dist`,
173172
value: radius
174173
})
175174
if (hspan !== undefined) {
176175
messages.push({
177-
address: `/adm/obj/${sourceIndex}/width`,
176+
address: `/adm/obj/${sourceIndex}/w`,
178177
value: hspan * 360 // Convert to degrees
179178
})
180179
}
181180
if (vspan !== undefined) {
182181
messages.push({
183-
address: `/adm/obj/${sourceIndex}/height`,
182+
address: `/adm/obj/${sourceIndex}/h`,
184183
value: vspan * 180 // Convert to degrees
185184
})
186185
}
@@ -238,13 +237,13 @@ ApplicationWindow {
238237
})
239238
if (hspan !== undefined) {
240239
messages.push({
241-
address: `/adm/obj/${sourceIndex}/width`,
240+
address: `/adm/obj/${sourceIndex}/w`,
242241
value: hspan * 360 // Convert to degrees
243242
})
244243
}
245244
if (vspan !== undefined) {
246245
messages.push({
247-
address: `/adm/obj/${sourceIndex}/height`,
246+
address: `/adm/obj/${sourceIndex}/h`,
248247
value: vspan * 180 // Convert to degrees
249248
})
250249
}
@@ -435,7 +434,7 @@ ApplicationWindow {
435434
TextField {
436435
id: inputPortField
437436
Layout.preferredWidth: Math.min(80, window.width * 0.1)
438-
text: "4567"
437+
text: "18032"
439438
color: "#ffffff"
440439
font.pixelSize: Math.min(12, window.height * 0.02)
441440

@@ -495,6 +494,8 @@ ApplicationWindow {
495494
anchors.fill: parent
496495
spacing: 10
497496

497+
498+
Item { width: 1; height: 30 }
498499
// Add Output Form
499500
RowLayout {
500501
Layout.fillWidth: true
@@ -503,9 +504,9 @@ ApplicationWindow {
503504
TextField {
504505
id: outputNameField
505506
Layout.preferredWidth: Math.max(100, Math.min(150, window.width * 0.15))
506-
placeholderText: "Device Name"
507507
color: "#ffffff"
508508
font.pixelSize: Math.min(12, window.height * 0.02)
509+
placeholderText: "Name"
509510

510511
background: Rectangle {
511512
color: "#3a3a3a"
@@ -604,6 +605,7 @@ ApplicationWindow {
604605
Layout.preferredWidth: Math.max(50, Math.min(80, window.width * 0.08))
605606

606607
onClicked: {
608+
console.log(outputNameField.text, outputHostField.text,outputPortField.text)
607609
if (outputNameField.text && outputHostField.text && outputPortField.text) {
608610
createOutputDevice(
609611
outputNameField.text,
@@ -795,7 +797,7 @@ ApplicationWindow {
795797
Button {
796798
Layout.preferredWidth: Math.max(80, Math.min(120, window.width * 0.12))
797799
text: "SpatGRIS"
798-
onClicked: createOutputDevice("SpatGRIS_1", "127.0.0.1", 18032, "SpatGRIS")
800+
onClicked: createOutputDevice("SpatGRIS_1", "127.0.0.1", 18042, "SpatGRIS")
799801

800802
background: Rectangle {
801803
color: parent.hovered ? "#5a5a5a" : "#4a4a4a"

0 commit comments

Comments
 (0)