forked from ArduPilot/MissionPlanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJoy_Do_Set_Relay.cs
36 lines (28 loc) · 916 Bytes
/
Joy_Do_Set_Relay.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MissionPlanner.Joystick
{
public partial class Joy_Do_Set_Relay : Form
{
public Joy_Do_Set_Relay(string name)
{
InitializeComponent();
Utilities.ThemeManager.ApplyThemeTo(this);
this.Tag = name;
var config = MainV2.joystick.getButton(int.Parse(name));
numericUpDown1.Text = config.p1.ToString();
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
var config = MainV2.joystick.getButton(int.Parse(this.Tag.ToString()));
config.p1 = (float)numericUpDown1.Value;
MainV2.joystick.setButton(int.Parse(this.Tag.ToString()), config);
}
}
}