From e274271820f4562423a6cd89bfaa6033b9a4e609 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Mon, 17 Apr 2023 11:19:00 +0100 Subject: [PATCH] Add support for IC-905 --- rigcommander.cpp | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ rigidentities.h | 21 +++++++++++++------ wfviewtypes.h | 1 + 3 files changed, 69 insertions(+), 6 deletions(-) diff --git a/rigcommander.cpp b/rigcommander.cpp index 454f356..9f0f490 100644 --- a/rigcommander.cpp +++ b/rigcommander.cpp @@ -3484,6 +3484,10 @@ void rigCommander::determineRigCaps() bandType bandDef4m = bandType(band4m, 70000000, 70500000, modeUSB); bandType bandDef70cm = bandType(band70cm, 420000000, 450000000, modeUSB); bandType bandDef23cm = bandType(band23cm, 1240000000, 1400000000, modeUSB); + bandType bandDef13cm = bandType(band13cm, 2300000000, 2450000000, modeUSB); + bandType bandDef9cm = bandType(band9cm, 3300000000, 3500000000, modeUSB); + bandType bandDef6cm = bandType(band6cm, 5650000000, 5925000000, modeUSB); + bandType bandDef3cm = bandType(band3cm, 10000000000, 10500000000, modeUSB); bandType bandDefAir(bandAir, 108000000, 137000000, modeAM); bandType bandDefWFM(bandWFM, 88000000, 108000000, modeWFM); @@ -3679,6 +3683,55 @@ void rigCommander::determineRigCaps() rigCaps.hasQuickSplitCommand = true; rigCaps.quickSplitCommand = QByteArrayLiteral("\x1a\x05\x00\x43"); break; + case model905: + rigCaps.modelName = QString("IC-905"); + rigCaps.rigctlModel = 0; + rigCaps.hasSpectrum = true; + rigCaps.spectSeqMax = 11; + rigCaps.spectAmpMax = 160; + rigCaps.spectLenMax = 475; + rigCaps.inputs.append(inputLAN); + rigCaps.inputs.append(inputUSB); + rigCaps.hasLan = true; + rigCaps.hasEthernet = true; + rigCaps.hasWiFi = false; + rigCaps.hasDD = true; + rigCaps.hasDV = true; + rigCaps.hasCTCSS = true; + rigCaps.hasDTCS = true; + rigCaps.hasRepeaterModes = true; + rigCaps.hasTBPF = true; + rigCaps.attenuators.push_back('\x10'); + rigCaps.preamps.push_back('\x01'); + rigCaps.bands = standardVU; + rigCaps.bands.push_back(bandDef23cm); + rigCaps.bands.push_back(bandDef13cm); + rigCaps.bands.push_back(bandDef6cm); + rigCaps.bands.push_back(bandDef3cm); + rigCaps.bsr[band2m] = 0x01; + rigCaps.bsr[band70cm] = 0x02; + rigCaps.bsr[band23cm] = 0x03; + rigCaps.bsr[band13cm] = 0x04; + rigCaps.bsr[band6cm] = 0x05; + rigCaps.bsr[band3cm] = 0x06; + rigCaps.modes = commonModes; + rigCaps.modes.insert(rigCaps.modes.end(), {createMode(modeDV, 0x17, "DV"), + createMode(modeDD, 0x22, "DD"), + createMode(modeATV, 0x23, "ATV") + }); + + rigCaps.scopeCenterSpans.insert(rigCaps.scopeCenterSpans.end(), {createScopeCenter(cs1M, "±1M"), + createScopeCenter(cs2p5M, "±2.5M"), + createScopeCenter(cs5M, "±5M"), + createScopeCenter(cs10M, "±10M"), + createScopeCenter(cs25M, "±25M")}); + rigCaps.transceiveCommand = QByteArrayLiteral("\x1a\x05\x01\x42"); + rigCaps.hasVFOMS = false; + rigCaps.hasVFOAB = true; + rigCaps.hasAdvancedRptrToneCmds = true; + rigCaps.hasQuickSplitCommand = true; + rigCaps.quickSplitCommand = QByteArrayLiteral("\x1a\x05\x00\x46"); + break; case model910h: rigCaps.modelName = QString("IC-910H"); rigCaps.rigctlModel = 3044; diff --git a/rigidentities.h b/rigidentities.h index 8202506..2502e8f 100644 --- a/rigidentities.h +++ b/rigidentities.h @@ -40,6 +40,7 @@ enum model_kind { model756pro = 0x5C, model756proii = 0x64, model756proiii = 0x6E, + model905 = 0xAC, model910h = 0x60, model9100 = 0x7C, modelUnknown = 0xFF @@ -55,7 +56,12 @@ enum rigInput{ inputMic=0, inputUnknown=0xff }; -enum availableBands { band23cm=0, +enum availableBands { + band3cm = 0, + band6cm, + band9cm, + band13cm, + band23cm, band70cm, band2m, bandAir, @@ -87,7 +93,10 @@ enum centerSpansType { cs250k = 6, cs500k = 7, cs1M = 8, - cs2p5M = 9 + cs2p5M = 9, + cs5M = 10, + cs10M = 11, + cs25M = 12, }; struct centerSpanData { @@ -96,14 +105,14 @@ struct centerSpanData { }; struct bandType { - bandType(availableBands band, quint32 lowFreq, quint32 highFreq, mode_kind defaultMode) : + bandType(availableBands band, quint64 lowFreq, quint64 highFreq, mode_kind defaultMode) : band(band), lowFreq(lowFreq), highFreq(highFreq), defaultMode(defaultMode) {} bandType() {} availableBands band; - quint32 lowFreq; - quint32 highFreq; + quint64 lowFreq; + quint64 highFreq; mode_kind defaultMode; }; @@ -161,7 +170,7 @@ struct rigCapabilities { std::vector antennas; std::vector scopeCenterSpans; std::vector bands; - unsigned char bsr[20] = {0}; + unsigned char bsr[24] = {0}; std::vector modes; diff --git a/wfviewtypes.h b/wfviewtypes.h index 7cd83f9..2921c30 100644 --- a/wfviewtypes.h +++ b/wfviewtypes.h @@ -48,6 +48,7 @@ enum mode_kind { modeLSB_D=0x80, modeUSB_D=0x81, modeDV=0x17, + modeATV=0x23, modeDD=0x27, modeWFM, modeS_AMD,