intothedarkness / GPS-Simulator

28 stars 5 forks source link

Feature Request #20

Open Converjance opened 3 years ago

Converjance commented 3 years ago

I have a few feature requests. I'm not a programmer by any stretch of the imagination.

MainWindow.xaml (starting on line 45)
<TabItem Header="Walking">
     <Grid>
                    <Button x:Name ="walking" Content="Start" HorizontalAlignment="Left" Height="26" Margin="0,410,0,0" VerticalAlignment="Top" Width="219" Click="walk_Button_Click"/>
                    <Button x:Name ="option" Content="Load GPX" HorizontalAlignment="Left" Height="26" Margin="0,380,0,0" VerticalAlignment="Top" Width="219" Click="option_Button_Click"/>
                    <Button x:Name ="stop_button" Content="Stop" HorizontalAlignment="Left" Height="26" Margin="0,440,0,0" VerticalAlignment="Top" Width="219" Click="stop_Button_Click"/>
                    <CheckBox x:Name="gps_drift" Content="GPS Drifting" HorizontalAlignment="Left" Height="19" Margin="10,22,0,0" VerticalAlignment="Top" Width="173"/>
                    <GroupBox Header="Speed" HorizontalAlignment="Left" Height="180" Margin="0,184,0,0" VerticalAlignment="Top" Width="219">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="85*"/>
                                <ColumnDefinition Width="128*"/>
                            </Grid.ColumnDefinitions>
                            <RadioButton x:Name ="walking_speed" Content="Walk - 8 mph" HorizontalAlignment="Left" Height="23" Margin="10,17,0,0" VerticalAlignment="Top" Click="walking_speed_click" Width="122" Grid.ColumnSpan="2"/>
                            <RadioButton x:Name ="running_speed" Content="Run - 16 mph" HorizontalAlignment="Left" Height="22" Margin="10,37,0,0" VerticalAlignment="Top" Click="running_speed_click" Width="122" Grid.ColumnSpan="2"/>
                            <RadioButton x:Name ="driving_speed" Content="Drive - 65 mph" HorizontalAlignment="Left" Height="22" Margin="10,57,0,0" VerticalAlignment="Top" Click="driving_speed_click" Width="122" Grid.ColumnSpan="2"/>
                            <RadioButton x:Name ="fastdriving_speed" Content="Fast Drive - 85 mph" HorizontalAlignment="Left" Height="22" Margin="10,77,0,0" VerticalAlignment="Top" Click="fastdriving_speed_click" Width="144" Grid.ColumnSpan="2"/>
                            <RadioButton x:Name ="light_speed" Content="Light Speed - 100 mph" HorizontalAlignment="Left" Height="22" Margin="10,97,0,0" VerticalAlignment="Top" Click="light_speed_click" Width="171" Grid.ColumnSpan="2"/>
                            <RadioButton x:Name ="ridiculous_speed" Content="Ridiculous Speed - 150 mph" HorizontalAlignment="Left" Height="22" Margin="10,117,0,0" VerticalAlignment="Top" Click="ridiculous_speed_click" Width="171" Grid.ColumnSpan="2"/>
                            <RadioButton x:Name ="ludicrous_speed" Content="Ludicrous Speed - 200 mph" HorizontalAlignment="Left" Height="22" Margin="10,137,0,-2" VerticalAlignment="Top" Click="ludicrous_speed_click" Width="171" Grid.ColumnSpan="2"/>
                        </Grid>

On the walking_tab.cs code

walking_tab.cs (starting on line 153)
         private void driving_speed_click(object sender, RoutedEventArgs e)
        {
            timer_callback.walking_speed = c_fast_walking_speed * 12;
        }

        private void fastdriving_speed_click(object sender, RoutedEventArgs e)
        {
            timer_callback.walking_speed = c_fast_walking_speed * 15.545;
        }

        private void light_speed_click(object sender, RoutedEventArgs e)
        {
            timer_callback.walking_speed = c_fast_walking_speed * 18.288;
        }

        private void ridiculous_speed_click(object sender, RoutedEventArgs e)
        {
            timer_callback.walking_speed = c_fast_walking_speed * 27.432;
        }

        private void ludicrous_speed_click(object sender, RoutedEventArgs e)
        {
            timer_callback.walking_speed = c_fast_walking_speed * 36.576;
        }

A few other features would be:

Thanks, Converjance

intothedarkness commented 2 years ago

feel free to submit the PR.