Skip to content

Commit

Permalink
Fix numerous spellings in comments, strings and messages fixes #153
Browse files Browse the repository at this point in the history
  • Loading branch information
robincornelius committed Feb 1, 2019
1 parent 6261921 commit c97e4ec
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 92 deletions.
20 changes: 10 additions & 10 deletions EDSTest/DeviceODView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ private void button_save_changes_Click(object sender, EventArgs e)

if(selectedobject.parent == null && selectedobject.objecttype == ObjectType.ARRAY)
{
// Propogate changes through sub objects
// Propagate changes through sub objects
// We only really need to do this for PDOMapping to fix bug #13 see report
// on git hub for discussion why other parameters are not propogated here
// on git hub for discussion why other parameters are not propagated here
// tl;dr; Limitations of CanOpenNode object dictionary perms for sub array objects

foreach (KeyValuePair<UInt16,ODentry>kvp in selectedobject.subobjects)
Expand Down Expand Up @@ -227,8 +227,8 @@ private void button_save_changes_Click(object sender, EventArgs e)
}

//If we edit a parent REC object we also need to change the storage location of subobjects
//this does occur implicity anyway and it also occurs during load of file but the GUI was displaying
//incorrect data in the shaded combobox item for storage location
//this does occur implicitly anyway and it also occurs during load of file but the GUI was displaying
//incorrect data in the shaded combo box item for storage location
if (selectedobject.parent == null && selectedobject.objecttype == ObjectType.REC)
{
foreach (KeyValuePair<UInt16, ODentry> kvp in selectedobject.subobjects)
Expand Down Expand Up @@ -309,8 +309,8 @@ public void validateanddisplaydata()
}
}

//Bug#25 set the combobox text to be the same as the selected item as this does not happen automaticly
//when the combobox is disabled
//Bug#25 set the combo box text to be the same as the selected item as this does not happen automatically
//when the combo box is disabled
if (comboBox_datatype.SelectedItem!=null)
comboBox_datatype.Text = comboBox_datatype.SelectedItem.ToString();

Expand Down Expand Up @@ -371,7 +371,7 @@ public void validateanddisplaydata()
return; //nothing else to do at this point
}

//protect eveything as default
//protect everything as default
textBox_defaultvalue.Enabled = false;
comboBox_accesstype.Enabled = false;
comboBox_datatype.Enabled = false;
Expand Down Expand Up @@ -405,7 +405,7 @@ public void validateanddisplaydata()
((od.parent.Index >=0x1600 && od.parent.Index <= 0x17ff) || (od.parent.Index >= 0x1A00 && od.parent.Index <= 0x1Bff)) &&
od.Subindex == 0)
{
//We are allowed to edit the no sub objects for the PDO mappings as its a requirment to support dynamic PDOs
//We are allowed to edit the no sub objects for the PDO mappings as its a requirement to support dynamic PDOs

textBox_defaultvalue.Enabled = true;
comboBox_accesstype.Enabled = true;
Expand Down Expand Up @@ -512,7 +512,7 @@ public void updateselectedindexdisplay()

lvi2.SubItems.Add(subod.defaultvalue);

//fixe me ??
//fix me ??
lvi2.SubItems.Add(subod.PDOtype.ToString());

lvi2.Tag = subod;
Expand Down Expand Up @@ -1184,7 +1184,7 @@ private void comboBox_memory_SelectedIndexChanged(object sender, EventArgs e)
{
/* add string to the second to last position (before "add...") */
comboBox_memory.Items.Insert(comboBox_memory.Items.Count - 1, memory.name);
/* add new memory location to eds backend */
/* add new memory location to eds back end */
eds.storageLocation.Add(memory.name);
}
}
Expand Down
12 changes: 6 additions & 6 deletions EDSTest/DevicePDOView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void UpdatePDOinfo()
if (od.Disabled == true)
continue;

//protect againt not completed new CommunicationParamater sections
//protect against not completed new CommunicationParamater sections
//we probably could do better and do more checking but as long as
//we protect against the subobjects[1] read in a few lines all else is
//good
Expand Down Expand Up @@ -268,7 +268,7 @@ void UpdatePDOTXslot(ODentry od , int row)

if (mappingfail == true)
{
MessageBox.Show(String.Format("PDO mapping failed for object 0x{0:x4}/{1:x2}\nplease manaully check the PDO mapping in the TX and RX PDO tabs\n as it does not agree with the mapping paramater 0x{2:x4}/{3:x2}\nThis can occur if you edit objects that are already mapped",pdoindex,pdosub, idx,sub.Subindex));
MessageBox.Show(String.Format("PDO mapping failed for object 0x{0:x4}/{1:x2}\nplease manually check the PDO mapping in the TX and RX PDO tabs\n as it does not agree with the mapping parameter 0x{2:x4}/{3:x2}\nThis can occur if you edit objects that are already mapped",pdoindex,pdosub, idx,sub.Subindex));
}
}

Expand Down Expand Up @@ -579,20 +579,20 @@ private void Button_savepdochanges_Click(object sender, EventArgs e)

if (!eds.ods.ContainsKey(index))
{
MessageBox.Show("Error finding communication paramaters");
MessageBox.Show("Error finding communication parameters");
return;
}

//Fix me this is not strictly true, the reserved/compatability entries do not need to appear
//Fix me this is not strictly true, the reserved/compatibility entries do not need to appear
//they can just be left as gaps in the sub OD
if (isTXPDO && (eds.ods[index].Nosubindexes != 6 && eds.ods[index].Nosubindexes != 7))
{
MessageBox.Show("Error with communication paramaters, manual edit required of OD");
MessageBox.Show("Error with communication parameters, manual edit required of OD");
return;
}
if (!isTXPDO && eds.ods[index].Nosubindexes != 3)
{
MessageBox.Show("Error with communication paramaters, manual edit required of OD");
MessageBox.Show("Error with communication parameters, manual edit required of OD");
return;
}

Expand Down
6 changes: 3 additions & 3 deletions EDSTest/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private void openCanOpenNodeXMLToolStripMenuItem_Click(object sender, EventArgs
{

OpenFileDialog odf = new OpenFileDialog();
odf.Filter = "All supported files (*.eds;*.xml;*.xdd;*.dcf)|*.eds;*.xml;*.xdd;*.dcf|Electronic Data Sheets (*.eds)|*.eds|Device Configuration Files (*.dcf)|*.dcf|CanOpen Xml Datasheet (*.xdd)|*.xdd|CanOpenNode XML (*.xml)|*.xml";
odf.Filter = "All supported files (*.eds;*.xml;*.xdd;*.dcf)|*.eds;*.xml;*.xdd;*.dcf|Electronic Data Sheets (*.eds)|*.eds|Device Configuration Files (*.dcf)|*.dcf|CanOpen Xml Data sheet (*.xdd)|*.xdd|CanOpenNode XML (*.xml)|*.xml";
if (odf.ShowDialog() == DialogResult.OK)
{

Expand Down Expand Up @@ -429,7 +429,7 @@ private void closeFileToolStripMenuItem_Click(object sender, EventArgs e)

if(device.eds.Dirty==true)
{
if (MessageBox.Show( "All usaved changes will be lost\n continue?", "Unsaved changes", MessageBoxButtons.YesNo) == DialogResult.No)
if (MessageBox.Show( "All unsaved changes will be lost\n continue?", "Unsaved changes", MessageBoxButtons.YesNo) == DialogResult.No)
return;
}

Expand Down Expand Up @@ -642,7 +642,7 @@ private void ODEditor_MainForm_Load(object sender, EventArgs e)

private void addtoMRU(string path)
{
// if it already exists remove it then let it readd itsself
// if it already exists remove it then let it re-add itself
// so it will be promoted to the top of the list
if (_mru.Contains(path))
_mru.Remove(path);
Expand Down
24 changes: 12 additions & 12 deletions EDSTest/ListViewEx.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Taken from http://www.codeproject.com/Articles/18111/Reusable-ListView-in-C-with-textbox-and-combobox */
/* No explicit licence with code or documentation */
/* No explicit license with code or documentation */

/* ListViewEx.cs
* This file contains the definition of the class ListViewEx, which is a
Expand Down Expand Up @@ -152,7 +152,7 @@ private void InitializeComponent()

/// <summary>
/// This method will send LVM_GETSUBITEMRECT message to
/// get the current subitem bouds of the listview
/// get the current subitem bounds of the listview
/// </summary>
/// <param name="clickPoint"></param>
/// <returns></returns>
Expand All @@ -178,7 +178,7 @@ private Rectangle GetSubItemRect(Point clickPoint)
// Add 1 because of the presence of above condition
this.col = index + 1;
{
// This case happens when items in the first columnis selected.
// This case happens when items in the first column is selected.
// So we need to set the column number explicitly
if (clickPoint.X < subItemRect.Left)
{
Expand Down Expand Up @@ -325,7 +325,7 @@ private void ShowTextBox(Point location, Size sz)
textBox.Location = location;
// Set text, take it from the current listview cell
textBox.Text = this.Items[row].SubItems[col].Text;
// Shopw the text box
// Show the text box
textBox.Show();
textBox.Focus();
}
Expand All @@ -346,7 +346,7 @@ protected override void OnMouseUp(MouseEventArgs e)
// Hide the controls
this.textBox.Visible = this.combo.Visible = false;

// If no mouse down happned in this listview,
// If no mouse down happened in this listview,
// no need to show anything
if (!mouseDown)
{
Expand All @@ -365,7 +365,7 @@ protected override void OnMouseUp(MouseEventArgs e)
mouseDown = false;

// Get the subitem rect at the mouse point.
// Remeber that the current row index and column index will also be
// Remember that the current row index and column index will also be
// Modified within the same method
Rectangle rect = this.GetSubItemRect(new Point(e.X, e.Y));

Expand All @@ -390,7 +390,7 @@ protected override void OnMouseUp(MouseEventArgs e)

ValidateAndAddSubItems();

// Decide which conrol to be displayed.
// Decide which control to be displayed.
if (this.customCells[cell] == null)
{
this.ShowTextBox(location, sz);
Expand Down Expand Up @@ -445,7 +445,7 @@ private int GetDropDownWidth(StringCollection data)
// Set the first text as the largest
string maximum = data[0];

// Now iterate thru each string, to findout the
// Now iterate thru each string, to find out the
// largest
foreach (string text in data)
{
Expand All @@ -461,7 +461,7 @@ private int GetDropDownWidth(StringCollection data)
/// <summary>
/// For this method, we will get a Subitem.
/// Then we will iterate thru each of the keys and will
/// check whther any key contains the given cells row/column.
/// check if any key contains the given cells row/column.
/// If it is not found we will check for -1 in any one
/// </summary>
/// <param name="cell"></param>
Expand All @@ -482,7 +482,7 @@ private SubItem GetKey(SubItem cell)
{
return key;
}
// Entire col for a row is is enabled for a control(Textbox/combobox)
// Entire col for a row is enabled for a control(Textbox/combobox)
else if (key.row == cell.row && key.col == -1)
{
return key;
Expand Down Expand Up @@ -523,7 +523,7 @@ protected override void OnMouseDown(MouseEventArgs e)
}

/// <summary>
/// This event handler wll set the current text in the textbox
/// This event handler will set the current text in the textbox
/// as the listview's current cell's text, while the textbox
/// focus is lost
/// </summary>
Expand All @@ -546,7 +546,7 @@ private void textBox_Leave(object sender, EventArgs e)
}

/// <summary>
/// This event handler wll set the current text in the combobox
/// This event handler will set the current text in the combobox
/// as the listview's current cell's text, while the combobox
/// selection is changed
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion EDSTest/Profiles/DSP302-NMTMaster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CANopenObjectList>
<CANopenObject index="1f80" name="NMTStartup" objectType="VAR" memoryType="RAM" dataType="0x07" accessType="rw" PDOmapping="no" defaultValue="" subNumber="0" accessFunctionName="" disabled="false">
<description>This object configures the start-up behaviour of a device that is able to perform the NMT. The
<description>This object configures the start-up behavior of a device that is able to perform the NMT. The
value has the following interpretation:</description>
<accessFunctionPreCode />
</CANopenObject>
Expand Down
6 changes: 3 additions & 3 deletions Tests/EDSParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void Test_CompactSubObj()
ODentry od = ods[0x1003];

if (od.subobjects.Count != 10)
throw (new Exception("parseEDSentry() CompactSubObj faield to generate children"));
throw (new Exception("parseEDSentry() CompactSubObj failed to generate children"));

ODentry sub = od.Getsubobject(0);

Expand Down Expand Up @@ -284,10 +284,10 @@ public void Test_implicit_PDOS()
UpdatePDOcount();

if(noexplicitrxpdos != di.NrOfRXPDO)
throw (new Exception("Implict RX PDO incorrect"));
throw (new Exception("Implicit RX PDO incorrect"));

if (noexplicittxpdos != di.NrOfTXPDO)
throw (new Exception("Implict RT PDO incorrect"));
throw (new Exception("Implicit RT PDO incorrect"));


}
Expand Down
8 changes: 4 additions & 4 deletions libEDSsharp/Bridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ You should have received a copy of the GNU General Public License
using System.Text.RegularExpressions;
using XSDImport;

/* I know i'm going to regret this
/* I know I'm going to regret this
*
* I quite like my eds class as it trys to validate the EDS using typing and enums etc
* but i also want the XML wrappers for the CanOpenXML
* so i'm going to make a converter outside of both classes hence this bridge
* so I'm going to make a converter outside of both classes hence this bridge
* which is more code to manage ;-(
* */

Expand Down Expand Up @@ -542,7 +542,7 @@ public EDSsharp convert(Device dev)
{
if (dev.Other.File != null)
{
// CanOpenNode default project.xml conatins - for fileversion, its suspose to be a byte field according to DS306
// CanOpenNode default project.xml contains - for fileversion, its suppose to be a byte field according to DS306
if (dev.Other.File.FileVersion == "-")
{
dev.Other.File.FileVersion = "0";
Expand All @@ -560,7 +560,7 @@ public EDSsharp convert(Device dev)

eds.fi.EDSVersion = "4.0";

//FIX me any other approprate defaults for eds here??
//FIX me any other appropriate defaults for eds here??

eds.UpdatePDOcount();

Expand Down
Loading

0 comments on commit c97e4ec

Please sign in to comment.