Merge pull request #1764 from larsbrubaker/master
Made firmware updater report state into terminal
This commit is contained in:
commit
09178e11d5
6 changed files with 51 additions and 23 deletions
|
|
@ -49,11 +49,9 @@ namespace MatterHackers.MatterControl.ConfigurationPage
|
|||
|
||||
AddChild(mainContainer);
|
||||
AddHandlers();
|
||||
SetVisibleControls();
|
||||
SetEnabledStates();
|
||||
}
|
||||
|
||||
private TextWidget printLevelingStatusLabel;
|
||||
|
||||
public override void OnClosed(EventArgs e)
|
||||
{
|
||||
unregisterEvents?.Invoke(this, null);
|
||||
|
|
@ -187,8 +185,8 @@ namespace MatterHackers.MatterControl.ConfigurationPage
|
|||
|
||||
private void AddHandlers()
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.CommunicationStateChanged.RegisterEvent(onPrinterStatusChanged, ref unregisterEvents);
|
||||
PrinterConnectionAndCommunication.Instance.EnableChanged.RegisterEvent(onPrinterStatusChanged, ref unregisterEvents);
|
||||
PrinterConnectionAndCommunication.Instance.CommunicationStateChanged.RegisterEvent((e, s) => SetEnabledStates(), ref unregisterEvents);
|
||||
PrinterConnectionAndCommunication.Instance.EnableChanged.RegisterEvent((e,s) => SetEnabledStates(), ref unregisterEvents);
|
||||
}
|
||||
|
||||
private void openCameraPreview_Click(object sender, EventArgs e)
|
||||
|
|
@ -249,13 +247,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage
|
|||
UiThread.RunOnIdle(TerminalWindow.Show);
|
||||
}
|
||||
|
||||
private void onPrinterStatusChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetVisibleControls();
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
private void SetVisibleControls()
|
||||
private void SetEnabledStates()
|
||||
{
|
||||
if (!ActiveSliceSettings.Instance.PrinterSelected)
|
||||
{
|
||||
|
|
@ -315,6 +307,8 @@ namespace MatterHackers.MatterControl.ConfigurationPage
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
this.Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -161,8 +161,6 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
|
||||
private bool firmwareUriGcodeSend = false;
|
||||
|
||||
private string firmwareVersion;
|
||||
|
||||
private int currentLineIndexToSend = 0;
|
||||
|
||||
private bool ForceImmediateWrites = false;
|
||||
|
|
@ -659,10 +657,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
get { return firmwareType; }
|
||||
}
|
||||
|
||||
public string FirmwareVersion
|
||||
{
|
||||
get { return firmwareVersion; }
|
||||
}
|
||||
public string FirmwareVersion { get; private set; }
|
||||
|
||||
public Vector3 LastReportedPosition { get { return lastReportedPosition.position; } }
|
||||
|
||||
|
|
@ -1072,7 +1067,6 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
//Attempt connecting to a specific printer
|
||||
this.stopTryingToConnect = false;
|
||||
firmwareType = FirmwareTypes.Unknown;
|
||||
firmwareVersion = null;
|
||||
firmwareUriGcodeSend = false;
|
||||
|
||||
// On Android, there will never be more than one serial port available for us to connect to. Override the current .ComPort value to account for
|
||||
|
|
@ -1565,9 +1559,9 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
}
|
||||
|
||||
//Firmware version was detected and is different
|
||||
if (firmwareVersionReported != "" && firmwareVersion != firmwareVersionReported)
|
||||
if (firmwareVersionReported != "" && FirmwareVersion != firmwareVersionReported)
|
||||
{
|
||||
firmwareVersion = firmwareVersionReported;
|
||||
FirmwareVersion = firmwareVersionReported;
|
||||
OnFirmwareVersionRead(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,13 @@ namespace MatterHackers.MatterControl
|
|||
OnHasChanged(eventArgs);
|
||||
}
|
||||
|
||||
public void WriteLine(string line)
|
||||
{
|
||||
StringEventArgs eventArgs = new StringEventArgs(line);
|
||||
PrinterLines.Add(eventArgs.Data);
|
||||
OnHasChanged(eventArgs);
|
||||
}
|
||||
|
||||
private void Instance_ConnectionFailed(object sender, EventArgs e)
|
||||
{
|
||||
OnHasChanged(null);
|
||||
|
|
|
|||
|
|
@ -5698,3 +5698,36 @@ Translated:Sync Dashboard
|
|||
English:SD Card
|
||||
Translated:SD Card
|
||||
|
||||
English:MatterControl: Select Firmware File
|
||||
Translated:MatterControl: Select Firmware File
|
||||
|
||||
English:Starting firmware update...
|
||||
Translated:Starting firmware update...
|
||||
|
||||
English:Disconnecting from printer...
|
||||
Translated:Disconnecting from printer...
|
||||
|
||||
English:Initializing hardware...
|
||||
Translated:Initializing hardware...
|
||||
|
||||
English:Creating firmware backup...
|
||||
Translated:Creating firmware backup...
|
||||
|
||||
English:Update In Progress: {0}
|
||||
Translated:Update In Progress: {0}
|
||||
|
||||
English:Updating firmware...
|
||||
Translated:Updating firmware...
|
||||
|
||||
English:Firmware updated successfully. Please reconnect.
|
||||
Translated:Firmware updated successfully. Please reconnect.
|
||||
|
||||
English:The 'Serial Port' section lists all available serial\nports on your device. Changing which USB port the printer\nis conneted to may change the associated serial port.\n\nTip: If you are uncertain, unplug/plug in your printer\nand hit refresh. The new port that appears should be\nyour printer.
|
||||
Translated:The 'Serial Port' section lists all available serial\nports on your device. Changing which USB port the printer\nis conneted to may change the associated serial port.\n\nTip: If you are uncertain, unplug/plug in your printer\nand hit refresh. The new port that appears should be\nyour printer.
|
||||
|
||||
English:Reverting firmware to previous version...
|
||||
Translated:Reverting firmware to previous version...
|
||||
|
||||
English:Firmware restored successfully. Please reconnect.
|
||||
Translated:Firmware restored successfully. Please reconnect.
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit b4928e90793fc2f5bad70aff15ca5dee0f6e55e7
|
||||
Subproject commit 98818bfa46d8efef422c20b04bfbe80bff997553
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit a91d41b90a13fa7b86fcb8fb9a2b1e6231b0e35f
|
||||
Subproject commit 0184b613a0c9b3306393090353dee8101199e5ce
|
||||
Loading…
Add table
Add a link
Reference in a new issue