v1.0.13: Channel.GPSSystem: expand field from 5 to 8 bits When I first set the GPSSystem selector field, I made it a 5-bit field. Apparently that is not correct. The current MD-390 CPS uses the entire byte field. This commit expands the field to fill the entire byte, matching the CPS. Thanks to ReinkNL for reporting the bug. v1.0.12: Revert "Fix crash on non-existent field types" This reverts commit 852efe14d3e83462d7d9edc65968623478d45079. This commit is no longer needed because the bug was fixed at a higher level by commit 26a6fcd46092c44164e4f1696cd6267512aa3eee. Filter records referenced by other records' fields We maintain a static list of all possible record types that have fields that reference a given record type. Traversing this list fields if the codeplug doesn't have a specific record type. We now filter out those record types that do not exist in the codeplug. Thanks to Mike, KB2FX, for reporting the bug. v1.0.11: Update copyright notices to include 2019 Add debug warning functions Fix error msg when deleting non-deletable records Fix convert of md-uv380 codeplug to md-2017 In this case, we were trying to delete button definitions. The number of button definitions is fixed. When converting to a codeplug that has non-variable-count records (like button definitions) and the number of records is less than supported by the codeplug type, we create the missing records. Thanks to Eduardo Nunes, CT4AJ, for the bug report. Avoid checking sibling fields on creating records This error occurred while importing JSON files. Since we do not know the order of fields we'll be given when creating a record, avoid checking the value of sibling fields that we may not have yet. After the record is created, check the validity of fields. This commit fixes issue #23. v1.0.10: MD-2017: Fix button definitions When button definitions were first added to editcp, the md-uv380 buttons were inadvertently used for the md-2017. Fixed here. MD-2017: Add Menu Control and Two Channel opts These two new checkboxes were recentely added to the General Settings window in the MD-2017 CPS. v1.0.9: Fix crash on non-existent field types Crash was seen on an MD-40 when changing a channel's name field. While trying to examine all fields, it crashed looking for the non-existent gpsSystems field, which the MD-40 does not have. Thanks to Mike, KB2FX, for reporting the crash. v1.0.8: Fix r.HasFieldType() when member list is empty When a zone member list was empty, neither the available list nor the member list would display. Change r.HasFieldType() to explicitly check whether the record contains the field type instead of checking if the record currently has a field of that type. v1.0.7: Fix Add/Dup of zone, scan list, and RX group list When copying a record, the record name was not copied correctly and the new record name was blank. This bug was introduced when I the records to be referenced by their names instead of their indexes. v1.0.6: Fix panic when moving within a fieldList Thanks to Geoffrey, VK2CNN, for the error report. attempt to catch sigsegv on windows v1.0.5: Avoid recursion when setting current record This fixes a panic while deleting a record Include known model names in write codeplug dialog In addition to the model name, e.g. DR780, contained in the codeplug header, include the user-known model names, e.g MD-380 / RT3> Clear talkaround when reading radio or codeplug v1.0.4: Clear talkaround when writing radio (all channels) v1.0.3: Enable General Settings column 3 for all models v1.0.2: Reduce the height of the General Settings window To permit the General Settings window to fit in a screen that's 768 pixels high, this commit moves several fields from the second column to the third column. Add functions to get/set the font size v1.0.1: Accept number key contact index of 65535 Treat it as 0, meaning "None". Add window.enableAllWidgets() Avoid setting fields to their current value Fix combobox handling of invalid values Add Zone +, 1750 Hz, and md380tools button defs Add debugging l.Match() function v1.0.0: Sort depRecords dropped into a different codeplug We sort depRecords so they maintain their original order when dropped into a new codeplug. v0.16.11: Make "extra" record list items non-selectable We added an extra blank item at the end of record lists to workaround a reported issue where the user's UI would hide the last item in the list. Make that blank item non-selectable. Fixes Issue#19 Improve list index error description Turn off QT debugging on Linux v0.16.10: Add Progress dialog when copying between codeplugs v0.16.9: Fix setting field on multiple records Add a couple of explanatory comments Use new l (debug logging) module Sort generated field enables, avoid map randomness v0.16.8: Fix combobox bug from change to indexedStrings Optimize updating of dependent field widgets Instead of scanning all of the widgets in a new window, scan only those that have dependent widgets. Also, when a widget changes, only update its dependent widgets. Update sibling fields on field value change v0.16.7: Remove debugging print outs Cleanup iStrings since "" strings aren't allowed We no longer have to check for empty strings as an iStrings possibility. v0.16.6: Fix combobox result invalid values This bug first manifested as a setting-Channel0Mode failure. It occured when iStrings had a placeholder value of "". I changed those values to indexedStrings, eliminating the placeholder. Thanks to Shane McDougall, VE1SMC for the error report. v0.16.5: Remove test/debug code v0.16.4: Fix panic on zero-valued list index This fixes "panic: runtime error: index out of range". Separate radio models on factory firmware Display debugging and panic messages on Windows Debugging messages are displayed in popup windows. Panic messages are saved and displayed on the next invocation of editcp. v0.16.3: Restore descriptions for invalid values Now (once again) we'll see specific descripions for invalid fields, rather than the general "invalid value". Handle a GPS list index of 0xffff, treat it as 0 I was checking for a value of 65536, which is obviously incorrect, since it doesn't fit into a 16-bit field. Changed to 65535. Fix span comboboxes that didn't display last value On comboboxes generated from a range of values, the final value was omitted. For example when valid squelch values were 0 through 9, only values 0 through 8 would be displayed. v0.16.2: Update MD-2017 Radio Buttons to those of CPS v1.22 Ensure unique names when setting multiple records Speed up name field change propagation v0.16.1: Fix panic on nil mw.connectChange v0.16.0: Add possible radio types to the Basic Information Add the possible radio types to the Model Name field of the Basic Information page. Add ability to remove buttons from the main window The functions of the buttons are duplicated in the Edit menu. Optionally permit the buttons to be removed to save screen area. Remove Undo/Redo capability The burden of maintaining the undo/redo code is much greater than the perceived value. It was an interesting idea and I had fun doing the initial implementation, but now the complexity is higher. Remove ListIndexChange support We no longer need to propagate list index changes because the list reference is now a string instead of a record index. Update a record's references when its name changes v0.15.12: Go back to using obj.DeleteLater() I foolishly replaced an obj.DeleteLater call with object.DestroyObject(). The result was a panic on modifying field widgets. Now we are back to safely deleting them after the current round of GUI updates are completed. v0.15.11: Avoid panic on cancel convert codeplug v0.15.10: Clear window subscriptions for new records Add HBox.Clear() & VBox.Clear() Add a blank line to record lists Better handle GPS & non-GPS codeplugs Update invalid field list after drag/drop Ensure selected row is viewable Add option to require unique contact names I don't know why the original CPS doesn't require it. Force contact names to be unique (internally) This is done by appending a random string to the contact name. The added suffix is not displayed to the user nor stored in the codeplug. Disable field when enabler is invalid Make listIndex a string value Set log prefix to include filename Widen record list v0.15.9: Update MD-2017/RT82 to features of CPS 1.22 v0.15.8: Fix hasUniqueNames() This caused imports of text, spreadsheets, json to fail on certain codeplugs. v0.15.7: Remove debug messages Fix unique record name when copying records Close record windows upon closing main window Make recordList column a fixed width Avoid double-stuffing record windows Add BeginChange/EndChange internal API Fix panic while setting current record Copy between codeplugs with deferred values Fix value of invalid comboboxes and spinboxes Fix copying records between codeplugs This used to fail. For example, if copying a zone, and the channels did not exist, the copy would fail. We now also copy all of the records the requested records depend on. Undo/redo of this operation does not preserve the order of the records. I'm still looking into this. I'm tempted to remove undo/redo entirely. Clean up some UI functions Add ability to set button definitions v0.15.6: Fix frequency rounding error This would cause certain frequencies to be written out off +/- by 0.00001 MHz (10Hz). v0.15.5: Revert several commits to regain stability I made several changes without adequate testing, resulting in instability. I will revert these commits now: commit 8e744aa70c1fc92adcf69a076dd565b305cd170b Add ability to set button definitions commit 8e10281ef0d5f2364e7361927b31657b6080cb70 Clean up some UI functions commit e0dfdc35fc500c349cc6119f8fd8cf73395265d4 Fix copying records between codeplugs commit 4d418dcaaa25219e28b8b44da72f8921b8651b49 Remove Undo/Redo. See if anyone complains I'll add those fixes in later after better testing. v0.15.4: Do frequency conversion with 64-bit integers On Linux, integers are by-default 64 bits. However, we use a 32-bit compiler on Windows (hoping for maximum compatibility). I have received reports of rounding problems. We'll do the conversions with 64-bit ints on all platforms and see if that helps. v0.15.3: Remove Undo/Redo. See if anyone complains v0.15.2: Fix convert codeplug type and text import After removing the last record before populating the new codeplug, we referenced that removed record. Oops. Fix copying records between codeplugs This used to fail. For example, if copying a zone, and the channels did not exist, the copy would fail. We now also copy all of the records the requested records depend on. Undo/redo of this operation does not preserve the order of the records. I'm still looking into this. I'm tempted to remove undo/redo entirely. checkCodeplug: Rename "Update" to "Re-scan ..." Rename it to "Re-scan for invalid values". Some interpreted "Update" to mean that it would fix the listed invalid values. v0.15.1: Fix app name back to 'Codeplug Editor' It accidentally got changed to 'Codeplug Editor x'. v0.15.0: Clean up some UI functions Add ability to set button definitions Add ability to edit text messages Avoid qt warning when deleting last record v0.14.9: Fix validating txOffset if rxFrequency is invalid editcp would segfault if the rxFrequency was invalid. Now, it's more robust. editcp now survives loading a .rdt file that has a valid md-uv380 header, followed by all 0xff bytes. Select correct records after inserting them After you insert records, they will now be selected. Move to qt 5.11.1 and fix incompatibilities Makefile: Remove "upload" target Fix build of docker_usb images These recipes weren't complete before. Now "make docker_usb" should work right after installing docker. It can be run again to update the docker usb images. Update record list on insert/remove records Clean up undo/redo code No functional changes v0.14.8: Change some spinners to combo boxes If the number of selections is relatively small, display via a combo box instead of a spinner. Enable changing multiple records at a time This commit adds a feature to provide for setting a field on multiple records. To use it, select multiple records in the record list oon the left. Any field changes made will be applied to all of the selected records. Enable certain fields only when channel is Digital We added some fields that are only to be enabled when the channel is in digital mode. Here, we mark the dependency on digital mode. Spinbox: Update value when "EditingFinished" We were updating the value whenever it changed. This doesn't work well when updating multiple records. Rename mid-power setting to "Medium" Add export text with one line per record While we're here, we'll also remove the index ([1]) after record and field names. It's not used and I think it confuses people who would want to edit the text file and reorder records or fields. Makefile: remove personal targets v0.14.7: Unabbreviate countries/states for MD-UV380 usersdb There is no benefit to abbreviating the userdb for the MD-UV380 because 100 bytes are statically allocated for each entry. So, we use full country and state names. Remove error msg from popup title Makefile: Run "uploaded" after uploading The uploaded program will move the uploaded files to their final directories. v0.14.6: Simplify message when USB device allocation fails This error commonly occurs when the USB device is already in use by a virtual machine. Provide a message to that effect. v0.14.5: Warn: MD-2017 & MD-UV380 userdb only work on CSV FW Add General Settings field to enable ContactsCSV v0.14.4: Force bandwidth to 12.5 KHz in digital mode Revise flash memory writing for MD-UV380 users db The MD-UV380 has the users db in the processor's flash memory, not in a separate SPI flash memory. This commit makes that happen. Work around reserved area in flash memory There is a section of reserved memory in flash in the range 0x40000-0x110000. When we read or write a codeplug larger than 256K (0x40000) bytes, we must skip this region. The upper bound address for codeplugs is 0x200000 (2048K). We translate any addresses greater than 256K that would yield a new address of less than 2048K. If the flash address is between 256K (inclusive) and (2048-832)K (exclusive), we add 832K to the address before doing the operation. Similarly for erasing blocks of flash. Add missing MD-2017 General Settings Update thanks popup message Ignore non-existent enabling fields Make the Contacts Call Type 5 bits wide When I just used the 2-bit field, Group Calls were'nt recognized by the Tytera CPS and apparently not by the MD-UV380 either. Change invalid string to "=INVALID=" The asterisks had to be escaped when searching for invalid fields. This will be slightly more convenient. No longer disable CPS Version from being exported Also, protect ourselves from bad values for CPS Version. Set default values for fields. This is useful when converting from one codeplug type to another. Fields that didn't exist in the first type will now take on default values, instead of invalid ones. Fix codeplug radio type conversion When importing text files, match field names with or without a trailing "A". Also, when converting to a new codeplug type, clear all records before importing the new text records. Add an "experimental" preference and CLI flag This will be used to enable broken or experimental features. Currently, it has no effect. internal: rename functions using types, not models Several function names are no longer correct, rename them to match what they do. Clean up changelog generation script Makefile: Add target to upload without pushing Handle the 16-byte trailer in md-uv380 codeplug The md-380 codeplug file has a 16 byte trailer. When the codeplug size was expanded for the md-uv380, these 16 bytes were left at that position in the middle of the codeplug file. However, these bytes are not part of the codeplug image that is stored in the radio. Finish redrawing codeplug windows on field change In commit 6fd0f1e5fa0b984a4037f9b07559a870400627ae, I missed some places were fields were set, so windows weren't all redrawn. I hope I got them all this time. Restore MD-2017 & MD-UV380 support Revert "Remove MD-2017 & MD-UV380 support temporarily" This reverts commit dec7df627ea4de267c33322f2600f015615682f3. v0.14.3: Remove MD-2017 & MD-UV380 support temporarily I've ordered an MD-UV380 and will need to test with it. Until its working, I'm disabling support for these radios. v0.14.2: Sort frequency ranges before showing to the user Remove spaces from new codeplug internal filename Replace spaces by "_" characters. Remove redundant cpi.Type from cpi.Models Sort radio models when listing them Add RT3, RT3-G, RT3S, and RT82 models Generate a changelog on upload Make the userdb for the md-uv380 match dmrconfig I don't have access to an actual md-uv380, so the best I can do is match the userdb image written by the dmrconfig program, https://github.com/sergev/dmrconfig Ignore all userdb lines with a bad Radio ID Revert "Ignore CSV header line for users from radioid.net" This reverts commit d4079bf5cab68629e8a99c5b27c800738440a77b. The following commit will revise the handling of lines with bad ID values. v0.14.1: Ignore CSV header line for users from radioid.net Apparently radioid.net added a CSV header that we need to skip when processing user ids. v0.14.0: Add conversion of codeplug to a new radio type userdb: Add users support for MD-2017 and MD-UV380 radio: Change funcs to take io.reader/io.writer Move "Write factory firmware" up a menu level Redraw all codeplug windows when any field changes When multiple windows were open, they could get out of sync. Now, we update all the open windows associated with a codeplug when any field is changed. Permit biFrequency fields to be set again I don't remember and can't figure out why this was removed. Initial support for the MD-UV380 & MD-2017 radios debug: Print dprint args with "%#v" Simplify frequencyOffset logic Move the conversion from a frequency to an offset to the v.valid() function. This works because v.valid() is *always* called after v.load() and v.setString(). Added a Dup option to record lists Dup is like Add, but places the new records immediately after the records they were copied from. v0.13.1: field: Make frequencyOffset.loaded default to true We do this by naming it notloaded, so the default value of false means that the value is loaded. Also, if the rxFrequency is not available in the record, we skip the validity check. This happens when adding (copying) records and creating the new fields one-by-one. Add option to download the KD4Z mods to md380tools uv380: Begin support for MD-UV380 and MD2017 Fix add channel when name has trailing space When the channel whose name has trailing spaces is copied, editcp would panic. Fixed by removing the trailing spaces before applying the unique name logic. v0.13.0: Update menu bar after checking codeplug validity v0.12.9: radio: Validate codeplug when reading/writing it Check the codeplug for errors after reading it from the radio as well as before writing it to the radio. Show a popup if errors are found. v0.12.8: channel: Remove KHz from bandwidth value Instead, place it in the label. v0.12.7: Enable full stack backtrace on panic() The recover() that was previously added was ill considered. Debugging is helped by having the stack backtrace. Update menubar after preferences are edited codeplug: Maintain a slice of warning strings Use this slice to show which fields have invalid values internal: remove ignoreWarnings parameter Remove setting to suppress warnings Add menu item to show invalid fields We now don't list invalid fields when loading or saving a codeplug. Instead when there are errors, we refer the user to this menu item. channel: Show Tx Offset instead of Tx Frequency internal: Revamp AddFieldRow(s) functions channel: Add Emergency System field We still need to add the Page to define the available emergency system. channel: Add 20 KHz bandwidth setting With this addition, we now support 12.5 KHz, 20 KHz, and 25 KHz in analog mode. 20 KHz was added in later versions of the original CPS. While we're changing things, add "KHz" to each setting value. foo channel: Fix TOT width and limit it to 555 seconds Change the timeout timer field from a 6-bit field to 8 bits, matching what is written by the original CPS. Also limit its value to 37 (0x25). This value is multiplied by 15, yielding a maximum TOT value of 555 seconds. channel: Fix RX & TX Signalling system This commit changes the field width to be 8 bits, matching the CPS software. field: Initialize hexadecimal value on imports v0.12.6: Add installer for windows version of dmrRadio usersdb: Remove extraneous debug message Add warning before updating codeplug or user db Corruption may occur if a signal is received while writing to the radio. We add a warning to turn to an unprogrammed channel. v0.12.5: Fix nil pointer de-ref reading codeplug from radio The nil pointer reference was also hit when loading a .bin codeplug file (a codeplug file without the .rdt header). Oops: Add privacySettings.go to repository v0.12.4: Add the ability to edit privacy settings channel: make Privacy Number value selectable Instead of free form field for the privacy number, make it a combo box so the value can be selected from a list. generalSettings: Add Keypad Tones field channel: Disable Bandwidth field in digital mode This change permits the bandwidth to be set to 50KHz only when the channel is in analog mode. v0.12.3: Fix progress functions and quiet down the linter usersdb: Significantly update the Users() function Too many changes to enumerate here. Sorry. Revamp userdb handling: proper merge and options When merging userdb files: instead of replacing all fields, replace only empty fields. AbbrevCountries AbbrevStates AbbrevDirections RemoveDupLastNames RemoveRepeats TitleCase RemoveMatchingFirstNames dfu: Ensure progress count doesn't exceed 100% readUsers: Only read valid userdb bytes to file Rename dumpUsers to readusers. Read the first line of the user db to get the size and then only read the actual user db into the specified file. Makefile: Only tag commits updating version Add dmrRadio to the main README dmrRadio: Add conversion to/from text and xlsx dmrRadio: Ignore case of subCommand name v0.12.2: dmrRadio: require freqRange flag for readCodeplug To properly set the frequence range field in the .rdt header, we need to know the specific frequency range for the codeplug. v0.12.1: dmrRadio: Add dmrRadio targets to Makefile Revert "codeplug: Export cp.SetLastProgrammedTime" This reverts commit 62a553da4e4268837a9f9667840f47215ddd727a. It turned out that there was no need to export it after all. dmrRadio: Create new CLI program for users/plugs The radio program has been renamed to dmrRadio. When reading/writing codeplugs, it now creates/uses .rdt format instead of bin format. Added the new subcommands jsonToCodeplug and CodeplugToJSON to convert a .rdt file from/to JSON. codeplug: Place frequency first in freq Ranges codeplug: Add AllFrequencyRanges Returns all know model names and their corresponding frequency ranges. Update copyright to 2017-2018 codeplug: Export cp.SetLastProgrammedTime cleanup: Remove unused variable: downloadChecked Update version to 0.11.9 Add writing of original firmware version D14.04 Used on the newest MD380s radio: get radio utility command running again makefile: Do a git-push on "make upload" v0.11.8: windows: Do uninstall silently, without a popup window v0.11.7: dfu: Call SelectCurrentConfiguration usb command This exists only on windows. Not calling it is said to cause usb errors on some windows systems. userdb: Remove "european" option Sensitive data has been removed from the source database for EU hams, this option is no longer needed. Reduce max lines in warning popup to 12 When it was set to 20, the Accept and Ignore buttons were off the bottom of the low resolution screens. This confused new users. Makefile: "make upload" now implies "make tag" v0.11.6: userdb: Use separate transport and client timeouts We'll try 20 seconds for transport timeouts and 300 seconds for client timeouts. userdb: Merge entries of radioid.net & ham-digital.org v0.11.5: Accept a minimum of 50000 users in the main db We previously had a minimum of 90000, but radioid.net has now removed EU users, resulting in about 56000 users. We're still waiting for the dust to settle after the GDPR.: v0.11.4: userdb: increase download timeout to 40 seconds v0.11.3: userdb: Use radioid.net instead of dmr-marc.net userdb: Default to existing db if < 12 hours old The user can force a download of a new db by checking a box. Update version to 0.11.2 userdb: Change to getting quoted csv from DMR-MARC This avoids the problems with some fields containing commas. Revert "Get the DMR-MARC database via its json api" DMR-MARC reversed their decisision to change to a json API. Instead, they now have csv versions that are updated daily. This reverts commit 2e7c1a1e93f630b73258c079210a30ef63dc94b8. userdb: Remove leading '#' character from userid This mysteriously appeared in some "special" entries. E.g. #2730,TG2730 AREN Log. v0.11.1: Get the DMR-MARC database via its json api Also, improve error messages on failure to get the db. Add image files for logo v0.11.0: Ignore short lines from getSpecialUsers The URL for Ireland's special users has been shown to return a blank line. Ignore all lines without the minimum number of fields. v0.10.18: Add "Menu Items" editing window v0.10.17: Fix codeplug save under Windows Ensure that we close the tmpfile before renaming it v0.10.16: If radio programming password 0, write 0xffffffff This sets the radio to not require a password for the "Program Radio" menu option. v0.10.15: Fix firmware URL downloaded if default is selected This bug was introduced in commit 91d93926d03a5aa16f1888f578e33841eee6a917. v0.10.14: Download from correct original firmware URL v0.10.13: Fix reversed byte radio passwords The Radio Programming Password and the Power On Password fields were byte-reversed. Now fixed. Thanks to Piotr SQ5KLN for the bug report. v0.10.12: Trim Whitespace from lineedit field input And don't force trimming whitespace on f.setString(). Undo: show quotes around changed field strings v0.10.11: Fix validation of memberListIndex values v0.10.10: Fix isDeferredValue for VtMemberListIndex types Make 'bad record name" error messages unique Set theme jekyll-theme-minimal Begin github pages docs v0.10.9: Add CiInCallCriteria field Clarify European user db option Rename 'Group List' to 'RX Group List' Add filename to userdb dialog Change user db download progress function Base it on the number of urls downloaded, instead of an arbitrary timeout. Update year in copyright notice SPI Flash: Set programming mode on read/write Enter programming mode before reading or writing the SPI flash. Reboot the radio after completing that operation. Fix deferred error handling Previously, the deferred function would wipe out any error value. Fix error messages on downloading the User DB Fix import of General Settings record Fix deferred value handling for VtMemberListIndex This fixes an infinite loop bug. Correct contributor name in thanks() v0.10.8: Add a Help->Thanks menu entry Acknowledge those who have helped develop editcp. Contacts: set Call ID 16777215 for Call Type All Previously, we relied on the CallType field being set after the CallId field. Here, we handle it correctly regardless of order. Close the file where it is opened Add a icon for editcp.exe This icon was kindly provided by Jose Melo (CT4TX). Add ability to suppress invalid field warnings Add a preference checkbox that will silently ignore invalid fields when reading and writing codeplug files. Silently fix invalid GPS Report Interval values Invalid GPS Report Interval values are common on codeplugs for non-GPS radios. We'll just quietly correct them. Fix validity check for span-valued fields Show blank value for invalid combo and spin boxes WriteRadio: Don't validate codeplug before writing We check field validity on reading files and modifying fields. It is redundant to also check them before writing the radio. Save File: Handle Ingore Warnings correctly While saving a file, if the user selects the "Ignore" button after being shown warning messages, go ahead and save the file. v0.10.7: Update Makefile to supply 99-md380.rules udev file Also add a message when installing to copy that file to /etc/udev/rules.d v0.10.6: Ignore return from dfu.GetStatus() after reboot I'm guessing there's a race. If the radio reboots before we request a status change, the request returns an error. We probably shouldn't do the GetStatus call at all, but I see it in Travis Goodspeed's code, so I'll keep it for now. v0.10.5: Fix DCS Encode/Decode field values v0.10.4: Revert "Update dll files to latest version from ST Micro" This reverts commit 0a93906ee3f9974b6e952c550dc67d7ded8d1bec. Apparently the latest (smaller) versions of these dll files fail under some circumstances. We'll go back to the versions currently used by the various CPS programs. v0.10.3: Reboot radio after reading or writing flash memory v0.10.2: Fix USB driver access method for Windows 10 Windows 10 returns a different error than Windows 7 when we are querying how large a structure is needed for a particular data structure. Instead of checking for specific error returns, the better fix (and used in the ST Micro demo app) is to simply ignore the error value. Makefile: add stdfu/*.go as dependencies Makefile: make win installer depend on dll files Update dll files to latest version from ST Micro Bonus: The new files are significantly smaller than the ones I previouslly used. v0.10.1: Remove debug messages v0.10.0: Update usersDB dl checkbox on euro checkbox change Ensure we close the files we create Catch panics so we can display an error on windows Provide windows-specific log functions For unknown reasons, building with QT on windows doesn't permit writing to stdout. We'll use a message box instead. Use the STDFU.dll driver for windows Using the same driver as the CPS avoids having to switch between libusb and the "standard" windows driver for the MD-380. Fix potenial overflow in reverse4Bytes v0.9.8: radio: Fix firmware url for default model selected v0.9.7: Add write of md380tools firmware Change spi flash erase delay to 500 milliseconds Bypass error popups with empty messages Editcp: Add write userdb dialog Codeplug: Update for new DFU API Add userdb euro flag to radio.go Move progressCallback func to NewDFU() dfu: modify progressFunc DFU: Replace goto with wrapError() Codeplug: Replace goto with wrapError() Editcp: Update progress messages Radio: Add support for writing users file Codeplug: Change progress callback Add library to support writing userdb files Refactor dfu.go, preparing for writing usersDB Reorder File menu, move Revert after opens Change "Ok" button in preferences pop-up to "Save" Create Radio menu, move Preferences to Edit menu Move "Write codeplug to radio" and "Read codeplug from radio" to the new Radio menu. trivial: Have clobber remove installers first Change Windows shortcut names to EditCp Fix import of GPS fields v0.9.6: Fix date parsing with 4-digit years Change README to include getting libraries Usb: go get github.com/google/gousb Spreadsheet: go get github.com/tealeg/xlsx Add gpsSystem.go Oops, forgot this earlier. v0.9.5: Add support for GPS version of md380 and md390 Fix Last Programmed Time to have 4-digit year Fix generation of newfiles.go Fix width of record lists and field lists They were based on a multiplier. Instead we add the width of the scrollbar. Fix size of Basic Information record There is no visible effect of this change, it's only for correctness. v0.9.4: Don't set codeplug directory if non-existent Update generated.go display names trivial: Revise record display names Digital Contacts -> Contacts GroupLists -> Group Lists Change json export indent to tab character v0.9.3: Rename field types ChannelMember and ContactMember They are now just Channel and Contact v0.9.2: Fix gui spacing/expansion in windows Remove superfluous calls to SetContentsMargins Don't insert duplicate names into recent file list Trivial Change import menu descriptions Factor out common code from importXXXXFile funcs Create storeParsedRecords() to hold the common code. Clean up deferred value field handling Sort exported text and spreadsheet file output Records and Fields will be sorted in the order they are layed out in codeplugs.json. Add import/export of spreadsheet (.xlsx) files Add capability to export the codeplug as JSON Refactor parseRecords Prepare for additional text import formats. Fix Add record when no record is selected We duplicate the last record if no records are selected. Fix close of initial window without codeplug It would crash. Not now. Rename several record type names This will make existing codeplug text files incompatible, but I believe it's an improvement going forward. Rename importFrom>importText, ExportTo>ExportText v0.9.1: Fix Copy Record Function It was continuing to use pointers to the old fields (except for the name field). We now create new fields. source: build docker images with usb Update instructions for updating the docker images to include the libusb-1.0-0-dev package. Fix windows menu when no codeplug has been opened v0.9.0: Add capability to read and write radio over USB The USB code in dfu/dfu.go began as a transliteration of the python code from https://github.com/travisgoodspeed/md380tools. Fix remove of autosave file on normal exit Remove panic() on iStrings getString() Instead, we'll return an invalidValueString error. Improve warning messages on text file import Revise commit dc6d3e14, Fix load of bin files There should be no change in behavior. Update version to v0.8.13 Fix load of bin files We failed to load the rdt header for md380tools bin files. This patch fixes it. Thanks to Ron McMurdy, W5QLD, for reporting the problem. v0.8.12: Fix set last programed time on save Don't add auto-generated name to recent file list Change TimeStamp to LastProgramedTime import: make bad field name a recoverable warning If only one model, don't present model options Change Variant to FrequencyRange Remove day-of-week from timestamp field Don't export hidden BasicInformation fields v0.8.11: Add Basic Information button/window Fix offsets for MD40 basic info and gen setttings Fix DJ-MD40 model name Remove obsolete md40GsRecord() v0.8.10: Change Digital Contacts record-deleted detection Use a call type of 0, instead of a nil name Change preferences window to be modal Don't attempt autosave if editor has no codeplug Disable recentFiles menu if no recent files Don't close editor when save file is cancelled Change file menu order: import, export, then revert Major update, import text without loading codeplug Permit importing text to succeed on value errors. Added multiple error/warning messages on importing text. Consolidate warning & error into a single value We always return either an error or a warning. Introduce a new error type, codeplug.Warning. trivial: Fix error msg formatting Permit whitespace at start of import text Add codeplug.record() & codeplug.records() Import without creating a new codeplug Fix codeplug library Makefile Ignore writes to BI filename and frequency fields Correct the name for text file opens Rename "RDT Header" to "Basic Information" We will also include the Basic Information record in text export/import. Increase rdt header size to 8805 bytes v0.8.9: Fix record.NewField() for zero-length field lists Fix ZoneInformation for md390 v0.8.8: Fix auto-init of zero-length lists v0.8.7: Fix handling of zero-length field lists Handle zero-length record lists Even though the standard software doesn't create zero-length record lists, they have been observed, so we'll handle theml v0.8.6: Fix deleteField, which wasn't storing anything trivial: mv listIndex.load(), listIndex.store() Fix codeplug.CurrentHash() We now want to hash the full codeplug byte range v0.8.5: Fix EOF when importing a text file v0.8.4: Revert "Mark newly created codeplug files as changed" This reverts commit ed7b200a60eac61e0be08fefea19bf4a74db75b0. I'm not sure why I did this in the first place. The newly created codeplugs can be recreated easily. In practice, creating a new codeplug and then immediately importing text is simpler if we don't mark the newly created codeplug as changed. Print line/character numbers on import text trivial: Fix error messsage for record.addField Fix span field validation linux: qml files are unused, remove them windows: Only provide a 32-bit version It seems to run fine on my 64-bit Windows 10 system. Revert "Provide a standalone exe file instead of installer" This reverts commit 15d67cf1b4864a443f7b03ad7ce3c10ee91db6a2. It turns out that Windows is very picky about downloaded exe files and presents a scare popup an indeterminate number of times for such files. We'll return to using an installer so that we get the scare popup only once for the installer. It's also a bit nicer for the typical windows user, I think. Remove code to infer frequency range Now that we always have a vaild rdt header, we know we have a valid frequency range. There is no need to infer one. v0.8.3: Remove D680 model name (CSI-700?) I found this one in a file AZ_700.rdt, which appears to be for a CSI radio. The format seems the same as for the md380, but to be safe, I'm removing it for now. Add CPS version field Mark newly created codeplug files as changed Revise model/frequency selection code Use temporary codeplug to get model if needed v0.8.2: Always write the full-size codeplug file Fix timeStamp field conversion v0.8.1: Disable preference setting of default model Oops, this didn't have adequate testing. Will need fixing. v0.8.0: Provide a standalone exe file instead of installer Windows 10 discourages installing from unknown providers. We'll skip the installer and just provide an exe file. Ensure new codeplug filenames do not collide Automatically ignore non-existent fields in forms Ignoring non-existent fields enables one form to be used by multiple models. Add filters to file open/save dialogs Use numeric suffixes to make unique record names Using numbers instead of letters works better with the names in the fresh (virgin) codeplug files. Add fresh rdt files and enable File->New We also now always write rdt files, though we still read can read bin files. When a bin file is read, we ask what model and frequency variant it is and then use the rdt header (and tailer) from the corresponding fresh (virgin) rdt file. This commit contains too many changes. I'm just too lazy to break it up into easily reviewable pieces. Add timestamp field to general settings record Permit records to be added up to the max The number of records was incorrectly limited to MaxRecords-1. Fixed. v0.7.3: Fix record.Copy record.Copy was not correctly setting up the fDesc fields for the fields in the copied record. The effects of this bug were catastrophic. sigh. v0.7.2: Change validation errors to ignorable warnings Fix model field in RDT header I'm not sure how long the model field in the header is. For now, I'm reducing it from 16 characters to 8 characters. I'll adjust it up if we encounter any models with longer names. Also fill the field with 0xff after the nul byte that terminates the model string. Field: rename SetString -> setString Also create a new f.SetString() records a change. Make value functions package private Permit only one CallType "All" in Digital Contacts Digital Contacts member: only show group contacts The available list for "Digital Rx Group List" should only consist of "Digital Contacts" with a "Call Type" of "Group". Don't delete digital contact: All Call I had used data from this page, http://www.iz2uuf.net/wp/index.php/2016/06/04/tytera-dm380-codeplug-binary-format/, which indicates a digital contact record beginning with 0xffffff is deleted. Unfortunately, that is incorrect. An contact with a type of "All Call" has a Call ID of 0xffffff (16777215). Such records were incorrectly considered deleted. We no longer consider those records as deleted. Set codeplug directory on all codeplug opens v0.7.1: Remove popup if an invalid value is auto-corrected Trim spaces from field values Trivial: Rename label to model Permit Digital Contact names to be non-unique Fix makeNameUnique when record has no name field Trim name before adding unique suffix Fix exported record and field type names Add Alinco DJ-MD40 support to the README v0.7.0: Remove echo of command line from editcp.sh This was a leftover from debugging. Add ambiguous codeplug type names to preferences Complete support for the Alinco DJ-MD40 Remove bytes parameter from load/store functions This is necessitated because some codeplugs have discontiguous byte areas. First seen by me in the zone member fields of the DJ-MD40 codeplug. Begin support for Alinco DJ-MD40 Prepare support for additional codeplug formats Add additional general settings fields for Alinco DJ-MD40 Trivial: add space to "GeneralSettings" button Save directory used by open/save filename diaglogs Detect when built without using QT Remove popup window during CanDrop test The popup during the can-drop check results in a GUI hang. v0.6.1: Fix drop error: "drop error: no name" Off-by-one error on field name length. Change name of windows installer Rename the windows installer binary to editcp-$VERSION-installer.exe to avoid confusion with the editcp binary itself. v0.6.0: On initial open don't present open dialog When no filename was specified on the command line, we used to immediately go to an open file dialog. This confused users. We now let the users do it themselves via "File->Open" or "File->Open Recent". Provide win32 binaries as well as win64 To do this we use the NSIS installer instead of wixl and MSI. We'll produce an installer executable that contains both the win32 and win64 executables and installs the appropriate one for the target system. Handle int == 0xffffffff on 32-bit systems Cleanup Makefile Remove my home directory from shell scripts These references get overwritten during the installation process. But it was an error to include them in the first place. Thanks to snd_crew on freenode for reporting it. Aesthetics: Pretty-up recordLists and fieldLists Prevent the right or bottom items from stretching by adding filler space to the right and below recordLists and fieldLists. v0.5.0: Treat a radio password value of 0xffffffff as zero I'm not sure how, but some codeplugs have a value of 0xffffffff in the radio password field that is supposed to be bcd only. Treat it as if it were 00000000. Treat loaded records with an empty name as deleted I believe this is an alternate way of designating a deleted record. Regardless, I have found codeplugs doing this. Add mention of Windows binaries as well as Linux Create a windows installer .msi file We'll create an editcp-$VERSON.msi file holding the editcp.exe. On installation, two shortcuts will be created, one on the desktop and one on the start menu. v0.4: Trivial: Add space to FieldChange error message Trivial: updateDeferredFields: rename variable: ok Trivial: Rename AddFieldRow() ->addFieldRow() Change value: invalid -> default on field enable When a field is enabled, if the field's value is invalid, we set it to a default (valid) value. Ignore invalid loaded fields if disabled When loading fields from a codeplug file, if a field is in valid, but currently disabled, we do not produce an error. Also when saving to a codeplug file, invalid, but disabled, fields are not written, leaving the original invalid value in the codeplug intact. Move field enabling logic from ui to codeplug The main reason to do this is to avoid validating disabled fields when a codefile is initially read. I have seen codeplugs that have bad values for some disabled fields. As a bonus, this simplifies the interface to the UI code. v0.3: Add git-tag version command to the Makefile "make tag" will now create a git tag with the version from the version.go file. Add 64-bit static windows build to the Makefile Move the version string into its own file Place the version string in version.go Add the version string to the Help->About message Fix overflow error for compilers with 32-bit ints Fix move from available field list to member list Fix a crash that occurred when dragging fields from the available field list to the member field list. Fix dragging from one type of field to another Dragging from one type of field, e.g. contacts, to another type, e.g. channels is not permitted. However there was a bug in the code that tested if the drop was permitted that terminated the program. This commit fixes that bug. Disallow overlap on field drag/drop QT already prevents overlap when dragging contiguous fields. We extend that to disallow overlap when the dragged fields are discontiguous. The reasoning is that it's not obvious what the semantics are and it is less confusing to the user to just disallow it. Disallow overlap on record drag/drop QT already prevents overlap when dragging contiguous records. We extend that to disallow overlap when the dragged records are discontiguous. The reasoning is that it's not obvious what the semantics are and it is less confusing to the user to just disallow it. v0.2: Rename the tar files, usinge a - before the version editcp.0.2.tar.xz ==> editcp-0.2.tar.xz Disallow dropping a field on the next field Dropping a field on top of the following field in a list should be a no-op, so we tell QT to disallow it, giving the user feedback. Fix dropping a field on top of the next field Dropping a field on top of the following field in a list should be a no-op, since dropping on a list item is the same as dropping before that item. Now, we avoid doing it to avoid a QT crash. Disallow dropping a record on the next record Dropping a record on top of the following record in a list should be a no-op, so we tell QT to disallow it, giving the user feedback. Fix dropping a record on top of the next record Dropping record on top of the following record in a list should be a no-op, since dropping on a list item is the same as dropping before that item. Now, we avoid doing it to avoid a QT crash. Thanks to Kevin Otte for discovering and reporting the crash. v0.1: Initial (empty) commit