Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2397 → Rev 2398

/MKLiveView/v1.0/Source/MainWindow.xaml
590,41 → 590,41
<TabItem Header="Analog">
<Grid>
<TextBlock x:Name="tbVolt" HorizontalAlignment="Left" Height="23" Margin="110,42,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<TextBlock x:Name="tbCur" HorizontalAlignment="Left" Height="23" Margin="110,63,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<TextBlock x:Name="tbCur" HorizontalAlignment="Left" Height="23" Margin="110,60,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy" Content="Controller:" HorizontalAlignment="Left" Margin="8,6,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBox x:Name="tbCtrl" HorizontalAlignment="Left" Height="21" Margin="111,9,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="27" Padding="-9,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" Foreground="White" Background="{x:Null}" FontSize="16"/>
<Label x:Name="label6_Copy3" Content="Voltage" HorizontalAlignment="Left" Margin="13,38,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<Label x:Name="label6_Copy4" Content="Current" HorizontalAlignment="Left" Margin="13,59,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbCapacity" HorizontalAlignment="Left" Height="23" Margin="110,84,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy5" Content="Capacity" HorizontalAlignment="Left" Margin="13,80,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbFTime" HorizontalAlignment="Left" Height="23" Margin="110,108,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<TextBlock x:Name="tbRCQ" HorizontalAlignment="Left" Height="23" Margin="110,129,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy6" Content="Flying time" HorizontalAlignment="Left" Margin="13,104,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<Label x:Name="label6_Copy7" Content="RC quality" HorizontalAlignment="Left" Margin="13,125,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbMagF" HorizontalAlignment="Left" Height="23" Margin="110,153,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy8" Content="Mag. field" HorizontalAlignment="Left" Margin="13,149,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbSats" HorizontalAlignment="Left" Height="23" Margin="110,177,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<TextBlock x:Name="tbSpeed" HorizontalAlignment="Left" Height="23" Margin="110,200,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy9" Content="Satellites" HorizontalAlignment="Left" Margin="13,173,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<Label x:Name="label6_Copy10" Content="Gr. speed" HorizontalAlignment="Left" Margin="13,196,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbAlt" HorizontalAlignment="Left" Height="23" Margin="110,223,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy11" Content="Altitude" HorizontalAlignment="Left" Margin="13,219,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbHeading" HorizontalAlignment="Left" Height="23" Margin="110,245,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy12" Content="Heading" HorizontalAlignment="Left" Margin="13,241,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbPitch" HorizontalAlignment="Left" Height="23" Margin="110,268,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy13" Content="Pitch" HorizontalAlignment="Left" Margin="13,264,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbRoll" HorizontalAlignment="Left" Height="23" Margin="110,292,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy14" Content="Roll" HorizontalAlignment="Left" Margin="13,288,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbHP" HorizontalAlignment="Left" Height="23" Margin="110,317,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy15" Content="Distance HP" HorizontalAlignment="Left" Margin="13,313,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbHP1" HorizontalAlignment="Left" Height="23" Margin="110,339,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy16" Content="(Distance ???)" HorizontalAlignment="Left" Margin="9,335,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbWP" HorizontalAlignment="Left" Height="23" Margin="110,360,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy17" Content="Distance WP" HorizontalAlignment="Left" Margin="13,356,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbWPCount" HorizontalAlignment="Left" Height="23" Margin="110,381,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy19" Content="WP count" HorizontalAlignment="Left" Margin="13,377,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbWPIndex" HorizontalAlignment="Left" Height="23" Margin="110,401,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy20" Content="WP-Index" HorizontalAlignment="Left" Margin="13,397,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<Label x:Name="label6_Copy3" Content="Voltage" HorizontalAlignment="Left" Margin="6,38,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<Label x:Name="label6_Copy4" Content="Current" HorizontalAlignment="Left" Margin="6,56,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbCapacity" HorizontalAlignment="Left" Height="23" Margin="110,78,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy5" Content="Capacity" HorizontalAlignment="Left" Margin="6,74,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbFTime" HorizontalAlignment="Left" Height="23" Margin="110,99,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<TextBlock x:Name="tbRCQ" HorizontalAlignment="Left" Height="23" Margin="110,119,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy6" Content="Flying time" HorizontalAlignment="Left" Margin="6,95,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<Label x:Name="label6_Copy7" Content="RC quality" HorizontalAlignment="Left" Margin="6,115,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbMagF" HorizontalAlignment="Left" Height="23" Margin="110,140,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy8" Content="Mag. field" HorizontalAlignment="Left" Margin="6,136,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbSats" HorizontalAlignment="Left" Height="23" Margin="110,161,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<TextBlock x:Name="tbSpeed" HorizontalAlignment="Left" Height="23" Margin="110,181,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy9" Content="Satellites" HorizontalAlignment="Left" Margin="6,157,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<Label x:Name="label6_Copy10" Content="Gr. speed" HorizontalAlignment="Left" Margin="6,177,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbAlt" HorizontalAlignment="Left" Height="23" Margin="110,201,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy11" Content="Altitude" HorizontalAlignment="Left" Margin="6,197,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbHeading" HorizontalAlignment="Left" Height="23" Margin="110,221,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy12" Content="Heading" HorizontalAlignment="Left" Margin="6,217,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbPitch" HorizontalAlignment="Left" Height="23" Margin="110,240,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy13" Content="Pitch" HorizontalAlignment="Left" Margin="6,236,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbRoll" HorizontalAlignment="Left" Height="23" Margin="110,259,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy14" Content="Roll" HorizontalAlignment="Left" Margin="6,255,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbHP" HorizontalAlignment="Left" Height="23" Margin="110,278,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy15" Content="Distance HP" HorizontalAlignment="Left" Margin="6,274,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbHP1" HorizontalAlignment="Left" Height="23" Margin="110,297,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy16" Content="(Distance ???)" HorizontalAlignment="Left" Margin="6,293,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbWP" HorizontalAlignment="Left" Height="23" Margin="110,315,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy17" Content="Distance WP" HorizontalAlignment="Left" Margin="6,311,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbWPCount" HorizontalAlignment="Left" Height="23" Margin="110,333,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy19" Content="WP count" HorizontalAlignment="Left" Margin="6,329,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbWPIndex" HorizontalAlignment="Left" Height="23" Margin="110,351,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy20" Content="WP-Index" HorizontalAlignment="Left" Margin="6,347,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<Label x:Name="label6" Content="CRC-Error" Margin="14,0,64,10.04" VerticalAlignment="Bottom" Background="{x:Null}" Foreground="White"/>
<TextBox x:Name="tbCrc" Height="21" Margin="78,0,35,11.04" TextWrapping="Wrap" Text="0" VerticalAlignment="Bottom" Padding="-9,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" Foreground="White" Background="{x:Null}"/>
<Label x:Name="label6_Copy1" Content="SPI-Error" Margin="14,0,69,25.04" Background="{x:Null}" Foreground="White" Height="26" VerticalAlignment="Bottom"/>
633,6 → 633,12
<TextBox x:Name="tbI2C" Margin="78,0,35,41.04" TextWrapping="Wrap" Text="0" Padding="-9,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" Foreground="White" Background="{x:Null}" Height="21" VerticalAlignment="Bottom"/>
<Label x:Name="label6_Copy18" Content="NC-Error" Margin="14,0,68,56.04" Background="{x:Null}" Foreground="White" Height="26" VerticalAlignment="Bottom"/>
<TextBox x:Name="tbNCErr" Margin="78,0,35,57.04" TextWrapping="Wrap" Text="0" Padding="-9,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" Foreground="White" Background="{x:Null}" Height="21" VerticalAlignment="Bottom"/>
<TextBlock x:Name="tbNCGrSpeed" HorizontalAlignment="Left" Height="23" Margin="110,376,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy21" Content="Gr. speed (NC)" HorizontalAlignment="Left" Margin="6,372,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbHeadingCompass" HorizontalAlignment="Left" Height="23" Margin="110,395,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy22" Content="Heading (NC)" HorizontalAlignment="Left" Margin="6,391,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
<TextBlock x:Name="tbHeadingNorth" HorizontalAlignment="Left" Height="23" Margin="110,413,0,0" TextWrapping="Wrap" Text="NA" VerticalAlignment="Top" Width="65" Foreground="White" FontSize="16"/>
<Label x:Name="label6_Copy23" Content="Heading north" HorizontalAlignment="Left" Margin="6,409,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="White" FontSize="14"/>
 
</Grid>
</TabItem>
1487,12 → 1493,12
</Button.Background>
</Button>
<Label x:Name="label4_Copy28" Content="add current Pos" HorizontalAlignment="Left" Margin="855,0,-1,172" VerticalAlignment="Bottom" Width="107" Foreground="White" Height="26"/>
<Rectangle x:Name="rectSimulate" HorizontalAlignment="Left" Width="59" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="892,0,0,72" Height="43" VerticalAlignment="Bottom" Visibility="Hidden">
<Rectangle x:Name="rectSimulate" HorizontalAlignment="Left" Width="59" Stroke="#FFE4E4E4" StrokeThickness="0.5" Margin="608,0,0,7" Height="37" VerticalAlignment="Bottom" Visibility="Hidden">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFCEFFC6"/>
<GradientStop Color="#FF9BFFC4" Offset="0.18"/>
<GradientStop Color="#FF70E2AF" Offset="0.39"/>
<GradientStop Color="#FF9DFFAA"/>
<GradientStop Color="#FF5DE094" Offset="0.236"/>
<GradientStop Color="#FF5DD6A0" Offset="0.39"/>
<GradientStop Color="#FF4FCF8F" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
/MKLiveView/v1.0/Source/MainWindow.xaml.cs
973,8 → 973,9
}
if (_bVoiceDistancePlay && !_bVoiceDistanceActive)
{
Thread t = new Thread(()=>_mediaPlayer("Voice\\Distance.mp3"));
t.Start();
ThreadPool.QueueUserWorkItem(new WaitCallback(_mediaPlayer), "Voice\\Distance.mp3");
//Thread t = new Thread(()=>_mediaPlayer("Voice\\Distance.mp3"));
//t.Start();
_bVoiceDistanceActive = true;
}
_iDistanceJitter++;
1512,8 → 1513,9
}
if (_bVoiceVoltPlay && !_bCritVoiceVoltActive)
{
Thread t = new Thread(() => _mediaPlayer("Voice\\CriticalBattery.mp3"));
t.Start();
ThreadPool.QueueUserWorkItem(new WaitCallback(_mediaPlayer), "Voice\\CriticalBattery.mp3");
//Thread t = new Thread(() => _mediaPlayer("Voice\\CriticalBattery.mp3"));
//t.Start();
_bCritVoiceVoltActive = true;
}
}
1528,8 → 1530,9
 
if (_bVoiceVoltPlay && !_bWarnVoiceVoltActive)
{
Thread t = new Thread(() => _mediaPlayer("Voice\\LowBattery.mp3"));
t.Start();
ThreadPool.QueueUserWorkItem(new WaitCallback(_mediaPlayer), "Voice\\LowBattery.mp3");
//Thread t = new Thread(() => _mediaPlayer("Voice\\LowBattery.mp3"));
//t.Start();
_bWarnVoiceVoltActive = true;
}
}
1555,7 → 1558,7
case 10: //heading
Dispatcher.Invoke((Action)(() => tbHeading.Text = sAnalogData[index] + "°"));
Dispatcher.Invoke(() => ArtHor.rotate = iAnalogData[index]);
Dispatcher.Invoke(() => ((CustomMarkerCopter)(copter.Shape)).rotate = iAnalogData[index]);
//Dispatcher.Invoke(() => ((CustomMarkerCopter)(copter.Shape)).rotate = iAnalogData[index]);
break;
case 12: // SPI error
Dispatcher.Invoke((Action)(() => tbSPI.Text = sAnalogData[index]));
1599,8 → 1602,9
}
if (_bVoiceMagneticFieldPlay && !_bVoiceMagneticFieldActive)
{
Thread t = new Thread(() => _mediaPlayer("Voice\\MagneticField.mp3"));
t.Start();
ThreadPool.QueueUserWorkItem(new WaitCallback(_mediaPlayer), "Voice\\MagneticField.mp3");
//Thread t = new Thread(() => _mediaPlayer("Voice\\MagneticField.mp3"));
//t.Start();
_bVoiceMagneticFieldActive = true;
}
}
1809,8 → 1813,9
}
if (_bVoiceSatFixPlay && !_bVoiceSatFixActive)
{
Thread th = new Thread(() => _mediaPlayer("Voice\\SatFixLost.mp3"));
th.Start();
ThreadPool.QueueUserWorkItem(new WaitCallback(_mediaPlayer), "Voice\\SatFixLost.mp3");
//Thread th = new Thread(() => _mediaPlayer("Voice\\SatFixLost.mp3"));
//th.Start();
_bVoiceSatFixActive = true;
}
 
1887,6 → 1892,25
Dispatcher.Invoke((Action)(() => tbCapacity.Text = iVal.ToString() + " mAh"));
Dispatcher.Invoke((Action)(() => tbTopCapacity.Text = iVal.ToString() + " mAh"));
 
//--------------- Ground speed ------------------------
i_16 = data[59];
i_16 = (Int16)(i_16 << 8);
iVal = data[58] + i_16;
Dispatcher.Invoke((Action)(() => tbNCGrSpeed.Text = ((double)(iVal)/100).ToString("0.00 m/s")));
 
//--------------- Heading north ------------------------
i_16 = data[61];
i_16 = (Int16)(i_16 << 8);
iVal = data[60] + i_16;
Dispatcher.Invoke((Action)(() => tbHeadingNorth.Text = iVal.ToString() + " °"));
 
//--------------- Heading compass ------------------------
i_16 = data[63];
i_16 = (Int16)(i_16 << 8);
iVal = data[62] + i_16;
Dispatcher.Invoke((Action)(() => tbHeadingCompass.Text = iVal.ToString() + " °"));
//Dispatcher.Invoke(() => ArtHor.rotate = iVal);
Dispatcher.Invoke(() => ((CustomMarkerCopter)(copter.Shape)).rotate = iVal);
//--------------- Flying time ------------------------
i_16 = data[56];
i_16 = (Int16)(i_16 << 8);
1921,8 → 1945,9
}
if (_bVoiceRCLevelPlay && !_bVoiceRCLevelActive)
{
Thread th = new Thread(() => _mediaPlayer("Voice\\RCLevel.mp3"));
th.Start();
ThreadPool.QueueUserWorkItem(new WaitCallback(_mediaPlayer), "Voice\\MagneticField.mp3");
//Thread th = new Thread(() => _mediaPlayer("Voice\\RCLevel.mp3"));
//th.Start();
_bVoiceRCLevelActive = true;
}
_iRCLevelJitter++;
2547,12 → 2572,12
 
#endregion controller messages
 
void _mediaPlayer(string file)
void _mediaPlayer(object file)
{
if (File.Exists(file))
if (File.Exists((string)file))
{
MediaPlayer.MediaPlayer mp = new MediaPlayer.MediaPlayer();
mp.Open(file);
mp.Open((string)file);
mp.Play();
}
}