Skip to content

Commit 30c21f4

Browse files
committed
Add packet support for M17, IAX fixes for ASL3, other code cleanups
1 parent 31614da commit 30c21f4

22 files changed

+322
-169
lines changed

CMakeLists.txt

+4-5
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,12 @@ if(UNIX)
132132
endif()
133133

134134
if(APPLE)
135+
set_target_properties(DroidStar PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
135136
target_link_libraries(DroidStar PRIVATE
136137
"-framework AVFoundation"
137138
)
138139
endif()
139140

140-
if(APPLE)
141-
set_target_properties(DroidStar PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
142-
endif()
143-
144141
if(ANDROID)
145142
include(~/Android/Sdk/android_openssl/android_openssl.cmake)
146143
add_android_openssl_libraries(DroidStar)
@@ -150,7 +147,7 @@ if(ANDROID)
150147

151148
set_target_properties(DroidStar PROPERTIES
152149
QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android
153-
QT_ANDROID_VERSION_CODE 84
150+
QT_ANDROID_VERSION_CODE 86
154151
#QT_ANDROID_MIN_SDK_VERSION 31
155152
)
156153
endif()
@@ -206,6 +203,7 @@ else()
206203
)
207204
endif()
208205

206+
209207
if(FALSE) # set TRUE for flite
210208
target_compile_definitions(DroidStar PRIVATE
211209
USE_FLITE
@@ -228,6 +226,7 @@ if(FALSE) # set TRUE for md380_vocoder
228226
)
229227
target_link_libraries(DroidStar PRIVATE
230228
md380_vocoder
229+
#/home/nostar/Android/Sdk/local/libmd380_vocoder.a
231230
# -Xlinker --section-start=.firmware=0x0800C000 -Xlinker --section-start=.sram=0x20000000
232231
)
233232
endif()

LogTab.qml

+25-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ import QtQuick
1919
import QtQuick.Controls
2020

2121
Item {
22+
property alias smsedit: _smsedit
23+
property alias smsSendButton: _smsSendButton
24+
2225
id: logTab
2326
property alias logText: logTxt
2427
Button {
@@ -37,7 +40,7 @@ Item {
3740
x: 20
3841
y: 40
3942
width: parent.width - 40
40-
height: parent.height - 40
43+
height: parent.height - 60
4144
color: "#252424"
4245
Flickable{
4346
id: logflick
@@ -57,4 +60,25 @@ Item {
5760
}
5861
}
5962
}
63+
TextField {
64+
id: _smsedit
65+
x: 10
66+
y: parent.height - 40
67+
width: parent.width - 90
68+
height: 25
69+
text: qsTr("")
70+
selectByMouse: true
71+
}
72+
Button {
73+
id: _smsSendButton
74+
x: smsedit.width + 20
75+
y: parent.height - 40
76+
width: 60
77+
height: 25
78+
text: qsTr("SMS")
79+
onClicked: {
80+
droidstar.m17_sms_pressed(smsedit.text);
81+
smsedit.text = "";
82+
}
83+
}
6084
}

Main.qml

+22-5
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@ import QtQuick.Dialogs
2222
import org.dudetronics.droidstar
2323

2424
ApplicationWindow {
25-
// @disable-check M16
25+
id: main
2626
visible: true
27-
// @disable-check M16
2827
width: 340
29-
// @disable-check M16
3028
height: 480
31-
// @disable-check M16
32-
// @disable-check M16
3329
title: qsTr("DroidStar")
3430

3531
palette.window: "#252424"
@@ -200,6 +196,8 @@ ApplicationWindow {
200196
mainTab.comboM17CAN.visible = false;
201197
mainTab.privateBox.visible = false;
202198
mainTab.sliderMicGain.value = 0.0;
199+
logTab.smsedit.visible = false;
200+
logTab.smsSendButton.visible = false;
203201
}
204202
if(droidstar.get_mode() === "DCS"){
205203
//mainTab.comboMode.width = mainTab.width / 2;
@@ -216,6 +214,8 @@ ApplicationWindow {
216214
mainTab.comboM17CAN.visible = false;
217215
mainTab.privateBox.visible = false;
218216
mainTab.sliderMicGain.value = 0.0;
217+
logTab.smsedit.visible = false;
218+
logTab.smsSendButton.visible = false;
219219
}
220220
if(droidstar.get_mode() === "XRF"){
221221
//mainTab.comboMode.width = mainTab.width / 2;
@@ -232,6 +232,8 @@ ApplicationWindow {
232232
mainTab.comboM17CAN.visible = false;
233233
mainTab.privateBox.visible = false;
234234
mainTab.sliderMicGain.value = 0.0;
235+
logTab.smsedit.visible = false;
236+
logTab.smsSendButton.visible = false;
235237
}
236238
if(droidstar.get_mode() === "YSF"){
237239
//mainTab.comboMode.width = mainTab.width / 2;
@@ -248,6 +250,8 @@ ApplicationWindow {
248250
mainTab.comboM17CAN.visible = false;
249251
mainTab.privateBox.visible = false;
250252
mainTab.sliderMicGain.value = 0.5;
253+
logTab.smsedit.visible = false;
254+
logTab.smsSendButton.visible = false;
251255
}
252256
if(droidstar.get_mode() === "FCS"){
253257
//mainTab.comboMode.width = mainTab.width / 2;
@@ -264,6 +268,8 @@ ApplicationWindow {
264268
mainTab.comboM17CAN.visible = false;
265269
mainTab.privateBox.visible = false;
266270
mainTab.sliderMicGain.value = 0.5;
271+
logTab.smsedit.visible = false;
272+
logTab.smsSendButton.visible = false;
267273
}
268274
if(droidstar.get_mode() === "DMR"){
269275
//mainTab.comboMode.width = (mainTab.width / 5) - 5;
@@ -281,6 +287,8 @@ ApplicationWindow {
281287
mainTab.comboM17CAN.visible = false;
282288
mainTab.privateBox.visible = true;
283289
mainTab.sliderMicGain.value = 0.5;
290+
logTab.smsedit.visible = false;
291+
logTab.smsSendButton.visible = false;
284292
}
285293
if(droidstar.get_mode() === "P25"){
286294
//mainTab.comboMode.width = mainTab.width / 2;
@@ -298,6 +306,8 @@ ApplicationWindow {
298306
mainTab.comboM17CAN.visible = false;
299307
mainTab.privateBox.visible = false;
300308
mainTab.sliderMicGain.value = 0.5;
309+
logTab.smsedit.visible = false;
310+
logTab.smsSendButton.visible = false;
301311
}
302312
if(droidstar.get_mode() === "NXDN"){
303313
//mainTab.comboMode.width = mainTab.width / 2;
@@ -314,6 +324,8 @@ ApplicationWindow {
314324
mainTab.comboM17CAN.visible = false;
315325
mainTab.privateBox.visible = false;
316326
mainTab.sliderMicGain.value = 0.5;
327+
logTab.smsedit.visible = false;
328+
logTab.smsSendButton.visible = false;
317329
}
318330
if(droidstar.get_mode() === "M17"){
319331
//mainTab.comboMode.width = mainTab.width / 2;
@@ -332,6 +344,8 @@ ApplicationWindow {
332344
mainTab.comboM17CAN.visible = true;
333345
mainTab.privateBox.visible = false;
334346
mainTab.sliderMicGain.value = 0.5;
347+
logTab.smsedit.visible = true;
348+
logTab.smsSendButton.visible = true;
335349
}
336350
if(droidstar.get_mode() === "IAX"){
337351
//mainTab.comboMode.width = mainTab.width / 2;
@@ -348,7 +362,10 @@ ApplicationWindow {
348362
mainTab.comboM17CAN.visible = false;
349363
mainTab.privateBox.visible = false;
350364
mainTab.sliderMicGain.value = 0.5;
365+
logTab.smsedit.visible = false;
366+
logTab.smsSendButton.visible = false;
351367
}
368+
//mainTab.comboHost.contentItem.text = mainTab.comboHost.currentIndex === -1 ? "Host..." : mainTab.comboHost.currentText
352369
}
353370
function onUpdate_data() {
354371
mainTab.data1.text = droidstar.get_data1();

0 commit comments

Comments
 (0)