mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #100 from meshtastic/feature/module_config
Module Config
This commit is contained in:
commit
5406ed6155
5 changed files with 68 additions and 70 deletions
|
|
@ -829,6 +829,7 @@
|
|||
DEVELOPMENT_TEAM = GCH7VS5Y9R;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = MeshtasticApple/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Meshtastic;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
|
@ -860,6 +861,7 @@
|
|||
DEVELOPMENT_TEAM = GCH7VS5Y9R;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
INFOPLIST_FILE = MeshtasticApple/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Meshtastic;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
|
|
|||
|
|
@ -688,8 +688,13 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
positionPacket.longitudeI = Int32(LocationHelper.currentLocation.longitude * 1e7)
|
||||
positionPacket.time = UInt32(LocationHelper.currentTimestamp.timeIntervalSince1970)
|
||||
positionPacket.altitude = Int32(LocationHelper.currentAltitude)
|
||||
positionPacket.groundSpeed = UInt32(LocationHelper.currentSpeed)
|
||||
positionPacket.groundTrack = UInt32(LocationHelper.currentHeading)
|
||||
|
||||
// Get Errors without some speed
|
||||
if LocationHelper.currentSpeed >= 5 {
|
||||
|
||||
positionPacket.groundSpeed = UInt32(LocationHelper.currentSpeed)
|
||||
positionPacket.groundTrack = UInt32(LocationHelper.currentHeading)
|
||||
}
|
||||
|
||||
var meshPacket = MeshPacket()
|
||||
meshPacket.to = UInt32(destNum)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@
|
|||
<false/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSHasLocalizedDisplayName</key>
|
||||
<true/>
|
||||
<key>LSMultipleInstancesProhibited</key>
|
||||
<true/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
|
|
|
|||
|
|
@ -184,69 +184,66 @@ struct Connect: View {
|
|||
}
|
||||
|
||||
HStack(alignment: .center) {
|
||||
Spacer()
|
||||
Button(action: {
|
||||
|
||||
Spacer()
|
||||
|
||||
if !bleManager.isScanning {
|
||||
|
||||
Button(action: {
|
||||
|
||||
self.bleManager.startScanning()
|
||||
self.bleManager.startScanning()
|
||||
|
||||
}) {
|
||||
}) {
|
||||
|
||||
Image(systemName: "play.circle")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.imageScale(.large)
|
||||
.foregroundColor(self.bleManager.isScanning ? .gray : .accentColor)
|
||||
Text("Start Scanning").font(.caption)
|
||||
.font(.caption)
|
||||
Label("Start Scanning", systemImage: "play.fill")
|
||||
|
||||
}
|
||||
.disabled(self.bleManager.isScanning)
|
||||
.padding()
|
||||
.background(Color(.systemGray6))
|
||||
.clipShape(Capsule())
|
||||
Button(action: {
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
|
||||
} else {
|
||||
|
||||
Button(action: {
|
||||
|
||||
self.bleManager.stopScanning()
|
||||
self.bleManager.stopScanning()
|
||||
|
||||
}) {
|
||||
}) {
|
||||
|
||||
Image(systemName: "stop.circle")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.imageScale(.large)
|
||||
.foregroundColor(!self.bleManager.isScanning ? .gray : .accentColor)
|
||||
Text("Stop Scanning")
|
||||
.font(.caption)
|
||||
Label("Stop Scanning", systemImage: "stop.fill")
|
||||
|
||||
}
|
||||
.disabled(!self.bleManager.isScanning)
|
||||
.padding()
|
||||
.background(Color(.systemGray6))
|
||||
.clipShape(Capsule())
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
}
|
||||
|
||||
#if targetEnvironment(macCatalyst)
|
||||
|
||||
if bleManager.connectedPeripheral != nil {
|
||||
Button(role: .destructive, action: {
|
||||
|
||||
if bleManager.connectedPeripheral != nil && bleManager.connectedPeripheral.peripheral.state == CBPeripheralState.connected {
|
||||
bleManager.disconnectPeripheral()
|
||||
isPreferredRadio = false
|
||||
}
|
||||
|
||||
}) {
|
||||
|
||||
Image(systemName: "antenna.radiowaves.left.and.right.slash")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.imageScale(.large)
|
||||
.foregroundColor(.red)
|
||||
Text("Disconnect").font(.caption)
|
||||
.font(.caption)
|
||||
|
||||
if bleManager.connectedPeripheral != nil {
|
||||
|
||||
Button(role: .destructive, action: {
|
||||
|
||||
if bleManager.connectedPeripheral != nil && bleManager.connectedPeripheral.peripheral.state == CBPeripheralState.connected {
|
||||
bleManager.disconnectPeripheral()
|
||||
isPreferredRadio = false
|
||||
}
|
||||
.padding()
|
||||
.background(Color(.systemGray6))
|
||||
.clipShape(Capsule())
|
||||
|
||||
}) {
|
||||
|
||||
Label("Disconnect", systemImage: "antenna.radiowaves.left.and.right.slash")
|
||||
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.bottom, 10)
|
||||
|
|
|
|||
|
|
@ -96,17 +96,12 @@ struct NodeDetail: View {
|
|||
isPresentingShutdownConfirm = true
|
||||
}) {
|
||||
|
||||
Image(systemName: "power")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.imageScale(.small)
|
||||
.foregroundColor(Color.accentColor)
|
||||
Text("Power Off")
|
||||
.font(.caption)
|
||||
|
||||
Label("Power Off", systemImage: "power")
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
.background(Color(.systemGray6))
|
||||
.clipShape(Capsule())
|
||||
.confirmationDialog(
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingShutdownConfirm
|
||||
|
|
@ -126,18 +121,13 @@ struct NodeDetail: View {
|
|||
isPresentingRebootConfirm = true
|
||||
|
||||
}) {
|
||||
|
||||
Image(systemName: "arrow.triangle.2.circlepath")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.imageScale(.small)
|
||||
.foregroundColor(Color.accentColor)
|
||||
Text("Reboot")
|
||||
.font(.caption)
|
||||
|
||||
|
||||
Label("Reboot", systemImage: "arrow.triangle.2.circlepath")
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.buttonBorderShape(.capsule)
|
||||
.controlSize(.large)
|
||||
.padding()
|
||||
.background(Color(.systemGray6))
|
||||
.clipShape(Capsule())
|
||||
.confirmationDialog(
|
||||
"Are you sure?",
|
||||
isPresented: $isPresentingRebootConfirm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue