diff --git a/FabiGUI_C#/Commands.cs b/FabiGUI_C#/Commands.cs index c107cf6..7fa6b63 100644 --- a/FabiGUI_C#/Commands.cs +++ b/FabiGUI_C#/Commands.cs @@ -61,12 +61,13 @@ AT LI list all saved slot names AT NE next slot will be loaded (wrap around after last slot) AT DE delete EEPROM content (delete all stored slots) AT NC no command (idle operation) - AT E0 turn echo off (no debug output on serial console, default and GUI compatible) - AT E1 turn echo on (debug output on serial console) AT SR start periodic reporting analog values (A0) over serial (starting with "VALUES:") AT ER end reporting analog values AT FR report free EEPROM bytes in % (starting with "FREE:") + AT BT set bluetooth mode, 1=USB only, 2=BT only, 3=both(default) + (e.g. AT BT 2 -> send HID commands only via BT if BT-daughter board is available) + supported key identifiers for key press command (AT KP): @@ -111,6 +112,8 @@ public partial class FabiGUI const int GUITYPE_SLIDER = 4; const int GUITYPE_BOOLEAN = 5; const int GUITYPE_GENERIC = 6; + const int GUITYPE_COMBO_ONLY = 7; + const int GUITYPE_COMBO_INDEX = 8; const string PREFIX_FABI_VERSION = "FABI "; const string PREFIX_REPORT_VALUES = "VALUES:"; @@ -161,6 +164,8 @@ public void initCommands() allCommands.add(new Command("AT AP", PARTYPE_UINT, "Antitremor Press time", COMBOENTRY_NO, GUITYPE_SLIDER)); allCommands.add(new Command("AT AR", PARTYPE_UINT, "Antitremor Release time", COMBOENTRY_NO, GUITYPE_SLIDER)); allCommands.add(new Command("AT AI", PARTYPE_UINT, "Antitremor Idle time", COMBOENTRY_NO, GUITYPE_SLIDER)); + allCommands.add(new Command("AT BT", PARTYPE_UINT, "HID / Bluetooth mode", COMBOENTRY_NO, GUITYPE_COMBO_INDEX)); + } @@ -184,7 +189,8 @@ public void initCommandGuiLinks() commandGuiLinks.Add(new CommandGuiLink("AT BM 08", Button8FunctionBox, Button8ParameterText, Button8NumericParameter, "AT PL")); commandGuiLinks.Add(new CommandGuiLink("AT BM 09", Button9FunctionBox, Button9ParameterText, Button9NumericParameter, "AT PR")); commandGuiLinks.Add(new CommandGuiLink("AT BM 10", SipFunctionMenu, SipParameterText, SipNumericParameter, "AT WU")); - commandGuiLinks.Add(new CommandGuiLink("AT BM 11", PuffFunctionMenu, PuffParameterText, PuffNumericParameter, "AT WD")); + commandGuiLinks.Add(new CommandGuiLink("AT BM 11", PuffFunctionMenu, PuffParameterText, PuffNumericParameter, "AT WD")); + commandGuiLinks.Add(new CommandGuiLink("AT BT", HIDComboBox, 1)); } String[] keyOptions = { "Clear Keycodes!", "KEY_A","KEY_B","KEY_C","KEY_D","KEY_E","KEY_F","KEY_G","KEY_H","KEY_I","KEY_J","KEY_K","KEY_L", @@ -261,6 +267,8 @@ void init() { settingStrings.Add(cgl.cmd); settingStrings.Add(cgl.def); break; case GUITYPE_BOOLEAN: + case GUITYPE_COMBO_ONLY: + case GUITYPE_COMBO_INDEX: case GUITYPE_SLIDER: settingStrings.Add(cgl.cmd + " " + cgl.def); break; @@ -293,6 +301,12 @@ public void sendApplyCommands() sendCmd(cgl.cmd); sendCmd(buildCommandString(cgl.cb.Text, cgl.tb.Text, (int)cgl.nud.Value)); break; + case GUITYPE_COMBO_ONLY: + sendCmd(cgl.cmd + " " + cgl.cb.Text); + break; + case GUITYPE_COMBO_INDEX: + sendCmd(cgl.cmd + " " + cgl.cb.SelectedIndex); + break; case GUITYPE_SLIDER: sendCmd(cgl.cmd + " " + cgl.tl.Text); break; @@ -352,8 +366,13 @@ public int getGuiTypeFromDescription(String commandDescription) } public int getGuiTypeFromCommand(String command) { + // Console.Write("get "+command); foreach (Command c in commandList) - if (c.cmd.Equals(command)) return (c.guiType); + if (c.cmd.Equals(command)) + { + // Console.WriteLine("got " + c.guiType); + return (c.guiType); + } return (-1); } public String getCommand(String commandDescription) @@ -446,6 +465,14 @@ public CommandGuiLink(String cmd, RadioButton rb1, RadioButton rb2, String def) this.rb2 = rb2; this.def = def; } + + public CommandGuiLink(String cmd, ComboBox cb, int def) + { + this.type = GUITYPE_COMBO_INDEX; + this.cmd = cmd; + this.cb = cb; + this.def = def.ToString(); + } }; } diff --git a/FabiGUI_C#/MainGui.Designer.cs b/FabiGUI_C#/MainGui.Designer.cs index 479bd6c..93fffb8 100644 --- a/FabiGUI_C#/MainGui.Designer.cs +++ b/FabiGUI_C#/MainGui.Designer.cs @@ -175,6 +175,10 @@ private void InitializeComponent() this.StoreButton = new System.Windows.Forms.Button(); this.freeMemPanel = new System.Windows.Forms.Panel(); this.freeMemLabel = new System.Windows.Forms.Label(); + this.general = new System.Windows.Forms.TabPage(); + this.label50 = new System.Windows.Forms.Label(); + this.label43 = new System.Windows.Forms.Label(); + this.HIDComboBox = new System.Windows.Forms.ComboBox(); this.tabControl.SuspendLayout(); this.Buttons1Tab.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Button4NumericParameter)).BeginInit(); @@ -199,6 +203,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.timeThresholdBar)).BeginInit(); this.groupBox1.SuspendLayout(); this.menuStrip1.SuspendLayout(); + this.general.SuspendLayout(); this.SuspendLayout(); // // serialPort1 @@ -207,29 +212,29 @@ private void InitializeComponent() // // portComboBox // - this.portComboBox.Location = new System.Drawing.Point(126, 54); + this.portComboBox.Location = new System.Drawing.Point(142, 68); this.portComboBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.portComboBox.Name = "portComboBox"; - this.portComboBox.Size = new System.Drawing.Size(116, 24); + this.portComboBox.Size = new System.Drawing.Size(130, 28); this.portComboBox.TabIndex = 60; this.portComboBox.Click += new System.EventHandler(this.portComboBox_Click); // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(51, 57); + this.label3.Location = new System.Drawing.Point(57, 71); this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(71, 17); + this.label3.Size = new System.Drawing.Size(83, 20); this.label3.TabIndex = 7; this.label3.Text = "FABI Port:"; // // connectComButton // - this.connectComButton.Location = new System.Drawing.Point(349, 53); - this.connectComButton.Margin = new System.Windows.Forms.Padding(4); + this.connectComButton.Location = new System.Drawing.Point(393, 66); + this.connectComButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.connectComButton.Name = "connectComButton"; - this.connectComButton.Size = new System.Drawing.Size(83, 28); + this.connectComButton.Size = new System.Drawing.Size(93, 35); this.connectComButton.TabIndex = 8; this.connectComButton.Text = "Connect"; this.connectComButton.UseVisualStyleBackColor = true; @@ -239,10 +244,10 @@ private void InitializeComponent() // this.disconnectComButton.Enabled = false; this.disconnectComButton.ForeColor = System.Drawing.Color.Black; - this.disconnectComButton.Location = new System.Drawing.Point(438, 53); - this.disconnectComButton.Margin = new System.Windows.Forms.Padding(4); + this.disconnectComButton.Location = new System.Drawing.Point(493, 66); + this.disconnectComButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.disconnectComButton.Name = "disconnectComButton"; - this.disconnectComButton.Size = new System.Drawing.Size(93, 28); + this.disconnectComButton.Size = new System.Drawing.Size(105, 35); this.disconnectComButton.TabIndex = 10; this.disconnectComButton.Text = "Disconnect"; this.disconnectComButton.UseVisualStyleBackColor = true; @@ -252,10 +257,10 @@ private void InitializeComponent() // this.portStatus.AutoSize = true; this.portStatus.ForeColor = System.Drawing.Color.SlateGray; - this.portStatus.Location = new System.Drawing.Point(245, 58); + this.portStatus.Location = new System.Drawing.Point(276, 72); this.portStatus.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.portStatus.Name = "portStatus"; - this.portStatus.Size = new System.Drawing.Size(94, 17); + this.portStatus.Size = new System.Drawing.Size(107, 20); this.portStatus.TabIndex = 12; this.portStatus.Text = "Disconnected"; // @@ -265,11 +270,12 @@ private void InitializeComponent() this.tabControl.Controls.Add(this.Button2Tab); this.tabControl.Controls.Add(this.SipPuffLevelsTab); this.tabControl.Controls.Add(this.SettingsTab); - this.tabControl.Location = new System.Drawing.Point(50, 99); - this.tabControl.Margin = new System.Windows.Forms.Padding(4); + this.tabControl.Controls.Add(this.general); + this.tabControl.Location = new System.Drawing.Point(56, 124); + this.tabControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(788, 395); + this.tabControl.Size = new System.Drawing.Size(886, 494); this.tabControl.TabIndex = 61; this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); // @@ -309,21 +315,21 @@ private void InitializeComponent() this.Buttons1Tab.Controls.Add(this.Button2FunctionBox); this.Buttons1Tab.Controls.Add(this.label6); this.Buttons1Tab.Controls.Add(this.Button1FunctionBox); - this.Buttons1Tab.Location = new System.Drawing.Point(4, 25); - this.Buttons1Tab.Margin = new System.Windows.Forms.Padding(4); + this.Buttons1Tab.Location = new System.Drawing.Point(4, 29); + this.Buttons1Tab.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Buttons1Tab.Name = "Buttons1Tab"; - this.Buttons1Tab.Padding = new System.Windows.Forms.Padding(4); - this.Buttons1Tab.Size = new System.Drawing.Size(780, 366); + this.Buttons1Tab.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.Buttons1Tab.Size = new System.Drawing.Size(878, 461); this.Buttons1Tab.TabIndex = 1; this.Buttons1Tab.Text = "Buttons 1-4 Actions"; // // Button4Label // this.Button4Label.AutoSize = true; - this.Button4Label.Location = new System.Drawing.Point(99, 298); + this.Button4Label.Location = new System.Drawing.Point(111, 372); this.Button4Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button4Label.Name = "Button4Label"; - this.Button4Label.Size = new System.Drawing.Size(78, 17); + this.Button4Label.Size = new System.Drawing.Size(87, 20); this.Button4Label.TabIndex = 169; this.Button4Label.Text = "Parameter:"; this.Button4Label.TextAlign = System.Drawing.ContentAlignment.TopRight; @@ -331,10 +337,10 @@ private void InitializeComponent() // Button3Label // this.Button3Label.AutoSize = true; - this.Button3Label.Location = new System.Drawing.Point(103, 224); + this.Button3Label.Location = new System.Drawing.Point(116, 280); this.Button3Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button3Label.Name = "Button3Label"; - this.Button3Label.Size = new System.Drawing.Size(78, 17); + this.Button3Label.Size = new System.Drawing.Size(87, 20); this.Button3Label.TabIndex = 168; this.Button3Label.Text = "Parameter:"; this.Button3Label.TextAlign = System.Drawing.ContentAlignment.TopRight; @@ -342,10 +348,10 @@ private void InitializeComponent() // Button2Label // this.Button2Label.AutoSize = true; - this.Button2Label.Location = new System.Drawing.Point(106, 154); + this.Button2Label.Location = new System.Drawing.Point(119, 192); this.Button2Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button2Label.Name = "Button2Label"; - this.Button2Label.Size = new System.Drawing.Size(78, 17); + this.Button2Label.Size = new System.Drawing.Size(87, 20); this.Button2Label.TabIndex = 167; this.Button2Label.Text = "Parameter:"; this.Button2Label.TextAlign = System.Drawing.ContentAlignment.TopRight; @@ -353,10 +359,10 @@ private void InitializeComponent() // Button1Label // this.Button1Label.AutoSize = true; - this.Button1Label.Location = new System.Drawing.Point(110, 83); + this.Button1Label.Location = new System.Drawing.Point(124, 104); this.Button1Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button1Label.Name = "Button1Label"; - this.Button1Label.Size = new System.Drawing.Size(78, 17); + this.Button1Label.Size = new System.Drawing.Size(87, 20); this.Button1Label.TabIndex = 166; this.Button1Label.Text = "Parameter:"; this.Button1Label.TextAlign = System.Drawing.ContentAlignment.TopRight; @@ -364,40 +370,40 @@ private void InitializeComponent() // label17 // this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(75, 268); + this.label17.Location = new System.Drawing.Point(84, 335); this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(104, 17); + this.label17.Size = new System.Drawing.Size(119, 20); this.label17.TabIndex = 156; this.label17.Text = "Button4 Action:"; // // label24 // this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(79, 195); + this.label24.Location = new System.Drawing.Point(89, 244); this.label24.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(104, 17); + this.label24.Size = new System.Drawing.Size(119, 20); this.label24.TabIndex = 152; this.label24.Text = "Button3 Action:"; // // label25 // this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(82, 123); + this.label25.Location = new System.Drawing.Point(92, 154); this.label25.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(104, 17); + this.label25.Size = new System.Drawing.Size(119, 20); this.label25.TabIndex = 151; this.label25.Text = "Button2 Action:"; // // label26 // this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(84, 51); + this.label26.Location = new System.Drawing.Point(94, 64); this.label26.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(104, 17); + this.label26.Size = new System.Drawing.Size(119, 20); this.label26.TabIndex = 150; this.label26.Text = "Button1 Action:"; // @@ -405,10 +411,10 @@ private void InitializeComponent() // this.clearButton4.Enabled = false; this.clearButton4.ForeColor = System.Drawing.Color.Black; - this.clearButton4.Location = new System.Drawing.Point(542, 292); - this.clearButton4.Margin = new System.Windows.Forms.Padding(4); + this.clearButton4.Location = new System.Drawing.Point(610, 365); + this.clearButton4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton4.Name = "clearButton4"; - this.clearButton4.Size = new System.Drawing.Size(36, 28); + this.clearButton4.Size = new System.Drawing.Size(40, 35); this.clearButton4.TabIndex = 149; this.clearButton4.Text = "x"; this.clearButton4.UseVisualStyleBackColor = true; @@ -418,25 +424,25 @@ private void InitializeComponent() // Button4ComboBox // this.Button4ComboBox.FormattingEnabled = true; - this.Button4ComboBox.Location = new System.Drawing.Point(542, 265); - this.Button4ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button4ComboBox.Location = new System.Drawing.Point(610, 331); + this.Button4ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button4ComboBox.Name = "Button4ComboBox"; - this.Button4ComboBox.Size = new System.Drawing.Size(143, 24); + this.Button4ComboBox.Size = new System.Drawing.Size(160, 28); this.Button4ComboBox.TabIndex = 148; this.Button4ComboBox.Visible = false; this.Button4ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button4ComboBox_SelectedIndexChanged); // // Button4NumericParameter // - this.Button4NumericParameter.Location = new System.Drawing.Point(206, 296); - this.Button4NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button4NumericParameter.Location = new System.Drawing.Point(232, 370); + this.Button4NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button4NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button4NumericParameter.Name = "Button4NumericParameter"; - this.Button4NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button4NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button4NumericParameter.TabIndex = 147; this.Button4NumericParameter.Value = new decimal(new int[] { 1, @@ -447,29 +453,29 @@ private void InitializeComponent() // // Button4ParameterText // - this.Button4ParameterText.Location = new System.Drawing.Point(206, 295); + this.Button4ParameterText.Location = new System.Drawing.Point(232, 369); this.Button4ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button4ParameterText.Name = "Button4ParameterText"; this.Button4ParameterText.ReadOnly = true; - this.Button4ParameterText.Size = new System.Drawing.Size(329, 22); + this.Button4ParameterText.Size = new System.Drawing.Size(370, 26); this.Button4ParameterText.TabIndex = 145; // // label35 // this.label35.AutoSize = true; - this.label35.Location = new System.Drawing.Point(111, 268); + this.label35.Location = new System.Drawing.Point(125, 335); this.label35.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label35.Name = "label35"; - this.label35.Size = new System.Drawing.Size(0, 17); + this.label35.Size = new System.Drawing.Size(0, 20); this.label35.TabIndex = 144; // // Button4FunctionBox // this.Button4FunctionBox.FormattingEnabled = true; - this.Button4FunctionBox.Location = new System.Drawing.Point(206, 265); - this.Button4FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button4FunctionBox.Location = new System.Drawing.Point(232, 331); + this.Button4FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button4FunctionBox.Name = "Button4FunctionBox"; - this.Button4FunctionBox.Size = new System.Drawing.Size(329, 24); + this.Button4FunctionBox.Size = new System.Drawing.Size(370, 28); this.Button4FunctionBox.TabIndex = 143; this.Button4FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button4FunctionBox_SelectedIndexChanged); // @@ -477,10 +483,10 @@ private void InitializeComponent() // this.clearButton3.Enabled = false; this.clearButton3.ForeColor = System.Drawing.Color.Black; - this.clearButton3.Location = new System.Drawing.Point(542, 221); - this.clearButton3.Margin = new System.Windows.Forms.Padding(4); + this.clearButton3.Location = new System.Drawing.Point(610, 276); + this.clearButton3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton3.Name = "clearButton3"; - this.clearButton3.Size = new System.Drawing.Size(36, 28); + this.clearButton3.Size = new System.Drawing.Size(40, 35); this.clearButton3.TabIndex = 142; this.clearButton3.Text = "x"; this.clearButton3.UseVisualStyleBackColor = true; @@ -491,10 +497,10 @@ private void InitializeComponent() // this.clearButton2.Enabled = false; this.clearButton2.ForeColor = System.Drawing.Color.Black; - this.clearButton2.Location = new System.Drawing.Point(542, 149); - this.clearButton2.Margin = new System.Windows.Forms.Padding(4); + this.clearButton2.Location = new System.Drawing.Point(610, 186); + this.clearButton2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton2.Name = "clearButton2"; - this.clearButton2.Size = new System.Drawing.Size(36, 28); + this.clearButton2.Size = new System.Drawing.Size(40, 35); this.clearButton2.TabIndex = 141; this.clearButton2.Text = "x"; this.clearButton2.UseVisualStyleBackColor = true; @@ -505,10 +511,10 @@ private void InitializeComponent() // this.clearButton1.Enabled = false; this.clearButton1.ForeColor = System.Drawing.Color.Black; - this.clearButton1.Location = new System.Drawing.Point(542, 77); - this.clearButton1.Margin = new System.Windows.Forms.Padding(4); + this.clearButton1.Location = new System.Drawing.Point(610, 96); + this.clearButton1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton1.Name = "clearButton1"; - this.clearButton1.Size = new System.Drawing.Size(36, 28); + this.clearButton1.Size = new System.Drawing.Size(40, 35); this.clearButton1.TabIndex = 78; this.clearButton1.Text = "x"; this.clearButton1.UseVisualStyleBackColor = true; @@ -518,19 +524,19 @@ private void InitializeComponent() // label21 // this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(203, 27); + this.label21.Location = new System.Drawing.Point(228, 34); this.label21.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(0, 17); + this.label21.Size = new System.Drawing.Size(0, 20); this.label21.TabIndex = 140; // // Button3ComboBox // this.Button3ComboBox.FormattingEnabled = true; - this.Button3ComboBox.Location = new System.Drawing.Point(542, 194); - this.Button3ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button3ComboBox.Location = new System.Drawing.Point(610, 242); + this.Button3ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button3ComboBox.Name = "Button3ComboBox"; - this.Button3ComboBox.Size = new System.Drawing.Size(143, 24); + this.Button3ComboBox.Size = new System.Drawing.Size(160, 28); this.Button3ComboBox.TabIndex = 114; this.Button3ComboBox.Visible = false; this.Button3ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button3ComboBox_SelectedIndexChanged); @@ -538,10 +544,10 @@ private void InitializeComponent() // Button2ComboBox // this.Button2ComboBox.FormattingEnabled = true; - this.Button2ComboBox.Location = new System.Drawing.Point(542, 121); - this.Button2ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button2ComboBox.Location = new System.Drawing.Point(610, 151); + this.Button2ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button2ComboBox.Name = "Button2ComboBox"; - this.Button2ComboBox.Size = new System.Drawing.Size(143, 24); + this.Button2ComboBox.Size = new System.Drawing.Size(160, 28); this.Button2ComboBox.TabIndex = 113; this.Button2ComboBox.Visible = false; this.Button2ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button2ComboBox_SelectedIndexChanged); @@ -549,25 +555,25 @@ private void InitializeComponent() // Button1ComboBox // this.Button1ComboBox.FormattingEnabled = true; - this.Button1ComboBox.Location = new System.Drawing.Point(542, 49); - this.Button1ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button1ComboBox.Location = new System.Drawing.Point(610, 61); + this.Button1ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button1ComboBox.Name = "Button1ComboBox"; - this.Button1ComboBox.Size = new System.Drawing.Size(143, 24); + this.Button1ComboBox.Size = new System.Drawing.Size(160, 28); this.Button1ComboBox.TabIndex = 112; this.Button1ComboBox.Visible = false; this.Button1ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button1ComboBox_SelectedIndexChanged); // // Button3NumericParameter // - this.Button3NumericParameter.Location = new System.Drawing.Point(206, 225); - this.Button3NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button3NumericParameter.Location = new System.Drawing.Point(232, 281); + this.Button3NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button3NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button3NumericParameter.Name = "Button3NumericParameter"; - this.Button3NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button3NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button3NumericParameter.TabIndex = 109; this.Button3NumericParameter.Value = new decimal(new int[] { 1, @@ -578,15 +584,15 @@ private void InitializeComponent() // // Button2NumericParameter // - this.Button2NumericParameter.Location = new System.Drawing.Point(206, 152); - this.Button2NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button2NumericParameter.Location = new System.Drawing.Point(232, 190); + this.Button2NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button2NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button2NumericParameter.Name = "Button2NumericParameter"; - this.Button2NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button2NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button2NumericParameter.TabIndex = 108; this.Button2NumericParameter.Value = new decimal(new int[] { 1, @@ -597,15 +603,15 @@ private void InitializeComponent() // // Button1NumericParameter // - this.Button1NumericParameter.Location = new System.Drawing.Point(206, 81); - this.Button1NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button1NumericParameter.Location = new System.Drawing.Point(232, 101); + this.Button1NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button1NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button1NumericParameter.Name = "Button1NumericParameter"; - this.Button1NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button1NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button1NumericParameter.TabIndex = 107; this.Button1NumericParameter.Value = new decimal(new int[] { 1, @@ -616,85 +622,85 @@ private void InitializeComponent() // // Button3ParameterText // - this.Button3ParameterText.Location = new System.Drawing.Point(206, 224); + this.Button3ParameterText.Location = new System.Drawing.Point(232, 280); this.Button3ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button3ParameterText.Name = "Button3ParameterText"; this.Button3ParameterText.ReadOnly = true; - this.Button3ParameterText.Size = new System.Drawing.Size(329, 22); + this.Button3ParameterText.Size = new System.Drawing.Size(370, 26); this.Button3ParameterText.TabIndex = 101; // // Button2ParameterText // - this.Button2ParameterText.Location = new System.Drawing.Point(206, 152); + this.Button2ParameterText.Location = new System.Drawing.Point(232, 190); this.Button2ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button2ParameterText.Name = "Button2ParameterText"; this.Button2ParameterText.ReadOnly = true; - this.Button2ParameterText.Size = new System.Drawing.Size(329, 22); + this.Button2ParameterText.Size = new System.Drawing.Size(370, 26); this.Button2ParameterText.TabIndex = 99; // // Button1ParameterText // - this.Button1ParameterText.Location = new System.Drawing.Point(206, 81); + this.Button1ParameterText.Location = new System.Drawing.Point(232, 101); this.Button1ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button1ParameterText.Name = "Button1ParameterText"; this.Button1ParameterText.ReadOnly = true; - this.Button1ParameterText.Size = new System.Drawing.Size(329, 22); + this.Button1ParameterText.Size = new System.Drawing.Size(370, 26); this.Button1ParameterText.TabIndex = 97; // // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(50, 195); + this.label8.Location = new System.Drawing.Point(56, 244); this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(0, 17); + this.label8.Size = new System.Drawing.Size(0, 20); this.label8.TabIndex = 92; // // Button3FunctionBox // this.Button3FunctionBox.FormattingEnabled = true; - this.Button3FunctionBox.Location = new System.Drawing.Point(206, 194); - this.Button3FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button3FunctionBox.Location = new System.Drawing.Point(232, 242); + this.Button3FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button3FunctionBox.Name = "Button3FunctionBox"; - this.Button3FunctionBox.Size = new System.Drawing.Size(329, 24); + this.Button3FunctionBox.Size = new System.Drawing.Size(370, 28); this.Button3FunctionBox.TabIndex = 91; this.Button3FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button3FunctionBox_SelectedIndexChanged_1); // // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(59, 125); + this.label7.Location = new System.Drawing.Point(66, 156); this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(0, 17); + this.label7.Size = new System.Drawing.Size(0, 20); this.label7.TabIndex = 90; // // Button2FunctionBox // this.Button2FunctionBox.FormattingEnabled = true; - this.Button2FunctionBox.Location = new System.Drawing.Point(206, 121); - this.Button2FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button2FunctionBox.Location = new System.Drawing.Point(232, 151); + this.Button2FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button2FunctionBox.Name = "Button2FunctionBox"; - this.Button2FunctionBox.Size = new System.Drawing.Size(329, 24); + this.Button2FunctionBox.Size = new System.Drawing.Size(370, 28); this.Button2FunctionBox.TabIndex = 89; this.Button2FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button2FunctionBox_SelectedIndexChanged_1); // // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(63, 53); + this.label6.Location = new System.Drawing.Point(71, 66); this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(0, 17); + this.label6.Size = new System.Drawing.Size(0, 20); this.label6.TabIndex = 88; // // Button1FunctionBox // this.Button1FunctionBox.FormattingEnabled = true; - this.Button1FunctionBox.Location = new System.Drawing.Point(206, 49); - this.Button1FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button1FunctionBox.Location = new System.Drawing.Point(232, 61); + this.Button1FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button1FunctionBox.Name = "Button1FunctionBox"; - this.Button1FunctionBox.Size = new System.Drawing.Size(329, 24); + this.Button1FunctionBox.Size = new System.Drawing.Size(370, 28); this.Button1FunctionBox.TabIndex = 87; this.Button1FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button1FunctionBox_SelectedIndexChanged_1); // @@ -738,20 +744,20 @@ private void InitializeComponent() this.Button2Tab.Controls.Add(this.Button7FunctionBox); this.Button2Tab.Controls.Add(this.label13); this.Button2Tab.Controls.Add(this.Button6FunctionBox); - this.Button2Tab.Location = new System.Drawing.Point(4, 25); + this.Button2Tab.Location = new System.Drawing.Point(4, 29); this.Button2Tab.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button2Tab.Name = "Button2Tab"; - this.Button2Tab.Size = new System.Drawing.Size(780, 366); + this.Button2Tab.Size = new System.Drawing.Size(878, 461); this.Button2Tab.TabIndex = 3; this.Button2Tab.Text = "Buttons 5-9 Actions"; // // Button5Label // this.Button5Label.AutoSize = true; - this.Button5Label.Location = new System.Drawing.Point(149, 55); + this.Button5Label.Location = new System.Drawing.Point(168, 69); this.Button5Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button5Label.Name = "Button5Label"; - this.Button5Label.Size = new System.Drawing.Size(78, 17); + this.Button5Label.Size = new System.Drawing.Size(87, 20); this.Button5Label.TabIndex = 179; this.Button5Label.Text = "Parameter:"; this.Button5Label.TextAlign = System.Drawing.ContentAlignment.TopRight; @@ -759,10 +765,10 @@ private void InitializeComponent() // label27 // this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(123, 24); + this.label27.Location = new System.Drawing.Point(138, 30); this.label27.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(104, 17); + this.label27.Size = new System.Drawing.Size(119, 20); this.label27.TabIndex = 178; this.label27.Text = "Button5 Action:"; // @@ -770,10 +776,10 @@ private void InitializeComponent() // this.clearButton5.Enabled = false; this.clearButton5.ForeColor = System.Drawing.Color.Black; - this.clearButton5.Location = new System.Drawing.Point(556, 51); - this.clearButton5.Margin = new System.Windows.Forms.Padding(4); + this.clearButton5.Location = new System.Drawing.Point(626, 64); + this.clearButton5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton5.Name = "clearButton5"; - this.clearButton5.Size = new System.Drawing.Size(36, 28); + this.clearButton5.Size = new System.Drawing.Size(40, 35); this.clearButton5.TabIndex = 177; this.clearButton5.Text = "x"; this.clearButton5.UseVisualStyleBackColor = true; @@ -783,25 +789,25 @@ private void InitializeComponent() // Button5ComboBox // this.Button5ComboBox.FormattingEnabled = true; - this.Button5ComboBox.Location = new System.Drawing.Point(555, 24); - this.Button5ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button5ComboBox.Location = new System.Drawing.Point(624, 30); + this.Button5ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button5ComboBox.Name = "Button5ComboBox"; - this.Button5ComboBox.Size = new System.Drawing.Size(161, 24); + this.Button5ComboBox.Size = new System.Drawing.Size(181, 28); this.Button5ComboBox.TabIndex = 176; this.Button5ComboBox.Visible = false; this.Button5ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button5ComboBox_SelectedIndexChanged); // // Button5NumericParameter // - this.Button5NumericParameter.Location = new System.Drawing.Point(238, 55); - this.Button5NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button5NumericParameter.Location = new System.Drawing.Point(268, 69); + this.Button5NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button5NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button5NumericParameter.Name = "Button5NumericParameter"; - this.Button5NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button5NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button5NumericParameter.TabIndex = 175; this.Button5NumericParameter.Value = new decimal(new int[] { 1, @@ -813,37 +819,37 @@ private void InitializeComponent() // label28 // this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(175, 56); + this.label28.Location = new System.Drawing.Point(197, 70); this.label28.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(0, 17); + this.label28.Size = new System.Drawing.Size(0, 20); this.label28.TabIndex = 174; // // Button5ParameterText // - this.Button5ParameterText.Location = new System.Drawing.Point(238, 54); + this.Button5ParameterText.Location = new System.Drawing.Point(268, 68); this.Button5ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button5ParameterText.Name = "Button5ParameterText"; this.Button5ParameterText.ReadOnly = true; - this.Button5ParameterText.Size = new System.Drawing.Size(311, 22); + this.Button5ParameterText.Size = new System.Drawing.Size(349, 26); this.Button5ParameterText.TabIndex = 173; // // label31 // this.label31.AutoSize = true; - this.label31.Location = new System.Drawing.Point(143, 27); + this.label31.Location = new System.Drawing.Point(161, 34); this.label31.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label31.Name = "label31"; - this.label31.Size = new System.Drawing.Size(0, 17); + this.label31.Size = new System.Drawing.Size(0, 20); this.label31.TabIndex = 172; // // Button5FunctionBox // this.Button5FunctionBox.FormattingEnabled = true; - this.Button5FunctionBox.Location = new System.Drawing.Point(238, 24); - this.Button5FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button5FunctionBox.Location = new System.Drawing.Point(268, 30); + this.Button5FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button5FunctionBox.Name = "Button5FunctionBox"; - this.Button5FunctionBox.Size = new System.Drawing.Size(311, 24); + this.Button5FunctionBox.Size = new System.Drawing.Size(349, 28); this.Button5FunctionBox.TabIndex = 171; this.Button5FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button5FunctionBox_SelectedIndexChanged); // @@ -851,10 +857,10 @@ private void InitializeComponent() // this.clearButton9.Enabled = false; this.clearButton9.ForeColor = System.Drawing.Color.Black; - this.clearButton9.Location = new System.Drawing.Point(555, 323); - this.clearButton9.Margin = new System.Windows.Forms.Padding(4); + this.clearButton9.Location = new System.Drawing.Point(624, 404); + this.clearButton9.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton9.Name = "clearButton9"; - this.clearButton9.Size = new System.Drawing.Size(36, 28); + this.clearButton9.Size = new System.Drawing.Size(40, 35); this.clearButton9.TabIndex = 143; this.clearButton9.Text = "x"; this.clearButton9.UseVisualStyleBackColor = true; @@ -865,10 +871,10 @@ private void InitializeComponent() // this.clearButton8.Enabled = false; this.clearButton8.ForeColor = System.Drawing.Color.Black; - this.clearButton8.Location = new System.Drawing.Point(555, 256); - this.clearButton8.Margin = new System.Windows.Forms.Padding(4); + this.clearButton8.Location = new System.Drawing.Point(624, 320); + this.clearButton8.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton8.Name = "clearButton8"; - this.clearButton8.Size = new System.Drawing.Size(36, 28); + this.clearButton8.Size = new System.Drawing.Size(40, 35); this.clearButton8.TabIndex = 142; this.clearButton8.Text = "x"; this.clearButton8.UseVisualStyleBackColor = true; @@ -879,10 +885,10 @@ private void InitializeComponent() // this.clearButton7.Enabled = false; this.clearButton7.ForeColor = System.Drawing.Color.Black; - this.clearButton7.Location = new System.Drawing.Point(555, 187); - this.clearButton7.Margin = new System.Windows.Forms.Padding(4); + this.clearButton7.Location = new System.Drawing.Point(624, 234); + this.clearButton7.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton7.Name = "clearButton7"; - this.clearButton7.Size = new System.Drawing.Size(36, 28); + this.clearButton7.Size = new System.Drawing.Size(40, 35); this.clearButton7.TabIndex = 141; this.clearButton7.Text = "x"; this.clearButton7.UseVisualStyleBackColor = true; @@ -893,10 +899,10 @@ private void InitializeComponent() // this.clearButton6.Enabled = false; this.clearButton6.ForeColor = System.Drawing.Color.Black; - this.clearButton6.Location = new System.Drawing.Point(555, 119); - this.clearButton6.Margin = new System.Windows.Forms.Padding(4); + this.clearButton6.Location = new System.Drawing.Point(624, 149); + this.clearButton6.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButton6.Name = "clearButton6"; - this.clearButton6.Size = new System.Drawing.Size(36, 28); + this.clearButton6.Size = new System.Drawing.Size(40, 35); this.clearButton6.TabIndex = 140; this.clearButton6.Text = "x"; this.clearButton6.UseVisualStyleBackColor = true; @@ -906,25 +912,25 @@ private void InitializeComponent() // Button9ComboBox // this.Button9ComboBox.FormattingEnabled = true; - this.Button9ComboBox.Location = new System.Drawing.Point(555, 295); - this.Button9ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button9ComboBox.Location = new System.Drawing.Point(624, 369); + this.Button9ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button9ComboBox.Name = "Button9ComboBox"; - this.Button9ComboBox.Size = new System.Drawing.Size(161, 24); + this.Button9ComboBox.Size = new System.Drawing.Size(181, 28); this.Button9ComboBox.TabIndex = 138; this.Button9ComboBox.Visible = false; this.Button9ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button9ComboBox_SelectedIndexChanged); // // Button9NumericParameter // - this.Button9NumericParameter.Location = new System.Drawing.Point(238, 325); - this.Button9NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button9NumericParameter.Location = new System.Drawing.Point(268, 406); + this.Button9NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button9NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button9NumericParameter.Name = "Button9NumericParameter"; - this.Button9NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button9NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button9NumericParameter.TabIndex = 137; this.Button9NumericParameter.Value = new decimal(new int[] { 1, @@ -936,49 +942,49 @@ private void InitializeComponent() // Button9Label // this.Button9Label.AutoSize = true; - this.Button9Label.Location = new System.Drawing.Point(145, 327); + this.Button9Label.Location = new System.Drawing.Point(163, 409); this.Button9Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button9Label.Name = "Button9Label"; - this.Button9Label.Size = new System.Drawing.Size(78, 17); + this.Button9Label.Size = new System.Drawing.Size(87, 20); this.Button9Label.TabIndex = 136; this.Button9Label.Text = "Parameter:"; // // Button9ParameterText // - this.Button9ParameterText.Location = new System.Drawing.Point(238, 325); + this.Button9ParameterText.Location = new System.Drawing.Point(268, 406); this.Button9ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button9ParameterText.Name = "Button9ParameterText"; this.Button9ParameterText.ReadOnly = true; - this.Button9ParameterText.Size = new System.Drawing.Size(311, 22); + this.Button9ParameterText.Size = new System.Drawing.Size(349, 26); this.Button9ParameterText.TabIndex = 135; // // label15 // this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(32, 299); + this.label15.Location = new System.Drawing.Point(36, 374); this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(192, 17); + this.label15.Size = new System.Drawing.Size(216, 20); this.label15.TabIndex = 134; this.label15.Text = "Button9 / LongPress3 Action:"; // // Button9FunctionBox // this.Button9FunctionBox.FormattingEnabled = true; - this.Button9FunctionBox.Location = new System.Drawing.Point(238, 295); - this.Button9FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button9FunctionBox.Location = new System.Drawing.Point(268, 369); + this.Button9FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button9FunctionBox.Name = "Button9FunctionBox"; - this.Button9FunctionBox.Size = new System.Drawing.Size(311, 24); + this.Button9FunctionBox.Size = new System.Drawing.Size(349, 28); this.Button9FunctionBox.TabIndex = 133; this.Button9FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button9FunctionMenu_SelectedIndexChanged); // // Button8ComboBox // this.Button8ComboBox.FormattingEnabled = true; - this.Button8ComboBox.Location = new System.Drawing.Point(555, 229); - this.Button8ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button8ComboBox.Location = new System.Drawing.Point(624, 286); + this.Button8ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button8ComboBox.Name = "Button8ComboBox"; - this.Button8ComboBox.Size = new System.Drawing.Size(161, 24); + this.Button8ComboBox.Size = new System.Drawing.Size(181, 28); this.Button8ComboBox.TabIndex = 132; this.Button8ComboBox.Visible = false; this.Button8ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button8ComboBox_SelectedIndexChanged); @@ -986,10 +992,10 @@ private void InitializeComponent() // Button7ComboBox // this.Button7ComboBox.FormattingEnabled = true; - this.Button7ComboBox.Location = new System.Drawing.Point(555, 159); - this.Button7ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button7ComboBox.Location = new System.Drawing.Point(624, 199); + this.Button7ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button7ComboBox.Name = "Button7ComboBox"; - this.Button7ComboBox.Size = new System.Drawing.Size(161, 24); + this.Button7ComboBox.Size = new System.Drawing.Size(181, 28); this.Button7ComboBox.TabIndex = 131; this.Button7ComboBox.Visible = false; this.Button7ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button7ComboBox_SelectedIndexChanged); @@ -997,25 +1003,25 @@ private void InitializeComponent() // Button6ComboBox // this.Button6ComboBox.FormattingEnabled = true; - this.Button6ComboBox.Location = new System.Drawing.Point(555, 91); - this.Button6ComboBox.Margin = new System.Windows.Forms.Padding(4); + this.Button6ComboBox.Location = new System.Drawing.Point(624, 114); + this.Button6ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button6ComboBox.Name = "Button6ComboBox"; - this.Button6ComboBox.Size = new System.Drawing.Size(161, 24); + this.Button6ComboBox.Size = new System.Drawing.Size(181, 28); this.Button6ComboBox.TabIndex = 130; this.Button6ComboBox.Visible = false; this.Button6ComboBox.SelectedIndexChanged += new System.EventHandler(this.Button6ComboBox_SelectedIndexChanged); // // Button8NumericParameter // - this.Button8NumericParameter.Location = new System.Drawing.Point(238, 259); - this.Button8NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button8NumericParameter.Location = new System.Drawing.Point(268, 324); + this.Button8NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button8NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button8NumericParameter.Name = "Button8NumericParameter"; - this.Button8NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button8NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button8NumericParameter.TabIndex = 129; this.Button8NumericParameter.Value = new decimal(new int[] { 1, @@ -1026,15 +1032,15 @@ private void InitializeComponent() // // Button7NumericParameter // - this.Button7NumericParameter.Location = new System.Drawing.Point(238, 189); - this.Button7NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button7NumericParameter.Location = new System.Drawing.Point(268, 236); + this.Button7NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button7NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button7NumericParameter.Name = "Button7NumericParameter"; - this.Button7NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button7NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button7NumericParameter.TabIndex = 128; this.Button7NumericParameter.Value = new decimal(new int[] { 1, @@ -1045,15 +1051,15 @@ private void InitializeComponent() // // Button6NumericParameter // - this.Button6NumericParameter.Location = new System.Drawing.Point(238, 119); - this.Button6NumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.Button6NumericParameter.Location = new System.Drawing.Point(268, 149); + this.Button6NumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button6NumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.Button6NumericParameter.Name = "Button6NumericParameter"; - this.Button6NumericParameter.Size = new System.Drawing.Size(60, 22); + this.Button6NumericParameter.Size = new System.Drawing.Size(68, 26); this.Button6NumericParameter.TabIndex = 127; this.Button6NumericParameter.Value = new decimal(new int[] { 1, @@ -1065,118 +1071,118 @@ private void InitializeComponent() // Button8Label // this.Button8Label.AutoSize = true; - this.Button8Label.Location = new System.Drawing.Point(146, 260); + this.Button8Label.Location = new System.Drawing.Point(164, 325); this.Button8Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button8Label.Name = "Button8Label"; - this.Button8Label.Size = new System.Drawing.Size(78, 17); + this.Button8Label.Size = new System.Drawing.Size(87, 20); this.Button8Label.TabIndex = 126; this.Button8Label.Text = "Parameter:"; // // Button8ParameterText // - this.Button8ParameterText.Location = new System.Drawing.Point(238, 259); + this.Button8ParameterText.Location = new System.Drawing.Point(268, 324); this.Button8ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button8ParameterText.Name = "Button8ParameterText"; this.Button8ParameterText.ReadOnly = true; - this.Button8ParameterText.Size = new System.Drawing.Size(311, 22); + this.Button8ParameterText.Size = new System.Drawing.Size(349, 26); this.Button8ParameterText.TabIndex = 125; // // Button7Label // this.Button7Label.AutoSize = true; - this.Button7Label.Location = new System.Drawing.Point(145, 192); + this.Button7Label.Location = new System.Drawing.Point(163, 240); this.Button7Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button7Label.Name = "Button7Label"; - this.Button7Label.Size = new System.Drawing.Size(78, 17); + this.Button7Label.Size = new System.Drawing.Size(87, 20); this.Button7Label.TabIndex = 124; this.Button7Label.Text = "Parameter:"; // // Button7ParameterText // - this.Button7ParameterText.Location = new System.Drawing.Point(238, 189); + this.Button7ParameterText.Location = new System.Drawing.Point(268, 236); this.Button7ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button7ParameterText.Name = "Button7ParameterText"; this.Button7ParameterText.ReadOnly = true; - this.Button7ParameterText.Size = new System.Drawing.Size(311, 22); + this.Button7ParameterText.Size = new System.Drawing.Size(349, 26); this.Button7ParameterText.TabIndex = 123; // // Button6Label // this.Button6Label.AutoSize = true; - this.Button6Label.Location = new System.Drawing.Point(148, 123); + this.Button6Label.Location = new System.Drawing.Point(166, 154); this.Button6Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.Button6Label.Name = "Button6Label"; - this.Button6Label.Size = new System.Drawing.Size(78, 17); + this.Button6Label.Size = new System.Drawing.Size(87, 20); this.Button6Label.TabIndex = 122; this.Button6Label.Text = "Parameter:"; this.Button6Label.TextAlign = System.Drawing.ContentAlignment.TopRight; // // Button6ParameterText // - this.Button6ParameterText.Location = new System.Drawing.Point(238, 119); + this.Button6ParameterText.Location = new System.Drawing.Point(268, 149); this.Button6ParameterText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Button6ParameterText.Name = "Button6ParameterText"; this.Button6ParameterText.ReadOnly = true; - this.Button6ParameterText.Size = new System.Drawing.Size(311, 22); + this.Button6ParameterText.Size = new System.Drawing.Size(349, 26); this.Button6ParameterText.TabIndex = 121; // // label11 // this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(33, 231); + this.label11.Location = new System.Drawing.Point(37, 289); this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(192, 17); + this.label11.Size = new System.Drawing.Size(216, 20); this.label11.TabIndex = 120; this.label11.Text = "Button8 / LongPress2 Action:"; // // Button8FunctionBox // this.Button8FunctionBox.FormattingEnabled = true; - this.Button8FunctionBox.Location = new System.Drawing.Point(238, 229); - this.Button8FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button8FunctionBox.Location = new System.Drawing.Point(268, 286); + this.Button8FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button8FunctionBox.Name = "Button8FunctionBox"; - this.Button8FunctionBox.Size = new System.Drawing.Size(311, 24); + this.Button8FunctionBox.Size = new System.Drawing.Size(349, 28); this.Button8FunctionBox.TabIndex = 119; this.Button8FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button8FunctionMenu_SelectedIndexChanged); // // label12 // this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(35, 164); + this.label12.Location = new System.Drawing.Point(39, 205); this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(192, 17); + this.label12.Size = new System.Drawing.Size(216, 20); this.label12.TabIndex = 118; this.label12.Text = "Button7 / LongPress1 Action:"; // // Button7FunctionBox // this.Button7FunctionBox.FormattingEnabled = true; - this.Button7FunctionBox.Location = new System.Drawing.Point(238, 159); - this.Button7FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button7FunctionBox.Location = new System.Drawing.Point(268, 199); + this.Button7FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button7FunctionBox.Name = "Button7FunctionBox"; - this.Button7FunctionBox.Size = new System.Drawing.Size(311, 24); + this.Button7FunctionBox.Size = new System.Drawing.Size(349, 28); this.Button7FunctionBox.TabIndex = 117; this.Button7FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button7FunctionMenu_SelectedIndexChanged); // // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(124, 94); + this.label13.Location = new System.Drawing.Point(140, 118); this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(104, 17); + this.label13.Size = new System.Drawing.Size(119, 20); this.label13.TabIndex = 116; this.label13.Text = "Button6 Action:"; // // Button6FunctionBox // this.Button6FunctionBox.FormattingEnabled = true; - this.Button6FunctionBox.Location = new System.Drawing.Point(238, 91); - this.Button6FunctionBox.Margin = new System.Windows.Forms.Padding(4); + this.Button6FunctionBox.Location = new System.Drawing.Point(268, 114); + this.Button6FunctionBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Button6FunctionBox.Name = "Button6FunctionBox"; - this.Button6FunctionBox.Size = new System.Drawing.Size(311, 24); + this.Button6FunctionBox.Size = new System.Drawing.Size(349, 28); this.Button6FunctionBox.TabIndex = 115; this.Button6FunctionBox.SelectedIndexChanged += new System.EventHandler(this.Button6FunctionMenu_SelectedIndexChanged); // @@ -1212,11 +1218,11 @@ private void InitializeComponent() this.SipPuffLevelsTab.Controls.Add(this.sipThresholdLabel); this.SipPuffLevelsTab.Controls.Add(this.sipThresholdBar); this.SipPuffLevelsTab.Controls.Add(this.thresholdLabelForSip); - this.SipPuffLevelsTab.Location = new System.Drawing.Point(4, 25); + this.SipPuffLevelsTab.Location = new System.Drawing.Point(4, 29); this.SipPuffLevelsTab.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.SipPuffLevelsTab.Name = "SipPuffLevelsTab"; this.SipPuffLevelsTab.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.SipPuffLevelsTab.Size = new System.Drawing.Size(780, 366); + this.SipPuffLevelsTab.Size = new System.Drawing.Size(878, 461); this.SipPuffLevelsTab.TabIndex = 5; this.SipPuffLevelsTab.Text = "Sip/Puff Levels"; // @@ -1224,10 +1230,10 @@ private void InitializeComponent() // this.clearButtonPuff.Enabled = false; this.clearButtonPuff.ForeColor = System.Drawing.Color.Black; - this.clearButtonPuff.Location = new System.Drawing.Point(368, 164); - this.clearButtonPuff.Margin = new System.Windows.Forms.Padding(4); + this.clearButtonPuff.Location = new System.Drawing.Point(414, 205); + this.clearButtonPuff.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButtonPuff.Name = "clearButtonPuff"; - this.clearButtonPuff.Size = new System.Drawing.Size(36, 28); + this.clearButtonPuff.Size = new System.Drawing.Size(40, 35); this.clearButtonPuff.TabIndex = 155; this.clearButtonPuff.Text = "x"; this.clearButtonPuff.UseVisualStyleBackColor = true; @@ -1237,10 +1243,10 @@ private void InitializeComponent() // PuffComboBox // this.PuffComboBox.FormattingEnabled = true; - this.PuffComboBox.Location = new System.Drawing.Point(368, 132); - this.PuffComboBox.Margin = new System.Windows.Forms.Padding(4); + this.PuffComboBox.Location = new System.Drawing.Point(414, 165); + this.PuffComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.PuffComboBox.Name = "PuffComboBox"; - this.PuffComboBox.Size = new System.Drawing.Size(76, 24); + this.PuffComboBox.Size = new System.Drawing.Size(85, 28); this.PuffComboBox.TabIndex = 154; this.PuffComboBox.Visible = false; this.PuffComboBox.SelectedIndexChanged += new System.EventHandler(this.PuffComboBox_SelectedIndexChanged); @@ -1248,54 +1254,54 @@ private void InitializeComponent() // PuffParameterLabel // this.PuffParameterLabel.AutoSize = true; - this.PuffParameterLabel.Location = new System.Drawing.Point(43, 167); + this.PuffParameterLabel.Location = new System.Drawing.Point(48, 209); this.PuffParameterLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.PuffParameterLabel.Name = "PuffParameterLabel"; - this.PuffParameterLabel.Size = new System.Drawing.Size(74, 17); + this.PuffParameterLabel.Size = new System.Drawing.Size(83, 20); this.PuffParameterLabel.TabIndex = 152; this.PuffParameterLabel.Text = "Parameter"; // // PuffNumericParameter // - this.PuffNumericParameter.Location = new System.Drawing.Point(134, 164); - this.PuffNumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.PuffNumericParameter.Location = new System.Drawing.Point(151, 205); + this.PuffNumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.PuffNumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.PuffNumericParameter.Name = "PuffNumericParameter"; - this.PuffNumericParameter.Size = new System.Drawing.Size(57, 22); + this.PuffNumericParameter.Size = new System.Drawing.Size(64, 26); this.PuffNumericParameter.TabIndex = 151; this.PuffNumericParameter.Visible = false; // // label20 // this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(22, 138); + this.label20.Location = new System.Drawing.Point(25, 172); this.label20.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(91, 17); + this.label20.Size = new System.Drawing.Size(104, 20); this.label20.TabIndex = 150; this.label20.Text = "Puff Function"; // // PuffFunctionMenu // this.PuffFunctionMenu.FormattingEnabled = true; - this.PuffFunctionMenu.Location = new System.Drawing.Point(132, 132); - this.PuffFunctionMenu.Margin = new System.Windows.Forms.Padding(4); + this.PuffFunctionMenu.Location = new System.Drawing.Point(148, 165); + this.PuffFunctionMenu.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.PuffFunctionMenu.Name = "PuffFunctionMenu"; - this.PuffFunctionMenu.Size = new System.Drawing.Size(228, 24); + this.PuffFunctionMenu.Size = new System.Drawing.Size(256, 28); this.PuffFunctionMenu.TabIndex = 149; this.PuffFunctionMenu.SelectedIndexChanged += new System.EventHandler(this.PuffFunctionMenu_SelectedIndexChanged); // // PuffParameterText // - this.PuffParameterText.Location = new System.Drawing.Point(132, 164); - this.PuffParameterText.Margin = new System.Windows.Forms.Padding(4); + this.PuffParameterText.Location = new System.Drawing.Point(148, 205); + this.PuffParameterText.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.PuffParameterText.Name = "PuffParameterText"; this.PuffParameterText.ReadOnly = true; - this.PuffParameterText.Size = new System.Drawing.Size(228, 22); + this.PuffParameterText.Size = new System.Drawing.Size(256, 26); this.PuffParameterText.TabIndex = 153; this.PuffParameterText.Visible = false; // @@ -1303,10 +1309,10 @@ private void InitializeComponent() // this.clearButtonSip.Enabled = false; this.clearButtonSip.ForeColor = System.Drawing.Color.Black; - this.clearButtonSip.Location = new System.Drawing.Point(368, 78); - this.clearButtonSip.Margin = new System.Windows.Forms.Padding(4); + this.clearButtonSip.Location = new System.Drawing.Point(414, 98); + this.clearButtonSip.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.clearButtonSip.Name = "clearButtonSip"; - this.clearButtonSip.Size = new System.Drawing.Size(36, 28); + this.clearButtonSip.Size = new System.Drawing.Size(40, 35); this.clearButtonSip.TabIndex = 148; this.clearButtonSip.Text = "x"; this.clearButtonSip.UseVisualStyleBackColor = true; @@ -1316,10 +1322,10 @@ private void InitializeComponent() // SipComboBox // this.SipComboBox.FormattingEnabled = true; - this.SipComboBox.Location = new System.Drawing.Point(368, 48); - this.SipComboBox.Margin = new System.Windows.Forms.Padding(4); + this.SipComboBox.Location = new System.Drawing.Point(414, 60); + this.SipComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.SipComboBox.Name = "SipComboBox"; - this.SipComboBox.Size = new System.Drawing.Size(76, 24); + this.SipComboBox.Size = new System.Drawing.Size(85, 28); this.SipComboBox.TabIndex = 147; this.SipComboBox.Visible = false; this.SipComboBox.SelectedIndexChanged += new System.EventHandler(this.SipComboBox_SelectedIndexChanged); @@ -1327,54 +1333,54 @@ private void InitializeComponent() // SipParameterLabel // this.SipParameterLabel.AutoSize = true; - this.SipParameterLabel.Location = new System.Drawing.Point(45, 83); + this.SipParameterLabel.Location = new System.Drawing.Point(51, 104); this.SipParameterLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.SipParameterLabel.Name = "SipParameterLabel"; - this.SipParameterLabel.Size = new System.Drawing.Size(74, 17); + this.SipParameterLabel.Size = new System.Drawing.Size(83, 20); this.SipParameterLabel.TabIndex = 145; this.SipParameterLabel.Text = "Parameter"; // // SipNumericParameter // - this.SipNumericParameter.Location = new System.Drawing.Point(138, 80); - this.SipNumericParameter.Margin = new System.Windows.Forms.Padding(4); + this.SipNumericParameter.Location = new System.Drawing.Point(155, 100); + this.SipNumericParameter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.SipNumericParameter.Minimum = new decimal(new int[] { 100, 0, 0, -2147483648}); this.SipNumericParameter.Name = "SipNumericParameter"; - this.SipNumericParameter.Size = new System.Drawing.Size(57, 22); + this.SipNumericParameter.Size = new System.Drawing.Size(64, 26); this.SipNumericParameter.TabIndex = 144; this.SipNumericParameter.Visible = false; // // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(33, 50); + this.label5.Location = new System.Drawing.Point(37, 62); this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(86, 17); + this.label5.Size = new System.Drawing.Size(98, 20); this.label5.TabIndex = 143; this.label5.Text = "Sip Function"; // // SipFunctionMenu // this.SipFunctionMenu.FormattingEnabled = true; - this.SipFunctionMenu.Location = new System.Drawing.Point(134, 48); - this.SipFunctionMenu.Margin = new System.Windows.Forms.Padding(4); + this.SipFunctionMenu.Location = new System.Drawing.Point(151, 60); + this.SipFunctionMenu.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.SipFunctionMenu.Name = "SipFunctionMenu"; - this.SipFunctionMenu.Size = new System.Drawing.Size(226, 24); + this.SipFunctionMenu.Size = new System.Drawing.Size(254, 28); this.SipFunctionMenu.TabIndex = 142; this.SipFunctionMenu.SelectedIndexChanged += new System.EventHandler(this.SipFunctionMenu_SelectedIndexChanged); // // SipParameterText // - this.SipParameterText.Location = new System.Drawing.Point(136, 80); - this.SipParameterText.Margin = new System.Windows.Forms.Padding(4); + this.SipParameterText.Location = new System.Drawing.Point(153, 100); + this.SipParameterText.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.SipParameterText.Name = "SipParameterText"; this.SipParameterText.ReadOnly = true; - this.SipParameterText.Size = new System.Drawing.Size(224, 22); + this.SipParameterText.Size = new System.Drawing.Size(252, 26); this.SipParameterText.TabIndex = 146; this.SipParameterText.Visible = false; // @@ -1382,30 +1388,30 @@ private void InitializeComponent() // this.sipLevelIndicatorPanel.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.sipLevelIndicatorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.sipLevelIndicatorPanel.Location = new System.Drawing.Point(466, 214); + this.sipLevelIndicatorPanel.Location = new System.Drawing.Point(524, 268); this.sipLevelIndicatorPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.sipLevelIndicatorPanel.Name = "sipLevelIndicatorPanel"; - this.sipLevelIndicatorPanel.Size = new System.Drawing.Size(34, 24); + this.sipLevelIndicatorPanel.Size = new System.Drawing.Size(38, 30); this.sipLevelIndicatorPanel.TabIndex = 122; // // puffLevelIndicatorPanel // this.puffLevelIndicatorPanel.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.puffLevelIndicatorPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.puffLevelIndicatorPanel.Location = new System.Drawing.Point(722, 87); + this.puffLevelIndicatorPanel.Location = new System.Drawing.Point(812, 109); this.puffLevelIndicatorPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.puffLevelIndicatorPanel.Name = "puffLevelIndicatorPanel"; - this.puffLevelIndicatorPanel.Size = new System.Drawing.Size(34, 24); + this.puffLevelIndicatorPanel.Size = new System.Drawing.Size(38, 30); this.puffLevelIndicatorPanel.TabIndex = 121; // // incSipThreshold // this.incSipThreshold.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.incSipThreshold.ForeColor = System.Drawing.Color.Black; - this.incSipThreshold.Location = new System.Drawing.Point(463, 248); - this.incSipThreshold.Margin = new System.Windows.Forms.Padding(4); + this.incSipThreshold.Location = new System.Drawing.Point(521, 310); + this.incSipThreshold.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.incSipThreshold.Name = "incSipThreshold"; - this.incSipThreshold.Size = new System.Drawing.Size(41, 37); + this.incSipThreshold.Size = new System.Drawing.Size(46, 46); this.incSipThreshold.TabIndex = 128; this.incSipThreshold.Text = "+"; this.incSipThreshold.UseVisualStyleBackColor = true; @@ -1418,10 +1424,10 @@ private void InitializeComponent() this.decSipThreshold.Cursor = System.Windows.Forms.Cursors.Hand; this.decSipThreshold.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.decSipThreshold.ForeColor = System.Drawing.Color.Black; - this.decSipThreshold.Location = new System.Drawing.Point(463, 293); - this.decSipThreshold.Margin = new System.Windows.Forms.Padding(4); + this.decSipThreshold.Location = new System.Drawing.Point(521, 366); + this.decSipThreshold.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.decSipThreshold.Name = "decSipThreshold"; - this.decSipThreshold.Size = new System.Drawing.Size(41, 37); + this.decSipThreshold.Size = new System.Drawing.Size(46, 46); this.decSipThreshold.TabIndex = 127; this.decSipThreshold.Text = "-"; this.decSipThreshold.UseVisualStyleBackColor = true; @@ -1433,10 +1439,10 @@ private void InitializeComponent() // this.incPuffThreshold.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.incPuffThreshold.ForeColor = System.Drawing.Color.Black; - this.incPuffThreshold.Location = new System.Drawing.Point(718, 120); - this.incPuffThreshold.Margin = new System.Windows.Forms.Padding(4); + this.incPuffThreshold.Location = new System.Drawing.Point(808, 150); + this.incPuffThreshold.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.incPuffThreshold.Name = "incPuffThreshold"; - this.incPuffThreshold.Size = new System.Drawing.Size(41, 37); + this.incPuffThreshold.Size = new System.Drawing.Size(46, 46); this.incPuffThreshold.TabIndex = 126; this.incPuffThreshold.Text = "+"; this.incPuffThreshold.UseVisualStyleBackColor = true; @@ -1448,10 +1454,10 @@ private void InitializeComponent() // this.decPuffThreshold.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.decPuffThreshold.ForeColor = System.Drawing.Color.Black; - this.decPuffThreshold.Location = new System.Drawing.Point(718, 166); - this.decPuffThreshold.Margin = new System.Windows.Forms.Padding(4); + this.decPuffThreshold.Location = new System.Drawing.Point(808, 208); + this.decPuffThreshold.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.decPuffThreshold.Name = "decPuffThreshold"; - this.decPuffThreshold.Size = new System.Drawing.Size(41, 37); + this.decPuffThreshold.Size = new System.Drawing.Size(46, 46); this.decPuffThreshold.TabIndex = 125; this.decPuffThreshold.Text = "-"; this.decPuffThreshold.UseVisualStyleBackColor = true; @@ -1462,10 +1468,10 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(569, 40); + this.label4.Location = new System.Drawing.Point(640, 50); this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(65, 17); + this.label4.Size = new System.Drawing.Size(72, 20); this.label4.TabIndex = 124; this.label4.Text = "Pressure"; // @@ -1473,19 +1479,19 @@ private void InitializeComponent() // this.pressureDrawPanel.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.pressureDrawPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pressureDrawPanel.Location = new System.Drawing.Point(580, 78); + this.pressureDrawPanel.Location = new System.Drawing.Point(652, 98); this.pressureDrawPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.pressureDrawPanel.Name = "pressureDrawPanel"; - this.pressureDrawPanel.Size = new System.Drawing.Size(62, 250); + this.pressureDrawPanel.Size = new System.Drawing.Size(70, 312); this.pressureDrawPanel.TabIndex = 120; // // pressureLabel // this.pressureLabel.AutoSize = true; - this.pressureLabel.Location = new System.Drawing.Point(580, 57); + this.pressureLabel.Location = new System.Drawing.Point(652, 71); this.pressureLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.pressureLabel.Name = "pressureLabel"; - this.pressureLabel.Size = new System.Drawing.Size(16, 17); + this.pressureLabel.Size = new System.Drawing.Size(18, 20); this.pressureLabel.TabIndex = 119; this.pressureLabel.Text = "0"; this.pressureLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -1493,10 +1499,10 @@ private void InitializeComponent() // puffThresholdLabel // this.puffThresholdLabel.AutoSize = true; - this.puffThresholdLabel.Location = new System.Drawing.Point(699, 247); + this.puffThresholdLabel.Location = new System.Drawing.Point(786, 309); this.puffThresholdLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.puffThresholdLabel.Name = "puffThresholdLabel"; - this.puffThresholdLabel.Size = new System.Drawing.Size(32, 17); + this.puffThresholdLabel.Size = new System.Drawing.Size(36, 20); this.puffThresholdLabel.TabIndex = 118; this.puffThresholdLabel.Text = "525"; // @@ -1504,15 +1510,15 @@ private void InitializeComponent() // this.puffThresholdBar.AllowDrop = true; this.puffThresholdBar.LargeChange = 20; - this.puffThresholdBar.Location = new System.Drawing.Point(641, 67); - this.puffThresholdBar.Margin = new System.Windows.Forms.Padding(4); + this.puffThresholdBar.Location = new System.Drawing.Point(721, 84); + this.puffThresholdBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.puffThresholdBar.Maximum = 1023; this.puffThresholdBar.Minimum = 512; this.puffThresholdBar.Name = "puffThresholdBar"; this.puffThresholdBar.Orientation = System.Windows.Forms.Orientation.Vertical; this.puffThresholdBar.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.puffThresholdBar.RightToLeftLayout = true; - this.puffThresholdBar.Size = new System.Drawing.Size(56, 151); + this.puffThresholdBar.Size = new System.Drawing.Size(69, 189); this.puffThresholdBar.TabIndex = 117; this.puffThresholdBar.TickFrequency = 40; this.puffThresholdBar.Value = 525; @@ -1522,10 +1528,10 @@ private void InitializeComponent() // this.thresholdLabelForPuff.AutoSize = true; this.thresholdLabelForPuff.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.thresholdLabelForPuff.Location = new System.Drawing.Point(686, 226); + this.thresholdLabelForPuff.Location = new System.Drawing.Point(772, 282); this.thresholdLabelForPuff.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.thresholdLabelForPuff.Name = "thresholdLabelForPuff"; - this.thresholdLabelForPuff.Size = new System.Drawing.Size(71, 17); + this.thresholdLabelForPuff.Size = new System.Drawing.Size(79, 20); this.thresholdLabelForPuff.TabIndex = 116; this.thresholdLabelForPuff.Text = "Puff Level"; this.thresholdLabelForPuff.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -1533,23 +1539,23 @@ private void InitializeComponent() // sipThresholdLabel // this.sipThresholdLabel.AutoSize = true; - this.sipThresholdLabel.Location = new System.Drawing.Point(506, 170); + this.sipThresholdLabel.Location = new System.Drawing.Point(569, 212); this.sipThresholdLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.sipThresholdLabel.Name = "sipThresholdLabel"; - this.sipThresholdLabel.Size = new System.Drawing.Size(32, 17); + this.sipThresholdLabel.Size = new System.Drawing.Size(36, 20); this.sipThresholdLabel.TabIndex = 115; this.sipThresholdLabel.Text = "500"; // // sipThresholdBar // this.sipThresholdBar.LargeChange = 20; - this.sipThresholdBar.Location = new System.Drawing.Point(520, 191); - this.sipThresholdBar.Margin = new System.Windows.Forms.Padding(4); + this.sipThresholdBar.Location = new System.Drawing.Point(585, 239); + this.sipThresholdBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.sipThresholdBar.Maximum = 512; this.sipThresholdBar.Name = "sipThresholdBar"; this.sipThresholdBar.Orientation = System.Windows.Forms.Orientation.Vertical; this.sipThresholdBar.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.sipThresholdBar.Size = new System.Drawing.Size(56, 151); + this.sipThresholdBar.Size = new System.Drawing.Size(69, 189); this.sipThresholdBar.TabIndex = 114; this.sipThresholdBar.TickFrequency = 40; this.sipThresholdBar.Value = 500; @@ -1558,10 +1564,10 @@ private void InitializeComponent() // thresholdLabelForSip // this.thresholdLabelForSip.AutoSize = true; - this.thresholdLabelForSip.Location = new System.Drawing.Point(493, 151); + this.thresholdLabelForSip.Location = new System.Drawing.Point(555, 189); this.thresholdLabelForSip.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.thresholdLabelForSip.Name = "thresholdLabelForSip"; - this.thresholdLabelForSip.Size = new System.Drawing.Size(66, 17); + this.thresholdLabelForSip.Size = new System.Drawing.Size(73, 20); this.thresholdLabelForSip.TabIndex = 113; this.thresholdLabelForSip.Text = "Sip Level"; // @@ -1582,56 +1588,57 @@ private void InitializeComponent() this.SettingsTab.Controls.Add(this.timeThresholdLabel); this.SettingsTab.Controls.Add(this.timeThresholdBar); this.SettingsTab.Controls.Add(this.label2); - this.SettingsTab.Location = new System.Drawing.Point(4, 25); + this.SettingsTab.Location = new System.Drawing.Point(4, 29); + this.SettingsTab.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.SettingsTab.Name = "SettingsTab"; - this.SettingsTab.Size = new System.Drawing.Size(780, 366); + this.SettingsTab.Size = new System.Drawing.Size(878, 461); this.SettingsTab.TabIndex = 6; this.SettingsTab.Text = "Settings"; // // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(95, 99); + this.label16.Location = new System.Drawing.Point(107, 124); this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label16.Name = "label16"; this.label16.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.label16.Size = new System.Drawing.Size(566, 17); + this.label16.Size = new System.Drawing.Size(641, 20); this.label16.TabIndex = 129; this.label16.Text = "(Long Press Action for Button1=Button 7, for Button2=Button8 and for Button3=But" + - "ton9)"; + "ton9)"; // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(639, 56); + this.label1.Location = new System.Drawing.Point(719, 70); this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; this.label1.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.label1.Size = new System.Drawing.Size(107, 17); + this.label1.Size = new System.Drawing.Size(118, 20); this.label1.TabIndex = 128; this.label1.Text = "(5000=disable) "; // // antiTremorIdleLabel // this.antiTremorIdleLabel.AutoSize = true; - this.antiTremorIdleLabel.Location = new System.Drawing.Point(615, 280); + this.antiTremorIdleLabel.Location = new System.Drawing.Point(692, 350); this.antiTremorIdleLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.antiTremorIdleLabel.Name = "antiTremorIdleLabel"; this.antiTremorIdleLabel.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.antiTremorIdleLabel.Size = new System.Drawing.Size(16, 17); + this.antiTremorIdleLabel.Size = new System.Drawing.Size(18, 20); this.antiTremorIdleLabel.TabIndex = 127; this.antiTremorIdleLabel.Text = "1"; // // antiTremorIdleBar // this.antiTremorIdleBar.LargeChange = 20; - this.antiTremorIdleBar.Location = new System.Drawing.Point(283, 277); - this.antiTremorIdleBar.Margin = new System.Windows.Forms.Padding(4); + this.antiTremorIdleBar.Location = new System.Drawing.Point(318, 346); + this.antiTremorIdleBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.antiTremorIdleBar.Maximum = 500; this.antiTremorIdleBar.Minimum = 1; this.antiTremorIdleBar.Name = "antiTremorIdleBar"; this.antiTremorIdleBar.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.antiTremorIdleBar.Size = new System.Drawing.Size(330, 56); + this.antiTremorIdleBar.Size = new System.Drawing.Size(371, 69); this.antiTremorIdleBar.SmallChange = 10; this.antiTremorIdleBar.TabIndex = 126; this.antiTremorIdleBar.TickFrequency = 10; @@ -1641,35 +1648,35 @@ private void InitializeComponent() // label14 // this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(144, 280); + this.label14.Location = new System.Drawing.Point(162, 350); this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label14.Name = "label14"; this.label14.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.label14.Size = new System.Drawing.Size(134, 17); + this.label14.Size = new System.Drawing.Size(151, 20); this.label14.TabIndex = 125; this.label14.Text = "Antitremor Idle Time"; // // antiTremorReleaseLabel // this.antiTremorReleaseLabel.AutoSize = true; - this.antiTremorReleaseLabel.Location = new System.Drawing.Point(617, 223); + this.antiTremorReleaseLabel.Location = new System.Drawing.Point(694, 279); this.antiTremorReleaseLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.antiTremorReleaseLabel.Name = "antiTremorReleaseLabel"; this.antiTremorReleaseLabel.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.antiTremorReleaseLabel.Size = new System.Drawing.Size(16, 17); + this.antiTremorReleaseLabel.Size = new System.Drawing.Size(18, 20); this.antiTremorReleaseLabel.TabIndex = 124; this.antiTremorReleaseLabel.Text = "2"; // // antiTremorReleaseBar // this.antiTremorReleaseBar.LargeChange = 20; - this.antiTremorReleaseBar.Location = new System.Drawing.Point(285, 220); - this.antiTremorReleaseBar.Margin = new System.Windows.Forms.Padding(4); + this.antiTremorReleaseBar.Location = new System.Drawing.Point(321, 275); + this.antiTremorReleaseBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.antiTremorReleaseBar.Maximum = 500; this.antiTremorReleaseBar.Minimum = 1; this.antiTremorReleaseBar.Name = "antiTremorReleaseBar"; this.antiTremorReleaseBar.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.antiTremorReleaseBar.Size = new System.Drawing.Size(330, 56); + this.antiTremorReleaseBar.Size = new System.Drawing.Size(371, 69); this.antiTremorReleaseBar.TabIndex = 123; this.antiTremorReleaseBar.TickFrequency = 10; this.antiTremorReleaseBar.Value = 2; @@ -1678,35 +1685,35 @@ private void InitializeComponent() // label10 // this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(94, 223); + this.label10.Location = new System.Drawing.Point(106, 279); this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label10.Name = "label10"; this.label10.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.label10.Size = new System.Drawing.Size(186, 17); + this.label10.Size = new System.Drawing.Size(208, 20); this.label10.TabIndex = 122; this.label10.Text = "Antitremor-Time for Release"; // // antiTremorPressLabel // this.antiTremorPressLabel.AutoSize = true; - this.antiTremorPressLabel.Location = new System.Drawing.Point(616, 170); + this.antiTremorPressLabel.Location = new System.Drawing.Point(693, 212); this.antiTremorPressLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.antiTremorPressLabel.Name = "antiTremorPressLabel"; this.antiTremorPressLabel.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.antiTremorPressLabel.Size = new System.Drawing.Size(16, 17); + this.antiTremorPressLabel.Size = new System.Drawing.Size(18, 20); this.antiTremorPressLabel.TabIndex = 121; this.antiTremorPressLabel.Text = "5"; // // antiTremorPressBar // this.antiTremorPressBar.LargeChange = 20; - this.antiTremorPressBar.Location = new System.Drawing.Point(283, 167); - this.antiTremorPressBar.Margin = new System.Windows.Forms.Padding(4); + this.antiTremorPressBar.Location = new System.Drawing.Point(318, 209); + this.antiTremorPressBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.antiTremorPressBar.Maximum = 500; this.antiTremorPressBar.Minimum = 1; this.antiTremorPressBar.Name = "antiTremorPressBar"; this.antiTremorPressBar.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.antiTremorPressBar.Size = new System.Drawing.Size(330, 56); + this.antiTremorPressBar.Size = new System.Drawing.Size(371, 69); this.antiTremorPressBar.TabIndex = 120; this.antiTremorPressBar.TickFrequency = 10; this.antiTremorPressBar.Value = 5; @@ -1715,34 +1722,34 @@ private void InitializeComponent() // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(110, 170); + this.label9.Location = new System.Drawing.Point(124, 212); this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label9.Name = "label9"; this.label9.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.label9.Size = new System.Drawing.Size(170, 17); + this.label9.Size = new System.Drawing.Size(189, 20); this.label9.TabIndex = 119; this.label9.Text = "Antitremor-Time for Press"; // // timeThresholdLabel // this.timeThresholdLabel.AutoSize = true; - this.timeThresholdLabel.Location = new System.Drawing.Point(598, 56); + this.timeThresholdLabel.Location = new System.Drawing.Point(673, 70); this.timeThresholdLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.timeThresholdLabel.Name = "timeThresholdLabel"; this.timeThresholdLabel.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.timeThresholdLabel.Size = new System.Drawing.Size(40, 17); + this.timeThresholdLabel.Size = new System.Drawing.Size(45, 20); this.timeThresholdLabel.TabIndex = 118; this.timeThresholdLabel.Text = "5000"; // // timeThresholdBar // this.timeThresholdBar.LargeChange = 1000; - this.timeThresholdBar.Location = new System.Drawing.Point(269, 56); - this.timeThresholdBar.Margin = new System.Windows.Forms.Padding(4); + this.timeThresholdBar.Location = new System.Drawing.Point(303, 70); + this.timeThresholdBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.timeThresholdBar.Maximum = 5000; this.timeThresholdBar.Name = "timeThresholdBar"; this.timeThresholdBar.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.timeThresholdBar.Size = new System.Drawing.Size(330, 56); + this.timeThresholdBar.Size = new System.Drawing.Size(371, 69); this.timeThresholdBar.SmallChange = 200; this.timeThresholdBar.TabIndex = 117; this.timeThresholdBar.TickFrequency = 500; @@ -1752,22 +1759,22 @@ private void InitializeComponent() // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(48, 56); + this.label2.Location = new System.Drawing.Point(54, 70); this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Name = "label2"; this.label2.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.label2.Size = new System.Drawing.Size(221, 17); + this.label2.Size = new System.Drawing.Size(244, 20); this.label2.TabIndex = 116; this.label2.Text = "Threshold Time Short/Long Press"; // // groupBox1 // this.groupBox1.Controls.Add(this.activityLogTextbox); - this.groupBox1.Location = new System.Drawing.Point(53, 563); + this.groupBox1.Location = new System.Drawing.Point(60, 704); this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.groupBox1.Name = "groupBox1"; this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.groupBox1.Size = new System.Drawing.Size(785, 103); + this.groupBox1.Size = new System.Drawing.Size(883, 129); this.groupBox1.TabIndex = 74; this.groupBox1.TabStop = false; this.groupBox1.Text = "Activity-Log"; @@ -1776,11 +1783,11 @@ private void InitializeComponent() // this.activityLogTextbox.ForeColor = System.Drawing.SystemColors.MenuText; this.activityLogTextbox.HideSelection = false; - this.activityLogTextbox.Location = new System.Drawing.Point(28, 25); - this.activityLogTextbox.Margin = new System.Windows.Forms.Padding(4); + this.activityLogTextbox.Location = new System.Drawing.Point(32, 31); + this.activityLogTextbox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.activityLogTextbox.Name = "activityLogTextbox"; this.activityLogTextbox.ReadOnly = true; - this.activityLogTextbox.Size = new System.Drawing.Size(736, 60); + this.activityLogTextbox.Size = new System.Drawing.Size(828, 74); this.activityLogTextbox.TabIndex = 63; this.activityLogTextbox.Text = ""; // @@ -1789,24 +1796,26 @@ private void InitializeComponent() this.slotNames.CausesValidation = false; this.slotNames.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.slotNames.ForeColor = System.Drawing.SystemColors.MenuHighlight; - this.slotNames.Location = new System.Drawing.Point(339, 510); + this.slotNames.Location = new System.Drawing.Point(381, 638); this.slotNames.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.slotNames.Name = "slotNames"; - this.slotNames.Size = new System.Drawing.Size(206, 28); + this.slotNames.Size = new System.Drawing.Size(231, 33); this.slotNames.TabIndex = 76; this.slotNames.Text = ""; this.slotNames.SelectedIndexChanged += new System.EventHandler(this.slotNames_SelectedIndexChanged); // // menuStrip1 // + this.menuStrip1.GripMargin = new System.Windows.Forms.Padding(2, 2, 0, 2); + this.menuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileMenu, this.fLipMouseToolStripMenuItem, this.aboutToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2); - this.menuStrip1.Size = new System.Drawing.Size(885, 28); + this.menuStrip1.Padding = new System.Windows.Forms.Padding(6, 2, 0, 2); + this.menuStrip1.Size = new System.Drawing.Size(996, 33); this.menuStrip1.TabIndex = 77; this.menuStrip1.Text = "menuStrip1"; // @@ -1817,27 +1826,27 @@ private void InitializeComponent() this.loadFromFileMenuItem, this.exitMenuItem}); this.fileMenu.Name = "fileMenu"; - this.fileMenu.Size = new System.Drawing.Size(44, 24); + this.fileMenu.Size = new System.Drawing.Size(54, 29); this.fileMenu.Text = "File"; // // saveToFileMenuItem // this.saveToFileMenuItem.Name = "saveToFileMenuItem"; - this.saveToFileMenuItem.Size = new System.Drawing.Size(168, 24); + this.saveToFileMenuItem.Size = new System.Drawing.Size(222, 34); this.saveToFileMenuItem.Text = "Save Settings"; this.saveToFileMenuItem.Click += new System.EventHandler(this.saveToFileMenuItem_Click); // // loadFromFileMenuItem // this.loadFromFileMenuItem.Name = "loadFromFileMenuItem"; - this.loadFromFileMenuItem.Size = new System.Drawing.Size(168, 24); + this.loadFromFileMenuItem.Size = new System.Drawing.Size(222, 34); this.loadFromFileMenuItem.Text = "Load Settings"; this.loadFromFileMenuItem.Click += new System.EventHandler(this.loadFromFileMenuItem_Click); // // exitMenuItem // this.exitMenuItem.Name = "exitMenuItem"; - this.exitMenuItem.Size = new System.Drawing.Size(168, 24); + this.exitMenuItem.Size = new System.Drawing.Size(222, 34); this.exitMenuItem.Text = "Exit"; this.exitMenuItem.Click += new System.EventHandler(this.exitMenuItem_Click); // @@ -1847,14 +1856,14 @@ private void InitializeComponent() this.storeSlotSettingsMenuItem, this.loadSlotSettingsMenuItem}); this.fLipMouseToolStripMenuItem.Name = "fLipMouseToolStripMenuItem"; - this.fLipMouseToolStripMenuItem.Size = new System.Drawing.Size(49, 24); + this.fLipMouseToolStripMenuItem.Size = new System.Drawing.Size(60, 29); this.fLipMouseToolStripMenuItem.Text = "Fabi"; // // storeSlotSettingsMenuItem // this.storeSlotSettingsMenuItem.Enabled = false; this.storeSlotSettingsMenuItem.Name = "storeSlotSettingsMenuItem"; - this.storeSlotSettingsMenuItem.Size = new System.Drawing.Size(281, 24); + this.storeSlotSettingsMenuItem.Size = new System.Drawing.Size(355, 34); this.storeSlotSettingsMenuItem.Text = "Store Settings to FabiDevice"; this.storeSlotSettingsMenuItem.Click += new System.EventHandler(this.storeSlotSettingsMenuItem_Click); // @@ -1862,23 +1871,23 @@ private void InitializeComponent() // this.loadSlotSettingsMenuItem.Enabled = false; this.loadSlotSettingsMenuItem.Name = "loadSlotSettingsMenuItem"; - this.loadSlotSettingsMenuItem.Size = new System.Drawing.Size(281, 24); + this.loadSlotSettingsMenuItem.Size = new System.Drawing.Size(355, 34); this.loadSlotSettingsMenuItem.Text = "Load Settings from FabiDevice"; this.loadSlotSettingsMenuItem.Click += new System.EventHandler(this.loadSlotSettingsMenuItem_Click); // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(62, 24); + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(78, 29); this.aboutToolStripMenuItem.Text = "About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // // prevSlotButton // - this.prevSlotButton.Location = new System.Drawing.Point(186, 503); - this.prevSlotButton.Margin = new System.Windows.Forms.Padding(4); + this.prevSlotButton.Location = new System.Drawing.Point(209, 629); + this.prevSlotButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.prevSlotButton.Name = "prevSlotButton"; - this.prevSlotButton.Size = new System.Drawing.Size(143, 40); + this.prevSlotButton.Size = new System.Drawing.Size(161, 50); this.prevSlotButton.TabIndex = 79; this.prevSlotButton.Text = " < Previous Slot "; this.prevSlotButton.UseVisualStyleBackColor = true; @@ -1887,10 +1896,10 @@ private void InitializeComponent() // nextSlotButton // this.nextSlotButton.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.nextSlotButton.Location = new System.Drawing.Point(553, 503); - this.nextSlotButton.Margin = new System.Windows.Forms.Padding(4); + this.nextSlotButton.Location = new System.Drawing.Point(622, 629); + this.nextSlotButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.nextSlotButton.Name = "nextSlotButton"; - this.nextSlotButton.Size = new System.Drawing.Size(145, 40); + this.nextSlotButton.Size = new System.Drawing.Size(163, 50); this.nextSlotButton.TabIndex = 80; this.nextSlotButton.Text = "Next Slot >"; this.nextSlotButton.UseVisualStyleBackColor = true; @@ -1900,10 +1909,10 @@ private void InitializeComponent() // this.ApplyButton.Enabled = false; this.ApplyButton.ForeColor = System.Drawing.Color.Black; - this.ApplyButton.Location = new System.Drawing.Point(592, 53); - this.ApplyButton.Margin = new System.Windows.Forms.Padding(4); + this.ApplyButton.Location = new System.Drawing.Point(666, 66); + this.ApplyButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ApplyButton.Name = "ApplyButton"; - this.ApplyButton.Size = new System.Drawing.Size(118, 28); + this.ApplyButton.Size = new System.Drawing.Size(133, 35); this.ApplyButton.TabIndex = 36; this.ApplyButton.Text = "Test settings"; this.ApplyButton.UseVisualStyleBackColor = true; @@ -1912,10 +1921,10 @@ private void InitializeComponent() // newSlotButton // this.newSlotButton.ForeColor = System.Drawing.Color.Black; - this.newSlotButton.Location = new System.Drawing.Point(51, 503); - this.newSlotButton.Margin = new System.Windows.Forms.Padding(4); + this.newSlotButton.Location = new System.Drawing.Point(57, 629); + this.newSlotButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.newSlotButton.Name = "newSlotButton"; - this.newSlotButton.Size = new System.Drawing.Size(126, 40); + this.newSlotButton.Size = new System.Drawing.Size(142, 50); this.newSlotButton.TabIndex = 81; this.newSlotButton.Text = "New Slot"; this.newSlotButton.UseVisualStyleBackColor = true; @@ -1925,10 +1934,10 @@ private void InitializeComponent() // this.deleteSlotButton.ForeColor = System.Drawing.Color.Black; this.deleteSlotButton.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.deleteSlotButton.Location = new System.Drawing.Point(708, 503); - this.deleteSlotButton.Margin = new System.Windows.Forms.Padding(4); + this.deleteSlotButton.Location = new System.Drawing.Point(796, 629); + this.deleteSlotButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.deleteSlotButton.Name = "deleteSlotButton"; - this.deleteSlotButton.Size = new System.Drawing.Size(131, 40); + this.deleteSlotButton.Size = new System.Drawing.Size(147, 50); this.deleteSlotButton.TabIndex = 82; this.deleteSlotButton.Text = "Delete Slot"; this.deleteSlotButton.UseVisualStyleBackColor = true; @@ -1938,10 +1947,10 @@ private void InitializeComponent() // this.StoreButton.Enabled = false; this.StoreButton.ForeColor = System.Drawing.Color.Black; - this.StoreButton.Location = new System.Drawing.Point(715, 53); - this.StoreButton.Margin = new System.Windows.Forms.Padding(4); + this.StoreButton.Location = new System.Drawing.Point(804, 66); + this.StoreButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.StoreButton.Name = "StoreButton"; - this.StoreButton.Size = new System.Drawing.Size(118, 28); + this.StoreButton.Size = new System.Drawing.Size(133, 35); this.StoreButton.TabIndex = 83; this.StoreButton.Text = "Store settings"; this.StoreButton.UseVisualStyleBackColor = true; @@ -1952,10 +1961,10 @@ private void InitializeComponent() this.freeMemPanel.BackColor = System.Drawing.SystemColors.ButtonHighlight; this.freeMemPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.freeMemPanel.Enabled = false; - this.freeMemPanel.Location = new System.Drawing.Point(715, 89); + this.freeMemPanel.Location = new System.Drawing.Point(804, 111); this.freeMemPanel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.freeMemPanel.Name = "freeMemPanel"; - this.freeMemPanel.Size = new System.Drawing.Size(118, 26); + this.freeMemPanel.Size = new System.Drawing.Size(132, 32); this.freeMemPanel.TabIndex = 121; // // freeMemLabel @@ -1964,24 +1973,66 @@ private void InitializeComponent() this.freeMemLabel.BackColor = System.Drawing.Color.Transparent; this.freeMemLabel.Enabled = false; this.freeMemLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.freeMemLabel.Location = new System.Drawing.Point(592, 93); + this.freeMemLabel.Location = new System.Drawing.Point(666, 116); this.freeMemLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.freeMemLabel.Name = "freeMemLabel"; this.freeMemLabel.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.freeMemLabel.Size = new System.Drawing.Size(109, 17); + this.freeMemLabel.Size = new System.Drawing.Size(123, 20); this.freeMemLabel.TabIndex = 158; this.freeMemLabel.Text = "mem usage: 0%"; this.freeMemLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // general + // + this.general.BackColor = System.Drawing.SystemColors.ButtonFace; + this.general.Controls.Add(this.label50); + this.general.Controls.Add(this.label43); + this.general.Controls.Add(this.HIDComboBox); + this.general.Location = new System.Drawing.Point(4, 29); + this.general.Name = "general"; + this.general.Size = new System.Drawing.Size(878, 461); + this.general.TabIndex = 7; + this.general.Text = "General"; + // + // label50 + // + this.label50.AutoSize = true; + this.label50.Location = new System.Drawing.Point(128, 139); + this.label50.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label50.Name = "label50"; + this.label50.Size = new System.Drawing.Size(621, 20); + this.label50.TabIndex = 157; + this.label50.Text = "This setting defines if the mouse/keyboard activities are sent to USB, bluetooth " + + "or both "; + // + // label43 + // + this.label43.AutoSize = true; + this.label43.Location = new System.Drawing.Point(128, 95); + this.label43.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label43.Name = "label43"; + this.label43.Size = new System.Drawing.Size(172, 20); + this.label43.TabIndex = 156; + this.label43.Text = "USB / Bluetooth Mode:"; + // + // HIDComboBox + // + this.HIDComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.HIDComboBox.Location = new System.Drawing.Point(321, 92); + this.HIDComboBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.HIDComboBox.Name = "HIDComboBox"; + this.HIDComboBox.Size = new System.Drawing.Size(288, 28); + this.HIDComboBox.TabIndex = 155; + // // FabiGUI // this.AccessibleDescription = "FabiGUI"; this.AccessibleName = "FabiGUI"; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScroll = true; this.AutoSize = true; - this.ClientSize = new System.Drawing.Size(885, 681); + this.ClientSize = new System.Drawing.Size(996, 851); this.Controls.Add(this.freeMemLabel); this.Controls.Add(this.StoreButton); this.Controls.Add(this.deleteSlotButton); @@ -2001,7 +2052,7 @@ private void InitializeComponent() this.Controls.Add(this.menuStrip1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.menuStrip1; - this.Margin = new System.Windows.Forms.Padding(4); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "FabiGUI"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Fabi Settings Manager"; @@ -2035,6 +2086,8 @@ private void InitializeComponent() this.groupBox1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); + this.general.ResumeLayout(false); + this.general.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -2187,6 +2240,10 @@ private void InitializeComponent() private System.Windows.Forms.Label label16; private System.Windows.Forms.Panel freeMemPanel; private System.Windows.Forms.Label freeMemLabel; + private System.Windows.Forms.TabPage general; + private System.Windows.Forms.Label label50; + private System.Windows.Forms.Label label43; + private System.Windows.Forms.ComboBox HIDComboBox; } } diff --git a/FabiGUI_C#/MainGui.cs b/FabiGUI_C#/MainGui.cs index 721655b..29c7cda 100644 --- a/FabiGUI_C#/MainGui.cs +++ b/FabiGUI_C#/MainGui.cs @@ -29,7 +29,7 @@ namespace MouseApp2 { public partial class FabiGUI : Form { - const string VERSION_STRING = "2.3"; + const string VERSION_STRING = "2.5"; const int SPECIALMODE_CHANGE_STEP = 5; const int PRESSURE_CHANGE_STEP = 1; @@ -82,6 +82,8 @@ public void storeSlot(int slotNumber) case GUITYPE_INTFIELD: actSettingString+=(" "+guiLink.nud.Value); break; case GUITYPE_KEYSELECT: case GUITYPE_TEXTFIELD: actSettingString+=(" "+guiLink.tb.Text); break; + case GUITYPE_COMBO_ONLY: actSettingString += (" " + guiLink.cb.Text); break; + case GUITYPE_COMBO_INDEX: actSettingString += (" " + guiLink.cb.SelectedIndex); break; case GUITYPE_SLIDER: actSettingString += (" " + guiLink.tr.Value); break; case GUITYPE_BOOLEAN: if (guiLink.rb1.Checked) actSettingString += (" 1"); else actSettingString += (" 0"); @@ -113,6 +115,13 @@ public void displaySlot(int slotNumber) case GUITYPE_TEXTFIELD: actButtonLink.cb.SelectedIndex = allCommands.getSelectionIndex(cmd); strValue = settingString.Substring(6); actButtonLink.tb.Text = strValue; break; + case GUITYPE_COMBO_ONLY: + actButtonLink.cb.Text = settingString.Substring(6); + break; + case GUITYPE_COMBO_INDEX: + strValue = settingString.Substring(actButtonLink.cmd.Length + 1); + actButtonLink.cb.SelectedIndex = Int32.Parse(strValue); + break; case GUITYPE_SLIDER: actButtonLink.tr.Value = Int32.Parse(strValue); actButtonLink.tl.Text = strValue; break; case GUITYPE_STANDARD: actButtonLink.cb.SelectedIndex = allCommands.getSelectionIndex(cmd); @@ -144,6 +153,13 @@ public void displaySlot(int slotNumber) strValue = settingString.Substring(guiLink.cmd.Length + 1); guiLink.tr.Value = Int32.Parse(strValue); guiLink.tl.Text = strValue; break; + case GUITYPE_COMBO_ONLY: + guiLink.cb.Text = settingString.Substring(6); + break; + case GUITYPE_COMBO_INDEX: + strValue = settingString.Substring(guiLink.cmd.Length + 1); + guiLink.cb.SelectedIndex = Int32.Parse(strValue); + break; case GUITYPE_BOOLEAN: strValue = settingString.Substring(guiLink.cmd.Length + 1); int value= Int32.Parse(strValue); @@ -214,6 +230,12 @@ public FabiGUI() PuffComboBox.Items.Add(str); } + HIDComboBox.Items.Add("disable"); + HIDComboBox.Items.Add("USB HID only"); + HIDComboBox.Items.Add("Bluetooth HID only"); + HIDComboBox.Items.Add("both (USB + BT)"); + HIDComboBox.SelectedIndex = 2; + displaySlot(0); updateComPorts(); diff --git a/FabiGUI_C#/PortIO.cs b/FabiGUI_C#/PortIO.cs index fdc8b82..8d81786 100644 --- a/FabiGUI_C#/PortIO.cs +++ b/FabiGUI_C#/PortIO.cs @@ -156,12 +156,12 @@ public void gotEnd() public void gotID(String newLine) { - addToLog("Fabi detected:"); + addToLog("Fabi detected:" + newLine); fabiOnline = 1; slotNames.Items.Clear(); sendStartReportingCommand(); // start reporting raw values ! - DialogResult dialogResult = MessageBox.Show("Do you want to load the slots and settings which are stored in the Fabi device ?", "Load Settings ?", MessageBoxButtons.YesNo); + DialogResult dialogResult = MessageBox.Show("Detected "+newLine+"\nDo you want to load the slots and settings which are stored in the Fabi device ?", "Load Settings ?", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { loadSettingsFromFabi(); diff --git a/FabiWare/FabiWare.ino b/FabiWare/FabiWare.ino index e6cc2b3..2ae66a2 100644 --- a/FabiWare/FabiWare.ino +++ b/FabiWare/FabiWare.ino @@ -1,27 +1,24 @@ - + /* - Flexible Assistive Button Interface (FABI) Version 2.3 - AsTeRICS Foundation - http://www.asterics-foundation.org - allows control of HID functions via momentary switches and/or AT-commands - + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI - requirements: USB HID capable Arduino (Leonardo / Micro / Pro Micro) - see #define in fabi.h ! - or Teensy 2.0++ with Teensyduino AddOn setup as USB composite device (Mouse + Keyboard + Serial) - optional: Momentary switches connected to GPIO pins / force sensors connected to ADC pins - - for a list of supported AT commands, see commands.h / commands.cpp + Module: FabiWare.ino - initialisation and main loop + (for a list of supported AT-commands see commands.h) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html */ - #include "fabi.h" #include - - #include #include #include #include // WS2812 ("NeoPixel") Lib - #include "display.h" // global variables @@ -52,7 +49,7 @@ struct settingsType settings = { // type definition see fabi.h "slot1", DEFAULT_WHEEL_STEPSIZE, DEFAULT_TRESHOLD_TIME, DEFAULT_SIP_THRESHOLD, DEFAULT_PUFF_THRESHOLD, - DEFAULT_ANTITREMOR_PRESS, DEFAULT_ANTITREMOR_RELEASE, DEFAULT_ANTITREMOR_IDLE + DEFAULT_ANTITREMOR_PRESS, DEFAULT_ANTITREMOR_RELEASE, DEFAULT_ANTITREMOR_IDLE, DEFAULT_BT_MODE }; @@ -143,15 +140,10 @@ void setup() { pinMode(PCB_checkPin, INPUT_PULLUP); if(!digitalRead(PCB_checkPin)){ //PCB Version detected - #ifdef DEBUG_OUTPUT - Serial.println("FABi PCB Version"); - #endif + #ifdef DEBUG_OUTPUT + Serial.println("FABi PCB Version"); + #endif - //Serial.end(); // end USB Serial; causing problems if both active! - - /*Serial1.begin(9600); //start HW UART on TX and RX Pins - while (! Serial1); -*/ PCBversion = 1; memcpy(input_map, input_map_PCB, NUMBER_OF_PHYSICAL_BUTTONS+1); @@ -161,7 +153,6 @@ void setup() { _delay_ms(150); digitalWrite(buzzerPIN, LOW); delay(150); - //NeoPixel: pixels.setOutput(PIXELS_PIN); @@ -176,8 +167,7 @@ void setup() { for(uint8_t i = 0; i < 60; i++){ pixColor.r = i; pixels.set_crgb_at(0, pixColor); - pixels.sync(); - + pixels.sync(); delay(10); } @@ -185,7 +175,6 @@ void setup() { initDisplay(); digitalWrite(buzzerPIN, HIGH); - for(uint8_t i = 60; i > 50; i--){ pixColor.r = i; pixels.set_crgb_at(0, pixColor); @@ -195,7 +184,6 @@ void setup() { digitalWrite(buzzerPIN, LOW); neoPix_r = 1; - Serial1.begin(9600); // start HW-Pin-Serial (used for communication with Addon) //while(!Serial1); @@ -205,12 +193,11 @@ void setup() { // no PCB Version: pinMode(LED_PIN,OUTPUT); - for (int i=0; i 0) { - // get incoming byte: - inByte = Serial.read(); - parseByte (inByte); // implemented in parser.cpp - } + while (Serial.available() > 0) { + // get incoming byte: + inByte = Serial.read(); + parseByte (inByte); // implemented in parser.cpp } - else if(PCBversion == 1){ - while (Serial.available() > 0) { - // get incoming byte: - inByte = Serial.read(); - parseByte (inByte); // implemented in parser.cpp - } - /* - while (Serial1.available() > 0) { - // get incoming byte: - inByte = Serial1.read(); - parseByte (inByte); // implemented in parser.cpp - } - */ - } + //if incoming serial data on the addon board is available, + //just forward it to the host serial interface. + while (Serial1.available() > 0) { Serial.write(Serial1.read()); } for (int i=0;i0) handleButton(SIP_BUTTON, -1, pressure < settings.ts ? BUTTON_PRESSED : BUTTON_RELEASED); if (settings.tp<1023) handleButton(PUFF_BUTTON, -1, pressure > settings.tp ? BUTTON_PRESSED : BUTTON_RELEASED); - if (moveX==0) moveXcnt=0; if (moveY==0) moveYcnt=0; @@ -307,7 +272,7 @@ void loop() { if (moveX!=0) if (moveXcnt 10) { // report raw values ! Serial.print("VALUES:");Serial.print(pressure);Serial.println(","); @@ -355,15 +316,17 @@ void loop() { } }*/ - - if(PCBversion){ - if(beepCounter > 0){ //tone + + // TBD: isn't the resulting tone frequency much too low ? (note the delay at the end of the main loop ...) + // TBD: extra .cpp file for neopixels / buzzer ? + + if(beepCounter > 0){ // tone if(beepTime > BEEP_duration){ digitalWrite(buzzerPIN, HIGH); beepTime--; } - else if(beepTime > 0){ //no tone + else if(beepTime > 0){ // no tone digitalWrite(buzzerPIN, LOW); beepTime--; } @@ -392,16 +355,12 @@ void loop() { //pixels.show(); dimmLEDcounter++; } - - - } else{ UpdateLeds(); } - - + // TBD !! /* //we need a workaround for different clock settings on Arduino Pro Micro boards. @@ -429,7 +388,6 @@ void loop() { #endif */ - delay(waitTime); } @@ -504,12 +462,13 @@ void initDebouncers() void release_all() // releases all previously pressed keys { // Serial.println("release all!"); - Keyboard.releaseAll(); + keyboardReleaseAll(); //Keyboard.releaseAll(); leftMouseButton=0; rightMouseButton=0; middleMouseButton=0; moveX=0; moveY=0; + initDebouncers(); } @@ -538,7 +497,7 @@ void handleButton(int i, int l, uint8_t actState) buttonDebouncers[i].pressState=BUTTONSTATE_SHORT_PRESSED; } if ((buttonDebouncers[i].pressCount==settings.tt>>2) && (settings.tt<5000) && (l>=0) && (l not working + Serial_AUX.write((uint8_t)0x00); + //some additional bytes... + Serial_AUX.write((uint8_t)0x00); + Serial_AUX.write((uint8_t)0x00); + + sendCnt = 0; + accuX = 0; accuY = 0; + oldMouseButtons = activeMouseButtons; + } +} + +/** + @name mouseBTPress + @param mousebutton uint8_t contains all buttons to be pressed (masked): (1<<0) left; (1<<1) right; (1<<2) middle + @return none +*/ +void mouseBTPress(uint8_t mousebutton) +{ + activeMouseButtons |= mousebutton; + //update buttons without sending relative data for x/y/wheel + mouseBT(0, 0, 0); +} + +/** + @name mouseBTRelease + @param mousebutton uint8_t contains all buttons to be release (masked): (1<<0) left; (1<<1) right; (1<<2) middle + @return none +*/ +void mouseBTRelease(uint8_t mousebutton) +{ + activeMouseButtons &= ~mousebutton; + //update buttons without sending relative data for x/y/wheel + mouseBT(0, 0, 0); +} + +/** + @name isMouseBTPressed + @param mousebutton buttons which should be polled + @return boolan +*/ +boolean isMouseBTPressed(uint8_t mousebutton) +{ + if (activeMouseButtons & mousebutton) return true; + return false; +} + + +/** + + name: sendBTKeyboardReport + @param none + @return none + + Sends a full keyboard report where all keys contained in activeKeyCodes + and activeModifierKeys will be sent + + @todo Should we send with a different API here when upgrading to ESP32miniBT v0.2? +*/ +void sendBTKeyboardReport() +{ +#ifdef DEBUG_OUTPUT_FULL + Serial.println("BT keyboard actions:"); + Serial.print("modifier: 0x"); + Serial.println(activeModifierKeys, HEX); + Serial.println("activeKeyCodes: "); + Serial.println(activeKeyCodes[0], HEX); + Serial.println(activeKeyCodes[1], HEX); + Serial.println(activeKeyCodes[2], HEX); + Serial.println(activeKeyCodes[3], HEX); + Serial.println(activeKeyCodes[4], HEX); + Serial.println(activeKeyCodes[5], HEX); +#endif + + Serial_AUX.write(0xFD); //raw HID + Serial_AUX.write(activeModifierKeys); //modifier keys + Serial_AUX.write(0x00); + Serial_AUX.write(activeKeyCodes[0]); //key 1 + Serial_AUX.write(activeKeyCodes[1]); //key 2 + Serial_AUX.write(activeKeyCodes[2]); //key 3 + Serial_AUX.write(activeKeyCodes[3]); //key 4 + Serial_AUX.write(activeKeyCodes[4]); //key 5 + Serial_AUX.write(activeKeyCodes[5]); //key 6 +} + +/** + + name: keyboardBTPress + @param int key Keycode which should be pressed. Keycodes are in Teensy format + @return none + + Press a defined key code. + keycodes and modifier codes are extracted and sent to EZ-Key module via UART + for keylayouts see: https://github.com/PaulStoffregen/cores/blob/master/teensy/keylayouts.h +*/ +void keyboardBTPress(int key) +{ + uint8_t currentIndex = 0; + uint8_t keyCode = (uint8_t)(key & 0xff); + + if ((key >> 8) == 0xE0) // supported modifier key ? + { + // set bit in modifier key mask + activeModifierKeys |= keyCode; + } else if ((key >> 8) == 0xF0) { // supported key ? + // check the active key codes for a free slot or overwrite the last one + while ((activeKeyCodes[currentIndex] != 0) && (activeKeyCodes[currentIndex] != keyCode) && (currentIndex < 6)) + currentIndex++; + //set the key code to the array + activeKeyCodes[currentIndex] = keyCode; + } + + //send the new keyboard report + sendBTKeyboardReport(); +} + +/** + + name: keyboardBTRelease + @param int key Keycode which should be released. Keycodes are in Teensy format (16bit, divided into consumer keys, systemkeys & keyboard keys) + @return none + + Release a defined key code. +*/ +void keyboardBTRelease(int key) +{ + uint8_t currentIndex = 0; + uint8_t keyCode = (uint8_t)(key & 0xff); + + if ((key >> 8) == 0xE0) // supported modifier key (see Teensy keylayouts.h) + { + // clear bit in modifier key mask + activeModifierKeys &= ~keyCode; + } else { + //if not, check the active key codes for the pressed key + while ((activeKeyCodes[currentIndex] != keyCode) && (currentIndex < 6)) currentIndex++; + //delete the key code from the array + for (int i = currentIndex; i < 5; i++) + activeKeyCodes[i] = activeKeyCodes[i + 1]; + activeKeyCodes[5] = 0; + } + + //send the new keyboard report + sendBTKeyboardReport(); +} + +/** + + name: keyboardBTReleaseAll + @param none + @return none + + Release all previous pressed keyboard keys +*/ +void keyboardBTReleaseAll() +{ + //reset all activeKeyCodes to 0x00 + for (uint8_t i = 0; i <= 5; i++) activeKeyCodes[i] = 0; + //reset all modifier keys + activeModifierKeys = 0; + //send a keyboard report (now empty) + sendBTKeyboardReport(); +} + + +/** + + name: keyboardBTPrint + @param char* writeString string to typed by the Bluetooth HID keyboard + @return none + + This method prints out an ASCII string (no modifiers available!!!) via the + Bluetooth module + + @todo We should use the keyboard maps from ESP32, can store all of them. But how to handle any multibyte strings? +*/ +void keyboardBTPrint(char * writeString) +{ + uint16_t i = 0; + + // print each char of the string + while (writeString[i]) + { + // Serial_AUX.write(writeString[i++]); + + // improved for localization / keycodes (but: slower ...) + + int keycode = 0, modifier = 0; + + // Serial.print("key ="); Serial.print(writeString[i]); + if (writeString[i] < 128) { // ASCII + // Serial.print(" ASCII ="); Serial.println((int)writeString[i]); + + //keycode = pgm_read_byte(keycodes_ascii + (writeString[i] - 0x20)); + keycode = writeString[i]; // TBD!! + } + else { // ISO_8859 +#ifdef ISO_8859_1_A0 + // Serial.print(" ISO_8859 ="); Serial.println((int)writeString[i]); + // keycode = pgm_read_byte(keycodes_iso_8859_1 + (writeString[i] - 0xA0)); + keycode = writeString[i]; // TBD!! +#endif + } + + if (keycode & 0x40) { // SHIFT + // Serial.print("SHIFT+"); + keycode &= ~0x40; + modifier = 0xe002; + } else if (keycode & 0x80) { // ALTGR + // Serial.print("ALTGR+"); + keycode &= ~0x80; + modifier = 0xe040; + } + // Serial.print("HID ="); + // Serial.println(keycode); + + if (modifier) keyboardBTPress(modifier); + keyboardBTPress(keycode | 0xf000); + keyboardBTRelease(keycode | 0xf000); + if (modifier) keyboardBTRelease(modifier); + i++; + } +} + +/** + + name: initBluetooth + @param none + @return none + + Initialize the Bluetooth module on the external serial port. + If the module returns a valid version string, BT communication is + enabled (bt_enable is set to 1). + + @see bt_enable + +*/ +void initBluetooth() +{ +#ifdef DEBUG_OUTPUT_FULL + Serial.println("init Bluetooth"); +#endif + + //start the AUX serial port 9600 8N1 + Serial_AUX.begin(9600); + bt_available = 1; + + ///@todo send identifier to BT module & check response. With BT addon this is much faster and reliable + bt_esp32addon = EZKEY; + Serial_AUX.println("$ID"); +} + +/** + + name: isBluetoothAvailable + @param none + @return true, if the BT module is available, false if not + + This method returns true, if the BT module is available and delivered + a valid version string + False will be returned otherwise +*/ +bool isBluetoothAvailable() +{ + return bt_available; +} + +/** + + name: startBTPairing + @param none + @return none + @note Not implemented +*/ +bool startBTPairing() +{ + //we will send a command to the BT addon board here. + ///@todo which command & implement on BT addon + return true; +} diff --git a/FabiWare/bluetooth.h b/FabiWare/bluetooth.h new file mode 100644 index 0000000..97ed28f --- /dev/null +++ b/FabiWare/bluetooth.h @@ -0,0 +1,143 @@ +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: bluetooth.h - using external Bluetooth addon for mouse/keyboard control + Copyright (c) Benjamin Aigner + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ + +#ifndef _BLUETOOTH_H_ +#define _BLUETOOTH_H_ + +#include "fabi.h" + + +//RX/TX3 are used to communicate with an addon board (mounted on AUX header) +#define Serial_AUX Serial3 + +/** + + name: mouseBT + @þaram x relative movement x axis + @þaram y relative movement y axis + @þaram scroll relative scroll actions + @return + + this method sends a mouse command via the Bluetooth module. + Mouse movements, buttons and scroll wheel. + The limit for the movement is +127/-127 +*/ +void mouseBT(int x, int y, uint8_t scroll); + + +/** + @name mouseBTPress + @param mousebutton uint8_t contains all buttons to be pressed (masked): (1<<0) left; (1<<1) right; (1<<2) middle + @return none +*/ +void mouseBTPress(uint8_t mousebutton); + +/** + @name mouseBTRelease + @param mousebutton uint8_t contains all buttons to be release (masked): (1<<0) left; (1<<1) right; (1<<2) middle + @return none +*/ +void mouseBTRelease(uint8_t mousebutton); + + +/** + @name isMouseBTPressed + @param mousebutton buttons which should be polled + @return boolan +*/ +boolean isMouseBTPressed(uint8_t mousebutton); + +/** + + name: initBluetooth + @param none + @return none + + Initialize the Bluetooth module on the external serial port. + If the module returns a valid version string, BT communication is + enabled (bt_enable is set to 1). + + @see bt_enable + +*/ +void initBluetooth(); + +/** + + name: keyboardBTPrint + @param char* writeString string to typed by the Bluetooth HID keyboard + @return none + + This method prints out an ASCII string (no modifiers available!!!) via the + Bluetooth module + + @todo We should use the keyboard maps from ESP32, can store all of them. But how to handle any multibyte strings? +*/ +void keyboardBTPrint(char * writeString); + +/** + + name: keyboardBTReleaseAll + @param none + @return none + + Release all previous pressed keyboard keys +*/ +void keyboardBTReleaseAll(); + +/** + + name: keyboardBTPress + @param int key Keycode which should be pressed. Keycodes are in Teensy format + @return none + + Press a defined key code. + keycodes and modifier codes are extracted and sent to EZ-Key module via UART + for keylayouts see: https://github.com/PaulStoffregen/cores/blob/master/teensy/keylayouts.h +*/ +void keyboardBTPress(int key); + +/** + + name: keyboardBTRelease + @param int key Keycode which should be released. Keycodes are in Teensy format (16bit, divided into consumer keys, systemkeys & keyboard keys) + @return none + + Release a defined key code. +*/ +void keyboardBTRelease(int key); + +/** + + name: isBluetoothAvailable + @param none + @return true, if the BT module is available, false if not + + This method returns true, if the BT module is available and delivered + a valid version string + False will be returned otherwise +*/ +bool isBluetoothAvailable(); + +/** + + name: startBTPairing + @param none + @return none + @note Not implemented +*/ +bool startBTPairing(); + + +#endif diff --git a/FabiWare/commands.cpp b/FabiWare/commands.cpp index d3b2aca..04261a4 100644 --- a/FabiWare/commands.cpp +++ b/FabiWare/commands.cpp @@ -1,6 +1,19 @@ -#include "fabi.h" +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: commands.cpp - AT command processing + (for a list of supported AT-commands see commands.h) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ +#include "fabi.h" const struct atCommandType atCommands[] PROGMEM = { {"ID" , PARTYPE_NONE }, {"BM" , PARTYPE_UINT }, {"CL" , PARTYPE_NONE }, {"CR" , PARTYPE_NONE }, @@ -13,7 +26,7 @@ const struct atCommandType atCommands[] PROGMEM = { {"SR" , PARTYPE_NONE }, {"ER" , PARTYPE_NONE }, {"TS" , PARTYPE_UINT }, {"TP" , PARTYPE_UINT }, {"MA" , PARTYPE_STRING},{"WA" , PARTYPE_UINT }, {"TT" , PARTYPE_UINT }, {"AP" , PARTYPE_UINT }, {"AR" , PARTYPE_UINT}, {"AI" , PARTYPE_UINT }, - {"FR" , PARTYPE_NONE } + {"FR" , PARTYPE_NONE }, {"BT" , PARTYPE_UINT }, {"BC" , PARTYPE_STRING} }; void printCurrentSlot() @@ -26,6 +39,7 @@ void printCurrentSlot() Serial.print(F("AT AP ")); Serial.println(settings.ap); Serial.print(F("AT AR ")); Serial.println(settings.ar); Serial.print(F("AT AI ")); Serial.println(settings.ai); + Serial.print(F("AT BT ")); Serial.println(settings.bt); for (int i=0;i 0) - Serial1.print('a'); - else - Serial1.print('d'); + else mouseMove(parNum, 0); break; case CMD_MY: #ifdef DEBUG_OUTPUT @@ -204,12 +202,8 @@ void performCommand (uint8_t cmd, int16_t parNum, char * parString, int8_t perio Serial.println(parNum); #endif if (periodicMouseMovement) moveY=parNum; - else Mouse.move(0, parNum); + else mouseMove(0, parNum); - if(parNum > 0) - Serial1.print('s'); - else - Serial1.print('w'); break; case CMD_KW: #ifdef DEBUG_OUTPUT @@ -288,21 +282,9 @@ void performCommand (uint8_t cmd, int16_t parNum, char * parString, int8_t perio if(PCBversion){ updateSlot(actSlot); // update the Slot color of the LED - setBeepCount(actSlot); // set some beep count -> time (dependend on loop time) - writeSlot2Display(); //update the info on the Display } - - - //write2Display(settings.slotname); -/* - write2Display("Slot:"); - write2Display(settings.slotname, 28, 1); - -*/ - - // write2Display("no", 28, 0); reportSlotParameters=REPORT_NONE; break; @@ -390,6 +372,12 @@ void performCommand (uint8_t cmd, int16_t parNum, char * parString, int8_t perio Serial.print(F("FREE EEPROM (%):")); Serial.println((int)((uint32_t) freeEEPROMbytes * 100 / EEPROM_SIZE)); break; - + case CMD_BT: + settings.bt = parNum; + break; + case CMD_BC: + Serial1.write(parString); + Serial1.write('\n'); //terminate command + break; } } diff --git a/FabiWare/commands.h b/FabiWare/commands.h index bcfa694..0402a35 100644 --- a/FabiWare/commands.h +++ b/FabiWare/commands.h @@ -1,20 +1,28 @@ - /* - - Supported AT-commands: - (sent via serial interface, 115200 baud, using spaces between parameters. Enter (, ASCII-code 0x0d) finishes a command) +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: commands.h - AT command processing + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + + + Supported AT-commands: + (sent via serial interface, 115200 baud, using spaces between parameters. Enter (, ASCII-code 0x0d) finishes a command) AT returns "OK" AT ID returns identification string (e.g. "Fabi V2.3") AT BM puts button into programming mode (e.g. "AT BM 2" -> next AT-command defines the new function for button 2) - for the FABI, there are 11 buttons available (9 physical buttons, 2 virtual functions - sip / puff) - + for the FABI, there are 11 buttons available (9 physical buttons, 2 virtual functions - sip / puff) AT MA execute a command macro containing multiple commands (separated by semicolon) example: "AT MA MX 100;MY 100;CL;" use backslash to mask semicolon: "AT MA KW \;;CL;" writes a semicolon and then clicks left AT WA wait (given in milliseconds, useful for macro commands) - Commands for changing settings: - + Commands for changing settings: AT WS set mouse wheel stepsize (e.g. "AT WS 3" sets the wheel stepsize to 3 rows) AT TS threshold for sip action (0-512) AT TP threshold for puff action (512-1023) @@ -23,8 +31,7 @@ AT AR antitremor release time (1-500) AT AI antitremor idle time (1-500) - USB HID commands: - + USB HID commands: AT CL click left mouse button AT CR click right mouse button AT CM click middle mouse button @@ -53,7 +60,6 @@ AT RA release all: releases all currently pressed keys and buttons Housekeeping commands: - AT SA save settings and current button modes to slot under given name a new slot will be appended (e.g. AT SA mouse1) AT LO load button modes from eeprom slot (e.g. AT LO mouse1 -> loads profile named "mouse1") @@ -65,23 +71,29 @@ AT SR start periodic reporting analog values (A0) over serial (starting with "VALUES:") AT ER end reporting analog values AT FR report free EEPROM bytes in % (starting with "FREE:") - + AT BT set bluetooth mode, 1=USB only, 2=BT only, 3=both(default) + (e.g. AT BT 2 -> send HID commands only via BT if BT-daughter board is available) + AT BC sends parameter to external UART (mostly ESP32 Bluetooth Addon) supported key identifiers for key press command (AT KP): KEY_A KEY_B KEY_C KEY_D KEY_E KEY_F KEY_G KEY_H KEY_I KEY_J KEY_K KEY_L KEY_M KEY_N KEY_O KEY_P KEY_Q KEY_R KEY_S KEY_T KEY_U KEY_V KEY_W KEY_X KEY_Y KEY_Z KEY_1 KEY_2 KEY_3 KEY_4 KEY_5 KEY_6 KEY_7 KEY_8 KEY_9 KEY_0 - KEY_F1 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 KEY_F8 KEY_F9 KEY_F10 KEY_F11 KEY_F12 + KEY_F1 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 KEY_F8 KEY_F9 KEY_F10 KEY_F11 KEY_F12 KEY_F13 KEY_F14 KEY_F15 KEY_F16 KEY_F17 KEY_F18 KEY_F19 KEY_F20 KEY_F21 KEY_F22 KEY_F23 KEY_F24 - KEY_RIGHT KEY_LEFT KEY_DOWN KEY_UP KEY_ENTER KEY_ESC KEY_BACKSPACE KEY_TAB - KEY_HOME KEY_PAGE_UP KEY_PAGE_DOWN KEY_DELETE KEY_INSERT KEY_END KEY_NUM_LOCK KEY_SCROLL_LOCK + KEY_RIGHT KEY_LEFT KEY_DOWN KEY_UP KEY_ENTER KEY_ESC KEY_BACKSPACE KEY_TAB + KEY_HOME KEY_PAGE_UP KEY_PAGE_DOWN KEY_DELETE KEY_INSERT KEY_END KEY_NUM_LOCK KEY_SCROLL_LOCK KEY_SPACE KEY_CAPS_LOCK KEY_PAUSE KEY_SHIFT KEY_CTRL KEY_ALT KEY_RIGHT_ALT KEY_GUI KEY_RIGHT_GUI - + */ + + + + #ifndef _COMMANDS_H_ #define _COMMANDS_H_ @@ -92,7 +104,7 @@ enum atCommands { CMD_ID, CMD_BM, CMD_CL, CMD_CR, CMD_CM, CMD_CD, CMD_PL, CMD_PR, CMD_PM, CMD_RL, CMD_RR, CMD_RM, CMD_WU, CMD_WD, CMD_WS, CMD_MX, CMD_MY, CMD_KW, CMD_KP, CMD_KR, CMD_RA, CMD_SA, CMD_LO, CMD_LA, CMD_LI, CMD_NE, CMD_DE, CMD_NC, CMD_SR, CMD_ER, CMD_TS, CMD_TP, CMD_MA, CMD_WA, - CMD_TT, CMD_AP, CMD_AR, CMD_AI, CMD_FR, NUM_COMMANDS + CMD_TT, CMD_AP, CMD_AR, CMD_AI, CMD_FR, CMD_BT, CMD_BC, NUM_COMMANDS }; #endif diff --git a/FabiWare/display.cpp b/FabiWare/display.cpp index 8757780..e450ac2 100644 --- a/FabiWare/display.cpp +++ b/FabiWare/display.cpp @@ -1,4 +1,17 @@ +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: display.cpp - I2C display control + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ + #include "fabi.h" #include "display.h" @@ -20,4 +33,4 @@ void writeSlot2Display(){ ssd1306_printFixed(0, 0, "Slot:", STYLE_NORMAL); ssd1306_printFixed(0, 20, settings.slotname, STYLE_BOLD); -} \ No newline at end of file +} diff --git a/FabiWare/display.h b/FabiWare/display.h index 1240155..fadf8f8 100644 --- a/FabiWare/display.h +++ b/FabiWare/display.h @@ -1,3 +1,17 @@ + +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: display.cpp - I2C display control + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ + #ifndef _DISPLAY_H_ #define _DISPLAY_H_ diff --git a/FabiWare/eeprom.cpp b/FabiWare/eeprom.cpp index f9f216b..640f513 100644 --- a/FabiWare/eeprom.cpp +++ b/FabiWare/eeprom.cpp @@ -1,7 +1,21 @@ + +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: eeprom.cpp - load/store settings to/from eeprom + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ + #include "fabi.h" #include -#define SLOT_VALID 0x23 +#define SLOT_VALID 0x42 int nextSlotAddress=0; int EmptySlotAddress = 0; diff --git a/FabiWare/fabi.h b/FabiWare/fabi.h index 86b2636..17f247a 100644 --- a/FabiWare/fabi.h +++ b/FabiWare/fabi.h @@ -1,19 +1,16 @@ /* - Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org - allows control of HID functions via switches and/or AT-commands - - - requirements: Arduino (Pro) Micro or Teensy2.0++ with Teensyduino AddOn for Arduino IDE - (Teensy USB type set to USB composite device: Serial + Keyboard + Mouse + Joystick) - sensors: up to 9 momentary switches connected to GPIO pins - optional pressure sensor connected to ADC pin A0 for sip/puff actions - - - for a list of supported AT commands, see commands.h / commands.cpp - - */ - + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: eeprom.cpp - load/store settings to/from eeprom + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ #ifndef _FABI_H_ #define _FABI_H_ @@ -23,9 +20,10 @@ #include #include #include "commands.h" +#include "bluetooth.h" +#include "hid_hal.h" - -#define VERSION_STRING "FABI v2.3" +#define VERSION_STRING "FABI v2.5" //#define DEBUG_OUTPUT // if debug output is desired //#define TEENSY // if a Teensy2.0++ controller is used @@ -68,6 +66,8 @@ #define DEFAULT_ANTITREMOR_PRESS 5 // debouncing interval for button-press #define DEFAULT_ANTITREMOR_RELEASE 2 // debouncing interval for button-release #define DEFAULT_ANTITREMOR_IDLE 1 // debouncing interval for button idle time +#define DEFAULT_BT_MODE 1 // USB HID only + #define DEFAULT_TRESHOLD_TIME 5000 // treshold time for short / long press (5000: disable long press) #define BUTTON_PRESSED 1 #define BUTTON_RELEASED 0 @@ -85,6 +85,8 @@ struct settingsType { uint16_t ap; // antitremor press time uint16_t ar; // antitremor release time uint16_t ai; // antitremor idle time + uint8_t bt; // bt-mode (0,1,2) + }; struct atCommandType { // holds settings for a button function @@ -164,7 +166,6 @@ void release_all(); // releases all previously pressed keys and butto #define strcmp_FM strcmp_PF typedef uint_farptr_t uint_farptr_t_FM; -#endif // fabi logo for 128x32 OLED screen; height:32px widht: 55px @@ -194,4 +195,7 @@ const unsigned char FABIlogo [] PROGMEM = { 0x70, 0x00, 0x06, 0xFC, 0x07, 0x83, 0x19, 0x0F, 0x00, 0x03, 0x3C, 0x8E, 0x81, 0x19, 0x00, 0x00, 0x03, 0x0E, 0x8C, 0xC1, 0x18, 0x00, 0x00, 0x03, 0x06, 0x9C, 0x71, 0x38, 0x00, 0x00, 0x03, 0x02, 0x98, 0x3D, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; \ No newline at end of file + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + + + #endif diff --git a/FabiWare/hid_hal.cpp b/FabiWare/hid_hal.cpp new file mode 100644 index 0000000..1163200 --- /dev/null +++ b/FabiWare/hid_hal.cpp @@ -0,0 +1,137 @@ +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: hid_hal.cpp - covers USB HID and BT HID send routines + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ + + +#include "hid_hal.h" + +void mouseRelease(uint8_t button) +{ + if (settings.bt & 1) + Mouse.release(button); + + if ((settings.bt & 2) && (isBluetoothAvailable())) + mouseBTRelease(button); +} + +void mousePress(uint8_t button) +{ + if (settings.bt & 1) + Mouse.press(button); + + if ((settings.bt & 2) && (isBluetoothAvailable())) + mouseBTPress(button); +} + +void mouseToggle(uint8_t button) +{ + if (settings.bt & 1) { + if (Mouse.isPressed(button)) + Mouse.release(button); else Mouse.press(button); + } + + if ((settings.bt & 2) && (isBluetoothAvailable())) { + if (isMouseBTPressed(button)) + mouseBTRelease(button); else mouseBTPress(button); + } +} + + +void mouseScroll(int8_t steps) +{ + if (settings.bt & 1) + #ifdef ARDUINO_PRO_MICRO + Mouse.move(0,0,steps); + #else + Mouse.scroll(steps); + #endif + + if ((settings.bt & 2) && (isBluetoothAvailable())) + mouseBT(0, 0, steps); +} + +void mouseMove(int x, int y) +{ + while (x < -128) { + if (settings.bt & 1) + Mouse.move(-128, 0); + if ((settings.bt & 2) && (isBluetoothAvailable())) + mouseBT(-128, 0, 0); + x += 128; + } + while (x > 127) { + if (settings.bt & 1) + Mouse.move(127, 0); + if ((settings.bt & 2) && (isBluetoothAvailable())) + mouseBT(127, 0, 0); + x -= 127; + } + + while (y < -128) { + if (settings.bt & 1) + Mouse.move(0, -128); + if ((settings.bt & 2) && (isBluetoothAvailable())) + mouseBT(0, -128, 0); + y += 128; + } + while (y > 127) { + if (settings.bt & 1) + Mouse.move(0, 127); + if ((settings.bt & 2) && (isBluetoothAvailable())) + mouseBT(0, 127, 0); + y -= 127; + } + + if (settings.bt & 1) + Mouse.move(x, y); + if ((settings.bt & 2) && (isBluetoothAvailable())) + mouseBT(x, y, 0); +} + +void keyboardPrint(char * keystring) +{ + if (settings.bt & 1) { + //Keyboard.print(keystring); // improved for ISO 8859 compatibility (but: slower ..) + for (int i = 0; i < strlen(keystring); i++) + { + Keyboard.press(keystring[i]); + Keyboard.release(keystring[i]); + } + } + + if ((settings.bt & 2) && (isBluetoothAvailable())) + keyboardBTPrint(keystring); // TODO: check ISO8859-compatibility +} + +void keyboardPress(int key) +{ + if (settings.bt & 1) + Keyboard.press(key); + if ((settings.bt & 2) && (isBluetoothAvailable())) + keyboardBTPress(key); +} + +void keyboardRelease(int key) +{ + if (settings.bt & 1) + Keyboard.release(key); + if ((settings.bt & 2) && (isBluetoothAvailable())) + keyboardBTRelease(key); +} + +void keyboardReleaseAll() +{ + if (settings.bt & 1) + Keyboard.releaseAll(); + if ((settings.bt & 2) && (isBluetoothAvailable())) + keyboardBTReleaseAll(); +} diff --git a/FabiWare/hid_hal.h b/FabiWare/hid_hal.h new file mode 100644 index 0000000..22d05ef --- /dev/null +++ b/FabiWare/hid_hal.h @@ -0,0 +1,116 @@ +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: hid_hal.h - covers USB HID and BT HID send routines + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ + + + +#ifndef _HID_HAL_H_ +#define _HID_HAL_H_ + +#include "fabi.h" + +/* + + name: keyboardPrint + @param char* keyString string to be typed by keyboard + @return none + + This method prints out an ASCII string (no modifiers available!) +*/ +void keyboardPrint(char * keyString); + +/* + + name: keyboardPress + @param int key keycode to be typed by keyboard + @return none + + This method presses a key of given keycode (modifiers available!) +*/ +void keyboardPress(int key); + +/* + + name: keyboardRelease + @param int key keycode to be released by keyboard + @return none + + This method releases a key of given keycode (modifiers available!) +*/ +void keyboardRelease(int key); + +/* + + name: keyboardReleaseAll + @param none + @return none + + This method releases all currently pressed keys +*/ +void keyboardReleaseAll(); + +/* + + name: mousePress + @param uint8_t button button code which should be pressed. + @return none + + Press a defined mouse button (MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE) +*/ +void mousePress(uint8_t button); + +/* + + name: mouseToggle + @param uint8_t button button code which should be toggled. + @return none + + Toggle a defined mouse button (MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE) +*/ +void mouseToggle(uint8_t button); + +/* + + name: mouseRelease + @param uint8_t button button code which should be released. + @return none + + Release a defined mouse button (MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE) +*/ +void mouseRelease(uint8_t button); + + +/* + + name: mouseScroll + @param int8_t steps steps to scroll. + @return none + + scrolls a number of steps +*/ +void mouseScroll(int8_t steps); + + +/* + + name: mouseMove + @param int x movement in x direction + @param int y movement in y direction + @return none + + moves the mouse cursor a defined nmber of steps. (if x or y are > 127, multiple HID commands are generated) +*/ +void mouseMove(int x, int y); + + + +#endif diff --git a/FabiWare/keys.cpp b/FabiWare/keys.cpp index fccbbfb..79f3b44 100644 --- a/FabiWare/keys.cpp +++ b/FabiWare/keys.cpp @@ -1,3 +1,15 @@ +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: keys.cpp - keyboard and keycode support + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ #include "fabi.h" #include @@ -209,7 +221,7 @@ void pressSingleKeys(char* keyNames) { int kc=getKeycode(singleKeyName); if (kc) { - Keyboard.press(kc); + keyboardPress(kc); // Serial.print ("press key "); Serial.println (kc); } keyNames+=len; @@ -225,7 +237,7 @@ void releaseSingleKeys (char * keyNames) while (len=getNextKeyName(keyNames,singleKeyName)) { int kc=getKeycode(singleKeyName); - if (kc) Keyboard.release(kc); + if (kc) keyboardRelease(kc); keyNames+=len; } } @@ -243,12 +255,12 @@ void writeTranslatedKeys(char * str, int len) // if (k&MOD_ALTGR) Serial.print("AltGr + "); if (k&MOD_SHIFT) Serial.print("Shift + "); // Serial.print((char)(k&0xff)); Serial.println(")"); - if (k&MOD_ALTGR) Keyboard.press(KEY_RIGHT_ALT); - if (k&MOD_SHIFT) Keyboard.press(KEY_LEFT_SHIFT); - Keyboard.press(k&0xff); - Keyboard.release(k&0xff); - if (k&MOD_SHIFT) Keyboard.release(KEY_LEFT_SHIFT); - if (k&MOD_ALTGR) Keyboard.release(KEY_RIGHT_ALT); + if (k&MOD_ALTGR) keyboardPress(KEY_RIGHT_ALT); + if (k&MOD_SHIFT) keyboardPress(KEY_LEFT_SHIFT); + keyboardPress(k&0xff); + keyboardRelease(k&0xff); + if (k&MOD_SHIFT) keyboardRelease(KEY_LEFT_SHIFT); + if (k&MOD_ALTGR) keyboardRelease(KEY_RIGHT_ALT); } } @@ -265,7 +277,10 @@ void sendToKeyboard(char * writeKeystring) //extract name of special key getNextKeyName(specialKeyLocation,singleKeyName); int kc=getKeycode(singleKeyName); - if (kc) Keyboard.write(kc); + if (kc) { + keyboardPress(kc); + keyboardRelease(kc); + } // continue after special key name actpos= specialKeyLocation+strlen(singleKeyName); specialKeyLocation=strstr(actpos,"KEY_"); diff --git a/FabiWare/parser.cpp b/FabiWare/parser.cpp index 2287241..55a3459 100644 --- a/FabiWare/parser.cpp +++ b/FabiWare/parser.cpp @@ -1,3 +1,16 @@ +/* + Flexible Assistive Button Interface (FABI) - AsTeRICS Foundation - http://www.asterics-foundation.org + for controlling HID functions via momentary switches and/or serial AT-commands + More Information: https://github.com/asterics/FABI + + Module: parser.cpp - serial command processing + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, see: + http://www.gnu.org/licenses/gpl-3.0.en.html + +*/ + #include "fabi.h" uint8_t get_uint(char * str, int16_t * result) @@ -78,7 +91,7 @@ void parseCommand (char * cmdstr) if (cmd>-1) performCommand(cmd,num,actpos,0); else if (!PCBversion) { - Serial.println('?'); + Serial.println('?'); // TBD: why was this removed in PCB Version? } } @@ -110,9 +123,6 @@ void parseByte (int newByte) // parse an incoming commandbyte from serial inter readstate=0; } else if(cmdlen