# Copyright 2024:
# * Pavel Moravec, OK2MOP <moravecp.cz@gmail.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 2 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/>.

import logging

from chirp import (
    #   bitwise,
    directory
)

from chirp.drivers import (
    baofeng_uv17Pro,
    mml_jc8810
)

import struct

LOG = logging.getLogger(__name__)


@directory.register
class RT470XPlusRadio(mml_jc8810.RT470XRadio):
    """Radtel RT-470X Plus BT"""
    VENDOR = "Radtel"
    MODEL = "RT-470X_BT"

    _fingerprint_bt = [b"\x01\x36\x01\x80\x04\x00\x05\x20"]  # fw v0.15
    _fingerprint = mml_jc8810.RT470XRadio._fingerprint + _fingerprint_bt
