[chirp_devel] [PATCH] [FT818] New Model Support Yaesu FT-818 FIXED MISTAKE #5607

Vinny Stipo
Mon Dec 3 08:33:12 PST 2018


# HG changeset patch
# User Vincent Stipo <v at xpctech.com>
# Date 1543854671 28800
#      Mon Dec 03 08:31:11 2018 -0800
# Node ID c703ce827039991456dfa3c4e1428fdda190ec14
# Parent  c6cab71d7d7d76b63367f5529a1b2ea075a8db1b
[FT818] New Model Support Yaesu FT-818 FIXED MISTAKE #5607

diff --git a/chirp/drivers/ft818.py b/chirp/drivers/ft818.py
new file mode 100755
--- /dev/null
+++ b/chirp/drivers/ft818.py
@@ -0,0 +1,256 @@
+#
+# Copyright 2012 Filippi Marco <iz3gme.marco at gmail.com>
+# Copyright 2018 Vinny Stipo <v at xpctech.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+"""FT818 management module"""
+
+from chirp.drivers import ft817
+from chirp import chirp_common, errors, directory
+from chirp.settings import RadioSetting, RadioSettingGroup, \
+    RadioSettingValueInteger, RadioSettingValueList, \
+    RadioSettingValueBoolean, RadioSettingValueString, \
+    RadioSettings
+import os
+import logging
+from textwrap import dedent
+from chirp.util import safe_charset_string
+
+LOG = logging.getLogger(__name__)
+
+
+ at directory.register
+class FT818Radio(ft817.FT817Radio):
+
+    """Yaesu FT-818"""
+    BAUD_RATE = 9600
+    MODEL = "FT-818"
+    _model = ""
+    _memsize = 6573
+    _block_lengths = [2, 40, 208, 208, 208, 208, 198, 53, 130, 118, 130]
+
+    MEM_FORMAT = """
+        struct mem_struct {
+            u8  tag_on_off:1,
+                tag_default:1,
+                unknown1:3,
+                mode:3;
+            u8  duplex:2,
+                is_duplex:1,
+                is_cwdig_narrow:1,
+                is_fm_narrow:1,
+                freq_range:3;
+            u8  skip:1,
+                unknown2:1,
+                ipo:1,
+                att:1,
+                unknown3:4;
+            u8  ssb_step:2,
+                am_step:3,
+                fm_step:3;
+            u8  unknown4:6,
+                tmode:2;
+            u8  unknown5:2,
+                tx_mode:3,
+                tx_freq_range:3;
+            u8  unknown6:1,
+                unknown_toneflag:1,
+                tone:6;
+            u8  unknown7:1,
+                dcs:7;
+            ul16 rit;
+            u32 freq;
+            u32 offset;
+            u8  name[8];
+        };
+
+        #seekto 0x4;
+        struct {
+            u8  fst:1,
+                lock:1,
+                nb:1,
+                pbt:1,
+                unknownb:1,
+                dsp:1,
+                agc:2;
+            u8  vox:1,
+                vlt:1,
+                bk:1,
+                kyr:1,
+                unknown5:1,
+                cw_paddle:1,
+                pwr_meter_mode:2;
+            u8  vfob_band_select:4,
+                vfoa_band_select:4;
+            u8  unknowna;
+            u8  backlight:2,
+                color:2,
+                contrast:4;
+            u8  beep_freq:1,
+                beep_volume:7;
+            u8  arts_beep:2,
+                main_step:1,
+                cw_id:1,
+                scope:1,
+                pkt_rate:1,
+                resume_scan:2;
+            u8  op_filter:2,
+                lock_mode:2,
+                cw_pitch:4;
+            u8  sql_rf_gain:1,
+                ars_144:1,
+                ars_430:1,
+                cw_weight:5;
+            u8  cw_delay;
+            u8  unknown8:1,
+                sidetone:7;
+            u8  batt_chg:2,
+                cw_speed:6;
+            u8  disable_amfm_dial:1,
+                vox_gain:7;
+            u8  cat_rate:2,
+                emergency:1,
+                vox_delay:5;
+            u8  dig_mode:3,
+                mem_group:1,
+                unknown9:1,
+                apo_time:3;
+            u8  dcs_inv:2,
+                unknown10:1,
+                tot_time:5;
+            u8  mic_scan:1,
+                ssb_mic:7;
+            u8  mic_key:1,
+                am_mic:7;
+            u8  unknown11:1,
+                fm_mic:7;
+            u8  unknown12:1,
+                dig_mic:7;
+            u8  extended_menu:1,
+                pkt_mic:7;
+            u8  unknown14:1,
+                pkt9600_mic:7;
+            il16 dig_shift;
+            il16 dig_disp;
+            i8  r_lsb_car;
+            i8  r_usb_car;
+            i8  t_lsb_car;
+            i8  t_usb_car;
+            u8  unknown15:2,
+                menu_item:6;
+            u8  unknown16:4,
+                menu_sel:4;
+            u16 unknown17;
+            u8  art:1,
+                scn_mode:2,
+                dw:1,
+                pri:1,
+                unknown18:1,
+                tx_power:2;
+            u8  spl:1,
+                unknown:1,
+                uhf_antenna:1,
+                vhf_antenna:1,
+                air_antenna:1,
+                bc_antenna:1,
+                sixm_antenna:1,
+                hf_antenna:1;
+        } settings;
+
+        #seekto 0x2A;
+        struct mem_struct vfoa[16];
+        struct mem_struct vfob[16];
+        struct mem_struct home[4];
+        struct mem_struct qmb;
+        struct mem_struct mtqmb;
+        struct mem_struct mtune;
+
+        #seekto 0x431;
+        u8 visible[25];
+        u8 pmsvisible;
+
+        #seekto 0x44B;
+        u8 filled[25];
+        u8 pmsfilled;
+
+        #seekto 0x465;
+        struct mem_struct memory[200];
+        struct mem_struct pms[2];
+
+        #seekto 0x1903;
+        u8 callsign[7];
+
+        #seekto 0x19AD;
+        struct mem_struct sixtymeterchannels[5];
+    """
+
+    SPECIAL_MEMORIES = {
+        "VFOa-1.8M": -37,
+        "VFOa-3.5M": -36,
+        "VFOa-5M": -35,
+        "VFOa-7M": -34,
+        "VFOa-10M": -33,
+        "VFOa-14M": -32,
+        "VFOa-18M": -31,
+        "VFOa-21M": -30,
+        "VFOa-24M": -29,
+        "VFOa-28M": -28,
+        "VFOa-50M": -27,
+        "VFOa-FM": -26,
+        "VFOa-AIR": -25,
+        "VFOa-144": -24,
+        "VFOa-430": -23,
+        "VFOa-HF": -22,
+        "VFOb-1.8M": -21,
+        "VFOb-3.5M": -20,
+        "VFOb-5M": -19,
+        "VFOb-7M": -18,
+        "VFOb-10M": -17,
+        "VFOb-14M": -16,
+        "VFOb-18M": -15,
+        "VFOb-21M": -14,
+        "VFOb-24M": -13,
+        "VFOb-28M": -12,
+        "VFOb-50M": -11,
+        "VFOb-FM": -10,
+        "VFOb-AIR": -9,
+        "VFOb-144M": -8,
+        "VFOb-430M": -7,
+        "VFOb-HF": -6,
+        "HOME HF": -5,
+        "HOME 50M": -4,
+        "HOME 144M": -3,
+        "HOME 430M": -2,
+        "QMB": -1,
+    }
+    FIRST_VFOB_INDEX = -6
+    LAST_VFOB_INDEX = -21
+    FIRST_VFOA_INDEX = -22
+    LAST_VFOA_INDEX = -37
+
+    SPECIAL_PMS = {
+        "PMS-L": -39,
+        "PMS-U": -38,
+    }
+    LAST_PMS_INDEX = -39
+
+    SPECIAL_MEMORIES.update(SPECIAL_PMS)
+
+    SPECIAL_MEMORIES_REV = dict(zip(SPECIAL_MEMORIES.values(),
+                                    SPECIAL_MEMORIES.keys()))
+
+
+
+
diff --git a/tests/images/Yaesu_FT-818.img b/tests/images/Yaesu_FT-818.img
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..59b6e62681e131d4fee9f5c83518637a7753cc57
GIT binary patch
literal 6730
zc$~GFe~eUD702HWP`1Fr777ai?L;6|3e9H03;m;Y-j8`RZ{EzCH?wc%%}o5UyD)|A
zf}pl;X-r&`x*`5SNF=1uMppyfg%u>&#vjqJrcE?jElp}ll(I7wo5nO`6OEeKi0_?y
z?z{Isc4}gD{%8Up&bjBF`#tBL`+EKA#FDv at +mD~QqILgi)4+)<%M|6xK=@Pe_u=qA
zT`QCkMae2kclf8o)uf_4*n0<mL!2!0`$aO$N%upCLXyOvV6)=VkVu4e)@Z2?-qwF|
zt^?UTo)WzYB)Kx#fovafJCGeeo)C%J6_LE1Qo1ImSOn>WQbaPDfxIzdEKzJEXMa5*
zlJwHZTkG$yD$1XS7}0`L=mIZ^=lTvS%fFLk<N%Lt!ykvl9Q<$2XAv7bpGDUBznsq^
zHh4aZ5Ii47?mi#3&VO at 0DnFk;{6rDYC%sH at C`rtGZSI55hegojWY-Q!RcRizyZy8j
zH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