#ifndef __Rig_h__ #define __Rig_h__ #include "RigState.h" struct RigState { }; class UBitxRig { public: inline void begin() {} inline void update() {} inline unsigned getFreqA() const { return radState.getFreqA(); } inline unsigned getFreqB() const { return radState.getFreqB(); } inline int getRIT() const { return radState.getRIT(); } inline int getXIT() const { return radState.getXIT(); } inline bool isVFOA() const { return radState.isVFOA(); } inline bool isVFOB() const { return radState.isVFOB(); } inline bool isSplit() const { return radState.isSplit(); } inline bool isRIT() const { return radState.isRIT(); } inline bool isXIT() const { return radState.isXIT(); } inline bool isModeCWAny() const { return radState.isModeCWAny(); } inline bool isModeCW() const { return radState.isModeCW(); } inline bool isModeCWR() const { return radState.isModeCWR(); } inline bool isModeUSB() const { return radState.isModeUSB(); } inline bool isModeLSB() const { return radState.isModeLSB(); } inline bool isAI() const { return autoInfo; } inline void setFreqA(unsigned freq) { catState.setFreqA(freq); } inline void setFreqB(unsigned freq) { catState.setFreqB(freq); } inline void setRIT(int freq) { catState.setRIT(freq); } inline void setXIT(int freq) { catState.setXIT(freq); } inline void setVFOA() { catState.setVFOA(); } inline void setVFOB() { catState.setVFOB(); } inline void setSplitOn() { catState.setSplitOn(); } inline void setSplitOff() { catState.setSplitOff(); } inline void setRITOn() { catState.setRITOn(); } inline void setRITOff() { catState.setRITOff(); } inline void setXITOn() { catState.setXITOn(); } inline void setXITOff() { catState.setXITOff(); } inline void setCW() { catState.setCW(); } inline void setCWR() { catState.setCWR(); } inline void setUSB() { catState.setUSB(); } inline void setLSB() { catState.setLSB(); } inline void setAI(bool on) { autoInfo = on; } inline void aiOn() { autoInfo = true; } inline void aiOff() { autoInfo = false; } inline UBitxRigState& cat() { return catState; } inline UBitxRigState& rad() { return radState; } /********************************************************************/ // New functional/mode-based Rig methods // AG //void setVolOut(uint8_t level); //uint8_t getVolOut(); // BD/BU //void setBand(); //void getBand(); private: UBitxRigState catState; UBitxRigState radState; bool autoInfo = false; // TODO: Move this to rig state struct }; extern UBitxRig Rig; #endif