Skip to content

Commit c97e4ec

Browse files
Fix numerous spellings in comments, strings and messages fixes #153
1 parent 6261921 commit c97e4ec

File tree

13 files changed

+92
-92
lines changed

13 files changed

+92
-92
lines changed

‎EDSTest/DeviceODView.cs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ private void button_save_changes_Click(object sender, EventArgs e)
196196

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

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

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

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

@@ -371,7 +371,7 @@ public void validateanddisplaydata()
371371
return; //nothing else to do at this point
372372
}
373373

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

410410
textBox_defaultvalue.Enabled = true;
411411
comboBox_accesstype.Enabled = true;
@@ -512,7 +512,7 @@ public void updateselectedindexdisplay()
512512

513513
lvi2.SubItems.Add(subod.defaultvalue);
514514

515-
//fixe me ??
515+
//fix me ??
516516
lvi2.SubItems.Add(subod.PDOtype.ToString());
517517

518518
lvi2.Tag = subod;
@@ -1184,7 +1184,7 @@ private void comboBox_memory_SelectedIndexChanged(object sender, EventArgs e)
11841184
{
11851185
/* add string to the second to last position (before "add...") */
11861186
comboBox_memory.Items.Insert(comboBox_memory.Items.Count - 1, memory.name);
1187-
/* add new memory location to eds backend */
1187+
/* add new memory location to eds back end */
11881188
eds.storageLocation.Add(memory.name);
11891189
}
11901190
}

‎EDSTest/DevicePDOView.cs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void UpdatePDOinfo()
143143
if (od.Disabled == true)
144144
continue;
145145

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

269269
if (mappingfail == true)
270270
{
271-
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));
271+
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));
272272
}
273273
}
274274

@@ -579,20 +579,20 @@ private void Button_savepdochanges_Click(object sender, EventArgs e)
579579

580580
if (!eds.ods.ContainsKey(index))
581581
{
582-
MessageBox.Show("Error finding communication paramaters");
582+
MessageBox.Show("Error finding communication parameters");
583583
return;
584584
}
585585

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

‎EDSTest/Form1.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ private void openCanOpenNodeXMLToolStripMenuItem_Click(object sender, EventArgs
234234
{
235235

236236
OpenFileDialog odf = new OpenFileDialog();
237-
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";
237+
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";
238238
if (odf.ShowDialog() == DialogResult.OK)
239239
{
240240

@@ -429,7 +429,7 @@ private void closeFileToolStripMenuItem_Click(object sender, EventArgs e)
429429

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

@@ -642,7 +642,7 @@ private void ODEditor_MainForm_Load(object sender, EventArgs e)
642642

643643
private void addtoMRU(string path)
644644
{
645-
// if it already exists remove it then let it readd itsself
645+
// if it already exists remove it then let it re-add itself
646646
// so it will be promoted to the top of the list
647647
if (_mru.Contains(path))
648648
_mru.Remove(path);

‎EDSTest/ListViewEx.cs‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Taken from http://www.codeproject.com/Articles/18111/Reusable-ListView-in-C-with-textbox-and-combobox */
2-
/* No explicit licence with code or documentation */
2+
/* No explicit license with code or documentation */
33

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

153153
/// <summary>
154154
/// This method will send LVM_GETSUBITEMRECT message to
155-
/// get the current subitem bouds of the listview
155+
/// get the current subitem bounds of the listview
156156
/// </summary>
157157
/// <param name="clickPoint"></param>
158158
/// <returns></returns>
@@ -178,7 +178,7 @@ private Rectangle GetSubItemRect(Point clickPoint)
178178
// Add 1 because of the presence of above condition
179179
this.col = index + 1;
180180
{
181-
// This case happens when items in the first columnis selected.
181+
// This case happens when items in the first column is selected.
182182
// So we need to set the column number explicitly
183183
if (clickPoint.X < subItemRect.Left)
184184
{
@@ -325,7 +325,7 @@ private void ShowTextBox(Point location, Size sz)
325325
textBox.Location = location;
326326
// Set text, take it from the current listview cell
327327
textBox.Text = this.Items[row].SubItems[col].Text;
328-
// Shopw the text box
328+
// Show the text box
329329
textBox.Show();
330330
textBox.Focus();
331331
}
@@ -346,7 +346,7 @@ protected override void OnMouseUp(MouseEventArgs e)
346346
// Hide the controls
347347
this.textBox.Visible = this.combo.Visible = false;
348348

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

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

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

391391
ValidateAndAddSubItems();
392392

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

448-
// Now iterate thru each string, to findout the
448+
// Now iterate thru each string, to find out the
449449
// largest
450450
foreach (string text in data)
451451
{
@@ -461,7 +461,7 @@ private int GetDropDownWidth(StringCollection data)
461461
/// <summary>
462462
/// For this method, we will get a Subitem.
463463
/// Then we will iterate thru each of the keys and will
464-
/// check whther any key contains the given cells row/column.
464+
/// check if any key contains the given cells row/column.
465465
/// If it is not found we will check for -1 in any one
466466
/// </summary>
467467
/// <param name="cell"></param>
@@ -482,7 +482,7 @@ private SubItem GetKey(SubItem cell)
482482
{
483483
return key;
484484
}
485-
// Entire col for a row is is enabled for a control(Textbox/combobox)
485+
// Entire col for a row is enabled for a control(Textbox/combobox)
486486
else if (key.row == cell.row && key.col == -1)
487487
{
488488
return key;
@@ -523,7 +523,7 @@ protected override void OnMouseDown(MouseEventArgs e)
523523
}
524524

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

548548
/// <summary>
549-
/// This event handler wll set the current text in the combobox
549+
/// This event handler will set the current text in the combobox
550550
/// as the listview's current cell's text, while the combobox
551551
/// selection is changed
552552
/// </summary>

‎EDSTest/Profiles/DSP302-NMTMaster.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
33
<CANopenObjectList>
44
<CANopenObject index="1f80" name="NMTStartup" objectType="VAR" memoryType="RAM" dataType="0x07" accessType="rw" PDOmapping="no" defaultValue="" subNumber="0" accessFunctionName="" disabled="false">
5-
<description>This object configures the start-up behaviour of a device that is able to perform the NMT. The
5+
<description>This object configures the start-up behavior of a device that is able to perform the NMT. The
66
value has the following interpretation:</description>
77
<accessFunctionPreCode />
88
</CANopenObject>

‎Tests/EDSParserTests.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void Test_CompactSubObj()
7878
ODentry od = ods[0x1003];
7979

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

8383
ODentry sub = od.Getsubobject(0);
8484

@@ -284,10 +284,10 @@ public void Test_implicit_PDOS()
284284
UpdatePDOcount();
285285

286286
if(noexplicitrxpdos != di.NrOfRXPDO)
287-
throw (new Exception("Implict RX PDO incorrect"));
287+
throw (new Exception("Implicit RX PDO incorrect"));
288288

289289
if (noexplicittxpdos != di.NrOfTXPDO)
290-
throw (new Exception("Implict RT PDO incorrect"));
290+
throw (new Exception("Implicit RT PDO incorrect"));
291291

292292

293293
}

‎libEDSsharp/Bridge.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ You should have received a copy of the GNU General Public License
2424
using System.Text.RegularExpressions;
2525
using XSDImport;
2626

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

@@ -542,7 +542,7 @@ public EDSsharp convert(Device dev)
542542
{
543543
if (dev.Other.File != null)
544544
{
545-
// CanOpenNode default project.xml conatins - for fileversion, its suspose to be a byte field according to DS306
545+
// CanOpenNode default project.xml contains - for fileversion, its suppose to be a byte field according to DS306
546546
if (dev.Other.File.FileVersion == "-")
547547
{
548548
dev.Other.File.FileVersion = "0";
@@ -560,7 +560,7 @@ public EDSsharp convert(Device dev)
560560

561561
eds.fi.EDSVersion = "4.0";
562562

563-
//FIX me any other approprate defaults for eds here??
563+
//FIX me any other appropriate defaults for eds here??
564564

565565
eds.UpdatePDOcount();
566566

0 commit comments

Comments
 (0)