On Sat, Feb 13, 2016 at 8:11 PM, Dan Smith via chirp_devel chirp_devel@intrepid.danplanet.com wrote:
The problem is when CHIRP displays the firmware version, the firmware version gets sanitized so it can be displayed. This changes the 0xFF values to spaces. Then when the user modifies any settings, the sanitized firmware version gets written to the image. Since the firmware of the image no longer matches the firmware version of the radio, CHIRP aborts the upload.
Hmm, are we letting people alter the firmware version that gets stored back into the image? Is that a good idea?
No. These messages cannot be edited by the user. CHIRP is making the changes, not the user. I want to prevent this behavior.
Is there a way to display the firmware version as read only text (as it is now) but not alter the characters stored in the image?
I would think we should change that to a label instead of an entry so that it's visible but not alterable by the user...
How that done? This is what is there now.
def _filter(name): filtered = "" for char in str(name): if char in chirp_common.CHARSET_ASCII: filtered += char else: filtered += " " return filtered
_msg = self._memobj.firmware_msg val = RadioSettingValueString(0, 7, _filter(_msg.line1)) val.set_mutable(False) rs = RadioSetting("firmware_msg.line1", "Firmware Message 1", val) other.append(rs)
val = RadioSettingValueString(0, 7, _filter(_msg.line2)) val.set_mutable(False) rs = RadioSetting("firmware_msg.line2", "Firmware Message 2", val) other.append(rs)
The "0xFF"s in "firmware_msg.line2" get changed to " " by the filter helper and then the changes are written to the image. I need to keep the "0xFF" bytes from getting changed.
--Dan
Jim