Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow editing of PDO mapping flag in subobjects #16

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions EDSTest/DeviceODView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ private void button_save_changes_Click(object sender, EventArgs e)
selectedobject.Description = textBox_description.Text;
selectedobject.defaultvalue = textBox_defaultvalue.Text;

if (comboBox_pdomap.Enabled)
{
selectedobject.PDOtype = (PDOMappingType)Enum.Parse(typeof(PDOMappingType), comboBox_pdomap.SelectedItem.ToString());
}

if (!(selectedobject.parent != null && selectedobject.parent.objecttype == ObjectType.ARRAY))
{

Expand All @@ -102,8 +107,6 @@ private void button_save_changes_Click(object sender, EventArgs e)
EDSsharp.AccessType at = (EDSsharp.AccessType)Enum.Parse(typeof(EDSsharp.AccessType), comboBox_accesstype.SelectedItem.ToString());
selectedobject.accesstype = at;

selectedobject.PDOtype = (PDOMappingType)Enum.Parse(typeof(PDOMappingType), comboBox_pdomap.SelectedItem.ToString());

selectedobject.AccessFunctionName = textBox_accessfunctionname.Text;
selectedobject.AccessFunctionPreCode = textBox_precode.Text;
selectedobject.Disabled = !checkBox_enabled.Checked;
Expand Down Expand Up @@ -218,6 +221,7 @@ public void validateanddisplaydata()
if (od.parent.objecttype == ObjectType.ARRAY && od.subindex != 0)
{
textBox_defaultvalue.Enabled = true;
comboBox_pdomap.Enabled = true;
}


Expand Down