Changeset f096c48b4894fe8c41da1baeb3fce1e1e1d1e56a
- Timestamp:
- 21/12/10 13:20:57 (2 years ago)
- Children:
- 15c36f68bf2989f4965aa740a6d7e33fb6fd0016
- Parents:
- 074ab0776f20e64fa3748352b6e8e4808c13af2b
- git-committer:
- Matias De la Puente <mfpuente.ar@…> (21/12/10 13:20:57)
- Files:
-
- 6 edited
-
data/lpc21isp.i4ucprogrammer (modified) (1 diff)
-
data/pickit2.i4ucprogrammer (modified) (1 diff)
-
data/picstartplus.i4ucprogrammer (modified) (1 diff)
-
gtkfrontend/programmersview.vala (modified) (2 diffs)
-
libi4uccore/programmerslogic.vala (modified) (5 diffs)
-
libi4uccore/programmersview.vala (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
data/lpc21isp.i4ucprogrammer
r074ab07 rf096c48 6 6 has_devices_folder=false 7 7 has_clock=true 8 write_flash_command=lpc21isp -control -wipe -verify % hexfile %serial_port %baud_rate %clock8 write_flash_command=lpc21isp -control -wipe -verify %firmware %serial_port %baud_rate %clock 9 9 devices=LPC21xx; 10 10 firmware_types=.hex; -
data/pickit2.i4ucprogrammer
r074ab07 rf096c48 7 7 has_devices_folder=true 8 8 has_clock=false 9 write_flash_command=pk2cmd -b%devices_folder -P%device -F% hexfile -M10 read_flash_command=pk2cmd -b%devices_folder -P%device -GF% hexfile11 verify_flash_command=pk2cmd -b%devices_folder -P%device -F% hexfile -Y9 write_flash_command=pk2cmd -b%devices_folder -P%device -F%firmware -M 10 read_flash_command=pk2cmd -b%devices_folder -P%device -GF%firmware 11 verify_flash_command=pk2cmd -b%devices_folder -P%device -F%firmware -Y 12 12 erase_flash_command=pk2cmd -b%devices_folder -P%device -E 13 13 read_fuses_command=pk2cmd -b%devices_folder -P%device -GC -
data/picstartplus.i4ucprogrammer
r074ab07 rf096c48 7 7 has_devices_folder=false 8 8 has_clock=false 9 write_flash_command=picp %serial_port %device -bp -wp % hexfile10 read_flash_command=picp %serial_port %device -rp % hexfile9 write_flash_command=picp %serial_port %device -bp -wp %firmware 10 read_flash_command=picp %serial_port %device -rp %firmware 11 11 erase_flash_command=picp %serial_port %device -ef 12 12 write_fuses_command=picp %serial_port %device -wc %fuses -
gtkfrontend/programmersview.vala
r074ab07 rf096c48 101 101 } 102 102 103 public void show_open_dialog (Gee.List<string> firmware_types, ref string folder_uri, out string hexfile_uri)104 { 105 var dialog = new FileChooserDialog (_("Save hexfile as"), null, FileChooserAction.SAVE);103 public void show_open_dialog (Gee.List<string> firmware_types, ref string folder_uri, out string firmware_uri) 104 { 105 var dialog = new FileChooserDialog (_("Save firmware as"), null, FileChooserAction.SAVE); 106 106 dialog.set_current_folder_uri (folder_uri); 107 107 dialog.do_overwrite_confirmation = true; … … 118 118 { 119 119 folder_uri = dialog.get_current_folder_uri (); 120 hexfile_uri = dialog.get_uri ();120 firmware_uri = dialog.get_uri (); 121 121 } 122 122 dialog.destroy (); -
libi4uccore/programmerslogic.vala
r074ab07 rf096c48 27 27 private Command _command = create_command (); 28 28 private SerialPortUtils _serial_port_utils = create_serial_port_utils (); 29 private string _read_ hexfile;29 private string _read_firmware; 30 30 31 31 public bool can_write_flash { private set; get; } … … 86 86 var filtered_command = filter_command (_current_programmer.write_flash_command); 87 87 88 var hexfile = File.new_for_uri (uri).get_path ();89 filtered_command = filtered_command.replace ("% hexfile", Shell.quote (hexfile));88 var firmware = File.new_for_uri (uri).get_path (); 89 filtered_command = filtered_command.replace ("%firmware", Shell.quote (firmware)); 90 90 91 91 try … … 295 295 { 296 296 string folder_uri = I4uc.Core.Settings.instance.working_folder; 297 string hexfile_uri;298 _view.show_open_dialog ( ref folder_uri, out hexfile_uri);299 if ( hexfile_uri != null)297 string firmware_uri; 298 _view.show_open_dialog (_current_programmer.firmware_types, ref folder_uri, out firmware_uri); 299 if (firmware_uri != null) 300 300 { 301 301 I4uc.Core.Settings.instance.working_folder = folder_uri; 302 _read_ hexfile = hexfile_uri;302 _read_firmware = firmware_uri; 303 303 run_command (_current_programmer.read_flash_command); 304 304 } … … 328 328 329 329 // Open the hex file if read flash was selected 330 if (_read_ hexfile != null)331 { 332 _documents_logic.open_document (_read_ hexfile);333 _read_ hexfile = null;330 if (_read_firmware != null) 331 { 332 _documents_logic.open_document (_read_firmware); 333 _read_firmware = null; 334 334 } 335 335 … … 343 343 var filtered_command = filter_command (command); 344 344 345 if (_read_ hexfile == null)345 if (_read_firmware == null) 346 346 { 347 347 if (_view.pages_panel.current_page != null && 348 348 _current_programmer.is_valid_firmware_type (_view.pages_panel.current_page.tab_title)) 349 349 { 350 var hexfile = File.new_for_uri (_view.pages_panel.current_page.title).get_path ();351 filtered_command = filtered_command.replace ("% hexfile", Shell.quote (hexfile));350 var firmware = File.new_for_uri (_view.pages_panel.current_page.title).get_path (); 351 filtered_command = filtered_command.replace ("%firmware", Shell.quote (firmware)); 352 352 } 353 353 } 354 354 else 355 355 { 356 var hexfile = File.new_for_uri (_read_hexfile).get_path ();357 filtered_command = filtered_command.replace ("% hexfile", Shell.quote (hexfile));356 var firmware = File.new_for_uri (_read_firmware).get_path (); 357 filtered_command = filtered_command.replace ("%firmware", Shell.quote (firmware)); 358 358 } 359 359 -
libi4uccore/programmersview.vala
r074ab07 rf096c48 47 47 public abstract DialogResponse show_yes_no_message (string message, bool cancel = false); 48 48 public abstract void show_log_page (); 49 public abstract void show_open_dialog (Gee.List<string> firmware_types, ref string folder_uri, out string hexfile_uri);49 public abstract void show_open_dialog (Gee.List<string> firmware_types, ref string folder_uri, out string firmware_uri); 50 50 }
Note: See TracChangeset
for help on using the changeset viewer.

