<div dir="ltr">Hello, <br>I'm new to Mercurial, but have been enjoying the fruits of your project for a while. I recently picked up a VX-8GR and noticed that not many settings were populated, so this is my first stab at adding some...<br>
<br>Ray<br><br># HG changeset patch<br># User Ray Cielencki <<a href="mailto:rayslinky@gmail.com">rayslinky@gmail.com</a>><br># Date 1407084280 14400<br># Sun Aug 03 12:44:40 2014 -0400<br># Node ID de092ff89055726b65a355a2e8c8444f3fbb972b<br>
# Parent 73e127bbd9813b6cf966bdca1fefdc6c4ecac058<br>[vx8] New settings, from a VX-8GR<br><br>diff -r 73e127bbd981 -r de092ff89055 chirp/vx8.py<br>--- a/chirp/vx8.py Tue Jul 22 19:31:33 2014 -0400<br>+++ b/chirp/vx8.py Sun Aug 03 12:44:40 2014 -0400<br>
@@ -264,6 +264,27 @@<br> char padded_string[60];<br> } aprs_beacon_status_txt[5];<br> <br>+#seekto 0x04bf;<br>+struct {<br>+ u8 beep; <br>+} beep_select;<br>+<br>+#seekto 0x047f;<br>+struct {<br>+ u8 flag;<br>+ u16 unknown;<br>
+ struct {<br>+ u8 padded_yaesu[16];<br>+ } message;<br>+} opening_message;<br>+<br>+#seekto 0x04da;<br>+struct {<br>+ u8 scan_restart;<br>+ u8 unknown;<br>+ u8 scan_resume;<br>+} scan_settings;<br>+<br> #seekto 0xFECA;<br>
u8 checksum;<br> """<br>@@ -650,6 +671,15 @@<br> "every 2 minutes", "every 3 minutes", "every 4 minutes",<br> "every 5 minutes", "every 6 minutes", "every 7 minutes",<br>
"every 8 minutes", "every 9 minutes", "every 10 minutes")<br>+ _BEEP_SELECT = ("Off", "Key+Scan", "Key")<br>+ _OPENING_MESSAGE = ("Off", "DC", "Message", "Normal")<br>
+ _SCAN_RESUME = ("2.0s", "2.5s", "3.0s", "3.5s", "4.0s", "4.5s", "5.0s",<br>+ "5.5s", "6.0s", "6.5s", "7.0s", "7.5s", "8.0s", "8.5s",<br>
+ "9.0s", "9.5s", "10.0s", "Busy", "Hold")<br>+ _SCAN_RESTART = ("0.1s", "0.2s", "0.3s", "0.4s", "0.5s", "0.6s", "0.7s",<br>
+ "0.8s", "0.9s", "1.0s", "1.5s", "2.0s", "2.5s", "3.0s",<br>+ "3.5s", "4.0s", "4.5s", "5.0s", "5.5s", "6.0s", "6.5s",<br>
+ "7.0s", "7.5s", "8.0s", "8.5s", "9.0s", "9.5s", "10.0s")<br> _MY_SYMBOL = ("/[ Person", "/b Bike", "/> Car", "User selected")<br>
<br> def get_features(self):<br>@@ -1135,12 +1165,73 @@<br> <br> return menu<br> <br>+ def _get_beep_select(self):<br>+ menu = RadioSettingGroup("beep_select", "Beep Select")<br>
+ beep_select = self._memobj.beep_select<br>+<br>+ val = RadioSettingValueList(<br>+ self._BEEP_SELECT,<br>+ self._BEEP_SELECT[beep_select.beep])<br>+ rs = RadioSetting("beep_select.beep", "Beep Select",<br>
+ val)<br>+ menu.append(rs)<br>+<br>+ return menu<br>+<br>+ def _get_scan_settings(self):<br>+ menu = RadioSettingGroup("scan_settings", "Scan Settings")<br>
+ scan_settings = self._memobj.scan_settings<br>+<br>+ val = RadioSettingValueList(<br>+ self._SCAN_RESTART,<br>+ self._SCAN_RESTART[scan_settings.scan_restart])<br>+ rs = RadioSetting("scan_settings.scan_restart", "Scan Restart",<br>
+ val)<br>+ menu.append(rs)<br>+<br>+ val = RadioSettingValueList(<br>+ self._SCAN_RESUME,<br>+ self._SCAN_RESUME[scan_settings.scan_resume])<br>+ rs = RadioSetting("scan_settings.scan_resume", "Scan Resume",<br>
+ val)<br>+ menu.append(rs)<br>+<br>+ return menu<br>+<br>+ def _get_opening_message(self):<br>+ menu = RadioSettingGroup("opening_message", "Opening Message")<br>
+ opening_message = self._memobj.opening_message<br>+<br>+ val = RadioSettingValueList(<br>+ self._OPENING_MESSAGE,<br>+ self._OPENING_MESSAGE[opening_message.flag])<br>+ rs = RadioSetting("opening_message.flag", "Flag",<br>
+ val)<br>+ menu.append(rs)<br>+<br>+ msg = ""<br>+ for i in opening_message.message.padded_yaesu:<br>+ if i == 0xFF:<br>+ break<br>+ msg += CHARSET[i & 0x7F]<br>
+ val = RadioSettingValueString(0, 16, msg)<br>+ rs = RadioSetting("opening_message.message.padded_yaesu", "Message", <br>+ val)<br>+ rs.set_apply_callback(self.apply_ff_padded_yaesu, <br>
+ opening_message.message)<br>+ menu.append(rs)<br>+<br>+ return menu<br>+<br> def _get_settings(self):<br> top = RadioSettingGroup("all", "All Settings",<br>
self._get_aprs_general_settings(),<br> self._get_aprs_rx_settings(),<br> self._get_aprs_tx_settings(),<br>- self._get_aprs_smartbeacon())<br>
+ self._get_aprs_smartbeacon(),<br>+ self._get_beep_select(),<br>+ self._get_scan_settings(),<br>+ self._get_opening_message())<br>
return top<br> <br> def get_settings(self):<br>@@ -1272,6 +1363,16 @@<br> print element.get_name()<br> raise<br> <br>+ def apply_ff_padded_yaesu(cls, setting, obj):<br>+ # FF pad yaesus custom string format.<br>
+ rawval = setting.value.get_value()<br>+ max_len = getattr(obj, "padded_yaesu").size() / 8<br>+ rawval = str(rawval).rstrip()<br>+ val = [CHARSET.index(x) for x in rawval]<br>+ for x in range(len(val), max_len):<br>
+ val.append(0xFF)<br>+ setattr(obj, "padded_yaesu", val)<br>+<br> @directory.register<br> class VX8GERadio(VX8DRadio):<br> """Yaesu VX-8GE"""<br><br></div>