Skip to content

Commit 96e97fe

Browse files
committed
fixing the detected error
1 parent 1924379 commit 96e97fe

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

EDSEditorGUI2/ViewModels/DeviceOD.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void AddIndex(int index, string name, LibCanOpen.OdObject.Types.ObjectTyp
4040
var newObj = new OdObject
4141
{
4242
Name = name,
43-
Type = type
43+
ObjectType = type
4444
};
4545

4646
// create OD entry

EDSEditorGUI2/ViewModels/OdObject.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public partial class OdObject : ObservableObject
2222
string _description = string.Empty;
2323

2424
[ObservableProperty]
25-
LibCanOpen.OdObject.Types.ObjectType _type;
25+
LibCanOpen.OdObject.Types.ObjectType _objectType;
2626

2727
[ObservableProperty]
2828
string _countLabel = string.Empty;
@@ -41,13 +41,13 @@ public partial class OdObject : ObservableObject
4141
/// </summary>
4242
public OdSubObject? AddSubEntry(KeyValuePair<string, OdSubObject> selected)
4343
{
44-
if (Type == LibCanOpen.OdObject.Types.ObjectType.Var)
44+
if (ObjectType == LibCanOpen.OdObject.Types.ObjectType.Var)
4545
return null;
4646

4747
OdSubObject newOd;
4848

4949
//Do we need the type check??
50-
if ((SubObjects.Count == 0) && ((Type == LibCanOpen.OdObject.Types.ObjectType.Array) || (Type == LibCanOpen.OdObject.Types.ObjectType.Record)))
50+
if ((SubObjects.Count == 0) && ((ObjectType == LibCanOpen.OdObject.Types.ObjectType.Array) || (ObjectType == LibCanOpen.OdObject.Types.ObjectType.Record)))
5151
{
5252
SubObjects.Add(new KeyValuePair<string, OdSubObject>("0", new OdSubObject
5353
{
@@ -125,7 +125,7 @@ public partial class OdObject : ObservableObject
125125
/// <returns>true on successfull removal</returns>
126126
public bool RemoveSubEntry(KeyValuePair<string, OdSubObject> subObjectToRemove, bool renumber)
127127
{
128-
if (Type == LibCanOpen.OdObject.Types.ObjectType.Array || Type == LibCanOpen.OdObject.Types.ObjectType.Record)
128+
if (ObjectType == LibCanOpen.OdObject.Types.ObjectType.Array || ObjectType == LibCanOpen.OdObject.Types.ObjectType.Record)
129129
{
130130
UInt16 maxSubIndex = SubObjects[0].Value.DefaultValue.ToInteger();
131131
UInt16 lastSubIndex = SubObjects.Last().Key.ToInteger();

GUITests/ViewModels_OdObjects.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ViewModels_OdObjects()
4141
public void AddSubEntry_VarType()
4242
{
4343
sut = new OdObject();
44-
sut.Type = LibCanOpen.OdObject.Types.ObjectType.Var;
44+
sut.ObjectType = LibCanOpen.OdObject.Types.ObjectType.Var;
4545
sut.SubObjects.Add(new KeyValuePair<string, OdSubObject>("0", new OdSubObject
4646
{
4747
Name = "variableTest",
@@ -58,7 +58,7 @@ public void AddSubEntry_VarType()
5858
[Fact]
5959
public void AddSubEntry_RecordType()
6060
{
61-
sut.Type = LibCanOpen.OdObject.Types.ObjectType.Record;
61+
sut.ObjectType = LibCanOpen.OdObject.Types.ObjectType.Record;
6262
sut.AddSubEntry(sut.SubObjects[1]);
6363
Assert.Equal(4, sut.SubObjects.Count);
6464
Assert.Equal("0x03", sut.SubObjects[0].Value.DefaultValue);
@@ -70,7 +70,7 @@ public void AddSubEntry_RecordType()
7070
public void RemoveSubEntry_VarType(bool renumber)
7171
{
7272
sut = new OdObject();
73-
sut.Type = LibCanOpen.OdObject.Types.ObjectType.Var;
73+
sut.ObjectType = LibCanOpen.OdObject.Types.ObjectType.Var;
7474
sut.SubObjects.Add(new KeyValuePair<string, OdSubObject>("0x01", new OdSubObject
7575
{
7676
Name = "variableTest",
@@ -88,7 +88,7 @@ public void RemoveSubEntry_VarType(bool renumber)
8888
public void RemoveSubEntry_RecordType()
8989
{
9090
sut = new OdObject();
91-
sut.Type = LibCanOpen.OdObject.Types.ObjectType.Record;
91+
sut.ObjectType = LibCanOpen.OdObject.Types.ObjectType.Record;
9292
sut.SubObjects.Add(new KeyValuePair<string, OdSubObject>("0x00", new OdSubObject
9393
{
9494
Name = "variableTest0",

0 commit comments

Comments
 (0)