/// <summary> /// Reboot ECU /// </summary> /// <param name="Mode">Mode of reboot</param> /// <returns>0 on success, else see ReturnValue</returns> public override ReturnValue Reboot(RebootMode Mode) { ReturnValue ret = mEcu.Order(Comm.OrderByte.Reboot, (UInt16)Mode); if (ret == ReturnValue.NoError) { System.Threading.Thread.Sleep(3000); } return(ret); }
/// <summary> /// Reboots the device into a specific mode /// </summary> /// <param name="mode">The mode to reboot in</param> public void RebootInto(RebootMode mode) { //Decide which mode to use and set a standard mode string cmd = "reboot"; if (mode == RebootMode.Bootloader) { cmd += " bootloader"; } else if (mode == RebootMode.Recovery) { cmd += " recovery"; } ADB.ExecuteAdbCommandWithOutput(cmd, this.SerialNumber); }
private void SoftwareInstallerForm_Load(object sender, EventArgs e) { if (_installer == null) { _installer = new SoftwareInstaller(); _installer.InstallerId = SequentialGuid.NewGuid(); _installer.RebootSetting = RebootMode.NoReboot.ToString(); } reboot_ComboBox.DataSource = EnumUtil.GetDescriptions <RebootMode>().ToArray(); // Data Bindings description_TextBox.DataBindings.Add("Text", _installer, "Description"); filePath_TextBox.DataBindings.Add("Text", _installer, "FilePath"); arguments_TextBox.DataBindings.Add("Text", _installer, "Arguments"); RebootMode rebootMode = EnumUtil.Parse <RebootMode>(_installer.RebootSetting); reboot_ComboBox.SelectedItem = EnumUtil.GetDescription(rebootMode); copyDirectory_CheckBox.DataBindings.Add("Checked", _installer, "CopyDirectory"); }
public static string Reboot(RebootMode mode = RebootMode.Normal) { string command; switch (mode) { case RebootMode.Recovery: command = "reboot recovery"; break; case RebootMode.Bootloader: command = "reboot bootloader"; break; default: command = "reboot"; break; } return RunADBCommand(command); }
/// <summary> /// Determines whether a reboot is required. /// </summary> /// <param name="rebootMode"></param> /// <returns></returns> private static bool RebootRequired(RebootMode rebootMode) { return(rebootMode == RebootMode.Deferred || rebootMode == RebootMode.Immediate); }
/// <summary> /// Reboots the device into a specific mode /// </summary> /// <param name="mode">The mode to reboot in</param> public void RebootInto(RebootMode mode) { //Decide which mode to use and set a standard mode string cmd = "reboot"; if (mode == RebootMode.Bootloader) cmd += " bootloader"; else if (mode == RebootMode.Recovery) cmd += " recovery"; ADB.ExecuteAdbCommandWithOutput(cmd, this.SerialNumber); }
/// <summary>Reboot ecu</summary> /// <param name="Mode">Mode of reboot</param> /// <returns>0 on success, else see Error</returns> public override ReturnValue Reboot(RebootMode Mode) { // erst ab Protokoll 15 return(ReturnValue.NoError); }
/// <summary>Reboot ECU</summary> /// <param name="Mode">Mode of reboot</param> /// <returns>0 on success, else see Error</returns> public abstract ReturnValue Reboot(RebootMode Mode);
/// <summary> /// Reboot ecu /// </summary> /// <param name="Mode">Mode of reboot</param> /// <returns>0 on success, else see Error</returns> public override ReturnValue Reboot(RebootMode Mode) { // erst ab Protokoll 15 // throw new Exception("The method or operation is not implemented."); return(ReturnValue.NoError); }
private void OnRecoveryModeClicked(object sender, RoutedEventArgs e) { this.SelectedRebootMode = RebootMode.Recovery; this.Hide(); }
private void OnBootloaderModeClicked(object sender, RoutedEventArgs e) { this.SelectedRebootMode = RebootMode.Bootloader; this.Hide(); }
private void OnClassicModeClicked(object sender, RoutedEventArgs e) { this.SelectedRebootMode = RebootMode.Classic; this.Hide(); }