Initial commit: FieldLogger MAUI app with Maglink BLE support
Added Maglink RTK GNSS receiver integration with correct BLE UUIDs and device name filtering (ML-* prefix). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
44
FieldLogger/Views/DeviceScanPage.xaml
Normal file
44
FieldLogger/Views/DeviceScanPage.xaml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:vm="clr-namespace:FieldLogger.ViewModels"
|
||||
xmlns:ble="clr-namespace:FieldLogger.Services.Ble"
|
||||
x:Class="FieldLogger.Views.DeviceScanPage"
|
||||
x:DataType="vm:DeviceScanViewModel"
|
||||
Title="{Binding Title}">
|
||||
<Grid RowDefinitions="Auto,Auto,*" Padding="16" RowSpacing="12">
|
||||
|
||||
<Label Grid.Row="0" Text="{Binding Hint}" FontSize="13" TextColor="Gray" />
|
||||
|
||||
<HorizontalStackLayout Grid.Row="1" Spacing="12">
|
||||
<Button Text="{Binding ScanButtonText}" Command="{Binding ScanCommand}" IsEnabled="{Binding IsScanning, Converter={StaticResource InvertBool}}" />
|
||||
<ActivityIndicator IsRunning="{Binding IsScanning}" VerticalOptions="Center" />
|
||||
</HorizontalStackLayout>
|
||||
|
||||
<CollectionView Grid.Row="2" ItemsSource="{Binding Devices}">
|
||||
<CollectionView.EmptyView>
|
||||
<Label Text="No devices found yet." TextColor="Gray" Margin="8" />
|
||||
</CollectionView.EmptyView>
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate x:DataType="ble:DiscoveredDevice">
|
||||
<Border StrokeThickness="0" Background="{AppThemeBinding Light=#F2F2F7, Dark=#1C1C1E}"
|
||||
StrokeShape="RoundRectangle 10" Padding="12" Margin="0,4">
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Command="{Binding SelectCommand, Source={RelativeSource AncestorType={x:Type vm:DeviceScanViewModel}}}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<VerticalStackLayout Spacing="2">
|
||||
<Label Text="{Binding Name}" FontAttributes="Bold" />
|
||||
<Label Text="{Binding Id}" FontSize="11" TextColor="Gray" />
|
||||
</VerticalStackLayout>
|
||||
<Label Grid.Column="1" VerticalOptions="Center" FontSize="12" TextColor="Gray"
|
||||
Text="{Binding Rssi, StringFormat='{0} dBm'}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</Grid>
|
||||
</ContentPage>
|
||||
Reference in New Issue
Block a user