Skip to content

Commit

Permalink
Use 'MULTI-Module' everywhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
benlye committed Jan 14, 2020
1 parent 8374118 commit 2014f15
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/flash-multi/DfuRecoveryDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/flash-multi/FlashMulti.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/flash-multi/FlashMulti.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ private async void ButtonUpload_Click(object sender, EventArgs e)
// Error if flashing non-USB firmware via native USB port
if (mapleResult.DeviceFound && !firmwareSupportsUsb)
{
string msgBoxMessage = "The selected firmware file was compiled without USB support.\r\n\r\nFlashing this firmware would prevent the Multiprotocol module from functioning correctly.\r\n\r\nPlease select a different firmware file.";
string msgBoxMessage = "The selected firmware file was compiled without USB support.\r\n\r\nFlashing this firmware would prevent the MULTI-Module from functioning correctly.\r\n\r\nPlease select a different firmware file.";
MessageBox.Show(msgBoxMessage, "Incompatible Firmware", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.EnableControls(true);
return;
Expand Down
12 changes: 6 additions & 6 deletions src/flash-multi/MapleDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri
string commandArgs;
int returnCode = -1;

flashMulti.AppendLog("Starting Multimodule update via native USB\r\n");
flashMulti.AppendLog("Starting MULTI-Module update via native USB\r\n");

// Stop the serial monitor if it's active
SerialMonitor serialMonitor = null;
Expand Down Expand Up @@ -183,7 +183,7 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri

if (mapleMode == "USB")
{
flashMulti.AppendLog("Switching Multimodule into DFU mode ...");
flashMulti.AppendLog("Switching MULTI-Module into DFU mode ...");
command = ".\\tools\\maple-reset.exe";
commandArgs = $"{comPort} 2000";
await Task.Run(() => { returnCode = RunCommand.Run(flashMulti, command, commandArgs); });
Expand Down Expand Up @@ -226,7 +226,7 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri
}

// First attempt to flash the firmware
flashMulti.AppendLog("Writing firmware to Multimodule ...");
flashMulti.AppendLog("Writing firmware to MULTI-Module ...");
command = ".\\tools\\dfu-util.exe";
commandArgs = string.Format("-R -a 2 -d 1EAF:0003 -D \"{0}\"", fileName, comPort);

Expand All @@ -247,7 +247,7 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri
if (recoveryResult == DialogResult.OK)
{
// Run the recovery flash command
flashMulti.AppendLog("Writing firmware to Multimodule ...");
flashMulti.AppendLog("Writing firmware to MULTI-Module ...");
await Task.Run(() => { returnCode = RunCommand.Run(flashMulti, command, commandArgs); });
if (returnCode != 0)
{
Expand All @@ -272,7 +272,7 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri
}

flashMulti.AppendLog(" done\r\n");
flashMulti.AppendLog("\r\nMultimodule updated successfully");
flashMulti.AppendLog("\r\nMULTI-Module updated successfully");

// Reconnect the serial monitor
if (serialMonitor != null && reconnectSerialMonitor)
Expand All @@ -281,7 +281,7 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri
serialMonitor.SerialConnect(comPort);
}

MessageBox.Show("Multimodule updated successfully.", "Firmware Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("MULTI-Module updated successfully.", "Firmware Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
flashMulti.EnableControls(true);
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/flash-multi/SerialDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri
// The bootloader occupies the first 8 pages (0-7), so start writing after it
flashStart = 8;

// Start execution at the Multiprotocol code rather than the bootloader
// Start execution at the MULTI-Module code rather than the bootloader
executionAddress = "0x8002000";
}

// Write to the log
flashMulti.AppendLog("Starting Multimodule update via serial\r\n");
flashMulti.AppendLog("Starting MULTI-Module update via serial\r\n");

// Stop the serial monitor if it's active
SerialMonitor serialMonitor = null;
Expand Down Expand Up @@ -160,7 +160,7 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri

// Increment the step counter and write to the log
flashStep++;
flashMulti.AppendLog($"[{flashStep}/{flashSteps}] Writing Multimodule firmware...");
flashMulti.AppendLog($"[{flashStep}/{flashSteps}] Writing MULTI-Module firmware...");

// Prepare the command line arguments for writing the firmware
commandArgs = $"-v -s {flashStart} -e 0 -g {executionAddress} -b {serialBaud} -w \"{fileName}\" {comPort}";
Expand All @@ -185,10 +185,10 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, stri

// Write a success message to the log
flashMulti.AppendLog(" done\r\n");
flashMulti.AppendLog("\r\nMultimodule updated successfully");
flashMulti.AppendLog("\r\nMULTI-Module updated successfully");

// Show a success message box
MessageBox.Show("Multimodule updated successfully.", "Firmware Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("MULTI-Module updated successfully.", "Firmware Update", MessageBoxButtons.OK, MessageBoxIcon.Information);

// Re-enable the form controls
flashMulti.EnableControls(true);
Expand Down
6 changes: 3 additions & 3 deletions src/flash-multi/UsbAspDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, bool
}

// Write to the log
flashMulti.AppendLog("Starting Multimodule update via USBasp\r\n");
flashMulti.AppendLog("Starting MULTI-Module update via USBasp\r\n");

// Run the command asynchronously and wait for it to finish
await Task.Run(() => { returnCode = RunCommand.Run(flashMulti, command, commandArgs); });
Expand All @@ -134,9 +134,9 @@ public static async Task WriteFlash(FlashMulti flashMulti, string fileName, bool
}

flashMulti.AppendLog("\r\nDone.");
flashMulti.AppendLog("\r\nMultimodule updated successfully");
flashMulti.AppendLog("\r\nMULTI-Module updated successfully");

MessageBox.Show("Multimodule updated successfully.", "Firmware Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("MULTI-Module updated successfully.", "Firmware Update", MessageBoxButtons.OK, MessageBoxIcon.Information);

flashMulti.EnableControls(true);
}
Expand Down

0 comments on commit 2014f15

Please sign in to comment.