Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2355 → Rev 2356

/MKLiveView/v1.0/Source/MainWindow.xaml
1180,8 → 1180,8
<Button x:Name="btnOSDLeave" Content="" HorizontalAlignment="Left" Height="34" Margin="144,90,0,0" VerticalAlignment="Top" Width="52" Click="btnOSDLeave_Click"/>
</Grid>
<Grid x:Name="GridWP" Margin="23,36,25,0" Background="#7F000000" Height="526" VerticalAlignment="Top">
<Label x:Name="label4" Content="points" HorizontalAlignment="Left" Margin="872,480,0,0" VerticalAlignment="Top" Width="53" Foreground="White" Height="19" HorizontalContentAlignment="Right" Padding="0" VerticalContentAlignment="Center"/>
<Label x:Name="lblWPCount" Content="##" HorizontalAlignment="Right" Margin="0,482,4,0" VerticalAlignment="Top" Width="38" Foreground="White" HorizontalContentAlignment="Right" Padding="0" Height="16"/>
<Label x:Name="label4" Content="points" HorizontalAlignment="Right" Margin="0,480,46,0" VerticalAlignment="Top" Width="53" Foreground="White" Height="19" HorizontalContentAlignment="Right" Padding="0" VerticalContentAlignment="Center" FontSize="13"/>
<Label x:Name="lblWPCount" Content="##" HorizontalAlignment="Right" Margin="0,482,20,0" VerticalAlignment="Top" Width="26" Foreground="White" HorizontalContentAlignment="Right" Padding="0" Height="16" FontSize="13"/>
<Label x:Name="label4_Copy" Content="WP Index" HorizontalAlignment="Left" Margin="94,194,0,0" VerticalAlignment="Top" Width="80" Foreground="White" Visibility="Hidden"/>
<Label x:Name="lblWPIndex" Content="##" HorizontalAlignment="Left" Margin="170,194,0,0" VerticalAlignment="Top" Width="28" Foreground="White" Visibility="Hidden"/>
<Border Margin="10,456,0,3" BorderBrush="White" BorderThickness="0.5" CornerRadius="5" HorizontalAlignment="Left" Width="640">
1290,9 → 1290,9
<Label x:Name="label4_Copy13" Content="save to file (.wpl)" HorizontalAlignment="Left" Margin="324,0,0,35" VerticalAlignment="Bottom" Width="98" Foreground="White"/>
</Grid>
</Border>
<Border Margin="10,343,0,75" BorderBrush="White" BorderThickness="0.5" CornerRadius="5" HorizontalAlignment="Left" Width="941">
<Border Margin="10,324,0,75" BorderBrush="White" BorderThickness="0.5" CornerRadius="5" HorizontalAlignment="Left" Width="941">
<Grid Margin="-0.5,-0.5,-0.5,4.5">
<Rectangle HorizontalAlignment="Left" Width="94" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="10,0,0,-1" Height="40" VerticalAlignment="Bottom">
<Rectangle HorizontalAlignment="Left" Width="94" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="837,0,0,61" Height="40" VerticalAlignment="Bottom">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Style.Triggers>
1303,7 → 1303,7
</Style>
</Rectangle.Style>
</Rectangle>
<Button x:Name="btnSendActiveWP" Content="" HorizontalAlignment="Left" Height="36" Margin="11,0,0,0" VerticalAlignment="Bottom" Width="93" ToolTip="Download WP-list from copter" BorderBrush="#FFBDBDBD" Style="{DynamicResource ButtonWithoutEffectStyle}" Click="btnSendActiveWP_Click">
<Button x:Name="btnSendActiveWP" Content="" HorizontalAlignment="Left" Height="36" Margin="838,0,0,62" VerticalAlignment="Bottom" Width="93" ToolTip="Set WP as active WP" BorderBrush="#FFBDBDBD" Style="{DynamicResource ButtonWithoutEffectStyle}" Click="btnSendActiveWP_Click">
<Button.Background>
<ImageBrush ImageSource="Images/WPToCopter.png" Stretch="Uniform"/>
</Button.Background>
1323,7 → 1323,7
<Label x:Name="label4_Copy18" Content="Altitude" HorizontalAlignment="Left" Margin="277,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditAlt" HorizontalAlignment="Left" Height="22" Margin="277,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="7" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center"/>
<Label x:Name="label4_Copy19" Content="Heading" HorizontalAlignment="Left" Margin="324,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditHeading" HorizontalAlignment="Left" Height="22" Margin="324,24,0,0" VerticalAlignment="Top" Width="69" IsUndoEnabled="False" MaxLines="1" MaxLength="7" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center"/>
<TextBox x:Name="tbWPEditHeading" HorizontalAlignment="Left" Height="22" Margin="324,24,0,0" VerticalAlignment="Top" Width="69" IsUndoEnabled="False" MaxLines="1" MaxLength="7" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center" KeyDown="tbWPEditHeading_KeyDown"/>
<Label x:Name="label4_Copy20" Content="Speed" HorizontalAlignment="Left" Margin="398,6,0,0" Width="54" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditSpeed" HorizontalAlignment="Left" Height="22" Margin="398,24,0,0" VerticalAlignment="Top" Width="65" IsUndoEnabled="False" MaxLines="1" MaxLength="6" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center"/>
<ComboBox x:Name="cbWPEditSpeed" HorizontalAlignment="Left" Height="22" Margin="398,51,0,0" VerticalAlignment="Top" Width="65">
1364,10 → 1364,44
</ComboBox>
<Label x:Name="label4_Copy26" Content="Out1Timer" HorizontalAlignment="Left" Margin="762,6,0,0" Width="63" Foreground="White" Padding="0" Height="18" VerticalAlignment="Top"/>
<TextBox x:Name="tbWPEditOut1" HorizontalAlignment="Left" Height="22" Margin="762,24,0,0" VerticalAlignment="Top" Width="42" IsUndoEnabled="False" MaxLines="1" MaxLength="2" Foreground="White" Background="{x:Null}" VerticalContentAlignment="Center"/>
<Label x:Name="label4_Copy27" Content="set as active WP" HorizontalAlignment="Left" Margin="8,0,0,35" VerticalAlignment="Bottom" Width="96" Foreground="White" Height="26"/>
<Label x:Name="label4_Copy27" Content="send as active WP" HorizontalAlignment="Left" Margin="835,-1,-1,97" VerticalAlignment="Bottom" Width="107" Foreground="White" Height="26"/>
<Rectangle HorizontalAlignment="Left" Width="94" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="10,0,0,-2" Height="40" VerticalAlignment="Bottom">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=btnSendActiveWP_Copy1}" Value="True">
<Setter Property="Fill" Value="{DynamicResource PressedItemBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle>
<Button x:Name="btnSendActiveWP_Copy1" Content="" HorizontalAlignment="Left" Height="36" Margin="11,0,0,-1" VerticalAlignment="Bottom" Width="93" ToolTip="Set WP as active WP" BorderBrush="#FFBDBDBD" Style="{DynamicResource ButtonWithoutEffectStyle}" Click="btnSendActiveWP2_Click">
<Button.Background>
<ImageBrush ImageSource="Images/WPToCopter.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Label x:Name="label4_Copy29" Content="set as active WP" HorizontalAlignment="Left" Margin="8,0,0,34" VerticalAlignment="Bottom" Width="96" Foreground="White" Height="26"/>
<Rectangle HorizontalAlignment="Left" Width="94" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="837,0,0,2" Height="40" VerticalAlignment="Bottom">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=btnWPEditAddCurrentPo}" Value="True">
<Setter Property="Fill" Value="{DynamicResource PressedItemBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle>
<Button x:Name="btnWPEditAddCurrentPos" Content="" HorizontalAlignment="Left" Height="36" Margin="838,0,0,3" VerticalAlignment="Bottom" Width="93" ToolTip="Set WP as active WP" BorderBrush="#FFBDBDBD" Style="{DynamicResource ButtonWithoutEffectStyle}" Click="btnWPEditAddCurrentPos_Click">
<Button.Background>
<ImageBrush ImageSource="Images/WPToCopter.png" Stretch="Uniform"/>
</Button.Background>
</Button>
<Label x:Name="label4_Copy28" Content="add current Pos" HorizontalAlignment="Left" Margin="835,0,-1,38" VerticalAlignment="Bottom" Width="107" Foreground="White" Height="26"/>
</Grid>
</Border>
<DataGrid x:Name="dgvWP" Margin="10,5,10,188" Background="{x:Null}" ItemsSource="{Binding}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="14" HorizontalGridLinesBrush="#FF688CAF" VerticalGridLinesBrush="#FF688CAF" HeadersVisibility="Column" BorderBrush="{x:Null}" Padding="0" AutoGenerateColumns="False" MouseUp="dgvWP_MouseUp" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" MouseDoubleClick="dgvWP_MouseDoubleClick" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserSortColumns="False" IsReadOnly="True">
<DataGrid x:Name="dgvWP" Margin="10,5,10,207" Background="{x:Null}" ItemsSource="{Binding}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="14" HorizontalGridLinesBrush="#FF688CAF" VerticalGridLinesBrush="#FF688CAF" HeadersVisibility="Column" BorderBrush="{x:Null}" Padding="0" AutoGenerateColumns="False" MouseUp="dgvWP_MouseUp" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" MouseDoubleClick="dgvWP_MouseDoubleClick" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserSortColumns="False" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Header="Index" Binding="{Binding Path=Index}"/>
<DataGridTextColumn Header="Type" Binding="{Binding Path=Type, Converter={StaticResource wpConvert}, ConverterParameter= Type}"/>
1386,12 → 1420,12
</DataGrid.Columns>
</DataGrid>
<CheckBox x:Name="checkBoxShowWPRoute" Content="show route" HorizontalAlignment="Right" Height="22" Margin="0,504,0,0" VerticalAlignment="Top" Width="84" Foreground="#FFFFFEFE" Click="checkBoxShowWPRoute_Click"/>
<Label x:Name="label4_Copy9" Content="distance" HorizontalAlignment="Right" Margin="0,462,36,0" VerticalAlignment="Top" Width="57" Foreground="White" Padding="0" Height="18" HorizontalContentAlignment="Right" VerticalContentAlignment="Center"/>
<Label x:Name="lblWPRouteDistance" Content="0 m" HorizontalAlignment="Right" Margin="0,463,4,0" VerticalAlignment="Top" Width="38" Foreground="White" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" Padding="0"/>
<Label x:Name="label4_Copy14" Content="points NC (w/o POI)" HorizontalAlignment="Left" Margin="712,461,0,0" VerticalAlignment="Top" Width="111" Foreground="White" Height="20" HorizontalContentAlignment="Right" Padding="0" VerticalContentAlignment="Center"/>
<Label x:Name="lblWPCountNC" Content="##" HorizontalAlignment="Right" Margin="0,463,113,0" VerticalAlignment="Top" Width="38" Foreground="White" HorizontalContentAlignment="Right" Padding="0" Height="16"/>
<Label x:Name="label4_Copy15" Content="Index NC" HorizontalAlignment="Left" Margin="758,480,0,0" VerticalAlignment="Top" Width="65" Foreground="White" Height="21" HorizontalContentAlignment="Right" Padding="0" VerticalContentAlignment="Center"/>
<Label x:Name="lblWPIndexNC" Content="##" HorizontalAlignment="Right" Margin="0,482,113,0" VerticalAlignment="Top" Width="38" Foreground="White" HorizontalContentAlignment="Right" Padding="0" Height="16"/>
<Label x:Name="label4_Copy9" Content="distance" HorizontalAlignment="Right" Margin="0,462,46,0" VerticalAlignment="Top" Width="57" Foreground="White" Padding="0" Height="18" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" FontSize="13"/>
<Label x:Name="lblWPRouteDistance" Content="0 m" HorizontalAlignment="Right" Margin="0,463,4,0" VerticalAlignment="Top" Width="42" Foreground="White" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" Padding="0" FontSize="13"/>
<Label x:Name="label4_Copy14" Content="points NC (w/o POI)" HorizontalAlignment="Right" Margin="0,461,138,0" VerticalAlignment="Top" Width="118" Foreground="White" Height="20" HorizontalContentAlignment="Right" Padding="0" VerticalContentAlignment="Center" FontSize="13"/>
<Label x:Name="lblWPCountNC" Content="##" HorizontalAlignment="Right" Margin="0,463,113,0" VerticalAlignment="Top" Width="25" Foreground="White" HorizontalContentAlignment="Right" Padding="0" Height="16" FontSize="13"/>
<Label x:Name="label4_Copy15" Content="Index NC" HorizontalAlignment="Right" Margin="0,480,138,0" VerticalAlignment="Top" Width="65" Foreground="White" Height="21" HorizontalContentAlignment="Right" Padding="0" VerticalContentAlignment="Center" FontSize="13"/>
<Label x:Name="lblWPIndexNC" Content="##" HorizontalAlignment="Right" Margin="0,482,113,0" VerticalAlignment="Top" Width="25" Foreground="White" HorizontalContentAlignment="Right" Padding="0" Height="16" FontSize="13"/>
</Grid>
<Grid x:Name="GridSideBarR" Background="#66000000" Margin="0,36,0,0" HorizontalAlignment="Right" Width="23">
<Label x:Name="labelMotordata" Content="Motors" Padding="0" RenderTransformOrigin="0.5,0.5" Margin="-25,233,-26,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Stretch" MouseDown="labelMotorData_MouseDown" FontSize="14" HorizontalAlignment="Left" Width="74" Height="22" VerticalAlignment="Top">
/MKLiveView/v1.0/Source/MainWindow.xaml.cs
1697,9 → 1697,6
}
}
 
// lblNCGPSLat.Invoke((Action)(() => lblNCGPSLat.Text = d.ToString("0.######°"))); //GPS-Position: Latitude in decimal degree
//lblNCGPSLat.Invoke((Action)(() => lblNCGPSLat.Text = _convertDegree(d))); //GPS-Position: Latitude in minutes, seconds
 
i_16 = data[28];
i_16 = (Int16)(i_16 << 8);
iVal = data[27] + i_16;
1756,38 → 1753,6
}
}
 
if(wpList.Count > 0 && ((data[67] & 2) == 2))
{
//if (_wpIndex > -1)
//{
// row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(_wpIndex);
// row.Background = new SolidColorBrush(Colors.Transparent);
// row.BorderBrush = new SolidColorBrush(Colors.Transparent);
// row.BorderThickness = new Thickness(0);
//}
//_wpIndex = dgvWP.SelectedIndex;
//row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(_wpIndex);
//row.Background = new SolidColorBrush(Color.FromArgb(80, 0, 100, 255));
//row.BorderBrush = new SolidColorBrush(Colors.Aqua);
//row.BorderThickness = new Thickness(2);
//dgvWP.UpdateLayout();
 
 
// Dispatcher.Invoke(() =>
// {
// if(data[48] < wpList.Count)
// {
// DataGridRow row;
// if (data[48] > 0)
// {
// row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(data[48] - 1);
// row.Background = new SolidColorBrush(Colors.Transparent);
// }
// row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(data[48]);
// row.Background = new SolidColorBrush(Color.FromArgb(50, 0, 100, 255));
// }
// });
}
Dispatcher.Invoke((Action)(() => tbWPCount.Text = data[49].ToString())); //Waypoints count
Dispatcher.Invoke((Action)(() => lblWPCountNC.Content = data[49].ToString())); //Waypoints count
_wpCount = data[49];
1917,22 → 1882,17
{
if (data[1] == 1)
{
if(mRouteWP != null)
Dispatcher.Invoke(() => MainMap.Markers.Remove(mRouteWP));
wpList.Clear();
Dispatcher.Invoke(() => lblWPRouteDistance.Content = "0 m");
dtWaypoints.Rows.Clear();
Dispatcher.Invoke(() =>
{
for (int k = 0; k < MainMap.Markers.Count;)
{
GMapMarker p = MainMap.Markers[k];
if (p.Shape.GetType() == typeof(CustomMarkerWP))
MainMap.Markers.Remove(p);
else
k++;
}
wpList.Clear();
_clearMapMarkers(typeof(CustomMarkerWP));
if (mRouteWP != null)
MainMap.Markers.Remove(mRouteWP);
if (wpActiveMarker != null)
MainMap.Markers.Remove(wpActiveMarker);
lblWPRouteDistance.Content = "0 m";
dtWaypoints.Rows.Clear();
_wpEdit = -1;
});
}
DataRow dr = dtWaypoints.NewRow();
2264,7 → 2224,7
{
for (int i = 0; i < dtWaypoints.Rows.Count; i++)
{
_sendWayPoint(dtWaypoints.Rows[i],-1);
_sendWayPoint(dtWaypoints.Rows[i],-1,'w');
 
_iWPCount = -1;
iTimeout = 0;
2286,7 → 2246,7
Log(LogMsgType.Error, "NOT CONNECTED!");
 
}
bool _sendWayPoint(DataRow dr, int index)
bool _sendWayPoint(DataRow dr, int index, char command)
{
 
if (serialPortCtrl.Port.IsOpen)
2355,7 → 2315,7
//Autotrigger
bData[28] = Convert.ToByte(dr[11]);
 
bytes = FlightControllerMessage.CreateMessage('w', 2, bData);
bytes = FlightControllerMessage.CreateMessage(command, 2, bData);
serialStream.Write(bytes, 0, bytes.Length);
 
return true;
3200,14 → 3160,7
NumberFormatInfo nfi = new NumberFormatInfo();
nfi.NumberDecimalSeparator = ".";
dtWaypoints.Rows.Clear();
//for(int k = 0; k < MainMap.Markers.Count;)
//{
// GMapMarker p = MainMap.Markers[k];
// if (p.Shape.GetType() == typeof(CustomMarkerWP))
// MainMap.Markers.Remove(p);
// else
// k++;
//}
_wpEdit = -1;
_clearMapMarkers(typeof(CustomMarkerWP));
wpList.Clear();
if (mRouteWP != null)
3557,6 → 3510,7
//if (wpActiveMarker != null)
// MainMap.Markers.Remove(wpActiveMarker);
dtWaypoints.Rows.Clear();
_wpEdit = -1;
Dispatcher.Invoke(() => dgvWP.Items.Refresh());
Dispatcher.Invoke(() => lblWPIndex.Content = 0);
Dispatcher.Invoke(() => lblWPCount.Content = 0);
3572,13 → 3526,13
if (dgvWP.SelectedIndex > -1 && dgvWP.SelectedIndex < dtWaypoints.Rows.Count)
{
if (_wpCount > 0)
_sendWayPoint(dtWaypoints.Rows[dgvWP.SelectedIndex], -1);
_sendWayPoint(dtWaypoints.Rows[dgvWP.SelectedIndex], -1,'s');
else
_sendWayPoint(dtWaypoints.Rows[dgvWP.SelectedIndex], 1);
_sendWayPoint(dtWaypoints.Rows[dgvWP.SelectedIndex], 1,'s');
 
Dispatcher.Invoke(() => {
DataGridRow row;
if (_wpIndex > -1)
if (_wpIndex > -1 && _wpIndex < dgvWP.ItemContainerGenerator.Items.Count)
{
row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(_wpIndex);
row.Background = new SolidColorBrush(Colors.Transparent);
3594,6 → 3548,33
});
}
}
private void btnSendActiveWP2_Click(object sender, RoutedEventArgs e)
{
if (dgvWP.SelectedIndex > -1 && dgvWP.SelectedIndex < dtWaypoints.Rows.Count)
{
if (_wpCount > 0)
_sendWayPoint(dtWaypoints.Rows[dgvWP.SelectedIndex], _wpCount,'s');
else
_sendWayPoint(dtWaypoints.Rows[dgvWP.SelectedIndex], 1,'s');
 
Dispatcher.Invoke(() => {
DataGridRow row;
if (_wpIndex > -1 && _wpIndex < dgvWP.ItemContainerGenerator.Items.Count)
{
row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(_wpIndex);
row.Background = new SolidColorBrush(Colors.Transparent);
row.BorderBrush = new SolidColorBrush(Colors.Transparent);
row.BorderThickness = new Thickness(0);
}
_wpIndex = dgvWP.SelectedIndex;
row = (DataGridRow)dgvWP.ItemContainerGenerator.ContainerFromIndex(_wpIndex);
row.Background = new SolidColorBrush(Color.FromArgb(80, 0, 100, 255));
row.BorderBrush = new SolidColorBrush(Colors.Aqua);
row.BorderThickness = new Thickness(2);
dgvWP.UpdateLayout();
});
}
}
private void dgvWP_MouseUp(object sender, MouseButtonEventArgs e)
{
if (dgvWP.SelectedIndex > -1 && dgvWP.SelectedIndex < dtWaypoints.Rows.Count)
3710,6 → 3691,54
 
}
 
private void tbWPEditHeading_KeyDown(object sender, KeyEventArgs e)
{
if(!tbWPEditHeading.IsReadOnly)
{
//var x = KeyInterop.VirtualKeyFromKey(e.Key);
KeyConverter x = new KeyConverter();
string s = x.ConvertToString(e.Key);
 
if ("1234567890,\b".IndexOf(s) < 0) //general check for valid chars(0-9) and backspace (\b)
e.Handled = true;
else
if ("\b".IndexOf(s) < 0)
if (Convert.ToInt16(((TextBox)sender).Text + s) > 360) //if valid and not backspace, check for upper limit of the resulting number
e.Handled = true;
 
}
}
private void btnWPEditAddCurrentPos_Click(object sender, RoutedEventArgs e)
{
cbWPEditType.SelectedIndex = dgvWP.ItemContainerGenerator.Items.Count;
tbWPEditPrefix.Text = "P";
tbWPEditLat.Text = copter.Position.Lat.ToString();
tbWPEditLon.Text = copter.Position.Lng.ToString();
tbWPEditAlt.Text = ((double)iAnalogData[4] / (double)10).ToString();
 
cbWPEditHeading.SelectedIndex = 2;
tbWPEditHeading.Text = iAnalogData[10].ToString();
tbWPEditHeading.IsReadOnly = false;
 
cbWPEditSpeed.SelectedIndex = 1;
tbWPEditSpeed.Text = "5.0";
tbWPEditSpeed.IsReadOnly = false;
 
cbWPEditClimbrate.SelectedIndex = 1;
tbWPEditClimbrate.Text = "5.0";
tbWPEditClimbrate.IsReadOnly = false;
 
tbWPEditRadius.Text = "10";
tbWPEditHoldtime.Text = "5";
tbWPEditAutoTrigger.Text = "0";
 
cbWPEditCamAngle.SelectedIndex = 1;
tbWPEditCamAngle.Text = "AUTO";
tbWPEditCamAngle.IsReadOnly = true;
 
tbWPEditOut1.Text = "0";
}
 
#endregion WP
#region GPX
private void checkBoxGPXLog_Click(object sender, RoutedEventArgs e)
3779,6 → 3808,8
}
}
}
 
 
private void btnLoadGPXLog_Click(object sender, RoutedEventArgs e)
{
_loadGPXLog();
/MKLiveView/v1.0/Source/Waypoints.cs
13,7 → 13,8
{
INVALID= 255,
WP = 0,
POI = 1
POI = 1,
FS = 2
}
 
public enum status
41,7 → 42,7
return "MAX";
if (iVal > 0 && iVal < 248)
return ((double)iVal * 0.1).ToString("0.0 m/s");
if (iVal < 247)
if (iVal > 247)
return "Poti" + (256 - iVal).ToString();
 
return iVal.ToString();