pax_global_header00006660000000000000000000000064143553431240014516gustar00rootroot0000000000000052 comment=0b41328a6abeeb3ee893b014efc8a869d3abe6f9 grig-GRIG-0_9_0/000077500000000000000000000000001435534312400133445ustar00rootroot00000000000000grig-GRIG-0_9_0/.github/000077500000000000000000000000001435534312400147045ustar00rootroot00000000000000grig-GRIG-0_9_0/.github/workflows/000077500000000000000000000000001435534312400167415ustar00rootroot00000000000000grig-GRIG-0_9_0/.github/workflows/makefile.yml000066400000000000000000000010621435534312400212400ustar00rootroot00000000000000name: CI on: push: branches: [ "**" ] pull_request: branches: [ "master" ] jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Update system run: sudo apt update; sudo apt upgrade -y - name: Install dependencies run: sudo apt install libhamlib-dev autopoint libgtk2.0-dev -y - name: autoreconf run: autoreconf -i - name: Configure run: ./configure --prefix /tmp/grig - name: Make run: make - name: Install run: make install; tree /tmp/grig grig-GRIG-0_9_0/.gitignore000066400000000000000000000010211435534312400153260ustar00rootroot00000000000000*~ *.o *.lo *.la *.orig *.swp .version .dirstamp .deps/ .libs/ build/ grig-*.tar.gz Makefile Makefile.in build-config.h build-config.h.in compile configure config.guess config.h config.h.in config.log config.status config.sub config.cache cov-int/ depcomp aclocal.m4 autom4te.cache INSTALL install-sh intltool-extract intltool-extract.in intltool-merge intltool-merge.in intltool-update intltool-update.in ltmain.sh missing stamp-h.in stamp-h stamp-h1 mkinstalldirs libtool m4/ GTAGS GRTAGS GPATH tags po/*.gmo po/*.sin po/*.sed grig-GRIG-0_9_0/AUTHORS000066400000000000000000000011211435534312400144070ustar00rootroot00000000000000Grig is designed and developed by Alexandru Csete, OZ9AEC. Joop Stakenborg, PG4I, provided debian packages under debian/testing. He has also done a lots of testing and fixed some bugs. Pierre-Philippe Coupard, F8EJF, should be credited for the s-meter pixmap which has been taken from his very nice CWirc program. Release 0.8.0 has been made by Stephane Fillod, F8CFE, and Nirgal Vourgere. It may be one of the last version before architectural changes, and an eventual rewrite into Python. Also thanks to the many people around who have tested grig, reported bugs and helped fixing them. grig-GRIG-0_9_0/COPYING000066400000000000000000000431331435534312400144030ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. grig-GRIG-0_9_0/ChangeLog000066400000000000000000001334651435534312400151320ustar00rootroot000000000000002015-12-19; Stephane Fillod * Makefile.am, configure.ac: * src/Makefile.am: Keep-up with newer versions of autotools. * src/rig-daemon.c, src/main.c: Don't call deprecated glib functions and use the new gthread API. * src/main.c, src/rig-selector.c, src/rig-gui-vfo.c: * src/rig-gui-message-window.c: Cleanup compile warnings. * po/fr.po: Update from launchpad.net * configure.ac, NEWS: Update for 0.8.1 2011-08-20; Stephane Fillod * Makefile.am: Fixes for make distcheck * src/Makefile.am: Don't define GDK_DISABLE_DEPRECATED/GTK_DISABLE_DEPRECATED until the code base is converted to more recent gtk. * configure.ac, README, TODO, NEWS, AUTHORS: * po/Makevars, po/grig.pot, po/fr.po: Update for 0.8.0 2011-06-24; Stephane Fillod * src/rig-gui-lcd.c: Fix VFO indicator not being repainted after window minimization 2011-06-21; Nirgal Vourgère * NEWS: * src/key-press-handler.c: Now using left/right arrows rather than up/down for freq change 2011-06-21; Nirgal Vourgère * src/grig-debug.c: * src/rig-data.c: * rig-gui-message-window.c: * src/rig-selector.c: Removed a bunch of unused vars * doc/man/grig.1.in: Escaped addtionnal '-' in man file * po/POTFILES.in: Added extra files containing strings to translate * src/rig-gui-lcd.[ch]: Added an extra gigahertz digit in lcd display 2010-03-02; Stephane Fillod * src/rig-gui-message-window.c: * src/grig-about.c: Replace deprecated calls since Gtk 2.14 * src/rig-daemon-check.c: * src/rig-data.[ch]: * src/rig-gui-ctrl2.c: Added antenna control. * src/rig-gui-lcd.c: Fix buffer access out-of-bounds, found by cppcheck. * po/fr.po: Misc update. 2010-02-05; Alexandru Csete * src/rig-gui-lcd.c: Fix crash that occurs when mouse is clicked between MHz and kHz digits. Reported as Ubuntu bug 517816. 2009-01-21; Alessandro Zummo * src/rig-gui-vfo.c: Added memory/vfo button. 2009-01-13; Alessandro Zummo * src/rig-gui-lcd.c: Do not clear frequency if user hits return and the new freq has not been entered. 2009-01-13; Alessandro Zummo * src/grig-debug.c: Fixed debug levels 2008-12-15; Stephane Fillod * src/grig-menubar.[ch]: * src/rig-gui-func.[ch]: * src/Makefile.am: * src/rig-daemon-check.c: * src/rig-daemon.[ch]: * src/rig-data.[ch]: * po/POTFILES.in: Special Function window. * src/grig-menubar.c: * src/rig-gui-ctrl2.c: * src/rig-gui-message-window.c: * src/rig-gui-smeter.c: Allow l10n of menu items. * configure.ac: * po/fr.po: Translation to French. 2008-11-03; Alexandru Csete * configure.ac: Updated Gtk+ and Hamlib requirements. 2007-04-14; Alexandru Csete * src/rig-gui-keypad.[ch]: * src/rig-gui-lcd.[ch]: * src/rig-gui.c: * src/rig-gui-smeter.c: * src/rig-gui-vfo.c: * src/Makefile.am: Keypad support from Alessandro Zummo. 2007-01-02; Alexandru Csete * src/radio-conf.[ch]: Added data field for config version. 2007-12-31; Alexandru Csete * src/rig-selector.[ch]: Added widget showing a list of selected radios. Some basic functionality but far from finished. 2007-12-29; Alexandru Csete * src/compat.[ch]: Added function to retrieve user config directory. * src/radio-conf.[ch]: Added files containing functions for reading and writing .radio files. 2007-11-16; Alexandru Csete * src/key-press-handler.[ch]: Added functions to snoop and manage key press events. * src/main.c: Use new key press event handler. * src/rig-gui-lcd.[ch]: Changed rig_gui_lcd_set_freq_digits and rig_gui_lcd_set_rit_digits to be public in order to allow direct setting of frequency display when managing events other than the ones occurring on the LCD area. 2007-11-15; Alexandru Csete * NEWS, TODO: Separate NEWS and future improvements. * src/Makefile.am: Allow build with Gtk+ 2.12 (GtkTooltips deprecated). 2007-09-15; Alexandru Csete * doc/um/xml: Added files that will eventually become a real user manual. 2007-01-17; Alexandru Csete * Makefile.am: Include win32 files in source distribution (bug #1630052). 2007-01-07; Alexandru Csete * src/grig-debug.c: Use g_get_current_time() instead of gettimeoftheday(). * src/main.c: Use portable pixmap_file_name() instead of PACKAGE_PIXMAP_DIR, which only works on Unix (bug #1629905). Removed other traces of PACKAGE_PIXMAP_DIR too. * src/rig-gui-lcd.c: * src/rig-gui-smeter.c: Removed traces of PACKAGE_PIXMAP_DIR. * win32: Added files related to win32 build. 2006-12-16; Alexandru Csete * src/rig-data.c: Set 'new' flags to TRUE when receiving new values for mic gain and compressor (bug #1613622). * src/rig-daemon.[ch]: Fixed bug that caused wrong handling of RF gain and IF shift (bug #1613622). Give RIG_CMD_AF higher priority to avoid jumpy behaviour (bug #1616926). * configure.ac, NEWS: Updated for 0.7.2 2006-07-24; Alexandru Csete * Makefile.am: Explicitly create $(DESTDIR)$(pkgdatadir) before trying to install. This fixes bug #1523367. * configure.ac: Updated version number. 2006-07-07; Alexandru Csete * src/rig-data.[ch]: Added missing support functions. * src/rig-gui-tx.c: Implemented RF power and ALC. * src/rig-daemon.c: Implemented missing commands. * src/grig-about.c: Updated to use GtkAboutDialog. * src/compat.c: Fix pixmaps directory. 2006-07-06; Alexandru Csete * src/rig-gui-tx.c: Implemented TX levels with the exception of RFPOWER and ALC. 2006-07-02; Alexandru Csete * src/rig-daemon-check.c: Store IF shift range and step in rig-data. * src/rig-data.[ch]: Store IF shift range and step. * src/rig-gui-rx.c: Finished implementation. Can not test until daemon has support for it. * src/rig-daemon.c: Added support for RX level controls. Cycle also includes TX level controls. 2006-07-01; Alexandru Csete * src/rig-gui-rx.[ch]: Added files. * src/rig-gui-tx.[ch]: Added files. * src/grig-debug.[ch]: Added funstion to read the current debug level. * src/grig-menubar.c: Use grig_debug_get_level instead of direct reference to debug var in main.c. Moved UIManager to be global private so that we can access the individual menu items after creation. Added functions to force the value of the RX, TX and CW level controls. 2006-06-30; Alexandru Csete * src/rig-data.[ch]: Added support for all missing level settings. * src/rig-daemon-check.c: Added checks for remaining levels. * src/rig-daemon.h: Added new level commands. * doc/devnotes/commands.txt: Updated. 2006-06-26; Alexandru Csete * configure.ac: Don't use AC_DEFINEs to define locale, data and pixmapsdirs because that does not work with autoconf 2.59e anymore (was the wrong way to do it according to GNU Coding Std). * src/Makefile.am: Added locale, data and pixmapdir definitions: -DPACKAGE_DATA_DIR=\""$(datadir)/grig"\" \ -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/grig"\" \ -DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" Pixmaps will thus go to /usr/local/share/pixmaps/grig instead of /usr/local/share/grig/pixmaps by default. * pixmaps/Makefile.am: Redefined pixmapsdir to $(datadir)/pixmaps/grig 2006-03-28; Alexandru Csete * src/rig-daemon.c: Sleep between commands only if the last command has been executed. Added hamlib error message when a command fails to execute. * src/grig-debug: Use local debug level in order to be able to filter grig debug messages (bug #1457361). * src/grig-menubar.c, src/main.c: Use grig_debug_set_level instead of rig_set_debug. 2006-03-27; Alexandru Csete * src/rig-daemon.c: Generate log message when rig_daemon_set_suspend is called. * src/rig-state.c: Finished save/load state of supported parameters. * NEWS: Updated with information about saving and restoring rig state. * src/rig-daemon-check.c: Fixed bug, which gave the error message "Can not find VFO list for this rig! Bug in backend?" if the rig did not have any of the rig_set_vfo or rig_get_vfo functions (bug #1440876). * src/grig-menubar.c: Modified menu utems in View menu to toggle items. 2006-03-23; Alexandru Csete * src/rig-daemon.c: Nailed even more potential flicker bugs. Added function to obtain hamlib id of radio. * src/rig-utils: Added function to check file name for extension. * src/rig-state.c: Done some work on save state. Rig ID is already saved, all I need is to add the remaining parameters and the save function is done. 2006-03-22; Alexandru Csete * src/rig-daemon.c: Fixed bug, which caused the ptt and pstat readings to be overwritten by the old set values every time the SET command was executed. Added and extra SET_PTT and GET_PTT command to both the RX and the TX cycle. Same bug found for SET_FREQx (may fix bug #1388342?). * src/rig-daemon-check.c: Check and store maximum RF power level. * src/rig-data.c, src/rig-data.h: Added possibility to store maximum RF power level (needed to scale the power meter). * src/rig-gui-smeter.c: Implemented power meter scale. Select best scale automatically. 2006-03-21; Alexandru Csete * src/rig-state.c: Finished load and save state callbacks. 2006-03-19; Alexandru Csete * src/rig-state.c, src/rig-state.h: Added files. * src/Makefile.am: Added new files to list. * src/grig-menubar.c: Enable Load and Save State entries. 2006-03-17; Alexandru Csete * doc/userman/latex: Added a few files containing a skeleton for a user manual. 2006-03-16; Alexandru Csete * COPYING: Updated the address of FSF. * src/*.c, src/*.h: Update year and replace FSF address with website. * doc/man/grig.1.in: Added minimal info about the debug handler. 2006-03-12; Alexandru Csete * src/rig-gui-message-window.c: Implemented clear message list signal. Added message source to summary. Tested using in near-real-time by piping messages to file and at the same time monitoring with tail and reading into message list. Uncertain whether this would work in wintendo. * src/grig-menubar.c: Removed unused config function. Disabled menu items that have not been implemented. * src/main.c, doc/man/grig.1.in: Changed --rig-device back to --rig-file. It's best to keep compatibility with rigctl as much as possible. 2006-03-11; Alexandru Csete * src/grig-debug: Include to avoid compiler warning. Changes separator to ";;". Changed grig_debug_local to use variable argument list in order to save code throughout grig. * src/rig-gui-vfo.c: Modified to use grig debug handler instead of the one from Hamlib. * src/rig-daemon.c, src/rig-daemon-check.c: Modified to use grig debug handler and use i18n for strings. * src/rig-gui-message-window.c: Implemented reading debug messages from log files. Still to do is "Clean" and some visual fixups. 2006-02-27; Alexandru Csete * src/Makefile.am: Added new files to list. * configure.ac: Require hamlib 1.2.5 * src/grig-debug.c, src/grig-debug.h: Implemented logging source but there is no code to explicitly save to log file. The messages are printed to stderr, so the log can be saved that way. * src/main.c: Use new grig-debug infrastructure. 2006-02-24; Alexandru Csete * src/grig-debug.c, src/grig-debug.h: Added files containing new debug handler. The new debug handler will format the debug messages coming from hamlib, print them on stderr and, if requested, save them to a log file. The log file must be specified on the command line. 2006-02-23; Alexandru Csete * src/main.c, doc/man/grig.1.in: Changed --rig-file to --rig-device. We keep the former for compatibility reasons but issue a warning message to tell the user about this. 2006-02-21; Alexandru Csete * src/rig-gui-message-window: Moved column definition from header to source file. Add debug messages to the the message list. Works all right but needs a lot of optimisation. 2006-01-16; Alexandru Csete * src/rig-gui-message-window, src/main.c: Changed back to original hamlib implementation of debug message handler. As Stephane pointed out, it was wrong use of the va_list which caused the misbehaviour. 2005-12-22; Alexandru Csete * src/rig-daemon.c: Added RIG_CMD_SET_FREQ_1 and RIG_CMD_GET_FREQ_1 to the default TX cycle to allow change of frequency while the TX is on. On the FT-817, however, it seems that I can not control frequency in TX mode. Bug report opened #1388342. 2005-12-19; Alexandru Csete * src/menubar.c: Moved message window to View menu, band map and spectrum to tools menu. * src/rig-gui-message-window.c: Changed debug callback not to use va_list but expect a simple char * - proposition to modify hamlib interface sent to hamlib-developer. Added code to update message statistics. 2005-11-25; Alexandru Csete * src/rig-gui-message-window.c: Added code to create list view. Need some minor mods to allow access to GtkListStore. 2005-11-23; Alexandru Csete * src/rig-gui-message-window.c: Create message window skeleton. 2005-11-22; Alexandru Csete * src/rig-gui-message_window.c: Added code to show and hide window. 2005-11-14; Alexandru Csete * src/grig-menubar.c: Added RIG_FUNC and software memory menu entries. Use stock pixmaps where appropriate. * src/rig-gui.c: Change lcd box spacing for better layout. 2005-11-11; Alexandru Csete * src/rig-gui-vfo.c: Added split button. Rearranged button layout. * src/rig-data.h, src/rig-data.c: Added support for SPLIT ON/OFF. Currently passes RIG_VFO_RX and RIG_VFO_TX as parameters to hamlib. * src/rig-daemon.c, src/rig-daemon.h: Added RIG_CMD_SET_SPLIT and RIG_CMD_GET_SPLIT. * src/rig-daemon-check.c: Check for set_split_vfo and get_split_vfo. 2005-11-10; Alexandru Csete * src/rig-gui.c: Don't include level controls in main window. They will be in separate windows. * src/grig-menubar.c: Added View menu. No actions yet. * src/rig-data.c, src/rig-data.h, * src/rig-daemon.c, rc/rig-daemon.h, src/rig-daemon-check.c: Added support for VFO COPY and EXCHANGE. 2005-11-08; Alexandru Csete * src/compat.c, src/compat.h: Added files containing utilities for data directory retrieval. 2005-09-29; Alexandru Csete * src/rig-gui-lcd.c: Added readback of VFO. * src/rig-daemon.h, src/rig-daemon.c: Added support for RIG_CMD_VFO_TOGGLE, ie. RIG_OP_TOGGLE. 2005-09-28; Alexandru Csete * src/rig-gui-vfo.c, src/rig-gui-vfo.h: Added files containing VFO controls. * src/rig-gui.c: Use rig-gui-vfo. * src/rig-data.c, src/rig-data.h: Added support for RIG_OP_TOGGLE. * src/Makefile.am: Added rig-gui-vfo to build list. 2005-09-22; Alexandru Csete * src/rig-gui-info-data.h: Added RIG_FUNC_STR and RIG_OP arrays. * src/rig-gui-info.c: Added RIG_FUNC and VFO_OP settings. 2005-09-21; Alexandru Csete * src/rig-gui-buttons, * src/rig-data, * src/rig-daemon, Added support for RIG_FUNC_LOCK. * src/rig-daemon-check: Added generic checks for rig_set_func and rig_get_func availabilities. 2005-09-20; Alexandru Csete * src/rig-gui-message-window: Added prototype for debug callback function. 2005-09-06; Alexandru Csete * src/rig-daemon.c, src/rig-daemon-check.c: Added additional check in rig_daemon_check_mode to ensure that the correct frequency range for the current mode is selected and not just the first one found. Also, get the frequency resolution for the current mode. Also store the list of all modes in rig-data. * src/rig-data.c, src/rig-data.h: Added bitfield of all supported modes including a get_ function. * src/rig-gui-ctrl2.c: Only show supported modes in the mode selector combo. * NEWS: Updated. 2005-08-25; Alexandru Csete * src/rig-daemon.c: Fixed bug which caused grig to show WIDE instead of NORMAL passband width in those cases where the rig does not have any particular WIDE passband and the rig_passband_wide function returns 0, which also happens to be the value of the RIG_PASSBAND_NORMAL macro. * src/rig-daemon-check.c: Power button should now really work as claimed :o) 2005-08-22; Alexandru Csete * src/rig-daemon.c: Suspend all but RIG_CMD_SET_PSTAT command while the rig is in power OFF state. * doc/man/grig.1.in: Added a few sentences concerning the new handling of the power OFF state. 2005-08-21; Alexandru Csete * src/rig-daemon-check.c: Fixed very nasty bug in checking the availability of level set/get functions (bug #1266068). Improved RIT and XIT checking code. * src/rig-gui-info.c: Fixed a bug which caused incorrect handling of empty ATT and PREAMP arrays. In worse cases the program caused memory corruption (bug #1266071). Fixed a bug which caused a crash while reading the tuning step lists (bug #1266071). * src/rig-data.c, src/rig-data.h: Added has_set_rit and has_set_xit. * src/rig-gui-lcd.c: Display initial RIT value even if only set_it is available. * NEWS: Updated. 2005-08-16; Alexandru Csete * grig.spec.in: Fix erroneous pixmap drectories. 2005-08-10; Alexandru Csete * src/rig-gui-smeter.h: Adjusted DEF_TVAL and DEF_FALLOFF based on tests using a FT-817ND. The meter behaves quite the same using both 4800, 9600 and 38400 baud. It would, however, improve the real-time feeling if the raise time would be different (lower) than the fall-off time. 2005-07-25; Alexandru Csete * src/rig-daemon, src/rig-daemon.h, src/main.c: Disable POWER and PTT buttons by default. Use command line options to enable them at run-time. * doc/man/grig.1.in: Added description of the new command line switches. 2005-06-21; Alexandru Csete * src/rig-gui-message-window.c, src/rig-gui-message-window.h: Added files. * src/grig-menubar.c: Added menu entry for message window. Also added menu items for saving and loading the rig state. * src/Makfile.am: Added message window files. 2005-06-16; Alexandru Csete * doc/man/grig.1.in: Corrected one more error. * src/rig-daemon.c: Corrected a spelling error. * src/grig-about.c: Experimented with new GtkAboutDialog. Will stick with the old one for a while. 2005-06-15; Alexandru Csete * src/rig-daemon.c, src/rig-daemon.h: Changed shut-down procedure to wait until daemon process actually finishes. There is, however, still a timeout of 10 seconds, in case something goes wrong. Change command table to flat arrays. This also allows faster reaction when PTT is toggled. Added the possibility to suspend command execution without shutting down the daemon. * doc/man/grig.1.in: Corrected wrong command line argument for no-thread option. * configure.ac: Increment version number to 0.5.cvs Require Gtk+ 2.6 * NEWS: Added some news for 0.5 2005-06-03; Alexandru Csete * src/rig-daemon.c: Use g_usleep instead of usleep to make code more portable. * configure.ac: Increment micro version and remove check for unistd.h 2005-02-12; Alexandru Csete * src/rig-daemon.c: Implemented timeout based daemon process. The timeout delay is 2*cmd_del*nb_of_cmd. Only poll selected setting when in TX mode (power, alc or swr but not all). Modified default TX cycle accordingly. Decreased command delay factor for TX mode from 3 to 2. Added function to acquire the command delay. This allows the GUI to adjust the callback delays for the widgets. * src/rig-gui-smeter.c, src/rig-gui-smeter.h: Added function to acquire the current meter setting in TX mode. This allows the daemon to decide which level to poll when the rig is in TX mode. * src/rig-gui-lcd.c: Check frequency for lower limit to avoid flicker (bug #1082319). * doc/man/grig.1.in: Updated man page with info about the -n or --nothread option. * configure.ac: Updated version to 0.4.2 * src/*: Updated year. * NEWS: Updated info. 2005-02-11; Alexandru Csete * src/main.c: Added --nothread command line option. * src/rig-daemon.c, src/rig-daemon.h: Added (empty) branch for the --nothread option. 2005-02-09; Alexandru Csete * src/rig-daemon.c: Added error handling when creation of daemon process is not successful. 2005-02-02; Alexandru Csete * src/rig-daemon.h, src/rig-daemon.c: Replaced cycle delay with a default command delay. The delay in TX mode is three times the delay in RX mode. Added possibility for user defined delay. * src/main.c: Added command line option for command delay. * doc/man/grig.1.in: Added section about command delays and buggy power off state. * Makefile.am: Added AUTHORS, NEWS, COPYING, README and ChangeLog to install data. * NEWS: Updated with some 0.4.2 info. 2005-02-01; Alexandru Csete * configure.ac: Define PACKAGE_LOCALE_DIR. Increment version number. 2005-01-27; Alexandru Csete * pixmaps/Makefile.am: Fixed typo which caused pixmaps not to be included in datapack. * configure.ac: Incremented version number. 2005-01-22; Alexandru Csete * src/rig-gui-smeter-conv.c, src/rig-gui-smeter-conv.h: Implemented linear conversion for TX scale. No need for polynomial fit since TX scale is linear. * src/rig-gui-smeter.c: Enabled TX meter. Disable scale selector. * src/rig-gui-smeter.h: Increased default fall-off speed and frames per second. * src/grig-about.c: Removed empty notebook pages. * NEWS: Updated. * configure.ac: Changed versionnumber to 0.4 2005-01-21; Alexandru Csete * src/rig-data.c, src/rig-data.h: Added get functions for tx power, swr and alc. * src/rig-gui-smeter.c: Added code to read meter value for tx power, swr and alc. * doc/man/grig.1.in: Updated year. 2005-01-20; Alexandru Csete * src/rig-data.h: Removed TX levels that are not available via rig_get_level. * src/rig-data.c, src/rig-daemon.c, src/rig-daemon.h: Added support for TX power, SWR and ALC. * src/rig-daemon.h, src/rig-daemon.c: Change MAX_CMD_PER_CYCLE from 5 to 6. * src/rig-data.c, src/rig-data.h: Added has_get for ALC, SWR and RFPOWER. * src/rig-gui-smeter-conv.c, src/rig-gui-smeter-conv.h: Added function to convert floating point number between 0.0 and 1.0 to s-meter angle. Still need to define conversion parameters. 2005-01-07; Alexandru Csete * src/rig-data.c: Fixed a mis-spelling. * src/rig-gui-smeter.h: Updated doxygen comments for smeter_scale_t. 2004-12-21; Alexandru Csete * src/rig-daemon-check.c: Worked on a fix for bug #1082325, which causes misbehaviour if the rig is OFF when grig is started. Basically, only the powerstatus is tested for real, all other setting availabilities are obtained from the rig caps. If power status is not available from rig, RIG_POWER_ON is stored in the rig data structure. * src/rig-daemon.c: Only get/set power status if rig is in power off state. * doc/man/grig.1.in: Removed section saying that RIG must be powered ON. 2004-12-12; Alexandru Csete * src/rig-daemon.c, src/rig-daemon.h: Added rigconf parameter to rig_daemon_start. * src/main.c: Added check for pixmap files to exit cleanly with an error message if installation is incomplete (bug #1057427). Changed pixmap paths from PACKAGE_DATA_DIR to PACKAGE_PIXMAPS_DIR. * src/grig-about.c: Changed pixmap paths from PACKAGE_DATA_DIR to PACKAGE_PIXMAPS_DIR. * src/rig-gui-lcd.c: Changed pixmap paths from PACKAGE_DATA_DIR to PACKAGE_PIXMAPS_DIR. * src/rig-gui-smeter.c: Changed pixmap paths from PACKAGE_DATA_DIR to PACKAGE_PIXMAPS_DIR. * doc/man/grig.1.in: Added debug level info and a warning that rig must be turned ON before starting grig. Also added description of --set-conf command line option. 2004-12-11; Alexandru Csete * configure.ac: Added HAMLIB_VERSION define. * src/main.c, src/grig-about.c, src/rig-gui-lcd.c: * src/rig-gui-smeter.c: Include config.h * src/main.c: Added --set-conf command line option (bug #1082329). Has no effect yet. 2004-12-10; Alexandru Csete * config.guess, config.sub, configure.in: Removed files. * configure.ac: Added file based on gnome-hello template and xlog. * .cvsignore: Added file. * autogen.sh: Modified according to gnome-hello template. Does not use gnome-autogen though. * COPYING: Added file. * Makefile.am: Modified according to gnome-hello template. * doc/.cvsignore: Added file. * doc/man/.cvsignore: Added file. * pixmaps/.cvsignore: Added file. * po/.cvsignore: Added file. * po/Makevars: Removed file. * src/.cvsignore: Added file. * pixmaps/Makefile.am: Added file. * acconfig.h: Removed file. * acinclode.m4: Removed file. 2004-12-06; Alexandru Csete * src/rig-gui-info.c: Don't translate strings containing UTF-8 octal codes. 2004-12-05; Alexandru Csete * configure.in: Bumped version number. 2004-12-04; Alexandru Csete * configure.in: Removed possibility to fall back to the old style hamlib check. hamlib.pc is required to detect hamlib settings (cf. bug #1078800). * AUTHORS: Updated with proper credits. * NEWS: Updated. 2004-12-03; Alexandru Csete * grig.desktop: Removed file. 2004-12-02; Alexandru Csete * src/grig-gtk-workarounds.c, src/griggtk-workarounds.h: Created files. Intended to contain various workaround tricks for Gtk+ bugs and limitations. Currently it contains functions to allow tooltips with the GtkComboBox widget. * src/rig-guit-ctrl2.c, src/rig-gui-buttons.c: Added tooltips for combo boxes using the new utilities. Fixes bug #1002573. * src/Makefile.am: Added new files to the list. 2004-12-01; Alexandru Csete * configure.in: Added configure option to enable coverage report generation by gcov. 2004-11-30; Alexandru Csete * src/main.c: Catch SIGTERM, SIGINT and SIGABRT and try to make a clean exit. * doc/man/grig.1.in: Fixed a typo. 2004-11-27; Alexandru Csete * configure.in, grig.1.in: Moved man page to doc/man/ subdirectory. Added more text to man page. * doc/man/Makefile.am, doc/Makefile.am: Created files. Man page now installed correctly (fixes bug #1065828). * README: Updated. * Makefile.am: Removed explicit handling of man page. 2004-11-23; Alexandru Csete * src/rig-daemon.c: Added rig_daemon.get_brand and rig_daemon_get_model functions. Ideally, these function should have been in rig-data but since the only user at the moment is main.c which already has visibility on rig-daemon, it was easiest to implement them here. Fixed a typo. * src/main.c: Use new get_brand and get_model functions. This fixes bug #1069293. * src/rig-gui-info.c: Changed packing options for tuning step frame. * src/rig-gui.c: Don't include the levels widget since it contains nothing yet. 2004-11-21; Alexandru Csete * src/rig-gui-info.c: Finished preamp and att info frame and reorganized main container. 2004-11-19; Alexandru Csete * src/rig-data.c: Fixed bug which caused the new secondary frequency to be sent to the daemon but not registered in the readback buffer until next read cycle. * src/rig-gui-info.c: Added skeleton for front end info frame (attenuator and preamp). 2004-11-15; Alexandru Csete * configure.in, Makefile.am: autogen.sh was (again!) behaving stupid again. Removed all output requests for po and m4. * src/rig-gui-info-data.h: Added string representation for mode symbolic references. * src/rig-gui-info.c: Added tuing step info frame. 2004-11-14; Alexandru Csete * src/rig-gui-info.c, src/grig-about.c, src/grig-menubar.c, * src/main.c, src/rig-data.c, src/rig-gui-buttons.c, * src/rig-gui-ctrl2.c, * src/rig-gui-lcd.c, src/rig-gui-levels.c, src/rig-gui-smeter.c: Replaced support.h with glib/gi18n.h (bug #1042301). * src/support.h: Removed file since we use glib/gi18n.h instead. * Makefile.am: Removed support.h from list. 2004-11-13; Alexandru Csete * src/rig-gui-info.c: Added interface info frame. 2004-11-12; Alexandru Csete * src/rig-gui-info.c: Changed level checkboxes to labels. Fixed bug which caused the not all levels were correctly displayed. Fixed bug which caused the scrolled window to be non-functional (the new scrolled window api does not use gtk_container_add but gtk_scrolled_window_add_with_viewport). 2004-11-10; Alexandru Csete - IC177 * src/rig-gui-info.c: Rewrote create_levels to use a vertical table in a scrolled window. * src/rig-gui-info-data.h: Added string representations for port caps family. 2004-11-09; Alexandru Csete * src/rig-gui-info.c: Added offset and level info widgets. * src/rig-gui-info-data.h: Added file. Contains some constant data definitions. * src/Makefile.am: Added new file. 2004-11-05; Alexandru Csete * src/rig-gui-ctrl2.c: Removed note regarding the discrepacy between hamlib and grig symbillic references for AGC settings (they are the same now). * grig.1.in, grig.spec.in: Updated. * src/rig-utils.c: Fixed bug which caused the last three modes (ECLSB, ECUSB and FAX) to be discarded as valid modes. * src/rig-daemon.c: Fixed bug which caused the pass band to be set to 1Hz each time the mode was changed. Replaced XIT commands with VFO commands. * src/rig-daemon-check.c: Set smeter value to -54dB if command is not available. Added code to storeavailableVFOs in rig-data. * src/rig-data-c, src/rig-data.h: Added rig_data_set_vfos and rig_data_get_vfos to store the bitfield of available VFOs. * src/rig-gui-lcd.c: Ahow true VFO on LCD. 2004-11-04; Alexandru Csete * src/rig-gui-buttons.c: Added preamp selector. Added code to disable controls if read or write ability not present. * src/rig-data-c, src/rig-data.h: Added has_get and has_set for power status and PTT. * src/rig-daemon.c: Added RX matrix for debug mode. 2004-11-02; Alexandru Csete * src/rig-data.c, src/rig-data.h: Added global private data to store ATT and PREAMP levels. Also added unctions to set and read these arrays. Also added functions to get the index of a specific value (useful to the GUI). * src/rig-daemon-check.c: Added code to initialise attenuator and preamp arrays. * src/rig-gui-buttons.c: Finished ATT selector code. 2004-10-30; Alexandru Csete * src/rig-gui-info.c: Added doxygen description. * src/rig-data.c, src/rig-data.h: Added attenuator and preamp related fields and functions. Also added has_get_agc and has_set_agc. Minor rearrangements in the code. Added a comment about the incompleteness of the package. * src/rig-daemon.h: Added RIG_CMD_GET_ATT, RIG_CMD_SET_ATT, RIG_CMD_GET_PREAMP, RIG_CMD_SET_PREAMP to the list of modes. Include unistd.h to avoid compiler warning about implicit declaration of usleep. * src/rig-daemon.c: Added ATT and PREAMP command handling. * src/rig-daemon-check.c: Added checks for ATT and PREAMP under the levels checking function. * src/rig-gui-buttons.c: Added RIG_GUI_ATT_SELECTOR and RIG_GUI_PREAMP_SELECTOR to the list of object IDs. * src/rig-gui-levels.c, src/rig-gui-levels.h: Added files. Contain level controls hidden using a GtkExpander widget. * src/Makefile.am: Added new files to list. * src/rig-gui.c: Include level controls. 2004-10-29; Alexandru Csete - SK568 * src/main.c: Removed some useless comments from command line option handling code and compressed code a little. * NOTE: error in doxygen comment in rig.h:rig_caps saying rotator type instead of rig_type. 2004-10-26; Alexandru Csete * configure.in: Added --disable-hardware option to disable any hamlib operations except rig_init and rig_cleanup (useful to test rig caps and such). * src/rig-daemon-check.c: Added '\n' to the end of error messages. 2004-10-25; Alexandru Csete * src/rig-gui-lcd.c: Fixed a bug which caused incorrect RIT jumps especially when the RIT sign changes (eg. -0.40 + 1.00 gave 0.60 instead of 0.40). Added utility function to explicitly convert RIT/XIT values to byte array. * configure.in: Added summary of library versions (hamlib, glib, gthread, gdk and gtk). 2004-10-24; Alexandru Csete * src/rig-gui-lcd.c: Fixed bug where RIT could jump from -9.99 to 9.99 kHz. 2004-10-23; Alexandru Csete * src/grig-about.c: Added missing ';' character (caused compiled error). * src/main: Cleaning. Removed unused variables and split lines which were too long. * src/rig-gui-lcd.c: Reduced display width by one small digit. * src/rig-gui-ctrl2.c, src/rig-gui-ctrl2.h: Added files. Mode, filter and AGC selector moved into this container. This container is displayed on the right side of the LCD. * src/rig-gui-buttons.c: Removed mode, filter and AGC selectors. * src/Makefile.am: Added new files to the list. * src/rig-daemon.c: The passband width code was buggy it made implicit conversion from frequency to rig_data_pbw_e. Fixed using rig_passband_xxx hamlib functions. Changed new flags to be reset to FALSE even if write error ocurres (maybe I will change that back). get variables are always set to the value of set after writing new value. 2004-10-21; Alexandru Csete * src/grig-menubar.c: Removed about-callback since grig_about_run an be used directly as menu callback. * src/grig-about.c: Added dialog window, logo and some info. * grig.spec.in: Added some info. 2004-10-20; Alexandru Csete * src/grig-menubar.c: Added debug level menu items. * src/rig-gui-info.c, src/rig-gui-info.h: Added files. Contains popup dialog showing rig-caps. * src/Makefile.am: Added new files to list. 2004-10-19; Alexandru Csete * src/grig-menubar.c, src/grig-menubar.h: Remove rotator and GConf related code. Created menubar using GtkAction architecture. * src/rig-gui.c: Include menubar in the GUI. * src/main.c: Rearranged some code in the creation of the main window so that the window is created before the creation of the menubar. 2004-10-18; Alexandru Csete * src/main.c: Added grig_show_help, grig_show_version, grig_list_add and grig_list_compare. Implemented grig_list_rigs. Command line arguments are now working (all of them). 2004-10-17; Alexandru Csete - SK1563 * src/main.c: More work on command line arguments. 2004-10-15; Alexandru Csete - CDG * src/main.c: Begun work on command line arguments. Added list of args and while loop skeleton. Had to stop because departure was only 30 min delayed instead of the first announced 2h30. 2004-10-11; Alexandru Csete * src/rig-daemon.c, src/rig-daemon.h: Changed rig_daemon_start interface to take port, speed and CIV address as optional parameters. * src/main.c: Modified in accordance with the new rig_daemon_start interface. Removed any rotator related code. 2004-10-10; Alexandru Csete * src/rig-gui-lcd.c: Fixed bug which cause grig to crash when user clicked on RIT decimal separator. Modified code to take new pixmaps with '-' into account. Also found and fixed a memory leak in rig_gui_lcd_set_rit_digits. Added function to draw miscellaneous text on the display. Updated design docs accordingly. * pixmaps/digits_normal.png, pixmaps/digits_small.png: Added '-'sign. * configure.in: Changed version number. Added checks for sys/time.h unistd.h getopt.h 2004-10-09; Alexandru Csete * src/rig-data.c, src/rig-data.h: Added has_set_freq and macros to wrap set_freq. Added min/maxfields and functions for RIT and XIT. * src/rig-gui-lcd.c: Finished tuning code for both frequency and RIT/XIT. Only RIT is supported at the moment. Also added RIT/XIT mode selection field to the main ata structure. * src/rig-daemon-check.c: Store RIT and XIT ranges when check for functionalities. 2004-10-08; Alexandru Csete * src/rig-gui-lcd.c: Added more event handling code to catch mouse events on the LCD display. Expose event call has been merged into this code. 2004-10-07; Alexandru Csete * src/rig-gui-lcd.c: Added code to display small digits and removed first dot between MHz and kHz (too confusing). Added RIT/XIT display. Added bug text that it does not work with frequencies above 1 GHz. * src/rig-data.c, src/rig-data.h: Added rig_data_has_get_rit() and rig_data_has_get_xit(). 2004-10-06; Alexandru Csete * configure.in, Makefile.am: Even more build environment fixes :( * src/rig-data.c, src/rig-data.h: Added rig_data_has_get_freq1 and rig_data_has_get_freq2. * src/rig-gui-lcd.c, src/rig-gui-lcd.h: Begun to add and update digits. Frequency readback tested with RPC. Small digits and RIT/XIT still to be done. Adjusted fields in lcd structure accordingly. 2004-10-05; Alexandru Csete * NEWS: Readded file currently containing primary objectives for this development baseline. * src/rig-gui-lcd.c: First draft of calculating digit positions. Can be optimized or made nicer. 2004-10-04; Alexandru Csete * src/main.c, src/rig-gui-lcd.c, src/rig-gui-smeter.c: Replaced "/" with G_DIR_SEPARATOR_S. * src/rig-gui-lcd.c: Added rig_gui_lcd_calc_dim which will calculate frequently used sizes and positions. 2004-10-03; Alexandru Csete * src/rig-data.h: Added fields to store frequency limits and tuning step for the current mode. The fields are fmin, fmax and fstep. * src/rig-data.c: Added rig_data_get_fmax, rig_data_get_fmin and rig_data_get_fstep. * src/rig-daemon.c, src/rig-daemon-check.c: Added code to update frequency limits and tuning step at initialization and each time the mode is acquired. 2004-10-02; Alexandru Csete * src/rig-gui-smeter.c, src/rig-gui-smeter.h: Finished implementation of s-meter using GtkDrawingArea. Added code to test s-meter with random numbers. Adjusted the default constants and updated design docs. 2004-10-02; Alexandru Csete * src/rig-gui-meter.c, src/rig-gui-smeter.h, src/rig-gui-smeter-conv.c, * src/rig-gui-lcd.c, src/rig-gui-lcd.h, src/rig-gui-buttons.c, Removed GNOME and GConf dependencies so that files can be compiled with Gtk+ only. Replaced code which is deprecated in Gtk+ 2.4 * src/grig-menu.c: Changed file name to grig-menubar.c, added corresponding header file and removed GNOME dependencies. * src/Makeile.am: Updated list with new files. * configure.in: Added check for gthread-2.0 >= 2.4.0; explicitly required to use gthread. * src/Makevars: Added file. * src/main.c: Added window icon. Changed title style. 2004-10-01; Alexandru Csete * src/grig-duid.[ch]: Deleted files. * src/Makefile.am: Removed grig-druid from list. * src/support.h: Added file containing gettext macros. * src/main.c, src/grig-about.c, src/rig-anomaly.c, * src/rig-daemon.c, src/rig-daemon-check.c, src/rig-data.c: * src/rig-gui.c Removed GNOME and GConf dependencies so that files can be compiled with Gtk+ only. Replaced code which is deprecated in Gtk+ 2.4 2004-09-30; Alexandru Csete * src/main.c: Removed GNOME dependencies. * autogen.sh, Makefile.am, configure.in: Updated for Gtk+ only. * src/Makefile.am: Updated for Gtk+ only. * ChangeLog: Updated. * aclocal.m4, config.h.in: Deleted files. * grig.1.in, grig.desktop, grig.spec.in, acinclude.m4, config.guess, * config.sub: Added files. 2004-09-29; Alexandru Csete * pixmaps/digits_normal.png, digits_small.png: Added files. 2004-09-26; Alexandru Csete - SK1563 * src/rig-data.c: rig_data_set functions will temporarily set the 'get' data to the 'set' value to avoid gui flip-back when daemon is to slow to update the 'get' variable. * src/rig-gui-smeter.c: Added bug comment about object limitations. Corrected description of rig_gui_meter_create. * src/rig-gui-lcd.[ch]: Created files containing LCD widgets. * src/Makefile.am: Added the two new iles to the list. 2004-09-22; Alexandru Csete * src/rig-gui-smeter.c: Added callback functions to mode and range selector widgets. The s-meter callback now checks whether we are in RX or TX mode. * src/rig-gui-smeter.h: Adjusted fall-off delays. 2004-09-21; Alexandru Csete * src/rig-gui-smeter.h: Renamed rig_gui_smeter_t to smeter_t. Added enumerations smeter_scale_t and smeter_tx_mode_t for selecting s-meter configuration. * src/rig-gui-smeter.c: Renamed rig_gui_smeter_t to smeter_t. Added combo boxes for scale and mode selection. 2004-09-20; Alexandru Csete * src/rig-data.[ch]: Added rig_data_get_strength function. Added almost all rig_data_has_get_xxx functions (at least prototype templates). * src/rig-daemon.c: Changed powerstat sequence to set-and-get instead of get-and-set which could cause override of GUI command. 2004-09-18; Alexandru Csete * src/rig-gui-smeter-conv.[ch]: Added files. Contain utility functions to convert dB to needle angle and then needle angle to (x,y) coordinates. The conversion is done in two passes with the needle angle as intermediate result, so that it can be adjusted for mechanical delays. * src/rig-gui-smeter.c: Removed conversion macros in favor of new conversion utility functions in the aboe mentioned file. * src/Makefile.am: Added new files to list. 2004-09-13; Alexandru Csete * src/rig-gui-smeter.c: Added constants an macros to convert from dB to degrees correspondingto the inclination of the needle. The S-meter will be a so-called perfect S-meter with 6dB per S-unit and S9 = 0dB. 2004-08-03; Alexandru Csete * src/rig-utils.c: mode_to_index algorithm was buggy. Fixed. * src/rig-gui-smeter.c, src/rig-gui-smeter.h: Added files containing S-meter skeleton (no functionality yet). * src/rig-gui.c: Include S-meter widget. Changed packing mode from default to FALSE/FALSE. * src/Makefile.am: Added new files to list. Resolved patch for bug 996435 (bug closed). 2004-08-02; Alexandru Csete * src/rig-gui-buttons.c: Finished readback handlers. Also, connected signal handler for the filter selector (looks like I forgot to add it before). This component should be quite finished now, except some outstanding issues with no tooltips for the combo boxes. * src/rig-gui-buttons.h: Moved the default timeout value def to this file. Also defined min and max values for the timer delay. * src/grig-about.c: Added logo pixmap. 2004-08-01; Alexandru Csete * src/rig-daemon-check.c, src/rig-daemon-check.h: Added function to check AGC. This is part of the rig_daemon_check_level() function. * src/rig-daemon.c, src/rig-daemon.h: Added code handling AGC commands. * mkinstalldirs: Added file because it is not copied into grig automatically. * Makefile.am: Added mkinstalldirs to dist files. * src/rig-gui-buttons.c: Added readback timeout. 2004-07-31; Alexandru Csete * src/main.c: Added more info on -r and -a options. * src/grig-menu.c: Changed debug parameters to use hamlib symbols instead of hardcoded numbers. * src/rig-utils.c, src/rig-utils.h: Created files. Contains conversion functions between hamlib mode and array index type. * src/Makefile.am: Added new files to the list. * src/rig-gui-buttons.c: Added mode and filter selectors. Fixed up layout. * src/rig-data.h, src/rig-data.c: Added internal representation for passband width. Changed GET and SET function prototypes accordingly. 2004-07-28; Alexandru Csete * configure.in: Require Gtk+ >= 2.4 2004-07-24; Alexandru Csete * src/rig-gui.c, src/rig-gui.h: Added files. * src/rig-gui-buttons.c, src/rig-gui-buttons.h: Added files. * src/main.c: Added call to rig_gui_create. * src/rig-daemon.c: Added code to manually update 'get' data if rig doesn't support any get functions. * src/rig-data.c, src/rig-data.h: Added AGC. 2004-07-23; Alexandru Csete * src/main.c, src/rig-daemon.c: Added patch for bug #996426. 2004-07-18; Alexandru Csete * src/grig-druid.c: Added basic functionality with start and end pages. 2004-07-17; Alexandru Csete * src/grig-about.c, src/grig-about.h: Added files. 2004-07-14; Alexandru Csete * src/main.c: Implemented missing functions and added main application window. * src/grig-menu.c: Added file with menu declarations. * src/rig-ctrl.c, src/rig-ctrl.h: Created files. 2004-07-01; Alexandru Csete * src/rig-daemon.c, src/rig-daemon.h: Finished first draft of rig daemon. grig-GRIG-0_9_0/Makefile.am000066400000000000000000000004521435534312400154010ustar00rootroot00000000000000SUBDIRS = src doc pixmaps po pkgdata_DATA = AUTHORS ChangeLog NEWS README.md COPYING EXTRA_DIST = \ win32/config.mk \ win32/grig.rc \ win32/Makefile \ win32/icons/grig.ico # Install any third party macros into our tree for distribution ACLOCAL_AMFLAGS = -I m4 --install grig-GRIG-0_9_0/NEWS000066400000000000000000000134341435534312400140500ustar00rootroot00000000000000GRIG 0.9.0: - Maintenance update - Align with Hamlib 4.x - Various cosmetic fixes GRIG 0.8.1: - Maintenance update - French l10n GRIG 0.8.0: - Frequency entry via keypad (thanks to Alessandro Zummo). - Arrow LEFT/RIGHT will change the frequency with the smallest step. This can be used for tuning using external devices like the Powermate. * Support for VFO->MEM and MEM->VFO function. - Support on/off rig functions. - Added an extra gigahertz digit in lcd display - Added antenna control - French l10n - Fixed crash that occurs when mouse is clicked between MHz and kHz digits. Reported as Ubuntu bug 517816. - Requires Gtk+ 2.12 and Hamlib 1.2.8+ GRIG 0.7.2: - Fixed bug that caused wrong handling of RF gain, IF shift, MIC gain, and compressor controls (bug #1613622). - Give volume level control higher priority to avoid jumpy behaviour (bug #1616926). GRIG 0.7.1: - A bug that caused installation to fail has been fixed (#1523367). GRIG 0.7.0: - Added receiver and transmitter level controls. - Fixed bug that caused installation errors when using autoconf 2.59e. - Pixmaps are now installed to /usr/local/share/pixmaps/grig instead of /usr/local/share/grig/pixmaps by default (related to the above bug). GRIG 0.6.0: - Save and restore RIG state. - RF power meter scale is now functional with ranges of 5, 10, 50, 100 and 500 watts. There is currently a bug, which causes the meter needle to jump up when switching between RX/TX. - Fixed bug, which caused the frequency reading to flicker between the current value and a previously set value (bug #1388342). Same bug was found for the PTT and POWER controls, too. - Fixed bug, which gave the error message "Can not find VFO list for this rig! Bug in backend?" if the rig did not have any of the rig_set_vfo or rig_get_vfo functions (bug #1440876). - Better error messages when a command fails to execute. - Fixed bug, which blocked the debug handler to properly filter messages coming from grig (hamlib messages were filtered correctly). GRIG 0.5.0: - Requires Gtk+ 2.6 and Hamlib 1.2.5 - Added VFO and SPLIT controls. - Special rig functions: LOCK, ... - Use own debug handler for both hamlib and grig messages and format debug messages so that become easier to analyse. - New debug message window, which can be used to analyse previously saved debug messages. - Modified shutdown procedure to wait until daemon actually finishes instead of using a fixed length timeout. - Disable POWER and PTT buttons by default (can be enabled via the command line). - Optimisation of the daemon process allowing faster reaction when PTT is toggled. - The mode selector combo only shows modes, which are supported by the rig. - Fixed erroneous detection of set/get level availability (bug #1266068). - Fixed incorrect handling of empty ATT, PREAMP and tuning step lists in the Radio Info window (bug #1266071). - Fixed a bug, which caused grig to display WIDE instead of NORMAL passband when the rig has no wide passband. - Optimised S-meter dynamics. - Better detection of frequency ranges and resolutions. - Corrected various mistakes in the manual page. - Various minor improvements to the user interface. - Several minor changes to support wintendo builds. GRIG 0.4.3: - Changed usleep to g_usleep to make code more portable. GRIG 0.4.2: - Added command line option to specify a delay between the execution of each command. This has been introduced as an attempt to avoid buffer overflow in some radios caused by to fast polling. - Added command line option to disable threads and use a regular timeout based daemon process instead (problem reported on FreeBSD). - Fixed a bug which caused the frequency display to flicker. - Fixed a bug which caused the README, NEWS, AUTHORS, COPYING and ChangeLog files not to be installed. - Only poll the selected meter setting when in TX mode. GRIG 0.4.1: - Fixed a bug which caused the pixmaps to be omitted from the source package. GRIG 0.4.0: - Ported to Gtk2; requires Gtk+ 2.4 or greater. Removed Gnome and GConf dependencies. - Requires Hamlib 1.2.0 or greater. - Added continuous readback from radio. - Read signal strength, tx-power, swr and alc when available. - Removed rotator support (will be in a separate program). - Radio configuration is set via the command line and the first time wizard has been completely removed. - Added RIT control. - Removed level sliders, will be re-added in the next version. GRIG 0.3.0 (never released, available from CVS): - Rotator support with the possibility for AZ, EL or AZ/EL rotators. - New rig controls: PTT. - Possibility to configure the serial speed (backends can override it though?). - Active readback from rig and rotator. - Fixed bug which caused the number of radios to be reset to 1, if the user re-ran the first time druid (#750024). GRIG 0.2.2: - Fixed bug which selected the wrong debug level in the menubar (Bug #609332). - Fixed bug which caused incorrect handling of unavailable level settings (#621762). GRIG 0.2.1: - Finished configuration modules. - Added wheelmouse support. - Fixed bug which prevented correct initialization of Mode, Filter and AGC selectors. - Fixed bug which caused wrong initialization of the level sliders. - Added temporary command line option to enable frequency readback. GRIG 0.2.0: - Support for Hamlib 1.1.3 (rotator). - Preferences dialog to edit radios and rotators. - New user druid to guide first-time users through initial setup. - Radio controls have been embedded into a Gtk+ widget and can be reused by other Gtk+/Gnome applications. - Command line options to override some default settings. GRIG 0.1.0: - Initial release. - Power button. - Mode, filter and AGC selector. - Frequency display (change frequency by clicking on a digit). - Level settings for AF, RF, NR, Squelch and APF (receiver). grig-GRIG-0_9_0/README.md000066400000000000000000000035101435534312400146220ustar00rootroot00000000000000# Grig ## About **Grig** is a graphical user interface for the Ham Radio Control Libraries. It is intended to be simple and generic, presenting the user with the same interface regardless of which radio they use. ![Grig screenshot](doc/images/screenshot.png) ## Installing Grig from Source Assuming that you have obtained and unpacked source distribution, you can install **grig** by typing the following (in the top-level source directory): ```bash autoreconf -i ./configure make sudo make install ``` You likely miss some of the required libraries if you get any error messages during `configure`. These are: * `gtk+-2.0` at least version 2.12.0 * `gthread-2.0` at least version 2.14.0 * `hamlib` at least version 4.2 Please note that you also need the so-called development packages which contain the necessary header files. If you are already familiar with this kind of installation process, you may want to fine-tune the build and installation. You can do this by specifying various command line arguments to the `configure` script. See `configure --help` for details. If you obtained the **grig** sources from the CVS/Git repository, you have to run the `autogen.sh` script instead of the `configure` script. Any command line argument you would like to pass to `configure` can be passed to `autogen.sh` as well. Once you have installed **grig**, you can get a brief overview of its usage by reading the manual page. A summary of the command line options is also printed when typing `grig --help`. ## Getting Support If you encounter any problems using **grig**, you are welcome to ask for support on the mailing list or user forums. You can find them on the Groundstation project page at SourceForge: [http://sourceforge.net/projects/groundstation](http://sourceforge.net/projects/groundstation) ## License [COPYING](COPYING) grig-GRIG-0_9_0/TODO000066400000000000000000000014251435534312400140360ustar00rootroot00000000000000FEATURES TO BE IMPLEMENTED: x Rig selector and port dialogue at startup. x Support for external tuning knobs: Powermate, other? x Display current MEM#. x Software Memory Manager. x Software Scan. x Band Map. x DCS and CTCSS controls. x Tuning Step (rig's and/or software based) x Special rig parameters (RIG_PARM_XXX). x Support for extra ext_levels x Allow changing working frequency while in TX mode. x Add the possibility to suspend rig command execution without shutting down the daemon, ie. without closing connection to the rig. The statusbar contains a small indicator showing the status. x Auto-Tune: When mouse button is pressed and held down, grig will start tuning automatically. x Service layer watchdog. x Windows build files are now included in the source tarball. grig-GRIG-0_9_0/configure.ac000066400000000000000000000060041435534312400156320ustar00rootroot00000000000000## Process this file with autoconf to create configure. -*- autoconf -*- AC_PREREQ([2.71]) AC_INIT([grig],[0.9.0],[groundstation-developer@lists.sourceforge.net],[grig],[http://groundstation.sourceforge.net/grig]) AM_INIT_AUTOMAKE([-Wall subdir-objects]) AC_CONFIG_HEADERS(config.h) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AM_MAINTAINER_MODE AC_CONFIG_MACRO_DIR([m4]) dnl check for programs AC_PROG_CC AC_SEARCH_LIBS([strerror],[cposix]) AC_CHECK_INCLUDES_DEFAULT AC_PROG_EGREP LT_INIT LT_PREREQ([2.2.6b]) LT_INIT([win32-dll]) AC_CHECK_HEADERS([sys/time.h getopt.h]) if test "${ac_cv_c_compiler_gnu}" = "yes"; then CFLAGS="${CFLAGS} -Wall" fi pkg_modules="gtk+-2.0 >= 2.12.0 gthread-2.0 >= 2.14.0" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) ALL_LINGUAS="" dnl The gettext domain of the library GETTEXT_PACKAGE=${PACKAGE} AM_GNU_GETTEXT([external]) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The gettext domain]) AC_SUBST(GETTEXT_PACKAGE) AM_GNU_GETTEXT_VERSION([0.20]) AM_XGETTEXT_OPTION([--from-code=UTF-8]) # Check intltool #IT_PROG_INTLTOOL([0.33], [no-xml]) AC_CHECK_LIB([m], [sincos]) dnl Check hamlib hamlib_modules="hamlib >= 4.2" PKG_CHECK_MODULES(HAMLIB, [$hamlib_modules], [ CFLAGS="$CFLAGS $HAMLIB_CFLAGS"; LIBS="$LIBS $HAMLIB_LIBS"; dnl AC_DEFINE(WANT_HAMLIB, 1) ], [ AC_MSG_ERROR([Hamradio control libraries 4.2 or later not found...]) ]) dnl various developer/developer options dnl disable HW interaction; useful to access RIG caps without dnl having rig; default=no AC_ARG_ENABLE(hardware, [ --disable-hardware disable hardware IO], [if test "$enableval" = no ; then disable_hadware=yes; else disable_hadware=no; fi],disable_hadware=no) if test "$disable_hadware" = yes ; then AC_DEFINE(DISABLE_HW, 1, [Define if hardware is disabled.]) fi dnl compiler flags to enable generating coverage report dnl using gcov AC_ARG_ENABLE(coverage, [ --enable-coverage enable coverage reports],enable_coverage="$enableval",enable_coverage=no) if test "$enable_coverage" = yes ; then CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"; AC_DEFINE(DISABLE_HW, 1, [Define if hardware is disabled.]) fi dnl store library versions HAMLIB_V=`pkg-config --modversion hamlib` GLIB_V=`pkg-config --modversion glib-2.0` GTHR_V=`pkg-config --modversion gthread-2.0` GDK_V=`pkg-config --modversion gdk-2.0` GTK_V=`pkg-config --modversion gtk+-2.0` AC_DEFINE_UNQUOTED([HAMLIB_VERSION],[`pkg-config --modversion hamlib`],["Hamlib version"]) AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) AC_CONFIG_FILES([ Makefile doc/Makefile doc/man/grig.1 doc/man/Makefile grig.spec src/Makefile pixmaps/Makefile po/Makefile.in ]) AC_OUTPUT echo echo SUMMARY: echo echo grig version....... : $VERSION echo Hamlib version..... : $HAMLIB_V echo Glib version....... : $GLIB_V echo Gthread version.... : $GTHR_V echo Gdk version........ : $GDK_V echo Gtk+ version....... : $GTK_V echo Disable hardware... : $disable_hadware echo Enable coverage.... : $enable_coverage echo grig-GRIG-0_9_0/doc/000077500000000000000000000000001435534312400141115ustar00rootroot00000000000000grig-GRIG-0_9_0/doc/.cvsignore000066400000000000000000000000251435534312400161060ustar00rootroot00000000000000Makefile Makefile.in grig-GRIG-0_9_0/doc/Makefile.am000066400000000000000000000000161435534312400161420ustar00rootroot00000000000000SUBDIRS = man grig-GRIG-0_9_0/doc/devnotes/000077500000000000000000000000001435534312400157405ustar00rootroot00000000000000grig-GRIG-0_9_0/doc/devnotes/commands.txt000066400000000000000000000042701435534312400203050ustar00rootroot00000000000000 Command data daemon state GUI ------------------------------------------- FREQ_1 [X] [X] [X] [X] FREQ_2 [X] [X] [X] [ ] RIT [X] [X] [X] [X] XIT [X] [X] [X] [ ] VFO [X] [X] [X] [X] VFO_TOGGLE [X] [X] [-] [X] VFO_COPY [X] [X] [-] [X] VFO_EXCHG [X] [X] [-] [X] POWER_STAT [X] [X] [-] [X] PTT [X] [X] [-] [X] MODE [X] [X] [X] [X] FILTER [X] [X] [X] [X] ATT [X] [X] [X] [X] PREAMP [X] [X] [X] [X] AGC [X] [X] [X] [X] SPLIT [X] [X] [X] [X] LOCK [X] [X] [X] [X] DCD [ ] [ ] [ ] [ ] DCS [ ] [ ] [ ] [ ] CTCSS [ ] [ ] [ ] [ ] RPTR_SHIFT [ ] [ ] [ ] [ ] RPTR_OFFS [ ] [ ] [ ] [ ] ANT_SELECT [ ] [ ] [ ] [ ] DTMF [ ] [ ] [ ] [ ] MORSE [ ] [ ] [ ] [ ] RIG_SCAN [ ] [ ] [ ] [ ] RIG_MEM [ ] [ ] [ ] [ ] LEV_STRGTH [X] [X] [-] [X] LEV_RF_PWR [X] [X] [X] [X] LEV_SWR [X] [X] [-] [X] LEV_ALC [X] [X] [-] [X] LEV_VOX_DEL [X] [X] [ ] [X] LEV_VOX_GAIN [X] [X] [ ] [X] LEV_ANTIVOX [X] [X] [ ] [X] LEV_AFG [X] [X] [ ] [X] LEV_RFG [X] [X] [ ] [X] LEV_SQL [X] [X] [ ] [X] LEV_IF [X] [X] [ ] [X] LEV_APF [X] [X] [ ] [X] LEV_NR [X] [X] [ ] [X] LEV_PBT_IN [X] [X] [ ] [X] LEV_PBT_OUT [X] [X] [ ] [X] LEV_CWPITCH [X] [X] [ ] [X] LEV_MICG [X] [X] [ ] [X] LEV_KEYSPD [X] [X] [ ] [X] LEV_NOTCHF [X] [X] [ ] [X] LEV_COMP [X] [X] [ ] [X] LEV_BKINDEL [X] [X] [ ] [X] LEV_BALANCE [X] [X] [ ] [X] LEV_METER [ ] [ ] [ ] [ ] FUNC_XYZ [ ] [ ] [ ] [ ] grig-GRIG-0_9_0/doc/html/000077500000000000000000000000001435534312400150555ustar00rootroot00000000000000grig-GRIG-0_9_0/doc/html/grig.html000066400000000000000000000207271435534312400167030ustar00rootroot00000000000000Content-type: text/html; charset=UTF-8 Man page of GRIG

GRIG

Section: User Commands (1)
Updated: Version 0.9.0
Index Return to Main Contents

 

NAME

grig - graphical user interface for the Ham Radio Control Libraries (hamlib)

 

SYNOPSIS

grig [OPTION]...

 

DESCRIPTION

Grig is a simple Ham Radio control (CAT) program based on the Ham Radio Control Libraries. It is intended to be highly generic presenting the user to the same graphical user interface regardless of which radio is being controlled.

Grig does not store any radio configuration, instead it takes a number of command line options.

-m, --model=ID
select radio model number; see --list
-r, --rig-file=DEVICE
set device of the radio, eg. /dev/ttyS0
-s, --speed=BAUD
set transfer rate (serial port only)
-c, --civ-addr=ID
set CI-V address (decimal, ICOM only)
-C, --set-conf=par=val[,par2=val2]
set additional configuration parameters
-d, --debug=LEVEL
set hamlib debug level (0..5)
-D, --delay=VALUE
set delay between commands in msec (see below)
-n, --nothread
use timeout calls instead of thread (see below)
-l, --list
list supported radios and exit
-p, --enable-ptt
enable ptt control
-P, --enable-pwr
enable power status control
-h, --help
show a brief help message and exit
-v, --version
show version information and exit

Example: Start grig using YAESU FT-990 connected to the first serial port, using 4800 baud and debug level set to warning:


     grig -m 1016 -r /dev/ttyS0 -s 4800 -d 3

or if you prefer the long options:


     grig --model=1016 --rig-file=/dev/ttyS0 --speed=4800 --debug=3

It is usually enough to specify the model ID and the DEVICE.

If you start grig without any options it will use the Dummy backend and set the debug level to 0 (RIG_DEBUG_NONE). If you do not specify the transfer rate for the serial port, the default serial speed will be used by the backend and even if you specify a value, it can be overridden by the backend. If you omit the radio device (port) grig will use /dev/ttyS0 or localhost if the selected radio is RPC-rig.

 

DEBUG LEVELS


0 No debug, keep quiet.
1 Serious bug.
2 Error case (e.g. protocol, memory allocation).
3 Warnings.
4 Verbose information.
5 Trace.

Grig has its own debug message handler, which will manage messages from hamlib too. The messages are printed to STDERR by default but they can be redirected to a file. In bash shell you would write something like:


     grig [options] 2> grig.log

You can then use the Message Window in the View menu to view these messages. The debug messages printed by grig is formatted in a structured way with each line containing both time, source and level of the message. Each field is separated with ;; so you can also import the log file into a spread sheet for further analysis.

 

FEATURES

Grig 0.9.0 supports the most commonly used CAT command implemented by hamlib. These include frequency, mode, filter and various level settings. Please note that not all features have been thoroughly tested since I don't have access to any modern high-end radios. Therefore, comments regarding success or failure in using grig will be highly appreciated.

 

KNOWN BUGS AND LIMITATIONS

Buffer Overflow in Radio
By default, grig tries to execute rig commands as fast as possible in order to achieve an almost real-time remote control experience. This strategy has turned out to cause problems with some radios, probably because these radios acknowledge the reception of a command before executing them, whereby the next command will be sent before the previous one has terminated. To avoid any possible buffer overflow in these situations, one can try to experiment with the -D or --delay command line argument, which will put the specified delay in between each executed command. The default value is 10 milliseconds and the smallest possible value is 1 millisecond (if one specifies 0 millisecond on the command line, the default value will be used). If you find a value which is better for your radio than the default value, please let us know about it.
Daemon Never Starts on FreeBSD
There have been reports on that the new, thread-based daemon process is never started on FreeBSD, while the old, timeout-based daemon worked fine. It is therefore possible to choose the two ways to run the daemon process. The default is the new thread based daemon, but if you use FreeBSD and nothing seems to work after start-up you can select the timeout-based daemon with the -n or --nothread command line option.
Connection Settings
Once you have started grig you can not change the radio settings (model, device, speed). You will have to restart the program if you want to change any of these settings.
Multiple Radios
Grig can control only one radio at the time. There are, however, no problems in starting several instances of grig as long as they do not try to control the same radio. An exception to this is the RPC-rig backend in which case the rpc rig daemon will act as a server while grig or any other hamlib frontends will act as a clients.
Power OFF State
On some radios, grig does not cope very well with the power off state. It is yet not known whether this is a bug in the hamlib backend or in grig and we will definitely appreciate your input. The situation gets even more complicated due to the fact that different radios behave in a different ways when they are powered OFF; some of them will continue to respond to remote commands, while others will not. Even the same radio, like the FT-817, can behave differently depending on whether it is powered from internal batteries or external power supply. Grig tries to handle this mess by suspending all rig commands while in power OFF state. Only the power ON command will be sent to the rig. By default, the power status control is disabled and must explicitly be enabled using the -P or --enable-pwr command line switch.
PTT Control
Similar to the power state, the PTT has caused strange behaviour on some radios. Consequently, it has been disabled by default but can be enabled using the -p or --enable-ptt command line arguments.

 

AUTHOR

Written by Alexandru Csete, OZ9AEC.

 

REPORTING BUGS

Report bugs to <groundstation-developer@lists.sourcforge.net>.
Bugs related to hamlib should be reported directly to the hamlib developers at <hamlib-developer@lists.sourceforge.net>.

 

COPYRIGHT

Copyright © 2001-2006 Alexandru Csete.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

SEE ALSO

rigctl(1)


 

Index

NAME
SYNOPSIS
DESCRIPTION
DEBUG LEVELS
FEATURES
KNOWN BUGS AND LIMITATIONS
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 23:22:50 GMT, January 02, 2023 grig-GRIG-0_9_0/doc/images/000077500000000000000000000000001435534312400153565ustar00rootroot00000000000000grig-GRIG-0_9_0/doc/images/screenshot.png000066400000000000000000001624241435534312400202520ustar00rootroot00000000000000PNG  IHDRy;`HsBIT|dtEXtSoftwaregnome-screenshot> IDATxw|Ʉ$e(Á{au]kkvY[mUkuUqP {fH9s2H `PzoN<!B!ۀe y&p;pRP(D8& i[!B!DDQhll<;[ٝgSɡP, iiiD"t]߭ B!Bqꨭ%RYYIcc#t0NȻ1## q]۶q]72B!BaJ)6l@]]UUU籛:o4 ѥKuF4`'B!{Abz\YY`1)ҵkWW9_!B!`6ضM]]@⮞J%##C*xB!B5PJQUU֭[ihhd Äa xB!B5#;'"B\p~f]N~u䴚dBTj_>BN=r4 V_GfEcW&N.=9)MCfJ|GS乏O>a?Kp;z]tjw{nA?ڛ7)g,RQd'Ŝ~}\16Z4VSr"Ͼ>rO]!D+sǎ<=}(6\5d3xb1;/g;ƾ]2s Geu\2CnڨF(+vc8N!B '0>mR;m 9ޅ2Լkb?oI(U m'2{]ٙ+(=H6?K_33~7IKQPLW=ϯE_"/pb_ `*Y~\z?N:NޛLRF6/kSw7 a֋P^z5qrB oևmi⚳98H0wFKK/HWFN^w4#/嗗⼿/J_ߺb;b[1Ɨ\^ ' ֞\%Z񁑺N{Z:v gpIE%_eA 7+yf#7Χe~=k{%Z#'ȠXM%Un]GL9T:+nZ{:z>!Ua򋳩lD~_ λs"odCxB},C_9׶[9kXK}KͳX.'Q+r/jwm;מBsQf{=3:lEf?Fs71>+#Fx{턐?Ʈ8y;vLH9Zn;@k^vy*y ]cTWDSLx;I-Rn-a]vkV&=]=wx1j,bGSiV!Mt6dT8sC7[hlġ !O!i֩5*FMLeU≏WRfj┾̟:Mr狶;tzC'%xb6{4 }-ʍJ\{8N~~E4:KY\֑Re?sѼ|E6XɶZ :,mŶpA_K08z\'*6E=0>IiBW)S;7hasf}S;kifcΠ+f:@Sge=e}?q7֢ۗgd"^t^|{#G]Hjģ~|Q"bM))شVֳvX&W޳-ޭ "sbg/;ƢJlPE]zmg%bTs9oL+#F,|Bt"kӛpu)Kcu]ϋwW>/Ʃc؎8X8}+6l w!'Pr:J~jھQ*6lEC}:xosnxɥyV+r*(]3mK3Q0Ŗn%US!vKV!ߞJE'ǃg6y:deeu !i YwM&o\v=,l# !ص+j|fV_i޾2@B!wJ#~"7egzEb=X&[̺yǶZM;!vFqe#s !B;>TʸN)~3sSU#~Q*BqiT{|_]5-&2 ,H!BoD<Τ[wݷ_OoN<[OZy{E\w#<;mp,]:n^Yfvo»O]6V]4^œM#kRYLۼ# Vpm9)[bB!ۭwM'5#}S4)dsG( qoNUGcwxG)Qdd[G \㞚,j'Cf1|mkB!b_!VgѢ4|19Syc9f,R4WtM`WgoϦ܍ PĤKႣGPndURVZ/~.}x_ҲuU\zAX5'} s]z K{/,gM; ;r$s4sks++b|v[kTz9t D+?Kk,v9~yZ\ sώ``fƍDPYŤl9!aNQMbs?>6yv~_D HWлaPIΠ^)'I!`q>Z ' zyvJJȑ7wܳX'ϕCO~S+B!bOŐ)dwG"[3kr/IG6!dA-};)mc<ÆٟUf͆pexS=}yp(g0gAyr/?w5w< P8;]FϾ╍xG;Pz҉9&Y01U/ gY0\ʈ!ޘHaȯ!#gK#v% 71孛v5C<{n[{_7Y˹sVwN=@1N;{!B!R L?sX!WyI׉?ಳepq6!XX]l鋶tʤOh 3lh锱`a94"c}N1ֽ{WM{q'oOK-yK+xs뒲W:-䦓лox+~VB[^;+|Ϋ;Y~?8z3>: v껸gTe֊9}̙~@O gbű/cN x3 G]ʟ~бs[/*9sd uB!f _QYz/q q}˩[|ڝXu=[XX^>pڧW m|p<]KöjK{8fslJppvvf[.dcqgroYFg?>Cs2s1vwqϼjfZåDHp޷ܷR[eIyxvq<ׅB!c:y^fV\//Bň0@2o֬XFYMSYU|ݽ NÆwm rh\ҽR)idlUh8e)2Sa:%Dꦷq6P1xp^kW+ bY‹+0džX<GQwGJj:/uW]Ͽu]NoZq4Bc-4y U$vqz닝V wyJN𗜔tg206<:dⵗO4w or. gU cK鯿˻Rخ^ͼ d8qs~ƬtFs]9>E.%B! =zՓK~.=xv .:]"B!M%%%A2ײN:< V`Ys;uNZB!B|$/T {F5v~,k !B!2\S!B!vg^YBA!B!7CBB!BGvkN{<B!Bt y)){<B!BpM!B!؏HB!B]o 8q[׮&j/_8ճ7Ѳ=t6MR ͋=2lvq~+Љa{fi}^ͯ&h^tפ{x;;n9#7JSh/=LjCY-ΥK 43ܾkL.rpL=k}sLYdhf `1U!-}C߃aBi} 4 4,`C'HV|R[)薃n==~-͈]=lu%%&5/CJycJax"ft#_b?&أQFe9XF e:_SBeQ0kanRf I3yЌh1+eufMD0N p~U??y,^X!on<;#y"ܹ+IX!zӴ4b瘉c: F-qZKT5/9 ub8^ YQJEaU6Y={cְo2Ê Cokn94py&x3ۈi;m.2'v]uñ_!`4UZK l>TE ^ ͋&!o IDAT]i{vJJܡ(B]=}4r  q*d"ĨwmDC@g5Oow^^|t_[?$#Q 5MVGϿNTxPi iEءt}X"CSXvuD #I@DM1l/tS6gqX翰gU>?-N<үĈ5 DFP$ 5/C6,7Q$ι޵ d1nCq4ݯ=lKRl=~,):8e@a`"(oҢi0Yk3l*&7i>13qt<4޵h҈K?ٞP DCX̰?OϋÂ]P\!B* y$ئBЪ n?ox<wzkhJ|"3Mw1t0*jEtW~Y"55Zшt=lLA,݋pLzf/#Z O ~$ЈQ"&xnF:rC? T  h19olԽR)EUj'm/Eڀ~0Y"tC*mi@XŚ**ƫ^f#'8م0 4GiX*u*ԸYD)i,'U f%ҥ?kn٥t9BcS£|:y]ʸaaXalވH%/=MqAxZ2w)ϟg ',s)S|w!`JVD( ͣ9X|Y·zzF\y2="_E'!Ot:hѼ7GE'֕֕r;>hZU~[5HI [fV4Oa^#`%I@CzBtˡ^wyQZ+FCi}V,]-O++>Pfˆp!|&;[g4 aU=J~mp>tMQBFEM#|:2&9+dp3?B~EQ'ovbo \t<9T.]IC7E_=׊CӴ̊7jXϢ_cuu&bD~ a[g3viNY8zt>k6ap_IXxd=ъRJ>u5?o]wWy Qpm㆐*Dj!Ť413eHj=ί Z̧k>ZϹܼLTdwOCYC!rӅ!|ؖZJ_~KohE.$ YLǯ칞XO1l2-hڿ.ּhKRئ) GP_MsLf[(1y~7щ]쏿qG "sx?dʘrOvw] $薓@D =ž1WdꊏV%B׿E5H6ik ul\Zֲ/$pYEӕ (t8¾6l,#:aݣ~0M 휈5_l'{ (cgUp ҥ]GLd10-tÎP^!9EjFf뜢BnV$[Hչ쬹J!m-ݹ}OYuLLͦW2%Ab~زt).\YӑĜ C}&, *"C E0uV5 8%՟sAvj CnnB>j/cb"X_SJx=/8`B"N0ZշbhMAL)K| z<\:1j t(+]USXéNgkm[' l# ptbM&H|-~%НV.YrJ>!][<R8ꅔUK\=Z8-&)AL: = <"Z_M|` kiCg-J[袎FPo?6C[nfr;]Œh&k^gcbmZI+oυ Tu $Z]ê.cYg1pM3>X4`(jRR9zD`4͡MRXnh(tlܴMd ub8CL>|Ick8JJab()GzP`дDP ul]>pwv6Ux!2BGCW e%'8 -E'{@R/lm~#KVIQ~fݕ$Vc9 dVRU K-7 áVs*J|z 0E.F9:Tu[L] eXa?yPm>K=dt7gOr;ΣfRvYzr8~7!0z4Yqp+0@p(iDɓCXژnsC!RuաO-Ww  `zyڅgkF3]p]lC#,,o c^~H8h۬Q 8*H/Z^D Gi!ʟK{1ygdW N g3Mʷٚ|o8*@Ŷ50H"fiK%Y6ߟ78RC/2$o]y6vlzwgd0p&V&pjz49g*0d"2Cи沠OgRJz , 9#I[*,q]]>}l R!b-$$crm;Erl1@r~|*׮&һ׋(i\&c4*`{^QUF֣5SSSP]S<1<"F=K(5 T3,̼^^7)lRt+FZ^W{9frQt 4#No-絏_#Ρ3\WϡYUcE0\iRؾc<>{:Mu]>]6雦`pv:!#?3QʟH<{|H#C*Y6`bc-AFASH xlۼgX<| նFJVF}:T~ŏ-Ϋu%DJ> B6!;G Y*xx桔A9rbәW=,ڰW69!Ŗhy5YԶ/j>zճx4f:@NCݫP"Ԛ̘ @Mc W0-Eb=a-Α\/okoPv1Hz6n_L]'as%࿟HMo1X~mۣkԆM"6PU/NiԲj9غv6-eCI)e[Jp*iihL1R~)pS0(J9ٍ>9!v(d^jV)֑5To޲/b<I 'ng |nW&# #~aذa3f̟??|򔆮IJfF"Š6 ʅo0{E mqS ԍEs6QHrthbYOQ/&Wo(dL6~M)tpza:UM؎?HA[.dޛuf+1 dی/9;IIvzKЉa\ x_O|ۨ$C)~gi`CyF6eޜYBVZIŖ js rzqЈ6q瑖f׵'1;M+  ֯[n;t àel޼z=MJYl%3锕I+"5cD OauHAH a.!{䡸AMiۀJ6^1li,.; B8XR-5d>Y)i9;U B躎0yٽ2>+]D qT8bQ,lŔߥ8t$biBr,4xy`f*@z ds{lQsvr>^eo=T6,u O8n.ecc޼ag%lG~B$E9v=3>ʚ>'>#! fHӋ&p_DŴ٬PYd͗fvi&ptdGBD;?f7\#Ŀl[3you:|GBe[6,aέF3灖N~^rUKsP&4->r_9S]A;4Eժ V:{Ɇr;gŽ5Mhz߼sfs:1H y}~p%O:;i=x-ӫ@?W]w|q0ϯKbTlY̛ ٺu] #¤B=H1ӱUyt2D]7`Qb%捥`7: `*jFc94H8L*6 ۈ @ # ۈWSk)qšht-MQQ9ѯ? 3{oa;dBN~1c#Ѵ!Ag>9=y\0d⋠k#bŰ\ӒUo'\@an1e5)o(w%7@s yy^r{!Bo ǛT̟?k9w"ASּ:/a0Y >0$%K.5T`KޣqpKֱ}(S͢yXgt|z_bs !+TU[iGg63lf VR ,8>v2bkY@~J2&wL+:j2w;3Vn-c̏SYnԅ8T:LLUUX@zZDrSs L#l،79E20< GyGT ߵ⺮YxߑA4MsRT)YY] `U6M0"*< ܠA6m`رrcN&h5t,zY<?#<c5x=V1olrQ?dzB,ꇦ٘n׍hS2#경j}z?9El*/ K&66XD󎳢3޻]T5^1*Ƙc쉱%F-hbOl(J lef9?pruٙsfܽwy>!~ĎK'J(J!"wϐ5#bˈ۲s>BhaK>69qPl.Iɬ //ưY0܃ƹ?~?K"!ΕrUm7jQkm_|+~E-sϋ}{Q^q 'I΋)b-Ɨ)hG}z**J(J(VN2|?BXsѭ̛" ?VEsًai[򙔫_bAx,Ȕ'c Z Ec@{U-W0jJ^ިia7I0dBkV bTX͊evIre` 1:|͜΀!ÐE YNze֬&,Asf~6_|&?= nzJQY]A{3tp!HһwwV\#(t6.rDL|o۟[,Y4]k{Mt ςSU  r s+(+Dʋc듳06ݷ^gc-&8|/y⾻ne۳߾0`q޿+HTA>p%r< H7VY P"@- ّ(B[9L_3r1[wX \J(J(VN }ZK|ɝ1Z}4*\{EVo^ -x('sO$;{6#z'*cY!I,2Q!H )d+QRJ(J(V ! کr.IKu@1U5Bid+*,h1s4Н̿=` Ǟw[9N`hparM$a罷1~h3|o=mdU~'AϾЭw_9 X3>F}nY\(!>j2+ ~ŏd!aAkÊf_{^~( flnlGѹ[<DU Ad<_yGݍ7ѷ"'6uq,F8$¢x (A&<~!d̑?ڙ-2 ,_wࣷ_{';`0{pQvxR5T lH$i~GLyBrcP9TTw!2]oi&CdX.9+OJÉ "&uCĎZUR tKX9Sfgt2`1w >~݈\ 0k /#]aHh'yH0 +ҭ~;1uOgѼy4_Li\G q4+ #5c{Z빡QB %PG䕰>XZ[cbNK28~E>/'Tm >Λ⩧c̶{0|p/0h6x%gc}8}f#&~!LgEYOǮҥkW/)Ї( 5Ff'AsO<kkBH!6OtOYIbMfHJ-ʫ" W_{uCs0?_~^H1Dݫ,O zȾG/>^֛fO(+KӫGHR^ -͝Gohcaq٥ ej9$4D-IS+#>Xs$58!RQaEKŤ.GڤGdYWF%wojE&X^_WOu>Sh[˚HRgΫoв_*T(,u:Uװ!g+LPTzIaPJKB`!0}F}y:%PB %|;( nT %ц9"#Ӳb)j_=+n~Cd<~cxa=7qA1o hjh?EY6=O>ҽ'dNI#D A6 AHtkڼd'k,LBjT :2!& :>Fey3fNrS*MTU2r :9 <}m\}%{嘑6-MOD 9'2Y}ܼk:$/e{5.VDӅٴFrL'2z08 "Ф2&‘uW12rDre,]E(aE ˗ԯ9B㜅duDuvƱ|i=˖܄1*V%%A0jhrVѭ;8,^L:5A+0\Ya_k=79J(JvP"y%3,Y8"DNa=3R)*^ga IXc ->@g޿Pqw$2 >;&D&-piGp 2mt*f~v:vnL!pBMʍ_CከEHHy]v}[X" aH eAc9PsऐXip%mc:,q*6WFUG$"v=(bPy.ד{/Oq?Sm':U6#RQY{-=uW͘ŎGa[$q?[I} %Uh7!,#t KamLQ!H m]̙Y %<${ѬڛTWӥK[ͱt|(X*׸>^}7b㡃)?62Z X,RDopkF%|zvF}ijZ eJ(=|m'rڜG 5O|q+hS/ J1O=¢{聲J*f6_y}0;Mcdc~Ι'+?vWw30[Cdl*դNh|r&MR(pJ9.MM|sZF!מy6r p0ɻD^T"4}k7F CF(c$~d TZ6d"N[v0WxsA1aj'yXlO=ǟ|:J5Rq!G2j{8ITW lJdv<"rN.q5 q]yF:ɛױeE I#$R jiZ,#p|F]>L8tD*hC$UkW]̞: \_j5$R뾇~>:Sa׮ڷ빡QB %|P#׾RJ0Ã10 q]wۥDޔD|ewcFQr3wW Nڢje 1'=!ʵp-s)з`n{i 'L%p]vI Eڞx}n\{M $nLx,9'[+o3B" %ATT2 ^6vU>AIS4UY$HGE#|vnIA#KĐaCبkw\BXN# 31#]3MMER%9|#ظ =8x}h~ヹ?gxwGo;m4tƤ3/f&#xչ{Է3٬E\N#Ⱥ&~iI#eZ92^|BA ֖oQ.@DJ6 5̷66J.]:}a:CKK 0 k w\[74tJS!]*$\[uiR@$(.剎ɯ%P:z:|m%O8代s%!uݯ|ړV9RǐEi`\}o'#Gk]VfڔO&0O]Dӂ;jRwDn b"cy[ S^~'zp3r]£*UChVf EZ?~ҡ)IN%~0_$dItr8¡{en%ͱyS^}F`4Z%qCx/0b_ٗUȑ(hCFy"3v *}F GhDh-9ieqȑ cC3bn3f~_N؋ Y\{`< HꀜJ+GMGoMWzcc.Vuzh'VSٹ/ wqc&h˛b4j$]d}[4m1¢TTqtK3N\QSpRNUkܶGQtR p"Dz@[ \!`}EMگ%P BȺ*"}jڙM-ъt/͉LQ b"@C.pn5~s~1*Qam4#yA.?{Wj:Bny-v85A÷`.,?kՇFrL淇 &vJO[K ZQѳca鼅*EZ:m4 #qCKOPS[X7Žo IPTuvp=79$Q(?IGeBzY %|#%Ok1T?)e\V⅙bxC2"E7D i.( RKw3~ro_ޯ3bhpo۟d]ĵZ"AFvh؆ߙDcC#5+{|B;_B AnKΦƹlu2N6sϣ@⾿ࡃ upEEl\ecF"/6SŸF\Gm]g7Y7-Fb?4Nza(X!f}U‚93i8gq ?{v`ٓxR"Im]gN;#9kBIjK҉+CMuotFSs3 #{fʋ3^`YztDm,oa-q[|LE5!N{ sc0VSUWҋ Z(A.¯2NZ ${e"lV"E$S߷빁q|: c"_62t18¡ !oB]O4zw 5NC)a H&h|u$OkMEK)XkMp *Z,RxYHտT頕r;c8ʔKpIΕXG<Hqf;+397 yTUV/ ONeFqw3iLx,7y)G dSDYam93c x.AD+Imc*r&]T|_:Ig3n9SznQF% 4Yp%2t iHɳp #B0d^~n\u}r ~{[zC%2Qɇoy{7ӿFqqqDheQRA%9 ^emHV:Wu%ClF*KX=ҍͤ[E!Ix=vۖ HcE$]vLųƐdH<ϧkޫݶqYl@rTK?/v:%xK/AK0GZ2WAOfoW,|Ff Gci az 㻄[QfH)I$TVvN . N#H7m, )%Zk YgxyC"L䤥?hjn↋Nk[ m@%90Λٿa޲9f+_yֈNjbsbNF.# ND y2]P X;2|٨GvE3͋5`ʔDidM*T\^fֻ-q{qȱg1v}cM c1l5jOn\Cxl(`UJ`#xưx[ϳLdo i]KX 5 rhAcL#]v-5<"bx-(H[K2F2w {=J;E"qRO룵&zU|mg-At)C#lQZx"C|jGڵ+9iqT i$2~q8cYd?c7k̀[ %bR&d^AT"X)>޽:?oɹ͵S9 IDAT'L;Z$rqqF2WG>r}8Z1zܮ8*VcRQEW PnP,m-8FP'X$Kl6|'zoIa 9't#haA |EUXL 8]H%p1sʸ3zXbn ~8w}roa>ۑ4s~aȰc :>ǜr)o<\zOeC~]#q=lv 3T%%N鼏הٵxzoM{wz C3,0ˀkvyCґTvFظwfѡS:3!0:As?hږ`I}=lɲztHYEdؐM9Ckc#Q{)At],P^BhA/#DIM:Y eAAzy5S|\l +7d9d[I(vߗ16$(]---~Ww Xd DkzJ(auQX${[$N qٓte@oԹ;+r gabJ)ZC/\;DB7S2{j_=r UL ylQ4(uֵA-Ͻ!GJ[MP[%(SgD 'LA+?dW[rVZ7l8wOiYNYb饍Dc,2r*0(G!L'2̞9ϴixgACS-M8PIN8ی$Q ]{` {IxӾwMW_E˙8<* kd[tާ ?1|? ڍfJΉm@yntā,ӿF5QtۛCս'-M|dϛOɠ5"YT b̖cinkiӨ9jkJ1d9.,W_q0: 69.AWl5_t_> dGnjJ2Z! M˚hMt5VZ^+W5i?z^5NQa\+a!6,7&ͯMcpɈ1o]xu"<^y's{}IaM b" dVknewF,Q*I#Vfibŭ@b9pppH>@vIGr%;7%+{#cC'Y:6. p3/K^'b.>@Dh*^XZ"6_Q޺Ⱥ`4fo. {:fJ%2C'"7ξ#'l5,>}C IΤ?7@=/~ wH]yBF#]O)퓓ǀM۟wqр!VD5N䠅eح7xS776aWSCH$rG8 (//G~ޣd![SoL}64ۂu݇oBkWy6aktK7^{9>f|K#\k@yc5,S+V0=Iߵα6[`e[0ot2 +eEDd B04MϺ)f] eA h]ш#4a^Ɋor[0x {7w I^5!| _|T,aCi:mQ<]\wٜtO9b$+ja‘46,7WͩJù2dOmm f&ghNݮG0o;[yąqh7V #G)+tb` ԋւ&~q=/lZ]i~\wra^1!++͔tV9S$]D·-0hp{5;g(%B"mWU|yN9Kw_K\ @|-%ʵWr1gr kshm[LRSkxlcCmXY1mL1~N*:ǘ= M kȅLϒr[UЁl<|(:cAdMDhrtDVaЈaLmgƎܜg|HAԳ;NEմEY2&"fMBtݝݒMmJv"}z| -mx2k aS+I-IzVj-JL$_clHXQf%QRJXg(6Swة]D!wqO>gκ&n[ )rPV1oT?Gx{?ٹQxJs YoBtD(bδxѿǾѥkW;F ~B wq!m"|R2 "ZN:2{pe XE˩4>o+I*U=?ʐs{7wOԹ5. Cn)T8nl"cz>=c X#21QHJ?FN'TՂHd֏3<d CR<]Ψ-[;/ȩL:Va;3``9Ugse'sѐn# 8#߃V<`wv;ZhJ_&,_9_̢_OvGӛ3ct GN=PQQ>a)4,[[Yƀ#rUh]X2w. KfPF!$RPtg]ϙˢs6Sr&Mњ4/>d3c7] e Hgio+p|)U3=tLcFP^ `: W̉djs(+K"q/isꢁ ĤKSUB kFyςIuM6.G%(#pH"'5R^*.o'LZ8VW e+Ѣ\z$nZ[-a0_()-iS3j'y=2UW.NN։H- D8} Ak 6$$8takAÒ%xB\TVugZbqt_$Bo#Cc!(1#OIR>C)V+kȟ [ۘF:8 5%9byt1wq%vrҢMe=xTzvH &9_xƄ[ZЈc@ K5:uZs4.oͻ`PY5 uXIcPFD(#BB:} \a"| |2G p>x*_eU3x-3b(ߗ16| ZL8O>cIзc{=J׬ Y[1gq٦oG!t3dGSYԖ`=bL5<ЋxѷPmyO7AQ#"2*.e^UW]{Sp/b s T`D/%DDF"IJܕ*\Hw vc:걊׾/"XΤI w@托n4$Bεai$#pD;bQ pk,RqFHBbuM 5T3migSަ-bĐm2"&_.i m `"QIq#CMEyTS]7^B6]E*(~1#=wбF`TD4FJYڢYC)V %piZ܂: *nUby'> h\Z+AN܊oָ\&MʑR#ʨ۫wd=79:ȓlX=k}us$C@py|h婧?Q␣ъ}ɡpEubQQ!AȡM\@b!irNm46cROdrs䡇a" D S%"iD2ŠRIDx9LQ¢R>nutl[:.R`B"mM(Ga¸~75B|E!5_2GGd<ϚGlfwϐMV&h_䧞yr7ꕏ~-d2l;o3;Xkf?3L!xDvzBkC 5`~XvG'y`k~0Dy_!{ /ZDPFÒ%, W\ڥ hb/P(")1)pȩ4{v”s~1Mc͂SNm^qckjfyp1! d/mb@^q9kRNT"I* Ѿ %cQJ cr MX VwP%QATh/-U8Ƅ.qv RƊeq^[ON<'cp.&E MI8!eijT>R҉cTАWdf6݂K..:f=xxR#"+~K4#Dm̈́A䢐7,q\.@r9cQ$NMgHATfa-Vt\NF!j:N;_ ki\2(%WK"d[{n߿1Tu#srsKdLiifs+=nX)1~)AXS/z̏Y8$9dc:5m(kq hUCwy꯷GZN>bn;>]+9\dC؈n5Y|Rm#=Ҋ<n}cWr7IsgF缻d/>ƨ :+<"ߟ+^آnD(ԫ'%F'`I_e.`ˣx*Jͥ_Ysd l5Qͺ Oa.щD!C :f̘13f_<EE4t {/%j歑>ВD^1۱j&jBTӪE a1+F<eȐ %d[f (S^ \T3_܉ r尳k"們R^C [d)8y ŵpB莗ϧU`xgml@O0"-lU['b&u4=-.5&B$AqϏi!TUΙ"cz !QE c("*g<97c.{uۋ-LMT-%t 坣P (ᵐ%.M7*²UVۡ榍0 rpA۰+EA#Xv-+vhS#[QK=l* *q  1%U)XӽԃQ9c&ۅt;HWT;LQ,dMd Zp ]o?W]J@N?_-,#~ZydԶK~懩/UAe,~>Ym{(XƷ'2fC#mPg,EX-61:8Gw:qرcjzSyh%q9?1y[n%ULEt\<,-RJ4[M [2Fw6pP+|ʗXP^*,%xvƍQB$/F4 *{Sn>Dˡ"+Dvm2+5n52fQ]6=')n  ^0<&c~/F0V3qNn&0e]֯]Q p6n#*lifop oN*pZҚx E)|:e%maV%q\fTjttj$ȿ#i3@Wj}KqF|c`-Lv x2QD]pfsC޼:V$YN`‹zc2 DWz"r"M$= 3U3TtBu-@C1P5ϫ+^|Zy5Qa [xt%j*QDJ@ک[i\C7ATSMx^Z˱IZIz.|{+W̳aF@@p\Ϧ"=۶/NXu-/JޞFpͨNA^rm\T™s =U >z\TMQuhꋡX\Eh*Ͷ=\U=XbXŴ_a R.h*f+w׽lϦ$58uع2[X1kf7 ͳl7mFwEblckh{AGgʫ 9ȯSb݄Xt MCCQ5mԨ 9k8y/K7XPiP!(۶m=+jӸSp/l_{p E@[Xv)&U`q[]7(%F Y.Lfu-Z1ThJv-y< )m Gx3Du]P$A NfEh]E:UB2WMwPy, ^G8hJz^\ȋ'`$BBd] *^j r^p];Y΋ M:yB<InDcVmnϦlR**2b1Zo='LLx*UUp#ڶj0!G 5UQjq8u#_kšՓ1e %XGy^،h Üob2:N>=Bsَ] <ߟǮʞ?/"dzuNѫg S@Cv%tF'e&ό( ʶT[UlƎK$G<"//"v|a&9%hw(Zm~\{k\qe""!k^:H#/ U3jo=_e.` /fyzNҤ/T H8!nXAcDqRIղ"ޛq"ppU+UU; fa&I1 GhU8F O0*U+g.'cNʻ{&DsE4]R$ʡcK:^@O?}}?OSm@0udZErS*W8G53\u zn]omy ŝ;Rм^]ѵ_oQTR~:qBp<̍T୮^3d8hީ=ŚGvۋ}7xBCESTTūx: ALDsg`>dϦMUlнSf>#LTl\"B'j( A :h tbt Z4U m.hmpOYPiUEl[hsҥ i edUf`/˞]tLk?=5"Lqy`M\U /΃Nxw|Zj [Φ- -DveXY;JH'i04y*)Hµ'HDFŭS.WY4&EEt޳;F>^;-ƿpܹjB2ӂ~~5LrQx۶0aA5UOx!Du-"őY Zw,TeFt!,rCqAw5*l*9 ڷ+ke8$4cE_Bh-Vm\KAҺ4k˕6ry_x5݃T q:9Vz=R %ͮ|C)sWlIq58a~%H۷]v$I&] !R5C4ieLcek~-Rka^, TD%cXs/;0w$ƾ279hzemIxwnqٰ 2s׮BQ">!UT+ВļTn_S],MDVJpMX"5fmPMhIW g"Zm\ Uj ;As#8Ӹ+xIV%?po,Κ;ሠH_%ϯ C<]Pzӵu+H/(R~0[в("hJb{(^ۥZT}hڵ3l+eeeq(--:h5xm.m^ͯ.c*aU% 'cFiE2*pȠc93hӮۭ(I%g,,CK#wx~#e̛- hs(}Tަ Y u˥Jb?o\{]daBs$,cWbFu tDǼF rt:n0ቴOeE4}#غwxVPSyIHMp:bD /v]i >:_?~m:tU[5B8Ag!J-{m QV i)Qp nƈb-4rW6¯oэ\l2Pb5|Hly#s/p=i֫' K0cV-X׬x {iD=8pZBvd䋬$NZVnVG@UU/P,\AEQAOW#n~.`z*71%]_Cb Kn'x/zXAK«.Wd9(l@ݔj$QRppUT-Gٸ#Pr`?6Z$\m^oCw{M]G MXKD{L_vRhtr0T;SCb5m9e/!@އ~O%U4姯cģҾusT).F03h ; B/}lµg9$\?p97ބD"H$4ғ'i04LErqtkPCDHsլHzţ?7_CEA; :(rŌД{aQgdpzSAyFod0 ,WpDV^f;fVV[.BٸHDuvLb 'MTV5hֱprE`8Dڴ#ҲjwjGzDUMXfH>k' !yvoQT2ش}4t$b*!d)*"sgNy8{o<ӦN޿jqo/PЊm*F.9agwHxgǺƲhޯ/Il"(v a%pg癋ċIs t%_W&L$~j^X$Wf.‚|]i ]@A,xJ{gS9=.> 7ynfÃ̢)Y31q˃ $yBCu bN,>x!6-K n@SP4aHz ^ 98%JPJ$D"u/5ToO^nE]Ϲ_?YxJvyqR-MA@A]RgJm:g^2ύ21:p0EeFxpJ" 6񇟉Ulq&J""͊0Hj(#¬DԮjMK.)Gyy>|-?; o""1L K rlۀ(ȏf:GϋD=%=O?Me\t-tw@NbyxYtx'H$Ikr*i^=ybYa$Mus5.U,㎖!jq}CM8}`UwMsB[t| {db}[|1P'8:Փҧb/5 Mϓ'8:}_:T\g#yz1V$!P(A0N7-J .QĮT[*FA#!m[TQQ ɠqy[G=ZM zf a~M!QM!ݛ{I^IL,4 ϛDD:/GTW2s)MTsII$DRǡ«{鮊iTTTxTZ[iyV_NҸQN>xjE=;骗ב˧ӂ&(BVc\tєPgAxgMǀ54%aD\IUL{l*~O<Ƣj"Z\ 9 jdpWǍ^YZѲAXQUut'w1H7ަ9n<@rd6 ES5pJ8NQT%QN"9)Clj7bTL\5{:2Ai|+&:W/un)fТC"H$I4 qb;{:$`sTU%n˪&N7#-|9@Q0>K-_=orjCΐT_q3W tGqCߥ!%ZPۦoMTUÉChs1iyPZᤄ3hDu T~&* 5 V(,(KO4Is 2ۛ+-۾'T=j 5鵫sG?Q3fY\kJ$Dmhґ"mx H oFq"ۆAAZ d {v¹ey~Aﻬb*W1T)Qt ~_t! Ϗ o D"H$uG>7 EE^,Cu((F7akvk|d3tcs#+ߞ %4(qja~\txЉj90ф-"EK',_> 8_9D`"~xf`_hWޏy%%IL Fh:g2|>|-%D"Ny^⟟ڞsQoW^^N֭Gq/i\ףgmdժUb gkg`,Mp̰=Qa#3 MF`(4{~^[TNzbzXKQþ5a@́ZEQOW`I7A %0#+ t9SmRM;Ʃ9銅XZ$H$6"m=O$$X.o^ 53>~QM7ը[5WmY3kI-Qmy\r_>y+JFal&Ǖk>&z<2j9 OUje(jrd7q(#M$D"H!=y \t'7i7l7!/w)dT_/[d{J@DFgxYީ qiyܼ+]k:Tȡj}gy?pS jǕ+4l3ռMBe۬] ع=4>%,pED LRxpJ =F<;.=+/Â(o8h`y}cqi rv^!+6W`@HHaav %,YxE"H$Rr$=}=,w}2J#>^0-^2ƏŏSÞm͍͟o?#:בCO;;nm Q+ײd7|X>zovO{?V8v+iDdqٰ vv:~ئdGogOA"H$FJcN@{#NVTߏgh>|gfkN9Vqo̜UTأ71^> ڲƽS ucNᪿLo iah}/z벥l ­.oHڜ>C.k lXoM@ЭMm ӵFպݼ67sSJ'7Go|&%v$:~W;{ D"4b9L}/v/2s&P.~)cBr|߹WqJx=ؗf̽o\~~cLL43gVSjYD"/w7w,TQqw^g>.7c͊Xw-˽ߤD"H$)P<kltD{s̑mHޙ1Gfӗn}\hѿjɆ/gf+Տ98!|OUA4j Bn( ̐!C :f̘13f_J@N?_-,#~Zyd~r'~-OɭlFmё.K-S6ڢ.-ʱY<[ 1k^d~*幋bƎ P۞@m]knthS8_7kXء{Ƽ1*{{ F#A a?<0&zϗBche;{?;{ϺlzVVM%;>k_ gAuΞJ!//q4-siS-s8nc:jQd#I4}Swޱ;{$Տ01B~Q ,'/z%}~ RҽK<&|jpUj0`J~4{+!OP8c'^`&Q׸ΝΎw>ʟ24O\E?)~G\_U2w@0= n;/y9ʤ%:JUͼitUUb4L$Hd`-\̅8ضaFvsu, EQPUQ&FFitcwcyIkӎ/`=d$yEQI.F.I[nnX[MX-ԄyD"H$D҄"O"H$D"Hy Dv)UISG!C$D"Hyi<1{;K~9OބiqyAH$ѡPNg-ڞ56r[ ?.Ҷy1gzfxS9G8v kY|9ޚ{\ouM"Tng;jautni5r$Η0PɜȌLYqKs-(X-=UIXt F/)"RI7'ߖiS0vʷvVZ0pP*xi5 ̙ͥ3`OLhǨ?uGk)Kuޟ^k졧ygF7|!]iײse/͹5jg~Q6~qVuz\,d#W3)H'١mOIY?/X9s s#O3y*EE:{PhybȐ!\x[3fƌ}cWr7Is0>͝' |1F-U|y]DnW晠өWOJ̣Onje a^?UyrjzAF-/bO/ܻ-wfphˡ;{2(i̕]^NBMpxAQbŏw$ 'p_/0g78DJ̦`uOj~  6oG/o_8XGXT {Z,c`E[ gq}])6^[XfħkT1P=.|)ˢ*pMd[QQ&6l ]PX_Сy *k͗6W`qߏϾƏkw|رcj';Fla$J/~O7dP rX<5n9.0mfy#4rt~yӘ5H1yL~Nަ.ފG͠#xskr:IUDJ>LR"h ]qٲh"WbΦҚ#/`j!_1jw*8;f/qx?* j 7p&XO=݉/.>fʪ JAb4~y&O^SN;wӚ07dJiqm00 $;u, EQPu%;_m/? 9s,l:vwRϱc2jԨjXQdO^\he ^teRNg#gj}U+XRTJXy7ǎeر9bzy4ov[Jv4u?lW4YX'1~G|*1w$.{6I΃9R>t'謹|R>5=+9䰽)~"[xS͟k?a^aÑ,pѥo{?=ՓB~h'|7`FdǢ*a`Y.=yشӬXc7֯׍Sį˒e;-jg9>z WM\ EEUE/73ʘ ֗7؛]–]Grl"}1?Vb215+vUkN;;{N]δ 2iat§!#A}F3n7! k3^ւEb-K,IY('#|נG3_/cܙwyWpƻwdM!xm=ORIv(9{b8 <*>aɊk;vlkfgw'<|b({0t>̓_9ƱZ;zlAr|2i-l1ˬSVeKkϮ`K% _BلWF B؎ RFQiDl:9s_ߔqwr(,*mD͓xiV=8(=?U,κKWWr#L{wPᏏLUj=0K%ޮ'uƂL*:;_~/F zk-x{rzWUK12=u"6>:{θdt*\'n;ߖ}{g&(*CM$l)^Zo6k6ńhq[zk~BHĈ= GSYQdE!|N?(O㍡ej{ԕߍ6wdߞ={t1rl|Vtu9SrSO9wPZsB_Ю?x+M[Z?qeNR,8WgrYB+6OH$ RIv0K~cQ~Ã#>d/*030w%Nqʩmy~|.K:5_$d?y{ay5oxL{.{9n=;,0o>NBQ"jshıBMLp?2w{D7J}r3k}ϧæƀ#2d/`=dܚ "Fx(:ofS?aT>z6MkX6o"&Lk[Top:#(-2eg mb4>xYF= j>\qÎ/fS3apz]w>z0zb?+Edqn}k׮ݖD"!#28 mK 2dhtN燥w"alvɅeY;MJ6u{ S r;.sWr5H䉈t3Yt0Lq:n-vqN9n`>6]GԄ/`>dgQbE˘9Ae,?dt A*=&0#<߲# LWԥ;Lvw1"m IDATH70qam@w1<Yy],}q7˒00knZBCgSwMʤ\ldrI]P72q mwp2E\68;PLur9D'4&/CX wYW(ފU~zڣ|+=+N{{}}`<Ī_ƞ^],Nƽ;̩̾||PyZ/?\~s֖zpJDD#?K'y]IYVK‡7-`xHƤ˦s9 gza^q?˾=to&.<Ȏ?Nޤa\fmA`}6f%m`m]LɄ/&#a`-~GytHسs͌s! 䉈g͒& 73~dzM`Y32kP#w9&^(=Ȧ9u #f|-Cѧ8pۗ?g ]؂ۡ%ǩ{3??&PQLOxGΞn?}/{~Y6!%v]gᤤtiaDD·S}Ӳ,nlk4M 28eu{ UO/frNɶm"m q&@ @lE'*,,"SKH7`D7Zض퉯˅eYAʺ8gR]D<Lvw1z4Ũ}t˅8wwQZ[IQ,E$qH QKJea۶&54Ӟd+F#i_4G:"=<u,"v5IfqjD9 ]+"mMK20zEdMIŌIqaHߧohE Yj B#G6xG"M^bȨT|­dj9HcG9vǎ:i۾*[xfFx)NVa%EyޞMw0C]>ɣ;(-q< $=~<* $gM'N%%TE=߅'5mC1ԥp;y(#US"K?ye y";1n]!Pz*A]_I;TVvϨjmRT3 9g,;bsN-I\sL?RȺ-g*m]g7jK&(;<02n<3. 2D"q#xZm3RIPǑ]Emwt*:cp!cIq PK]5ER&y)\w0v[x/0r”֬0%dMvӇgO1Kwslaw25̆/_aˮ~]UHƾ}6!vHAJ:MT3f~$CU G"ضMxn\ID-8C8TK8T+BMOm C(ɋ񺑲L2Nb>n0JH8Z Fѯ;K3NT}01vHÇ::4H$ i`=ZIfFno s}ª]pNaᕃ(_$ 59Ws/ce l\{.!8m7)[{ۣ˹ϸϊ+Xby*LS3xFN1S5m.Aw%J`& o_ MeQͺEj&."3Au>T6<0Gl 8Yo]#Դ~99s :BfN^|9F%{7>IDK!\utN{]Ak+{ xoA:9`6yrim5+a7GϬ{X{< imn+Wh3S'L1jScUD}K&3cx|Em12ocoZHZPU^L{q–K8q-O~KK2شs6>[KϮǀUWr5EIq OAS_bfP04v4M'KJK;т"/A6ܵ=LtԵ˲,hΡ!jyGsViiIthr<&MfdOoj!z% /%az:cpk֗2Yj?=K5."z /o!?8z\ODD$HMi&w酺$O}3y]6d >q6Dgfy|)VMxz65,Eϱ9~1IɝH/P8Vި<#f|-8O7p/3@>|Sלs*q-\76wK_`o_ 5'"""ζmuζM>|8)))RRRP3"Y]]^4b:Ũ}KD{"Ѥ8NS%y"똦1*-bt:Ũ}GEy Hc&pX7( l&vON1jN1j_k1Ey-ҳub""=0 pwG0 ۍi6>SSZ}zxlJDW2MSC1jb$A瑈t?~1 ̅$8aEDDDDD[ Bz˄B!~|eavԍ ib&.FgQ\\@JscYi1IeYx:@B!jjjpGo eDpݚ4  85F1j#11KB@@H$raY`(0'[tіXaY& h4Mn7pT/ ŨbSϖMϝP(ͥi˅8wvyR'q%/-bt񨪪bȐ!TPTTjUl""Ω%O{ ifnNi 4]4^DDDD$zt8@GEDDDDGUUUi^PYYvt8ӀK^DDDD;5514;Qraôj*-"oo:;#_.|kRx1>x p0u rؽ3-U: ?#ҋQQɖM)7Y=bE?E;Od]3 ?` _W\gm\'jX8\.,]ja| k<,?1ws,j#A!L0@l>PJ(rb+eWgܠ6I]UHƾ}[n0swSx׹|\u~)K).Ya J޳B^䉈H+qјjvYn , ۶O-Aґ̶mmBA"rY#a}an_mav_2u ;}g&gt""'9QRF9M%C0uƅ$pĎV<%HmK6d|{{y7y_m*_^ɜHi$ps1*'+#xYSKUq>[?ϯOF4Hǿ<}<ͷ|~^q|w@t1rw;gW֪?7~WLcȻ8mna*6L? oDOcٓ+mW4P[|Olp|8X뙄w?σϦD*[{WGk慉/>ϥ蓔+U6n?.f#yIOdu2y2lm>odëv2[2Zg4n \,~s7](_ ǭGM#a*wA *_扜RTf,v9fCUVviJ#&'ᢖҖg·G 3 "B8c] xa+!8}YrjmeL^#z9Qv'""=WNbWaFFjw:[ϗps>ۋۇ`հO[ϛMkGr#|醙@թl$?()dur*~!YrsᲛD_AX MKcҗ憡<9dj kד_r7–]Iu;u3:Pw"G;$u$e3y˩ gӆD/&"룘]u4I&H1!3d8rKk{q^[Ǿy3ݐnu^g״AB7"#ݝ f- udo0w':g !9Пx ܿ| |*VId˳Cme`x=SXx =BͷEXxYמ,vc~ggŊXSD"?}3yrɢE8@~i5aKB$d5&3,%P{u'Qh;9J`+ʢIqU:cUDVf'bVNrkpѥqJvy}\z3q'OѶki;|;8|g|QDDzML'OX奤}@ӋDv5C+7|F:P=s=l?1Ήu+`muexa8eCbHU);W-B.^y`C!n1ɉT7v=c=TwmZ*+a7G~܄g==yosY6\DO HT œ'2f Rx0:j+J)Ȍ#UeļҢ`YC]J]̤86^+ΦtZ>ӧeT\]ےkV~6'wﻭ)a^ʉ_H""\^<3Nj'B-Ӽw9YXgϓO+io+u> f͓9 ]8k{Y }!P*_}nǫ,[<]/MNIlٵ?6"=N_ɷwis{)Bo:FVW mƶm׬ "#;M_:ƶ7Da4糭jHZIh r;.nÏN+[,kIEKȞ??SAZvO^@M,s܌[8TPn=t]RIDAT 1'A Ȯc7p۝\~\C?j,Y;zeL&{NZvq%hAv'5Edg9殽geOkLk[&]iL1u+G9u>;H<|l8x+|9NMfdOoj!z% /%az ?}8]= pO H- x6 5K{,Yn湆ETo-8$M:ʕ+x*M=۾C`K/S٭wq#[|}s<."YIl>Jx} շ:l|VUe -sA o|ĵ/=Ū Qo朲% 96T89Qr'""""zP߱jΣ|<>6LW1jL|/8O7p/3@>KꂧFygh`cp_@9LOMpݼ-}1e޿g|3*Z)"""""ζ=>|8)))RRRP3"Y]]^4bԺquVtB ,r6ٛqٌ""=Hcfmle<ӵG||

>潓ӋD'yh;i0HtpwM 4}4^DDDD$zt8@GEDDDD9M潋<ŏDDDDDDb<$ODDDDD$(!JDDDDDDbHf׬rH'PWQQUN`~,Q !"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""Q+'sIENDB`grig-GRIG-0_9_0/doc/keys.txt000066400000000000000000000002431435534312400156240ustar00rootroot00000000000000Key Bindings: Arrow LEFT/RIGHT: Decrease/increase frequency by tuning step INS: Enable keypad Entry DEL: Clear entry entry 0..9 (also numpad): Enter freq digit grig-GRIG-0_9_0/doc/man/000077500000000000000000000000001435534312400146645ustar00rootroot00000000000000grig-GRIG-0_9_0/doc/man/.cvsignore000066400000000000000000000000341435534312400166610ustar00rootroot00000000000000Makefile Makefile.in grig.1 grig-GRIG-0_9_0/doc/man/Makefile.am000066400000000000000000000002111435534312400167120ustar00rootroot00000000000000MAN_IN_FILES = grig.1.in MAN_FILES =$(MAN_IN_FILES:.1.in=.1) man_MANS = grig.1 EXTRA_DIST = $(MAN_IN_FILES) CLEANFILES = $(man_MANS) grig-GRIG-0_9_0/doc/man/grig.1.in000066400000000000000000000156351435534312400163150ustar00rootroot00000000000000.\" .TH "GRIG" "1" "Version @VERSION@" "Alexandru Csete" "User Commands" .SH "NAME" grig \- graphical user interface for the Ham Radio Control Libraries (hamlib) .SH "SYNOPSIS" .B grig [\fIOPTION\fR]... .SH "DESCRIPTION" .\" Add any additional description here .PP Grig is a simple Ham Radio control (CAT) program based on the Ham Radio Control Libraries. It is intended to be highly generic presenting the user to the same graphical user interface regardless of which radio is being controlled. .PP Grig does not store any radio configuration, instead it takes a number of command line options. .TP \fB\-m\fR, \fB\-\-model\fR=\fIID\fR select radio model number; see \fB\-\-list\fR .TP \fB\-r\fR, \fB\-\-rig\-file\fR=\fIDEVICE\fR set device of the radio, eg. /dev/ttyS0 .TP \fB\-s\fR, \fB\-\-speed\fR=\fIBAUD\fR set transfer rate (serial port only) .TP \fB\-c\fR, \fB\-\-civ\-addr\fR=\fIID\fR set CI\-V address (decimal, ICOM only) .TP \fB\-C\fR, \fB\-\-set\-conf\fR=\fIpar=val[,par2=val2]\fR set additional configuration parameters .TP \fB\-d\fR, \fB\-\-debug\fR=\fILEVEL\fR set hamlib debug level (0..5) .TP \fB\-D\fR, \fB\-\-delay\fR=\fIVALUE\fR set delay between commands in msec (see below) .TP \fB\-n\fR, \fB\-\-nothread\fR use timeout calls instead of thread (see below) .TP \fB\-l\fR, \fB\-\-list\fR list supported radios and exit .TP \fB\-p\fR, \fB\-\-enable-ptt\fR enable ptt control .TP \fB\-P\fR, \fB\-\-enable-pwr\fR enable power status control .TP \fB\-h\fR, \fB\-\-help\fR show a brief help message and exit .TP \fB\-v\fR, \fB\-\-version\fR show version information and exit .PP \fBExample:\fR Start grig using YAESU FT\-990 connected to the first serial port, using 4800 baud and debug level set to warning: .PP grig \-m 1016 \-r /dev/ttyS0 \-s 4800 \-d 3 .PP or if you prefer the long options: .PP grig \-\-model=1016 \-\-rig\-file=/dev/ttyS0 \-\-speed=4800 \-\-debug=3 .PP It is usually enough to specify the model ID and the DEVICE. .PP If you start grig without any options it will use the Dummy backend and set the debug level to 0 (RIG_DEBUG_NONE). If you do not specify the transfer rate for the serial port, the default serial speed will be used by the backend and even if you specify a value, it can be overridden by the backend. If you omit the radio device (port) grig will use \fI/dev/ttyS0\fR or \fIlocalhost\fR if the selected radio is RPC\-rig. .SH "DEBUG LEVELS" .br 0 No debug, keep quiet. .br 1 Serious bug. .br 2 Error case (e.g. protocol, memory allocation). .br 3 Warnings. .br 4 Verbose information. .br 5 Trace. .PP Grig has its own debug message handler, which will manage messages from hamlib too. The messages are printed to STDERR by default but they can be redirected to a file. In bash shell you would write something like: .PP grig [options] 2> grig.log .PP You can then use the Message Window in the View menu to view these messages. The debug messages printed by grig is formatted in a structured way with each line containing both time, source and level of the message. Each field is separated with ;; so you can also import the log file into a spread sheet for further analysis. .SH "FEATURES" .PP Grig @VERSION@ supports the most commonly used CAT command implemented by hamlib. These include frequency, mode, filter and various level settings. Please note that not all features have been thoroughly tested since I don't have access to any modern high\-end radios. Therefore, comments regarding success or failure in using grig will be highly appreciated. .SH "KNOWN BUGS AND LIMITATIONS" .TP Buffer Overflow in Radio By default, grig tries to execute rig commands as fast as possible in order to achieve an almost real\-time remote control experience. This strategy has turned out to cause problems with some radios, probably because these radios acknowledge the reception of a command before executing them, whereby the next command will be sent before the previous one has terminated. To avoid any possible buffer overflow in these situations, one can try to experiment with the \-D or \-\-delay command line argument, which will put the specified delay in between each executed command. The default value is 10 milliseconds and the smallest possible value is 1 millisecond (if one specifies 0 millisecond on the command line, the default value will be used). If you find a value which is better for your radio than the default value, please let us know about it. .TP Daemon Never Starts on FreeBSD There have been reports on that the new, thread\-based daemon process is never started on FreeBSD, while the old, timeout\-based daemon worked fine. It is therefore possible to choose the two ways to run the daemon process. The default is the new thread based daemon, but if you use FreeBSD and nothing seems to work after start\-up you can select the timeout\-based daemon with the \-n or \-\-nothread command line option. .TP Connection Settings Once you have started grig you can not change the radio settings (model, device, speed). You will have to restart the program if you want to change any of these settings. .TP Multiple Radios Grig can control only one radio at the time. There are, however, no problems in starting several instances of grig as long as they do not try to control the same radio. An exception to this is the RPC\-rig backend in which case the rpc rig daemon will act as a server while grig or any other hamlib frontends will act as a clients. .TP Power OFF State On some radios, grig does not cope very well with the power off state. It is yet not known whether this is a bug in the hamlib backend or in grig and we will definitely appreciate your input. The situation gets even more complicated due to the fact that different radios behave in a different ways when they are powered OFF; some of them will continue to respond to remote commands, while others will not. Even the same radio, like the FT\-817, can behave differently depending on whether it is powered from internal batteries or external power supply. Grig tries to handle this mess by suspending all rig commands while in power OFF state. Only the power ON command will be sent to the rig. By default, the power status control is disabled and must explicitly be enabled using the \-P or \-\-enable\-pwr command line switch. .TP PTT Control Similar to the power state, the PTT has caused strange behaviour on some radios. Consequently, it has been disabled by default but can be enabled using the \-p or \-\-enable\-ptt command line arguments. .SH "AUTHOR" Written by Alexandru Csete, OZ9AEC. .SH "REPORTING BUGS" Report bugs to \fB\fR. .br Bugs related to hamlib should be reported directly to the hamlib developers at \fB\fR. .SH "COPYRIGHT" Copyright \(co 2001\-2006 Alexandru Csete. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR rigctl (1) grig-GRIG-0_9_0/doc/um/000077500000000000000000000000001435534312400145325ustar00rootroot00000000000000grig-GRIG-0_9_0/doc/um/xml/000077500000000000000000000000001435534312400153325ustar00rootroot00000000000000grig-GRIG-0_9_0/doc/um/xml/getting-started.xml000066400000000000000000000002321435534312400211560ustar00rootroot00000000000000 Setting Up a New Radio This section describes how to set up a new radio when you start &app;. grig-GRIG-0_9_0/doc/um/xml/grig.xml000066400000000000000000000053501435534312400170070ustar00rootroot00000000000000 grig"> ]> &appname; User Manual 2001-2007 Alexandru Csete &legal; TBD &manrevision; &date; Alexandru Csete Feedback TBD. Introduction &intro; Getting Started &start; The Memory Manager This chapter describes experimental functionality that is not available in the stable release of &app;. &memman; Software Scanner This chapter describes experimental functionality that is not available in the stable release of &app;. &scan; grig-GRIG-0_9_0/doc/um/xml/introduction.xml000066400000000000000000000012421435534312400205740ustar00rootroot00000000000000 About &appname; &appname; is a CAT control application that allows you to remotely control you ham radio transceivers. It uses the Ham Radio Control Libraries for low level drivers, which means that .... &appname; has been designed with simplicity and efficiency in mind. My primary objective with &app; was to create a rig control application, which allows near-realtime experience when controlling my radios remotely. About this Manual Conventions used in this document. This manual is available in the following formats. grig-GRIG-0_9_0/doc/um/xml/legal.xml000066400000000000000000000071301435534312400171410ustar00rootroot00000000000000 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or in the file COPYING-DOCS distributed with this manual. This manual is part of a collection of GNOME manuals distributed under the GFDL. If you want to distribute this manual separately from the collection, you can do so by adding a copy of the license to the manual, as described in section 6 of the license. Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and the members of the GNOME Documentation Project are made aware of those trademarks, then the names are in capital letters or initial capital letters. DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT: DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. grig-GRIG-0_9_0/doc/um/xml/memory-manager.xml000066400000000000000000000002371435534312400207760ustar00rootroot00000000000000 Overview The memory manager allows you to store and retrieve your favourite frequencies. grig-GRIG-0_9_0/doc/um/xml/scan.xml000066400000000000000000000014031435534312400167760ustar00rootroot00000000000000 &appname; has built in functionality for performing advanced software scans. Software scan in this context means that the tuning is done by &app; and not by the radio. In other words, rather that using the scan functionality of a particular radio, &app; will perform the frequency stepping and use the set-frequency function to tune the radio to a particular frequency. You can select to read sigstr or swr back or signal from a 3. party instrument. supported devices... Continuous Scanning Continuous scanning: start, end, step, ... Memory Scanning Memory scanning: slelect memory channels to scan through. grig-GRIG-0_9_0/grig-move-somewhere.dia000066400000000000000000000025451435534312400177210ustar00rootroot00000000000000\Ko6W5K-ywE^g]4(:/Ngl=`3OCsf>}bKBgSJ7k,4^?S{aY~&Ajo}^,  {ſF N;X9 xH0A+}ß1g{Ui2¸ JʿEfQ{cvmȯruɎXa'ΦJq[*|h'H 1mȵ!BX ,Cl C!p1.8Ģ a H 'HR4( !{/s',(b5}.MŘ?+^8LUx?xCPc*&s}YȽ{mV-z܅)j7 x׷l|F _jF"$JnTt% _cuvu ʺ\΃szͲQeHc^z_|>̡Ȉd2NM s4=[vo`wٓ:}c0A~0`d٨^)AJGP:&\MsRMe s]!v[~ ^ o4!ܰ`O!xup!CrJp_a :T[QBz\B,^EP4!L!xq3saCA?ȑr.+C `{XE rFN$SJR) nU G( ΄JBoqSgʰ3 PBͫv9ta~i.iw3gqWǻʿ]x>(kIgrig-GRIG-0_9_0/grig.spec.in000066400000000000000000000023321435534312400155550ustar00rootroot00000000000000# grig.spec # # Copyright (c) 2001-2004 Alexandru Csete # %define name grig %define version @VERSION@ %define release 1 # required items Name: %{name} Version: %{version} Release: %{release} Copyright: GPL Group: Application/Communication Prefix: /usr BuildRoot: /var/tmp/%{name}-%{version} Summary: Graphical user interface for the Ham Radio Control Libraries Vendor: Alexandru Csete URL: http://groundstation.sourceforge.net/ Packager: Alexandru Csete Source: %{name}-%{version}.tar.gz %description Grig is a graphical user interface for the ham radio control libraries (hamlib). It can be used to control any amateur radio equipment which is supported by hamlib. %prep %setup -q %build export RPM_OPT_FLAGS="-O2 -march=i386" export CFLAGS="-O2" %configure make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc ChangeLog /usr/bin/grig /usr/share/grig/pixmaps/*.png /usr/share/man/man1/grig.1.gz %changelog * Tue Aug 16 2005 Alexandru Csete - Fix erroneous pixmap directories. * Thu Oct 21 2004 Alexandru Csete - Initial spec file. grig-GRIG-0_9_0/pixmaps/000077500000000000000000000000001435534312400150255ustar00rootroot00000000000000grig-GRIG-0_9_0/pixmaps/.cvsignore000066400000000000000000000000251435534312400170220ustar00rootroot00000000000000Makefile Makefile.in grig-GRIG-0_9_0/pixmaps/Makefile.am000066400000000000000000000003761435534312400170670ustar00rootroot00000000000000grig_pixmapsdir = $(datadir)/pixmaps/grig ## grig_pixmapsdir = $(pkgdatadir)/pixmaps grig_pixmaps_DATA = \ digits_normal.png \ digits_small.png \ grig-logo.png \ ic910.png \ smeter.png EXTRA_DIST = $(grig_pixmaps_DATA) grig-GRIG-0_9_0/pixmaps/digits_normal.png000066400000000000000000000152561435534312400203770ustar00rootroot00000000000000PNG  IHDR6%ȉ(bKGD pHYs  tIME +ZXTtEXtCommentCreated with The GIMPd%nIDATxIp\W{rĐ *J*5vE;v#}{셷aJU]JI XD$`ܗ{?oGrC_{ 8!HwhC_ΈYW(oR N|7\x+{W("hk)I=I yWW(בB X e5"q_?U6֋Ѿye/,mNb0o/`qv B|O?< 4z[aM&OMs3{r;Xz;(-.([:,N$)h`yߢx3Wn2qr#˱rs3wXXV@&ߓaѢ\{B[ _"7޿/[ݿvK{ǧx[_};ϝ7)/Q_-Blp- ‚lԫ\7q"ͻ^FeeMx؃^@EkT6$K)U*+{'8՗:α=ΩݿoטFP(HC+XcqNNYWW 2i =q/uq˼70&  CK؄C S& ﲲB(۞c-~_ѬTO[av!Μ<^Ε,- cN|g޿Lm~kiN\|a ˛TVBRphH8Bb0?ȅ/:ׯ\O+2BMP0ֶWACk<_]6/wz7d-VP}j_D7gڶH1 8O(NȇDž>" x_cṡz 9dHI"" BcB.~Ten]>nq Qݖ#2@SȨmcCH\ hZD}YƎ멭 w~BKЉ9B?E>"0aM0>*=W^{D"6}dRZ@,>-R`C)Jɕ7amnLRTx{#~$IوǟǗ*b.,82ɓv9+?2(a#;]s0`F9ه`-<&I2J^/Q:3x3;q7i*d,PA}Dx>-ax(}cC]qΑB!( vG6SL?{n1#ڹB 8RĭhGcgO2qoTϦq#w=iݻ{=q7T ʱ.,s ^#g֟V6*dD# C=p|ƲR! A"iCȶuk֘'&޿8ʥMQ^KAPaϕsuLCP??7?"̥6'Jww?8:!9kh,Vѱ8yեU""P >%M_^\5٨KbNbŏRz$ŷJIsH? ?<}]$ih:@'JTbpBb#Z?,FXRA O/Y۵N;^h@'F*t+sV&wVBJ0㋊ulxX34t.= 34+U.!c=*(Il=(-S-e5A&$eh6*DN,X.z\_F7b<+BdR?VDzH0 R<*vǧj/*sdj\V B *%6JJxa8SV'-.T v k68 |7M5 ,F8rT9Jm@tsT\\,\mX*Z'*$#pIfGw̱h C;JVR *Eu t6x@BulA)\:Ef/z  _Ge}Y t 륭eXk U*e*Mt7Ѭ.+-?fJđ# ǥ!cQk5;VE!GHs*T'H}쳻_T϶mVk$ZJvN Cxp:{ϱVwc+[C*`i8i(ؙbCJ\P$-MEdryu`+=)Ǿ95lb:K6E^Ot6֬.. - VBq`ݚsuĶxN/Ke*I:"m9K4*U|$RB*"r'$JH($?q`@ AhwfBv+7ch9N!R>c;/W,O?)~-e"nt|yĭu|!RAϓjO- xH6b+mJP&Tss";}T4Mp$p,Rձ8aQMy38R0::FvkjsD vŁxh `S=AG' NHupltA@Q@u**V!s|V6Nv`zd?8o[ǶF,(ٓ'8}tWˆC4jMIg(/ag,T䃐jIC; Zk'B$Qؤ\11[/$?P`b(&IVlK(]" 0ttTsij,rjDGUj&!prr=R 5aF AHLa,n͛r'T*tQTV٬V﨣[xO Q=/Ӝ= r|g%:wzwg{w}&F @y81ε냀!N=@aťEnS9 wquj*^p`S # ̳ۗg)G}ԉI&_|~^ =2A;w#n4P95 "*3g0}4Z_i&;7ށzsϐ|=sb *Y5}} LElE KCkb,'Ϝ`PoŕVBef:tq'd8~6E F8nъ$N:Kz#&>ycSSxbM+iZZumfqΜ=DZc2UC }dhV \Y!6#qN_}BxKܻ}‰ Su˱b0+pb]91:&>8I,NG{ܘ[`maV%,— dmq5ޘK]s$+3sXTLg \^ae>ŵu|ّfL)./4j(F$'A&GXwzWiY_|j7Ś#NqՋ=n-.W^b BGVO[ہww瑳D>z~+Fsk-}pog"֤$vq ߣ^K8R:t/ ٘_ FvV2LH;u|ߑB-,CǏQ:֮tm5B` ,ߚ᷿%mtrSn4Z -rcx3R%l]0IGvE%2RJ΂eU+x yAs"Y哊R~VQF )ad02|Z"ߗ>'b,z 8Hhu0ZR+m%Hc0QX2Q|suB"E&?0:h%8A7vc:%꾰R,Y֡a`n9sh#vZeAYՖ=YKE]Z3sg]B,ʂ (+Nup(!,<%zʱ[4 8C&!;6rt$[=q=<[AAQoR (~(UB Vo g0Yz/EfwyuZėmtL)ʕvy86j9,i_@ PL3>ԙ piEpVm8v=9k&N1gwʱze گ$|scmg\m}m!$ZfwtY_[oww&r,/ J[8X*Zk'r=XYX"LrxN&fqy8!m IZ"lc(5)1<[U~jz b۬U4`p㌷QƓh<)كn9֊hM bG:bރ&=Y['!OT\[[C ց6uh*Kd1/ 3]9Z1Jʥ<1ut[d;-kdr6EFrj[Z0lf{ódotDv<k{yDC9ul#![(HKv2o+w%'ʦ9u$9THQR'HH?qحgCHZ^M٫osf/qƀW$hϽr X'ڃ02RydSi ;\{Xkc pk H%1C//$+-Nu~7qqk= VӚ$:!1_$,\{oV>?Zs5%էCgqZ{/{g3gIM鹈n9tKW'$'H8@X%|& dNuW7ܿy By>mC-@{|y~:;KELz졭>/}i<"h ܃7GкEysmOJ<J*I֬ n<1ReI.tcG8IF%T(%QRH%Q#n⒘g;jc5pR@I R(R Ml8s 1^}QVK%NMs{SmqshBtBX,?cdV;zg3phk.Ib&&'9˱?Տ:7[.`fd;_@bvq?BA^(RGyv;nמ'PRp06«:en_/,8 V#ვuIµ7be~'sg!H?6r8m5— s *5uL=BJP+F|xC^C;$rqU?IENDB`grig-GRIG-0_9_0/pixmaps/digits_small.png000066400000000000000000000121221435534312400202040ustar00rootroot00000000000000PNG  IHDRIrbKGD pHYs  tIME #ǑtEXtCommentCreated with The GIMPd%nIDATxG\ٕ>*ˠ (xo3R-}-FPgZH DCҌL74)`ʤw/߽W2 @5ٌX +}s{2K_߯/?}Ykb,7v!y. ?,3𰃮$Y'=:5o{.Ԏ% rOoƘ-]iF<ξ{ W\2## ,BnӬ5n OoAXhH}*N]VJeoН+ ֈ:{p%]ȣZQB٢Z*SGnrM7qRKxܸ$-hv?"?Vp=`:1Xy2,XZ3' xwƵw.}cLɎ8cWr{"“w׿EjW"m8v<+q\̝:Iy |vs <_} \#e,.q-$& /CX[:*X:Ew=6ǩ<}΍O̻9r V-tw*/nrOuNsmO>rP|hyrzcʷ#&V@DtfAF>qO+Fg{h'uN^5_JjC.vkQ2I(8|`u{džtB\WwbX`fa7,ZFGb lHq\çNVcm<,fg5V^.58XbE(|OdC^>`XS^->A:B }Mm,Dޕr._LimF1F,"\Gi?07q=8H^ @!8r˫T^Q^^ҿ` ϟO>íuxz']J]1T"P~'~D63=cczndkAFhK~tdu 0'gyDx)rȏ7P]]",\:^ns"B\E1b6Q':vk?yF.mK g7 <ΝBil⸃5Ay/I>:pwqcFw/(Xa /VIbddXЀ">'Zh̚-SAkl:/*xpNAjkixFU;1,`-vkhx19b=R4uX. mk8j:{)Keuvu#= Q,-%5*J`RfݎR(@12Vk8伷٩iVk2r`rWV 2wl Jc|/İMvZo0wy- V*⊦bg&w !`auq 1? +ee`Х c ŧ/\vCZ%4IEl|zjض(XƳ>^l: r e:16==\ojv/lPòso~mo2^Q`vPN߽)=V]K^G1|SE)HiEAR[-? S OXKNĐ^Y^C,0 cJryl}Xc(Xu=\T6@X!󘜙= ~}Eh5F|7-WxpÀT*N0"ThQ_.G)~RѢY,!;VϦbBTk*Vr7I ۷Bv$O{ih8qz iW(fAK{ғGVKx^T-Ep3iLpU?z@f@oXB,F'9<7GpOJx&)/Gp!c\~]@nvrbH.191n㥒Ay.3s+O1 90 X=:u<.swHւ]1&oFb{?)!]k ý#WML:FN$%bt j(nTk8"T-ZY<~HO|lp%X: I$ T!Ǖd B1$97>=nAWu i'i9.;Hz}iG<OnܢU,UAw2a mv-/o[k{֠TRk(5CF\rd@}P" k Q+ڳ,'r/ `OߐʤN3^S\dۼ\|6n7n#woHe3POlbtHҸY8ʉ)M}ZDp'6"H2Y|w4܉,^ XzG"JpChr#9R92Q_vx딯2}D~sE>\dmO9td+ԖWoE*9 ?fs~o޿Nte(yv@26=I8_?U S|xa]e0 gNnI;DNo?Efz/f8v"5Uhh!0/)?{Wo~©q1lt<2屮ӉCcr ?SZ_=(wU231 Q^-2^OymlR1Db*A9019kX]zAT +Q] 58b QDE+kxQC"֊1;0['3&ƒ$Q& $nĠHmN B?9q;+ &?Юֱ!KX_!D gzE7m^vۨԠ@MY4ke4`$֚}Uhw`,=w'5*%1h&ǓW!WQU Íodv N}I"TTj:9`{& xS} F Z)kyatXYYAqg6LZm ~:A]0QJ\#"m,vܿde0;rnS-Wp%P-wb:2:ן44;)PnccZ1M`}ӱZKMS#G4nXzel,D+8SS'hxC1S]50[JGn2p}k}əME%@}'$ط/nH2T ѥ :}/\Iz<4 < ƞS,{Hnc.qV;nUY8zdJ~ფvNl`Cs1ϩw3sݟ٥la™C&.P^. #{LϒI:m4<X].z*3gO3>73&*YbQ ӓ[dq{Ϸ J өc?0T,B}>Y{֣侇IENDB`grig-GRIG-0_9_0/pixmaps/grig-logo.png000066400000000000000000000123221435534312400174210ustar00rootroot00000000000000PNG  IHDRl-Kb pHYs  ~tIME8-0UtEXtCommentCreated with The GIMPd%nHIDATxKeU߷_uUuS8ئL IAʨ=AA[H 1`̀!/ A ҉DG"L7"cn}{.{SV-IG{oE@~L~_lMb!J!"ޝ"Rd?H1H]XkxJ׻#"r6H/J X믿l6{(tY<.MS_NYf3Nt:k_\!4$wێgEկ ֙' <^ Q04NcZELQB` PA9OeMYF6ib³>,@=Kk|eRRbR( 8"1 DDy >|yO5L!=qo.[/snigv MW4)xꩧ)bkzQIb$K H&} Ʉ i*hq6v$H҄" $p)a'9wiMbV$BK$j!Eĉ""*2 FL SƸ5͜sޟ&9!}'Bt$|CV":DkȃuXH= X1ޱݻ;T3 { 5 1uMs$y-BD1'yV\`{g}̴gLfX,sqch5OɬBE[s(✢Qxl8q8+J>L xqk[fn }6 N,9Ǹ L-:Q$"B0I#Y"DBxC+)-c'oYKUZ1b[ ;3au]7K噹=kGA* y@!x-K _JۘMc>\ir#zN8:x60߾靉L;%.@O+&mX4pv&Fk_S{O][`j$Νi1T5ęE !H"e(߀exL `M2<3 ;u{{lee,JiObDy&@amć\6zTCb+qbqƘvShXZ&iYWyDE@(R1pycB xBp@ZCC,-15415evVBL9$!OU*$"IA$HN7Z&\ۈbPl%bt$-_icyB*bx[-V*[vnZ_@lj)iK,.jx<&o}_{@wt0AϯB}[W,s],j1L~)Iil,֝Ih~g92t="PWQ";(P*ab D SX[K.Z3;e}B4Q;n"pG Ʉ:)uU?0TPU*C.qqD3(Rb$Z!#0. w8*Sc늲*ePL1$Z~}k!Gƒ)(jk,so[[[ey_gqP'iqytٙEpW?(`Qk(CBMH򔺞{],g̅z|پ뀔qiHz{[̦Y kA*g z=LYal$iTrHߟVAdx`6SWY(J 6g.L7V%/N <N'ܺ}c ˣ/_e0aE?]v74ϝg0d9A\};Z}zGя =غg?7|/Y;kָKIFqis,lfyC.A'/,]uoJ[W+ T9k6.[?4a8{~YYY'[tyUU osUIN&(z=D-[\QG_%eY|^zi.XK)=Lu /k1f-[˒$<‹v>"`[>߾RPB+ͅ 8x۰N*<'SL])'c-å!Pے|u{epL>rw:!>"p;{Vü3`i /67PUՉ@qu]s ~RxwwƘy(۲$8VuL9`ZK3C67f) ^+ VWy}F!J)?vɴql |sDMwA@),+:64ZY?aŤ}%@ (˒W'2}/viTJݻw_Leu{!)%|EǮ]O{ C`'.7X]Yg?I&(- )&)|h4bmm((W67QIM@ I&3/*q.1M0uλz=$ePtVI dqĤ~I[#:] Ὡ 'c孷d3\al}o`@ʠrJj)7`c ck`iur2n_lHҔXZ^N'EFTK,-/c rN! o}[n+ࣂ2G-jq_n4eYw߫UЧLiz$|g~vQjV#}^?$Ѡ>Y/;h MxhPUOK2CϽ{8$rFlnn.l% :(Pic xqQ /|O}=튋G3&Gki_O6?6'OFq)˲;\><ٲނST7iW7:pxeM-ZjB\n,cۥ~l2ʠ֟._ 7pnQ'˱a!UhX3_ )UIENDB`grig-GRIG-0_9_0/pixmaps/ic910.png000066400000000000000000000056051435534312400163660ustar00rootroot00000000000000PNG  IHDR00WbKGD pHYs  ~tIME2: q IDATxKdUk}Ω:U辷Nbm 1b`ĀL 3%@ "$BB8i#k?:62H#gkֆ+\ W|?!&cL$D\L?YPH f5L/A EQ!"{}p‚ Xk }.f'ϋ钀"Pʊ"K #EKA: (,Jʷ_O>0jU@r~ {]@bdQnB FZ fn+"tMMUW, E1jIݶXceڵGc#MjUU;KnP#⠠^.x$bsG,8;yFlu<_yfTgXd΢Եa .mͭm"HQ(+s9| s>:X,Ծ#xA Y5MS}`Ae*6ʙjf!!ˆt)#YLZwHѓTi1&&gghlloEFkT]G)+3YfP- `;#;gi c ӳc.ڦM9aEX+KbLdt#goĉ?d9mQ75 )]xFÒk麎T1]K,]Ȍ1ECtx} J3k{r G+FWHVk%UTyN\<+3֣ 4jI9V5mנZB"bw8#͵uy򂦮qg2ǰSKDÒ_|ms2ânaa1ƒ_,:˯}rs9!x~~m=TmwM:ߒ4}/l뿌B05J;$M<9]p}o.F X'LsZѐpֲwx@]-Gc2yWUvy' kkdw31<p)%7 c bLlN;²_}` i}zVɼS Phĥ2-B|cD#}T"OZ&yMdmj\"]hmĢjix#v|N dƒBdv>EΘ8PJfk*)|Tgcئ5V8<rD^Lg^ƫ*YDڈX%yGM1[[EAyxy0??g8q1ny$1N8?`6g r(#p!!#N'S:RO9~j9gv1#<,K<[DF(PU 3̦S"MOiۖhD5y&#`csw5ŜH:)E,K1Ĕ.'o eզ۷!U0hH6p߱>^G5i.k\zZRe`8(qUFCNOk嬭9<JE}~\zZWp+\ h@CpIENDB`grig-GRIG-0_9_0/pixmaps/smeter.png000066400000000000000000000204371435534312400170400ustar00rootroot00000000000000PNG  IHDRPPLTE3%5*9( >' B0>2=5A3;4(B6 K0K2J6H:L<N:G>H@X8^4R=GA'K?(O=(I=9W; RAHA1U<*GB8OC & YF.]F&[I YI(UJ3UL)cISJGRL@!WO>&!&)'2]S;1aX+kS0qR&`SOaX2hQE\VL4-:fV6aWGh[)5#kXBgZC699.9Iq`?v_?ub7sd2?@ldKre9mcRidXofA@Jjd_tcMhiNI5J>KOiJvmbtojPBoL{rNQKpWysXyr`QYo`XHr^T^We\cUN`Nzna[~W{d{k|ycN}Qd~[m`ZiUekfbkUi[^doSoeqfjm|udjwkvpxeyeuvxtx~uu|yuniȀowvρˆ{̍ΊΔә͝љŪئةة֯ڬǫÿɶīܹŷḭʺݼƷ޾ҸͿ͹ɹҺ DbKGDH pHYs  tIME+ pIDATxuZ TytK4 T%B@(b !4TQ$&$$xiL KMX%PQD(ȊK<%Q,8W`ug93ktݙswyb.}OjO.;cc)V?4F_qϚIbT7)M&2]"X"Zl1,? ??m/o+kWL'GQoh]!].pg(u6՞Kz=Ƒåc\^%D1dY*N]s>ὕJfic @ظm6U$Tҿ`~djeH'4oS &p%3d>>eRrD.w@tiI$||G6 źXk$<|M2zAX]%0zcKV=32uSX\H墘<:FN+06bS,,.$' 1|Y'WxLzQn~(]ۧaŅ+őъd57u m[a;7 wbCcw/^MPgfXM5еbhdtx_>¯`oD5ŵ91j~G6ހ7ڲN$<6B*de%%zhM&p*A/(B["i70;&x:ɒEV*e5޸ηVXqBIoٚ}y{O| +RB(qHm|!b9fC5Ѕ~NM8 $i1hy2KD sũ{o[(JqZS 6EYTA #>zyb[W?ಖ_¿dc;,h菤Vb͑PDĶl83ѡ ÷O )# Kv^2<:NaE(M yGX9ABx ILkL.)EfS"{`7ᖩW95&PV[n󧉻Қh\k6 q͊ G[ٓs136U [rH2Pď[á9]DI(uPU5Bg,;al+ᦁܻ/-XX1-8AJ(|f^)+>JB<+GG$=JFoOm%G걝r [xgǦV;>|KT-I!lLjM#G`an t.X^jXt!E9Y$|}|MSq O^0ܾqλ`}zzeDZ6Wqfdʻw \ Pm —6,ypAklp^~`.퇐:&H3&)mxiڽvJzPؽZm{o?vӁ{:Œ84"_ MS~+RPh1RVV.1=Cn,qeV٥$JI zwꋇGmKbRO ΃q_7AȒ,V"+( ٶV)F|)}aƊ!)@ "TمU!H? 7QŌ3))][o o?/*V|s?w=]HG"0ZCұzr5&([{uN7?V|t)3䏖7g /sEO=ed_TG 2SsB6¹qrD>* 5T*иtC})_7V+ :Q!!"𤳶g#px]?g yO.[?YuYϿ`I>DkU%V] E%yjᖂ!КV]t(溶-%mK#s7qA?+:(e8?8~|%--|=iiPZJ+ʛ&`iE*Lt՞sim Buqp?}XՀzgt r U65 $.$BY)*&'iP_7lXS P% %^`H5of0E.N$;AP1``'Kf*!^BU{N(vb?#E .z*mZ$f'Cߨ4_4L$QC$ JV-SAZDziiɹug뷴(7OLWLQg0|5M3AT=UT6Q;]Q,;VBD]w|*VVi"(OޜP4 o)Fo΀? X#v] n"irt9"v4;[:W|9%MlZ\>ؔcc[c ~D U+^sVk5‹mY*P4,ʏ:]P Xy#l[w_ ͓G''kT:49.V-[d\ҿur_组$NATjbZ(AiTaZA5AkE. tI#qב#1ڥX-ojŞ 4kYʶ?>vElqox±Gx JWܾ@h\W HcFT.euM:0OW,Jqչ/ K"*Ͻ;lƅmԛqARg}5M$:'^DIwCa+z Cc\tN2. & Qԏh6 ܣQ-MoSch¾oa7SuqV|l;=I"jΘ _فlVl{P7 zvɔϽ,*n5%DU9{+pvjxϢS7Ԏ'?$ cԴA2jJE`3y*QE5z-@F|;-0G%P-7E''fXA 3 ]Ɛ;{ ̍bP]rd¬*@lF >hKJAogLw ~,n&%8R_,}2}B ި.n#^ﳮ '\=ȶ/T_"-[w^),@q#pRW 7bQ)3DUrpUJ_!ʥ 7M*"U9I!Pl34 q $k]y0fRc> 54Už;f4;hayqnD1N/My9*pDoГBѸZ@MJB,V4.H SJ0X`I;h !L; 6^"Ș]9 ?gi(MbH i⊔.@9::trqCgQkE+GY?(jLDŽ#.wQ ZvNr> VpĚPi Pdz"J=,*X:R7C-mn!^?l5ԣKI<ӳ_q|"G#xhvmJzm{ciC9A8gǚJs4 x|-~KxlDT}DHdYe~rdW:5i>HFI!؊Q4""V&P]Q ' P (¦Vdu$ٸ{M%c$wֹis#MA, #p0}$G:Zp5Itc؀0QxiSaL# ˑt\%B!w /^#Q ;eiE#F7?]KoM(o۲i#yq2i_̺Z:31S7K>B䑄3o,U#ڳ)X/:m.y~KƝ}l|E_be FQ5bKΙr{VPf=v-o6$#0 U|afXʤ]ۧī%zzEom-vǝwR<|'Jݧ.c؇y #Dl*զ>7Y!M %O{%$5+/9z- q`R=2u5/dJ'EΰhոokRH 49״Nrh$NוaؑRfvۨ˛#G~Ko.!7/ e#Si9\H҆.)H\qg2iK.i'܌eJf{'N~5jyW]~"cܽ]Zvs7OSS-/_U$pHǮT9H?%&If{P>Om˦>.`>/^ӻYw]q*zn7GĩG?1G0$K6ʃ ۏAD4ZmXsҦWLyȱ#*O~đˤ㛥_>OcYtպ#QL/Lay|vc.dAljy! W=4\1md[~L;?W+[[w_E<͔OI1vňӚ\.u$G[>w9K&lI8 O3,[..4%x3atpsb_60 u>R(+kjq6.'S A 7ҼcKNɂQhp\ȤĊPr%n{J[ۉtFf3Fc]q%kP2a40jj EW[qKD3%6^IM9Xfkk?6d=U_ L?Wj+:>Xf#1Fz,"l(dnUJd!fБu7m˘Z3nQ$_TjYp>f,/=NX+_Nzloy+W]u13qA*U@,^lvxZU#S̮NO~7wk˅e 32@M?T^˚$l_~vٲ3mĞՖ`l[Ԗ&-+9s=ⴆ7=H=0vHkWZg~YLvײVͻԛ֙jBQ#RψxjdA&s=VpߨJNmv&i> q.%Y+2i{.dzɁҀw=U"(7\:YB5`Q>j\mGHx|lZΥ<ֺ ΃y&wA"AU E:DdT55p"$Q+$ 5yMm#ɔ,m9~&ɳ*< -$4z{j5l<#kdzX5͢7fk\GAI~8'hjIENDB`grig-GRIG-0_9_0/po/000077500000000000000000000000001435534312400137625ustar00rootroot00000000000000grig-GRIG-0_9_0/po/.cvsignore000066400000000000000000000003601435534312400157610ustar00rootroot00000000000000*.mo boldquot.sed cat-id-tbl.c en@boldquot.header en@quot.header insert-header.sin Makefile Makefile.in Makefile.in.in Makevars.template messages.mo POTFILES quot.sed remove-potcdate.sed remove-potcdate.sin Rules-quot stamp-cat-id stamp-po grig-GRIG-0_9_0/po/ChangeLog000066400000000000000000000001411435534312400155300ustar00rootroot000000000000002006-07-07; Alexandru Csete * grig.pot: Updated for grig 0.7.0 grig-GRIG-0_9_0/po/LINGUAS000066400000000000000000000000111435534312400147770ustar00rootroot00000000000000de fr tr grig-GRIG-0_9_0/po/Makevars000066400000000000000000000035131435534312400154600ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Alexandru Csete # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = groundstation-developer@lists.sourcforge.net # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = grig-GRIG-0_9_0/po/POTFILES.in000066400000000000000000000011701435534312400155360ustar00rootroot00000000000000# List of source files containing translatable strings. src/compat.c src/grig-about.c src/grig-config.c src/grig-debug.c src/grig-gtk-workarounds.c src/grig-menubar.c src/key-press-handler.c src/main.c src/rig-anomaly.c src/rig-daemon.c src/rig-daemon-check.c src/rig-data.c src/rig-gui-buttons.c src/rig-gui.c src/rig-gui-ctrl2.c src/rig-gui-func.c src/rig-gui-info.c src/rig-gui-info-data.h src/rig-gui-keypad.c src/rig-gui-lcd.c src/rig-gui-levels.c src/rig-gui-message-window.c src/rig-gui-rx.c src/rig-gui-smeter.c src/rig-gui-smeter-conv.c src/rig-gui-tx.c src/rig-gui-vfo.c src/rig-selector.c src/rig-state.c src/rig-utils.c grig-GRIG-0_9_0/po/de.po000066400000000000000000001655011435534312400147220ustar00rootroot00000000000000# German translation for grig # Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 # This file is distributed under the same license as the grig package. # Jan Simon , 2011. # msgid "" msgstr "" "Project-Id-Version: grig\n" "Report-Msgid-Bugs-To: groundstation-developer@lists.sourcforge.net\n" "POT-Creation-Date: 2021-03-12 19:07+0100\n" "PO-Revision-Date: 2011-12-06 13:31+0000\n" "Last-Translator: Jan Simon \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2013-03-15 12:12+0000\n" "X-Generator: Launchpad (build 16532)\n" #: src/grig-about.c:58 msgid "" "Copyright (C) 2001-2009 Alexandru Csete OZ9AEC>\n" "\n" "Grig is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published\n" "by the Free Software Foundation; either version 2 of the License,\n" "or (at your option) any later version.\n" "\n" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU Library General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, you can find a copy on the FSF\n" "website http://www.fsf.org/ or you can write to the\n" "\n" "Free Software Foundation, Inc.\n" "51 Franklin Street - Fifth Floor\n" "Boston\n" "MA 02110-1301\n" "USA.\n" msgstr "" "Copyright (C) 2001-2009 Alexandru Csete OZ9AEC>\n" "\n" "Grig ist freie Software; Sie können es weitergeben und/oder verändern unter " "den Bedingungen der GNU Public License, veröffentlicht durch die Free " "Software Foundation; entweder unter der zweiten oder jeder anderen, späteren " "Version der Lizenz.\n" "\n" "Dies Programm ist in der Hoffnung veröffentlicht worden, dass es nützlich " "sein wird, aber OHNE JEGLICHE GARANTIE; selbst nicht unter der implizierten " "Garantie von MARKTFÄHIGKEIT oder der EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. " "Schauen Sie in die GNU General Public License für weitere Details.\n" "\n" "Sie sollten eine Kopie der GNU General Public License zusammen mit diesem " "Programm erhalten haben. Wenn nicht, schauen sie auf der FSF Internetseite " "http://www.fsf.org/ oder schreiben Sie an die \n" "\n" "Free Software Foundation, Inc.\n" "51 Franklin Street - Fifth Floor\n" "Boston\n" "MA 02110-1301\n" "USA.\n" #: src/grig-about.c:91 src/rig-gui-message-window.c:687 msgid "Grig" msgstr "Grig" #: src/grig-about.c:94 msgid "Copyright (C) 2001-2007 Alexandru Csete OZ9AEC" msgstr "Copyright (C) 2001-2007 Alexandru Csete OZ9AEC" #: src/grig-about.c:98 msgid "Grig Website" msgstr "Grig Internetseite" #: src/grig-about.c:108 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " Jan Simon https://launchpad.net/~jan-simon" #: src/grig-config.c:68 msgid "Checking GRIG configuration." msgstr "Überprüfe GRIG-Konfiguration" #: src/grig-config.c:106 #, c-format msgid "..Configuration directory: %s" msgstr "..Konfigurationsverzeichnis: %s" #: src/grig-config.c:107 src/rig-gui-message-window.c:80 msgid "ERROR" msgstr "FEHLER" #: src/grig-config.c:107 msgid "OK" msgstr "OK" #: src/grig-config.c:147 msgid "..Radio config files:" msgstr "..Funkgeräte-Konfigurationsdateien:" #: src/grig-config.c:155 #, c-format msgid "%s: %s" msgstr "%s: %s" #: src/grig-config.c:172 #, c-format msgid "....%s OK" msgstr "....%s OK" #: src/grig-debug.c:60 src/rig-gui-message-window.c:78 msgid "NONE" msgstr "KEIN" #: src/grig-debug.c:60 msgid "HAMLIB" msgstr "HAMLIB" #: src/grig-debug.c:60 src/rig-gui-message-window.c:485 msgid "GRIG" msgstr "GRIG" #: src/grig-debug.c:89 #, c-format msgid "%s: Debug handler initialised." msgstr "%s: Debug-Handler initialisiert." #: src/grig-debug.c:106 #, c-format msgid "%s: Shutting down debug handler." msgstr "%s: Debug-Handler wird geschlossen." #: src/grig-menubar.c:59 msgid "_Radio" msgstr "_Gerät" #: src/grig-menubar.c:60 msgid "_Settings" msgstr "_Einstellungen" #: src/grig-menubar.c:61 msgid "_View" msgstr "_Ansicht" #: src/grig-menubar.c:62 msgid "_Tools" msgstr "_Werkzeuge" #: src/grig-menubar.c:63 msgid "_Help" msgstr "_Hilfe" #: src/grig-menubar.c:66 msgid "_Info" msgstr "_Information" #: src/grig-menubar.c:66 msgid "Show info about radio" msgstr "Information über das Gerät anzeigen" #: src/grig-menubar.c:67 msgid "St_op daemon" msgstr "Dämon st_oppen" #: src/grig-menubar.c:67 msgid "Stop the Grig daemon" msgstr "Den Grig-Dämon beenden" #: src/grig-menubar.c:68 msgid "St_art daemon" msgstr "Dämon st_arten" #: src/grig-menubar.c:68 msgid "Start the Grig daemon" msgstr "Den Grig-Dämon starten" #: src/grig-menubar.c:69 msgid "_Save State" msgstr "Status _speichern" #: src/grig-menubar.c:69 msgid "Save the state of the rig to a file" msgstr "Den Status der Anlage in einer Datei speichern" #: src/grig-menubar.c:70 msgid "_Load State" msgstr "Status _laden" #: src/grig-menubar.c:70 msgid "Load the state of the rig from a file" msgstr "Den Status der Anlage aus einer Datei laden" #: src/grig-menubar.c:71 msgid "E_xit" msgstr "_Beenden" #: src/grig-menubar.c:71 msgid "Exit the program" msgstr "Programm beenden" #: src/grig-menubar.c:74 msgid "_Debug Level" msgstr "_Debug-Level" #: src/grig-menubar.c:74 msgid "Set Hamlib debug level" msgstr "Das Hamlib-Debug-Level einstellen" #: src/grig-menubar.c:77 msgid "Message _Window" msgstr "Mitteilungs_fenster" #: src/grig-menubar.c:77 msgid "Show window with debug messages" msgstr "Das Fenster mit den Debug-Mitteilungen anzeigen" #: src/grig-menubar.c:80 msgid "_SW Memory" msgstr "_SW Speicher" #: src/grig-menubar.c:80 msgid "Software Memory Mamager" msgstr "Software-Speicher Manager" #: src/grig-menubar.c:81 msgid "_Band Map" msgstr "_Band-Karte" #: src/grig-menubar.c:81 msgid "Show the band map" msgstr "Die Band-Karte anzeigen" #: src/grig-menubar.c:82 msgid "S_pectrum Scope" msgstr "S_pektrumskop" #: src/grig-menubar.c:82 msgid "Show the spectrum scope" msgstr "Das Spektrumsop anzeigen" #: src/grig-menubar.c:85 msgid "_About Grig" msgstr "_Über Grig" #: src/grig-menubar.c:85 msgid "Show about dialog" msgstr "»Über«-Dialog anzeigen" #: src/grig-menubar.c:91 msgid "_No Debug" msgstr "Kei_n Debug" #: src/grig-menubar.c:91 msgid "Don't show any debug mesages" msgstr "Keine Debug-Mitteilungen anzeigen" #: src/grig-menubar.c:92 msgid "_Bug" msgstr "_Bug" #: src/grig-menubar.c:92 msgid "Show error messages caused by possible bugs" msgstr "" "Fehlermitteilungen anzeigen, die möglicherweise von Bugs verursacht wurden" #: src/grig-menubar.c:93 msgid "_Error" msgstr "_Fehler" #: src/grig-menubar.c:93 msgid "Show run-time error messages" msgstr "Laufzeit-Fehlermitteilungen anzeigen" #: src/grig-menubar.c:94 msgid "_Warning" msgstr "_Warnung" #: src/grig-menubar.c:94 msgid "Show warnings" msgstr "Warnungen anzeigen" #: src/grig-menubar.c:95 msgid "_Verbose" msgstr "_Ausführlich" #: src/grig-menubar.c:95 msgid "Verbose reporting" msgstr "Ausführliche Benachrichtigung" #: src/grig-menubar.c:96 msgid "_Trace" msgstr "_Verfolgen" #: src/grig-menubar.c:96 msgid "Trace everything" msgstr "Alles verfolgen" #: src/grig-menubar.c:102 msgid "_RX Level Controls" msgstr "_RX-Level Steuerung" #: src/grig-menubar.c:102 msgid "Show receiver level controls" msgstr "Empfänger-Level Steuerung anzeigen" #: src/grig-menubar.c:103 msgid "_TX Level Controls" msgstr "_TX-Level Steuerung" #: src/grig-menubar.c:103 msgid "Show transmitter level controls" msgstr "Sender-Level Steuerung anzeigen" #: src/grig-menubar.c:104 msgid "_DCS/CTCSS" msgstr "_DCS/CTCSS" #: src/grig-menubar.c:104 msgid "Show DCS and CTCSS controls" msgstr "DCS- und CTCSS-Steuerung anzeigen" #: src/grig-menubar.c:105 msgid "_Special Functions" msgstr "_Spezialfunktionen" #: src/grig-menubar.c:105 msgid "Radio specific functions" msgstr "Gerätespezifische Funktionen" #: src/grig-menubar.c:217 #, c-format msgid "Failed to build menubar: %s" msgstr "Erzeugen der Menüleiste gescheitert: %s" #: src/key-press-handler.c:57 msgid "Initialising key press handler" msgstr "Tastendruck-Handler wird initialisiert" #: src/key-press-handler.c:67 msgid "Closing key press handler" msgstr "Tastendruck-Handler wird beendet" #: src/main.c:170 msgid "Grig can not find some necessary data files.\n" msgstr "Grig kann die nötigen Datendateien nicht finden.\n" #: src/main.c:171 msgid "This usually means that your installation is incomplete.\n" msgstr "" "Dies bedeutet normalerweise, dass Ihre Installation nicht komplett ist.\n" #: src/main.c:172 src/main.c:350 msgid "Sorry... but I can not continue..." msgstr "Entschuldigung… aber ich kann nicht fortfahren…" #: src/main.c:348 msgid "Grig configuration check failed!\n" msgstr "Grig-Konfigurationstest fehlgeschlagen!\n" #: src/main.c:349 msgid "This usually means that your configuration is broken.\n" msgstr "Dies bedeutet normalerweise, dass Ihre Konfiguration defekt ist.\n" #: src/main.c:352 msgid "Proposed solutions:\n" msgstr "Vorgeschlagene Lösungen:\n" #: src/main.c:439 #, c-format msgid "GRIG: %s %s" msgstr "GRIG: %s %s" #: src/main.c:484 #, c-format msgid "" "Received signal %d\n" "Trying clean exit..." msgstr "" "Signal %d empfangen\n" "Sauberes Beenden wird versucht…" #: src/main.c:560 msgid "" "Usage: grig [OPTION]...\n" "\n" msgstr "" "Benutzung: grig [OPTION]...\n" "\n" #: src/main.c:561 msgid " -m, --model=ID select radio model number; see --list\n" msgstr "" " -m, --model=ID Gerätemodellnummer auswählen; siehe --list\n" #: src/main.c:563 msgid " -r, --rig-file=DEVICE set device of the radio, eg. /dev/ttyS0\n" msgstr "" " -r, --rig-file=DEVICE Schnittstelle des Geräts einstellen, z.B /dev/" "ttyS0\n" #: src/main.c:565 msgid " -s, --speed=BAUD set transfer rate (serial port only)\n" msgstr "" " -s, --speed=BAUD Übertragungsrate einstellen (nur bei seriellen " "Port)\n" #: src/main.c:567 msgid " -c, --civaddr=ID set CI-V address (decimal, ICOM only)\n" msgstr "" " -c, --civaddr=ID CI-V-Adresse einstellen (dezimal, nur ICOM)\n" #: src/main.c:569 msgid "" " -C, --set-conf=param=val set config parameter (same as in rigctl)\n" msgstr "" " -C, --set-conf=param=val Konfigurationsparameter einstellen (selbe wie " "in rigctl)\n" #: src/main.c:571 msgid " -d, --debug=LEVEL set hamlib debug level (0..5)\n" msgstr " -d, --debug=LEVEL Hamlib Debug-Level einstellen (0..5)\n" #: src/main.c:573 msgid " -D, --delay=val set delay between commands in msec\n" msgstr "" " -D, --delay=val Pause zwischen Befehlen in ms einstellen\n" #: src/main.c:575 msgid " -n, --nothread start daemon without using threads\n" msgstr "" " -n, --nothread Dämon ohne Benutzung von Threads starten\n" #: src/main.c:577 msgid " -l, --list list supported radios and exit\n" msgstr "" " -l, --list Unterstützte Geräte auflisten und Beenden\n" #: src/main.c:579 msgid " -p, --enable-ptt enable PTT button\n" msgstr " -p, --enable-ptt PTT-Knopf aktivieren\n" #: src/main.c:581 msgid " -P, --enable-pwr enable POWER button\n" msgstr " -P, --enable-pwr POWER-Knopf aktivieren\n" #: src/main.c:583 msgid " -h, --help show this help message and exit\n" msgstr " -h, --help Diese Hilfe anzeigen und beenden\n" #: src/main.c:585 msgid " -v, --version show version information and exit\n" msgstr " -v, --version Version anzeigen und beenden\n" #: src/main.c:588 msgid "Example:" msgstr "Beispiel:" #: src/main.c:590 msgid "" "Start grig using YAESU FT-990 connected to the first serial port, using 4800 " "baud and debug level set to warning:" msgstr "" "Grig starten, mit einem YAESU FT-990 an den ersten seriellen Port " "angeschlossen, Übertragungsrate 4800 und Debug-Level auf Warnung:" #: src/main.c:596 msgid "or if you prefer the long options:" msgstr "oder wenn Sie lange Optionen bevorzugen:" #: src/main.c:601 msgid "It is usually enough to specify the model ID and the DEVICE." msgstr "Normalerweise reicht es, die Modell-ID und das DEVICE anzugeben" #: src/main.c:604 msgid "" "If you start grig without any options it will use the Dummy backend and set " "the debug level to RIG_DEBUG_NONE. If you don't specify the transfer rate " "for the serial port, the default value will be used by the backend and even " "if you specify a value, it can be overridden by the backend." msgstr "" "Wenn Sie Grig ohne Optionen starten, wird das Dummy-Backend benutzt und das " "Debug-Level auf RIG_DEBUG_NONE gesetzt. Wenn Sie die Übertragungsrate für " "den seriellen Port nicht angeben, wird der Standardwert vom Backend benutzt. " "Auch falls Sie einen Wert angeben, kann dieser vom Backend überschrieben " "werden." #: src/main.c:614 msgid "Debug levels:" msgstr "Debug-Level:" #: src/main.c:616 msgid " 0 No debug, keep quiet.\n" msgstr " 0 Kein Debug, stumm bleiben.\n" #: src/main.c:617 msgid " 1 Serious bug.\n" msgstr " 1 Ernster Bug.\n" #: src/main.c:618 msgid " 2 Error case (e.g. protocol, memory allocation).\n" msgstr " 2 Fehlerfall (z.B. Protokoll, Speicherzuweisung).\n" #: src/main.c:619 msgid " 3 Warnings.\n" msgstr " 3 Warnungen.\n" #: src/main.c:620 msgid " 4 Verbose information.\n" msgstr " 4 Ausführliche Informationen.\n" #: src/main.c:621 msgid " 5 Trace.\n" msgstr " 5 Verfolgen.\n" #: src/main.c:633 #, c-format msgid "grig %s\n" msgstr "grig %s\n" #: src/main.c:634 msgid "Graphical User Interface for the Hamradio Control Libraries." msgstr "" "Grafische Benutzeroberfläche für die Amateurfunksteuerungsbibliotheken." #: src/main.c:637 msgid "Copyright (C) 2001-2007 Alexandru Csete." msgstr "Copyright (C) 2001-2007 Alexandru Csete." #: src/main.c:639 msgid "This is free software; see the source for copying conditions. " msgstr "Dies ist freie Software; siehe Quelltext für die Lizenzbedingungen. " #: src/main.c:641 msgid "" "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A " "PARTICULAR PURPOSE." msgstr "" "Es gibt KEINE Garantie; selbst nicht für die MARKTFÄHIGKEIT oder der EIGNUNG " "FÜR EINEN BESTIMMTEN ZWECK." #: src/main.c:687 msgid " ID Manufacturer Model Ver. Status\n" msgstr "" #: src/rig-daemon.c:397 msgid "No error" msgstr "Kein Fehler" #: src/rig-daemon.c:398 msgid "Invalid parameter" msgstr "Ungültiger Parameter" #: src/rig-daemon.c:399 msgid "Invalid configuration" msgstr "Ungültige Konfiguration" #: src/rig-daemon.c:400 msgid "Memory shortage" msgstr "Speichermangel" #: src/rig-daemon.c:401 msgid "Function not implemented" msgstr "Funktion nicht implementiert" #: src/rig-daemon.c:402 msgid "Communication timed out" msgstr "Kommunikations-Time-Out" #: src/rig-daemon.c:403 msgid "I/O error" msgstr "I/O Fehler" #: src/rig-daemon.c:404 msgid "Internal Hamlib error :-(" msgstr "Interner Hamlib Fehler :-(" #: src/rig-daemon.c:405 msgid "Protocol error" msgstr "Protokollfehler" #: src/rig-daemon.c:406 msgid "Command rejected" msgstr "Befehl zurückgewiesen" #: src/rig-daemon.c:407 msgid "Command performed, but arg truncated" msgstr "Befehl ausgeführt, aber Argument verkürzt" #: src/rig-daemon.c:408 msgid "Function not available" msgstr "Funktion nicht verfügbar" #: src/rig-daemon.c:409 msgid "VFO not targetable" msgstr "VFO nicht ansprechbar" #: src/rig-daemon.c:410 msgid "BUS error" msgstr "BUS-Fehler" #: src/rig-daemon.c:411 msgid "Collision on the bus" msgstr "Kollision auf dem Bus" #: src/rig-daemon.c:412 msgid "NULL RIG handle or invalid pointer param" msgstr "NULL RIG Handle oder ungültiger Pointer-Parameter" #: src/rig-daemon.c:413 msgid "Invalid VFO" msgstr "Ungültiger VFO" #: src/rig-daemon.c:414 msgid "Argument out of domain" msgstr "Argument außerhalb des Bereichs" #: src/rig-daemon.c:481 #, c-format msgid "%s entered" msgstr "%s eingegeben" #: src/rig-daemon.c:523 #, c-format msgid "%s: Initializing rig (id=%d)" msgstr "%s: Initialisiere Anlage (id=%d)" #: src/rig-daemon.c:532 #, c-format msgid "%s: Init failed; Hamlib returned NULL!" msgstr "%s: Initialisierung fehlgeschlagen; Hamlib gab NULL zurück!" #: src/rig-daemon.c:566 #, c-format msgid "%s: Setting conf param (%s,%s)..." msgstr "%s: Konfig-Parameter wird gesetzt (%s,%s)…" #: src/rig-daemon.c:575 #, c-format msgid "%s: Set conf OK" msgstr "%s: Konfig setzen OK" #: src/rig-daemon.c:580 #, c-format msgid "%s: Set conf failed (%d)" msgstr "%s: Konfig setzen fehlgeschlagen (%d)" #: src/rig-daemon.c:600 #, c-format msgid "%s: Failed to open rig port %s: %s (permissions?)" msgstr "%s: Öffnen des Anlagen-Ports fehlgeschlagen %s: %s (Berechtigungen?)" #: src/rig-daemon.c:611 #, c-format msgid "%s: Init successfull, executing post-init" msgstr "%s: Initialisierung erfolgreich, post-init wird ausgeführt" #: src/rig-daemon.c:618 #, c-format msgid "%s: Starting rig daemon" msgstr "%s: Anlagen-Dämon wird gestartet" #: src/rig-daemon.c:637 #, c-format msgid "%s: Daemon timeout started, ID: %d" msgstr "%s: Time-Out-Dämon gestartet, ID: %d" #: src/rig-daemon.c:658 #, c-format msgid "%s: Failed to start daemon thread" msgstr "%s: Start des Dämon-Threads fehlgeschlagen" #: src/rig-daemon.c:661 #, c-format msgid "%s: Error %d: %s" msgstr "%s: Fehler %d: %s" #: src/rig-daemon.c:671 #, c-format msgid "%s: Daemon thread started" msgstr "%s: Dämon-Thread gestartet" #: src/rig-daemon.c:697 #, c-format msgid "%s: Sending stop signal to rig daemon" msgstr "%s: Stopsignal an den Anlagen-Dämon gesendet" #: src/rig-daemon.c:731 #, c-format msgid "%s: Cleaning up rig" msgstr "%s: Anlage wird gesäubert" #: src/rig-daemon.c:803 #, c-format msgid "%s: GET bits: %d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" msgstr "%s: GET Bits: %d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" #: src/rig-daemon.c:826 #, c-format msgid "%s: SET bits: %d%d%d%d%d%d%d%d%d%d%d%d%dXXX" msgstr "%s: SET Bits: %d%d%d%d%d%d%d%d%d%d%d%d%dXXX" #: src/rig-daemon.c:880 #, c-format msgid "%s started." msgstr "%s gestartet." #: src/rig-daemon.c:978 #, c-format msgid "%s stopped" msgstr "%s gestoppt" #: src/rig-daemon.c:1024 #, c-format msgid "%s called." msgstr "%s aufgerufen." #: src/rig-daemon.c:1159 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FREQ_1:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_FREQ_1 fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1186 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FREQ_1:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_FREQ_1 fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1243 src/rig-daemon.c:1311 #, c-format msgid "%s: I can't figure out available VFOs (got %d)" msgstr "%s: Kann verfügbare VFOs nicht herausfinden (habe %d)" #: src/rig-daemon.c:1256 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FREQ_2:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_FREQ_2 fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1324 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FREQ_2:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_FREQ_1 fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1353 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_RIT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_RIT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1380 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_RIT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_RIT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1409 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_XIT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_XIT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1436 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_XIT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_XIT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1465 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VFO:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_VFO fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1492 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VFO:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_VFO fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1521 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PSTAT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_PSTAT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1548 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PSTAT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_PSTAT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1577 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PTT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_PTT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1604 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PTT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_PTT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1634 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_MODE:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_MODE fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1685 src/rig-daemon-check.c:409 #, c-format msgid "%s: Found frequency range for mode %d" msgstr "%s: Frequenzbereich für Mode %d gefunden" #: src/rig-daemon.c:1688 src/rig-daemon-check.c:412 #, c-format msgid "%s: %.0f...(%.0f)...%.0f kHz" msgstr "%s: %.0f...(%.0f)...%.0f kHz" #: src/rig-daemon.c:1707 #, c-format msgid "%s: Can not find frequency range for this mode (%d)!Bug in backend?" msgstr "" "%s: Frequenzbereich für diesen Mode (%d) kann nicht gefunden werden! Bug im " "Backend?" #: src/rig-daemon.c:1780 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_MODE:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_MODE fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1814 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_AGC:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_AGC fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1844 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_AGC:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_AGC fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1872 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ATT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_ATT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1900 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ATT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_ATT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1928 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PREAMP:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_PREAMP fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1958 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PREAMP:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_PREAMP fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:1986 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_STRENGTH:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_STRENGTH fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2015 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_POWER:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_POWER fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2043 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_POWER:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_POWER fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2070 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SWR:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_SWR fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2097 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ALC:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_ALC fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2126 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ALC:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_ALC fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2151 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_LOCK:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_LOCK fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2178 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_LOCK:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_LOCK fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2202 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_TOGGLE:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_VFO_TOGGLE fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2225 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_COPY:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_VFO_COPY fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2248 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_XCHG:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_VFO_XCHG fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2270 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_SPLIT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_SPLIT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2291 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SPLIT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_SPLIT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2316 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_AF:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_AF fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2341 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_AF:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_AF fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2367 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_RF:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_RF fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2392 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_RF:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_RF fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2418 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_SQL:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_SQL fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2443 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SQL:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_SQL fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2469 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_IFS:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_IFS fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2494 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_IFS:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_IFS fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2520 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_APF:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_APF fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2545 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_APF:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_APF fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2571 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_NR:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_NR fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2596 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_NR:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_NR fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2622 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_NOTCH:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_NOTCH fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2647 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_NOTCH:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_NOTCH fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2673 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PBT_IN:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_PBT_IN fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2698 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PBT_IN:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_PBT_IN fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2724 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PBT_OUT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_PBT_OUT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2749 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PBT_OUT:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_PBT_OUT fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2775 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_CW_PITCH:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_CW_PITCH fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2800 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_CW_PITCH:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_CW_PITCH fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2826 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_KEYSPD:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_KEYSPD fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2851 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_KEYSPD:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_KEYSPD fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2877 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_BKINDEL:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_BKINDEL fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2902 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_BKINDEL:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_BKINDEL fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2928 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_BALANCE:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_BALANCE fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2953 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_BALANCE:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_BALANCE fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:2979 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VOXDEL:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_VOXDEL fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3004 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VOXDEL:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_VOXDEL fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3030 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VOXGAIN:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_VOXGAIN fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3055 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VOXGAIN:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_VOXGAIN fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3081 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ANTIVOX:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_ANTIVOX fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3106 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ANTIVOX:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_ANTIVOX fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3132 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_MICGAIN:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_MICGAIN fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3157 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_MICGAIN:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_MICGAIN fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3184 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_COMP:\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_COMP fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3210 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FUNC(%s):\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_SET_FUNC(%s) fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3240 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FUNC(%s):\n" "%s" msgstr "" "%s: Ausführen von RIG_CMD_GET_FUNC(%s) fehlgeschlagen:\n" "%s" #: src/rig-daemon.c:3259 #, c-format msgid "%s: Unknown command %d (grig bug)" msgstr "%s: Unbekannter Befehl %d (Grig Bug)" #: src/rig-daemon.c:3352 #, c-format msgid "%s: %d" msgstr "%s: %d" #: src/rig-daemon-check.c:157 #, c-format msgid "%s: Can not find VFO list for this backend! Bug in backend?" msgstr "" "%s: VFO-Liste für dieses Backend kann nicht gefunden werden! Bug im Backend?" #: src/rig-daemon-check.c:430 #, c-format msgid "%s: Can not find frequency range for this mode (%d)! Bug in backend?" msgstr "" "%s: Frequenzbereich für diesen Mode (%d) kann nicht gefunden werden! Bug im " "Backend?" #: src/rig-daemon-check.c:518 #, c-format msgid "%s: Could not get RF power" msgstr "%s: RF Power konnte nicht gelesen werden" #: src/rig-daemon-check.c:533 #, c-format msgid "%s: Maximum RF power is %.3f watts" msgstr "%s: Maximale RF Power ist %.3f Watt" #: src/rig-daemon-check.c:545 #, c-format msgid "%s: Could not get signal strength" msgstr "%s: Signalstärke konnte nicht gelesen werden" #: src/rig-daemon-check.c:560 #, c-format msgid "%s: Could not get SWR" msgstr "%s: SWR konnte nicht gelesen werden" #: src/rig-daemon-check.c:573 #, c-format msgid "%s: Could not get ALC" msgstr "%s: ALC konnte nicht gelesen werden" #: src/rig-daemon-check.c:586 #, c-format msgid "%s: Could not get AGC" msgstr "%s: AGC konnte nicht gelesen werden" #: src/rig-daemon-check.c:599 #, c-format msgid "%s: Could not get ATT" msgstr "%s: ATT konnte nicht gelesen werden" #: src/rig-daemon-check.c:612 #, c-format msgid "%s: Could not get PREAMP" msgstr "%s: PREAMP konnte nicht gelesen werden" #: src/rig-daemon-check.c:625 #, c-format msgid "%s: Could not get AF" msgstr "%s: AF konnte nicht gelesen werden" #: src/rig-daemon-check.c:638 #, c-format msgid "%s: Could not get RF" msgstr "%s: RF konnte nicht gelesen werden" #: src/rig-daemon-check.c:651 #, c-format msgid "%s: Could not get SQL" msgstr "%s: SQL konnte nicht gelesen werden" #: src/rig-daemon-check.c:666 #, c-format msgid "%s: Could not get IF shift" msgstr "%s: IF-Shift konnte nicht gelesen werden" #: src/rig-daemon-check.c:679 #, c-format msgid "%s: Could not get APF" msgstr "%s: APF konnte nicht gelesen werden" #: src/rig-daemon-check.c:692 #, c-format msgid "%s: Could not get NR" msgstr "%s: NR konnte nicht gelesen werden" #: src/rig-daemon-check.c:705 #, c-format msgid "%s: Could not get NOTCH" msgstr "%s: NOTCH konnte nicht gelesen werden" #: src/rig-daemon-check.c:718 #, c-format msgid "%s: Could not get PBT IN" msgstr "%s: PBT IN konnte nicht gelesen werden" #: src/rig-daemon-check.c:731 #, c-format msgid "%s: Could not get PBT OUT" msgstr "%s: PBT OUT konnte nicht gelesen werden" #: src/rig-daemon-check.c:744 #, c-format msgid "%s: Could not get CW pitch" msgstr "%s: CW-Pitch konnte nicht gelesen werden" #: src/rig-daemon-check.c:757 #, c-format msgid "%s: Could not get CW speed" msgstr "%s: CW-Speed konnte nicht gelesen werden" #: src/rig-daemon-check.c:770 #, c-format msgid "%s: Could not get break-in delay" msgstr "%s: Break-In-Delay konnte nicht gelesen werden" #: src/rig-daemon-check.c:783 #, c-format msgid "%s: Could not get balance" msgstr "%s: Balance konnte nicht gelesen werden" #: src/rig-daemon-check.c:796 #, c-format msgid "%s: Could not get VOX delay" msgstr "%s: Vox-Delay konnte nicht gelesen werden" #: src/rig-daemon-check.c:809 #, c-format msgid "%s: Could not get VOX gain" msgstr "%s: VOX-Gain konnte nicht gelesen werden" #: src/rig-daemon-check.c:822 #, c-format msgid "%s: Could not get anti-vox" msgstr "%s: Anti-VOX konnte nicht gelesen werden" #: src/rig-daemon-check.c:835 #, c-format msgid "%s: Could not get compression level" msgstr "%s: Kompressions-Level konnte nicht gelesen werden" #: src/rig-daemon-check.c:848 #, c-format msgid "%s: Could not get MIC gain" msgstr "%s: MIC-Gain konnte nicht gelesen werden" #: src/rig-daemon-check.c:954 #, c-format msgid "%s: Could not get LOCK status" msgstr "%s: LOCK-Status konnte nicht gelesen werden" #: src/rig-daemon-check.c:969 #, c-format msgid "%s: Could not get %s status" msgstr "%s: Status %s konnte nicht gelesen werden" #: src/rig-data.c:352 src/rig-data.c:544 #, c-format msgid "%s: Invalid target: %d\n" msgstr "%s: Ungültiges Ziel: %d\n" #: src/rig-gui-buttons.c:148 src/rig-gui-smeter.c:75 msgid "Power" msgstr "Leistung" #: src/rig-gui-buttons.c:149 msgid "Power status" msgstr "Power Status" #: src/rig-gui-buttons.c:193 msgid "PTT" msgstr "PTT" #: src/rig-gui-buttons.c:194 msgid "Push to talk" msgstr "Push To Talk" #: src/rig-gui-buttons.c:238 msgid "Lock" msgstr "Sperren" #: src/rig-gui-buttons.c:239 msgid "Lock tuning dial" msgstr "Frequenzwahlknopf sperren" #: src/rig-gui-buttons.c:284 msgid "ATT OFF" msgstr "ATT AUS" #: src/rig-gui-buttons.c:307 msgid "Attenuator level" msgstr "Dämpfungsregelung-Level" #: src/rig-gui-buttons.c:344 msgid "PREAMP OFF" msgstr "PREAMP AUS" #: src/rig-gui-buttons.c:367 msgid "Preamp level" msgstr "Vorverstärker-Level" #: src/rig-gui-ctrl2.c:86 src/rig-gui-info-data.h:172 msgid "AM" msgstr "AM" #: src/rig-gui-ctrl2.c:87 src/rig-gui-info-data.h:165 #: src/rig-gui-info-data.h:173 msgid "CW" msgstr "CW" #: src/rig-gui-ctrl2.c:88 src/rig-gui-info-data.h:174 msgid "USB" msgstr "USB" #: src/rig-gui-ctrl2.c:89 src/rig-gui-info-data.h:175 msgid "LSB" msgstr "LSB" #: src/rig-gui-ctrl2.c:90 src/rig-gui-info-data.h:176 msgid "RTTY" msgstr "RTTY" #: src/rig-gui-ctrl2.c:91 msgid "FM Narrow" msgstr "FM Schmal" #: src/rig-gui-ctrl2.c:92 msgid "FM Wide" msgstr "FM Breit" #: src/rig-gui-ctrl2.c:93 msgid "CW Rev" msgstr "CW Rev" #: src/rig-gui-ctrl2.c:94 msgid "RTTY Rev" msgstr "RTTY Rev" #: src/rig-gui-ctrl2.c:95 msgid "AM Synch" msgstr "AM Synch" #: src/rig-gui-ctrl2.c:96 msgid "Pkt (LSB)" msgstr "Pkt (LSB)" #: src/rig-gui-ctrl2.c:97 msgid "Pkt (USB)" msgstr "Pkt (USB)" #: src/rig-gui-ctrl2.c:98 msgid "Pkt (FM)" msgstr "Pkt (FM)" #: src/rig-gui-ctrl2.c:99 msgid "ECUSB" msgstr "ECUSB" #: src/rig-gui-ctrl2.c:100 msgid "ECLSB" msgstr "ECLSB" #: src/rig-gui-ctrl2.c:101 src/rig-gui-info-data.h:187 msgid "FAX" msgstr "FAX" #: src/rig-gui-ctrl2.c:207 msgid "AGC OFF" msgstr "AGC AUS" #: src/rig-gui-ctrl2.c:208 msgid "Super Fast" msgstr "Sehr schnell" #: src/rig-gui-ctrl2.c:209 msgid "Fast" msgstr "Schnell" #: src/rig-gui-ctrl2.c:210 msgid "Medium" msgstr "Mittel" #: src/rig-gui-ctrl2.c:211 msgid "Slow" msgstr "Langsam" #: src/rig-gui-ctrl2.c:212 msgid "Auto" msgstr "Automatisch" #: src/rig-gui-ctrl2.c:214 msgid "Automatic Gain Control Level" msgstr "Automatic Gain Control Level" #: src/rig-gui-ctrl2.c:320 msgid "Communication mode" msgstr "Communication mode" #: src/rig-gui-ctrl2.c:359 msgid "Wide" msgstr "Breit" #: src/rig-gui-ctrl2.c:360 msgid "Normal" msgstr "Normal" #: src/rig-gui-ctrl2.c:361 msgid "Narrow" msgstr "Schmal" #: src/rig-gui-ctrl2.c:362 msgid "[User]" msgstr "[Benutzer]" #: src/rig-gui-ctrl2.c:384 msgid "Passband Width" msgstr "Passband Breite" #: src/rig-gui-ctrl2.c:443 #, c-format msgid "ANT %d" msgstr "ANT %d" #: src/rig-gui-ctrl2.c:460 msgid "Antenna Port" msgstr "Antennenanschluss" #: src/rig-gui-func.c:82 #, c-format msgid "%s: FUNC window already visible." msgstr "%s: FUNC-Fenster bereits sichtbar." #: src/rig-gui-func.c:93 #, c-format msgid "%s (Special Functions)" msgstr "%s (Spezialfunktionen)" #: src/rig-gui-func.c:160 #, c-format msgid "%s: FUNC window is not visible." msgstr "%s: FUNC-Fenster ist nicht sichtbar." #: src/rig-gui-func.c:185 src/rig-gui-rx.c:242 src/rig-gui-tx.c:238 #, c-format msgid "%s:%d: Invalid level %d" msgstr "%s:%d: Ungültiges Level %d" #: src/rig-gui-func.c:227 src/rig-gui-rx.c:507 src/rig-gui-tx.c:463 msgid "Rig has no support." msgstr "Anlage hat keine Unterstützung." #: src/rig-gui-info.c:115 msgid "Radio Info" msgstr "Geräteinformation" #: src/rig-gui-info.c:250 msgid "RIT:" msgstr "RIT:" #: src/rig-gui-info.c:270 msgid "XIT:" msgstr "XIT:" #: src/rig-gui-info.c:289 msgid "IF-SHIFT:" msgstr "IF-SHIFT:" #: src/rig-gui-info.c:308 msgid "Max. Offsets" msgstr "Max. Offset" #: src/rig-gui-info.c:346 msgid "LEVEL" msgstr "LEVEL" #: src/rig-gui-info.c:356 src/rig-gui-info.c:987 msgid "READ" msgstr "LESEN" #: src/rig-gui-info.c:364 src/rig-gui-info.c:995 msgid "WRITE" msgstr "SCHREIBEN" #: src/rig-gui-info.c:392 src/rig-gui-info.c:401 src/rig-gui-info.c:1023 #: src/rig-gui-info.c:1032 src/rig-gui-info.c:1110 msgid "-" msgstr "-" #: src/rig-gui-info.c:397 src/rig-gui-info.c:406 src/rig-gui-info.c:1028 #: src/rig-gui-info.c:1037 src/rig-gui-info.c:1115 msgid "X" msgstr "X" #: src/rig-gui-info.c:442 msgid "Port Type:" msgstr "Porttyp:" #: src/rig-gui-info.c:460 src/rig-gui-info.c:489 src/rig-gui-info.c:518 #: src/rig-gui-info.c:632 src/rig-gui-info.c:667 msgid "Unknown" msgstr "Unbekannt" #: src/rig-gui-info.c:471 msgid "DCD Type:" msgstr "DCD-Typ:" #: src/rig-gui-info.c:500 msgid "PTT Type:" msgstr "PTT-Typ:" #: src/rig-gui-info.c:529 msgid "Serial Speed:" msgstr "Serielle Geschwindigkeit:" #: src/rig-gui-info.c:540 #, c-format msgid "%d..%d baud" msgstr "%d..%d Baud" #: src/rig-gui-info.c:547 src/rig-gui-info.c:574 src/rig-gui-info.c:601 #: src/rig-gui-info.c:636 src/rig-gui-info.c:671 src/rig-gui-info-data.h:67 #: src/rig-gui-info-data.h:68 src/rig-gui-info-data.h:69 #: src/rig-gui-info-data.h:103 msgid "N/A" msgstr "N/V" #: src/rig-gui-info.c:558 msgid "Data bits:" msgstr "Daten-Bits:" #: src/rig-gui-info.c:585 msgid "Stop bits:" msgstr "Stop-Bits:" #: src/rig-gui-info.c:612 msgid "Parity:" msgstr "Parität:" #: src/rig-gui-info.c:647 msgid "Handshake:" msgstr "Handshake:" #: src/rig-gui-info.c:683 msgid "Interface" msgstr "Schnittstelle" #: src/rig-gui-info.c:720 msgid "STEP" msgstr "STEP" #: src/rig-gui-info.c:730 msgid "MODES" msgstr "MODES" #: src/rig-gui-info.c:845 msgid "PREAMP:" msgstr "PREAMP:" #: src/rig-gui-info.c:893 msgid "ATT:" msgstr "ATT:" #: src/rig-gui-info.c:939 msgid "Front End" msgstr "Frontend" #: src/rig-gui-info.c:977 msgid "FUNCTION" msgstr "FUNKTION" #: src/rig-gui-info.c:1071 msgid "VFO OP" msgstr "VFO OP" #: src/rig-gui-info.c:1081 msgid "SET" msgstr "SET" #: src/rig-gui-info-data.h:44 msgid "PREAMP" msgstr "PREAMP" #: src/rig-gui-info-data.h:45 msgid "ATT" msgstr "ATT" #: src/rig-gui-info-data.h:46 src/rig-gui-info-data.h:82 msgid "VOX" msgstr "VOX" #: src/rig-gui-info-data.h:47 msgid "AF" msgstr "AF" #: src/rig-gui-info-data.h:48 msgid "RF" msgstr "RF" #: src/rig-gui-info-data.h:49 src/rig-gui-info-data.h:99 msgid "SQL" msgstr "SQL" #: src/rig-gui-info-data.h:50 msgid "IF" msgstr "IF" #: src/rig-gui-info-data.h:51 src/rig-gui-info-data.h:90 src/rig-gui-rx.c:412 msgid "APF" msgstr "APF" #: src/rig-gui-info-data.h:52 src/rig-gui-info-data.h:88 msgid "NR" msgstr "NR" #: src/rig-gui-info-data.h:53 msgid "PBT_IN" msgstr "PBT_IN" #: src/rig-gui-info-data.h:54 msgid "PBT_OUT" msgstr "PBT_OUT" #: src/rig-gui-info-data.h:55 msgid "CWPITCH" msgstr "CWPITCH" #: src/rig-gui-info-data.h:56 msgid "RFPOWER" msgstr "RFPOWER" #: src/rig-gui-info-data.h:57 msgid "MICGAIN" msgstr "MICGAIN" #: src/rig-gui-info-data.h:58 msgid "KEYSPD" msgstr "KEYSPD" #: src/rig-gui-info-data.h:59 msgid "NOTCHF" msgstr "NOTCHF" #: src/rig-gui-info-data.h:60 msgid "COMP" msgstr "COMP" #: src/rig-gui-info-data.h:61 msgid "AGC" msgstr "AGC" #: src/rig-gui-info-data.h:62 msgid "BKINDL" msgstr "BKINDL" #: src/rig-gui-info-data.h:63 msgid "BALANCE" msgstr "BALANCE" #: src/rig-gui-info-data.h:64 msgid "METER" msgstr "METER" #: src/rig-gui-info-data.h:65 msgid "VOXGAIN" msgstr "VOXGAIN" #: src/rig-gui-info-data.h:66 msgid "ANTIVOX" msgstr "ANTIVOX" #: src/rig-gui-info-data.h:70 msgid "RAWSTR" msgstr "RAWSTR" #: src/rig-gui-info-data.h:71 msgid "SQLSTAT" msgstr "SQLSTAT" #: src/rig-gui-info-data.h:72 src/rig-gui-smeter.c:76 msgid "SWR" msgstr "SWR" #: src/rig-gui-info-data.h:73 src/rig-gui-smeter.c:77 src/rig-gui-tx.c:347 msgid "ALC" msgstr "ALC" #: src/rig-gui-info-data.h:74 msgid "STRENGTH" msgstr "STRENGTH" #: src/rig-gui-info-data.h:79 msgid "FAST AGC" msgstr "FAST AGC" #: src/rig-gui-info-data.h:80 msgid "NB" msgstr "NB" #: src/rig-gui-info-data.h:81 src/rig-gui-tx.c:388 msgid "COMPR" msgstr "COMPR" #: src/rig-gui-info-data.h:83 msgid "TONE" msgstr "TONE" #: src/rig-gui-info-data.h:84 msgid "CTCSS" msgstr "CTCSS" #: src/rig-gui-info-data.h:85 msgid "SEMI BK" msgstr "SEMI BK" #: src/rig-gui-info-data.h:86 msgid "FULL BK" msgstr "FULL BK" #: src/rig-gui-info-data.h:87 msgid "ANF" msgstr "ANF" #: src/rig-gui-info-data.h:89 msgid "AIP" msgstr "AIP" #: src/rig-gui-info-data.h:91 msgid "MON" msgstr "MON" #: src/rig-gui-info-data.h:92 msgid "MAN NOTCH" msgstr "MAN NOTCH" #: src/rig-gui-info-data.h:93 msgid "RNF" msgstr "RNF" #: src/rig-gui-info-data.h:94 msgid "AUTO RO" msgstr "AUTO RO" #: src/rig-gui-info-data.h:95 msgid "LOCK" msgstr "LOCK" #: src/rig-gui-info-data.h:96 msgid "MUTE" msgstr "MUTE" #: src/rig-gui-info-data.h:97 msgid "VOICE SCAN" msgstr "VOICE SCAN" #: src/rig-gui-info-data.h:98 msgid "REV TRX" msgstr "REV TRX" #: src/rig-gui-info-data.h:100 msgid "ABM" msgstr "ABM" #: src/rig-gui-info-data.h:101 msgid "BEAT CANC" msgstr "BEAT CANC" #: src/rig-gui-info-data.h:102 msgid "MAN BC" msgstr "MAN BC" #: src/rig-gui-info-data.h:104 msgid "AFC" msgstr "AFC" #: src/rig-gui-info-data.h:105 msgid "SATMODE" msgstr "SATMODE" #: src/rig-gui-info-data.h:106 msgid "SCOPE" msgstr "SCOPE" #: src/rig-gui-info-data.h:107 msgid "RESUME" msgstr "RESUME" #: src/rig-gui-info-data.h:108 msgid "TBURST" msgstr "TBURST" #: src/rig-gui-info-data.h:109 msgid "TUNER" msgstr "TUNER" #: src/rig-gui-info-data.h:114 src/rig-gui-info-data.h:123 #: src/rig-gui-info-data.h:134 src/rig-gui-info-data.h:148 #: src/rig-gui-info-data.h:155 src/rig-gui-smeter.c:74 msgid "None" msgstr "Kein" #: src/rig-gui-info-data.h:115 src/rig-gui-info-data.h:124 msgid "Legacy" msgstr "Legacy" #: src/rig-gui-info-data.h:116 msgid "SER_DTR" msgstr "SER_DTR" #: src/rig-gui-info-data.h:117 msgid "SER_RTS" msgstr "SER_RTS" #: src/rig-gui-info-data.h:118 src/rig-gui-info-data.h:128 msgid "PARPORT" msgstr "PARPORT" #: src/rig-gui-info-data.h:125 msgid "SER_DSR" msgstr "SER_DSR" #: src/rig-gui-info-data.h:126 msgid "SER_CTS" msgstr "SER_CTS" #: src/rig-gui-info-data.h:127 msgid "SER_CAR" msgstr "SER_CAR" #: src/rig-gui-info-data.h:135 msgid "Serial" msgstr "Seriell" #: src/rig-gui-info-data.h:136 msgid "Network" msgstr "Netzwerk" #: src/rig-gui-info-data.h:137 msgid "Device" msgstr "Gerät" #: src/rig-gui-info-data.h:138 msgid "Packet" msgstr "Packet" #: src/rig-gui-info-data.h:139 msgid "DTMF" msgstr "DTMF" #: src/rig-gui-info-data.h:140 msgid "IrDA" msgstr "IrDA" #: src/rig-gui-info-data.h:141 msgid "RPC" msgstr "RPC" #: src/rig-gui-info-data.h:142 msgid "Parallel" msgstr "Parallel" #: src/rig-gui-info-data.h:149 msgid "Odd" msgstr "Odd" #: src/rig-gui-info-data.h:150 msgid "Even" msgstr "Even" #: src/rig-gui-info-data.h:156 msgid "XONXOFF" msgstr "XONXOFF" #: src/rig-gui-info-data.h:157 msgid "Hardware" msgstr "Hardware" #: src/rig-gui-info-data.h:162 msgid "OFF" msgstr "AUS" #: src/rig-gui-info-data.h:163 msgid "FREQ" msgstr "FREQ" #: src/rig-gui-info-data.h:164 msgid "RXMODE" msgstr "RXMODE" #: src/rig-gui-info-data.h:166 msgid "EMG" msgstr "EMG" #: src/rig-gui-info-data.h:167 msgid "JAP" msgstr "JAP" #: src/rig-gui-info-data.h:177 msgid "FM" msgstr "FM" #: src/rig-gui-info-data.h:178 msgid "WFM" msgstr "WFM" #: src/rig-gui-info-data.h:179 msgid "CWR" msgstr "CWR" #: src/rig-gui-info-data.h:180 msgid "RTTYR" msgstr "RTTYR" #: src/rig-gui-info-data.h:181 msgid "AMS" msgstr "AMS" #: src/rig-gui-info-data.h:182 msgid "PKTLSB" msgstr "PKTLSB" #: src/rig-gui-info-data.h:183 msgid "PKTUSB" msgstr "PKTUSB" #: src/rig-gui-info-data.h:184 msgid "PKTFM" msgstr "PKTFM" #: src/rig-gui-info-data.h:185 msgid "ECSSUSB" msgstr "ECSSUSB" #: src/rig-gui-info-data.h:186 msgid "ECSSLSB" msgstr "ECSSLSB" #: src/rig-gui-info-data.h:193 msgid "COPY A=B" msgstr "COPY A=B" #: src/rig-gui-info-data.h:194 msgid "XCHG A/B" msgstr "XCHG A/B" #: src/rig-gui-info-data.h:195 msgid "VFO->MEM" msgstr "VFO->MEM" #: src/rig-gui-info-data.h:196 msgid "MEM->VFO" msgstr "MEM->VFO" #: src/rig-gui-info-data.h:197 msgid "MEMCLEAR" msgstr "MEMCLEAR" #: src/rig-gui-info-data.h:198 msgid "UP" msgstr "UP" #: src/rig-gui-info-data.h:199 msgid "DOWN" msgstr "DOWN" #: src/rig-gui-info-data.h:200 msgid "BAND UP" msgstr "BAND UP" #: src/rig-gui-info-data.h:201 msgid "BAND DOWN" msgstr "BAND DOWN" #: src/rig-gui-info-data.h:202 msgid "LEFT" msgstr "LEFT" #: src/rig-gui-info-data.h:203 msgid "RIGHT" msgstr "RIGHT" #: src/rig-gui-info-data.h:204 msgid "TUNE" msgstr "TUNE" #: src/rig-gui-info-data.h:205 msgid "TOGGLE" msgstr "TOGGLE" #: src/rig-gui-keypad.c:289 msgid "ENT" msgstr "ENT" #: src/rig-gui-keypad.c:291 msgid "Begin manual frequency entry mode" msgstr "Manuellen Frequenzeingabemodus starten" #: src/rig-gui-keypad.c:301 msgid "CLR" msgstr "CLR" #: src/rig-gui-keypad.c:303 msgid "Clear manual frequency entry mode" msgstr "Manuellen Frequenzeingabemodus beenden" #: src/rig-gui-lcd.c:1396 msgid "kHz" msgstr "kHz" #: src/rig-gui-lcd.c:1421 msgid "RIT" msgstr "RIT" #: src/rig-gui-lcd.c:1472 msgid "VFO A" msgstr "VFO A" #: src/rig-gui-lcd.c:1476 msgid "VFO B" msgstr "VFO B" #: src/rig-gui-lcd.c:1480 msgid "VFO C" msgstr "VFO C" #: src/rig-gui-lcd.c:1484 msgid "MAIN VFO" msgstr "MAIN VFO" #: src/rig-gui-lcd.c:1488 msgid "SUB VFO" msgstr "SUB VFO" #: src/rig-gui-lcd.c:1492 msgid "MEM" msgstr "MEM" #: src/rig-gui-lcd.c:1496 msgid "VFO ?" msgstr "VFO ?" #: src/rig-gui-levels.c:52 msgid "Level Controls" msgstr "Level-Steuerung" #: src/rig-gui-levels.c:53 msgid "Show/hide level controls" msgstr "Level-Steuerung Zeigen/Verbergen" #: src/rig-gui-message-window.c:65 msgid "Time" msgstr "Zeit" #: src/rig-gui-message-window.c:66 msgid "Source" msgstr "Quelle" #: src/rig-gui-message-window.c:67 msgid "Level" msgstr "Level" #: src/rig-gui-message-window.c:68 msgid "Message" msgstr "Mitteilung" #: src/rig-gui-message-window.c:79 msgid "BUG" msgstr "BUG" #: src/rig-gui-message-window.c:81 msgid "WARNING" msgstr "WARNUNG" #: src/rig-gui-message-window.c:82 msgid "DEBUG" msgstr "DEBUG" #: src/rig-gui-message-window.c:83 msgid "TRACE" msgstr "VERFOLGEN" #: src/rig-gui-message-window.c:162 msgid "Grig Message Window" msgstr "Grig Mitteilungsfenster" #: src/rig-gui-message-window.c:407 msgid "Open Debug File" msgstr "Debug-Datei öffnen" #: src/rig-gui-message-window.c:476 msgid "SYS" msgstr "SYS" #: src/rig-gui-message-window.c:486 msgid "Log file seems corrupt" msgstr "Logdatei scheint defekt zu sein" #: src/rig-gui-message-window.c:509 #, c-format msgid "%s:%d: Error open debug log (%s)" msgstr "%s:%d: Fehler beim Öffnen des Debug-Logs (%s)" #: src/rig-gui-message-window.c:681 msgid "Hamlib" msgstr "Hamlib" #: src/rig-gui-message-window.c:693 msgid "Other" msgstr "Sonstige" #: src/rig-gui-message-window.c:703 msgid "Bugs" msgstr "Bugs" #: src/rig-gui-message-window.c:709 msgid "Errors" msgstr "Fehler" #: src/rig-gui-message-window.c:715 msgid "Warning" msgstr "Warnung" #: src/rig-gui-message-window.c:721 msgid "Verbose" msgstr "Ausführlich" #: src/rig-gui-message-window.c:727 msgid "Trace" msgstr "Verfolgen" #: src/rig-gui-message-window.c:740 msgid "Total" msgstr "Gesamt" #: src/rig-gui-message-window.c:765 msgid " Summary " msgstr " Zusammenfassung " #: src/rig-gui-rx.c:97 #, c-format msgid "%s: RX window already visible." msgstr "%s: RX-Fenster bereits sichtbar." #: src/rig-gui-rx.c:108 #, c-format msgid "%s (RX Levels)" msgstr "%s (RX-Level)" #: src/rig-gui-rx.c:172 #, c-format msgid "%s: RX window is not visible." msgstr "%s: RX-Fenster ist nicht sichtbar." #: src/rig-gui-rx.c:284 msgid "AF Gain" msgstr "AF-Gain" #: src/rig-gui-rx.c:304 msgid "RF Gain" msgstr "RF-Gain" #: src/rig-gui-rx.c:331 msgid "IF Shift" msgstr "IF-Shift" #: src/rig-gui-rx.c:351 msgid "CW Pitch" msgstr "CW-Pitch" #: src/rig-gui-rx.c:371 msgid "PBT In" msgstr "PBT In" #: src/rig-gui-rx.c:391 msgid "PBT Out" msgstr "PBT Out" #: src/rig-gui-rx.c:432 msgid "N.R." msgstr "N.R." #: src/rig-gui-rx.c:452 msgid "NOTCH" msgstr "NOTCH" #: src/rig-gui-rx.c:472 msgid "Squelch" msgstr "Squelch" #: src/rig-gui-rx.c:492 msgid "Balance" msgstr "Balance" #: src/rig-gui-smeter.c:83 msgid "0..5" msgstr "0..5" #: src/rig-gui-smeter.c:84 msgid "0..10" msgstr "0..10" #: src/rig-gui-smeter.c:85 msgid "0..50" msgstr "0..50" #: src/rig-gui-smeter.c:86 msgid "0..100" msgstr "0..100" #: src/rig-gui-smeter.c:87 msgid "0..500" msgstr "0..500" #: src/rig-gui-smeter.c:430 msgid "Select TX mode for the meter" msgstr "TX-Modus für die Anzeige auswählen" #: src/rig-gui-smeter.c:479 msgid "Select TX meter scale" msgstr "TX-Anzeigenskala auswählen" #: src/rig-gui-tx.c:98 #, c-format msgid "%s: TX window already visible." msgstr "%s: TX-Fenster bereits sichtbar." #: src/rig-gui-tx.c:109 #, c-format msgid "%s (TX Levels)" msgstr "%s (TX-Level)" #: src/rig-gui-tx.c:176 #, c-format msgid "%s: TX window is not visible." msgstr "%s: TX-Fenster ist nicht sichtbar." #: src/rig-gui-tx.c:286 msgid "CW SPD" msgstr "CW SPD" #: src/rig-gui-tx.c:306 msgid "BKIN DEL" msgstr "BKIN DEL" #: src/rig-gui-tx.c:326 msgid "POWER" msgstr "POWER" #: src/rig-gui-tx.c:368 msgid "MIC GAIN" msgstr "MIC GAIN" #: src/rig-gui-tx.c:408 msgid "VOX GAIN" msgstr "VOX GAIN" #: src/rig-gui-tx.c:428 msgid "VOX DEL" msgstr "VOX DEL" #: src/rig-gui-tx.c:448 msgid "ANTI VOX" msgstr "ANTI VOX" #: src/rig-gui-vfo.c:119 msgid "Main / Sub" msgstr "Main / Sub" #: src/rig-gui-vfo.c:120 msgid "Toggle active VFO" msgstr "Aktiven VFO umschalten" #: src/rig-gui-vfo.c:123 msgid "A / B" msgstr "A / B" #: src/rig-gui-vfo.c:124 msgid "Toggle between available VFOs" msgstr "Zwischen verfügbaren VFOs umschalten" #: src/rig-gui-vfo.c:235 msgid "Main = Sub" msgstr "Main = Sub" #: src/rig-gui-vfo.c:236 msgid "Set Main VFO = Sub VFO" msgstr "Main VFO = Sub VFO setzen" #: src/rig-gui-vfo.c:239 msgid "A = B" msgstr "A = B" #: src/rig-gui-vfo.c:240 msgid "Set VFO B = VFO A" msgstr "VFO B = VFO A setzen" #: src/rig-gui-vfo.c:304 msgid "Main«»Sub" msgstr "Main«»Sub" #: src/rig-gui-vfo.c:305 msgid "Exchange Main and sub VFOs" msgstr "Main- und Sub-VFOs tauschen" #: src/rig-gui-vfo.c:308 msgid "A«»B" msgstr "A«»B" #: src/rig-gui-vfo.c:309 msgid "Exchange VFO A and B" msgstr "VFO A und B tauschen" #: src/rig-gui-vfo.c:370 msgid "Split" msgstr "Split" #: src/rig-gui-vfo.c:371 msgid "Toggle split mode operation" msgstr "Splitmodus-Betrieb umschalten" #: src/rig-gui-vfo.c:399 msgid "M / V" msgstr "M / V" #: src/rig-gui-vfo.c:400 msgid "Toggle between memory and VFO" msgstr "Zwischen Speicher und VFO umschalten" #: src/rig-selector.c:116 msgid "" "Connect to the selected radio.Grig will attempt to establish connection to " "the selected radio using the specified settings. If the connection is " "successful, the main application window will be loaded." msgstr "" "Zu ausgewählten Gerät verbinden. Grig wird versuchen, zu dem ausgewählten " "Gerät unter Benutzung der gewählten Einstellungen, eine Verbindung " "herzustellen. Falls die Verbindung erfolgreich ist, wird das Fenster der " "Hauptanwendung geladen." #: src/rig-selector.c:125 msgid "Cancel radio selection. This will end grig." msgstr "Geräteauswahl beenden. Dies wird Grig beenden" #: src/rig-selector.c:130 msgid "" "Add a new radio to the list.A new configuration window will be shown " "allowing you to select a radio and specify the connection settings." msgstr "" "Ein neues Gerät zur Liste hinzufügen. Ein neues Konfigurationsfensterwird " "angezeigt werden, was Ihnen ermöglicht, ein Gerät auszuwählen und die " "Verbindungseinstellungen zu setzen." #: src/rig-selector.c:139 msgid "Delete the currently selected radio." msgstr "Derzeit gewähltes Gerät löschen." #: src/rig-selector.c:145 msgid "Edit the settings for the currently selected radio." msgstr "Einstellungen für das derzeit gewählte Gerät bearbeiten." #: src/rig-selector.c:170 msgid "Select a Radio" msgstr "Gerät auswählen" #: src/rig-selector.c:230 msgid "Company" msgstr "Hersteller" #: src/rig-selector.c:236 msgid "Model" msgstr "Modell" #: src/rig-selector.c:242 msgid "Port" msgstr "Port" #: src/rig-selector.c:248 msgid "Speed" msgstr "Geschwindigkeit" #: src/rig-selector.c:254 msgid "CI-V" msgstr "CI-V" #: src/rig-selector.c:262 msgid "DTR" msgstr "DTR" #: src/rig-selector.c:270 msgid "RTS" msgstr "RTS" #: src/rig-selector.c:483 #, c-format msgid "%s:%s: Failed to delete %s" msgstr "%s:%s: Löschen von %s fehlgeschlagen" #: src/rig-selector.c:488 #, c-format msgid "%s:%s: Removed %s" msgstr "%s:%s: %s entfernt" #: src/rig-state.c:130 msgid "Load Rig State" msgstr "Anlagenstatus geladen" #: src/rig-state.c:139 src/rig-state.c:262 msgid "Rig state files (*.rig)" msgstr "Anlagenstatusdateien (*.rig)" #: src/rig-state.c:144 src/rig-state.c:267 msgid "All files" msgstr "Alle Dateien" #: src/rig-state.c:164 #, c-format msgid "" "There was an error reading the settings from:\n" "\n" " %s\n" "\n" " Examine the log messages for further info." msgstr "" "Fehler beim Lesen der Einstellungen aus:\n" "\n" " %s\n" "\n" " Schauen sie in die Logmitteilungen für weitere Informationen." #: src/rig-state.c:182 #, c-format msgid "" "The selected file:\n" " %s\n" " does not exist or is not a regular file." msgstr "" "Die ausgewählte Datei:\n" " %s\n" "existiert nicht oder ist keine gültige Datei." #: src/rig-state.c:253 msgid "Save Rig State" msgstr "Anlagenstatus speichern" #: src/rig-state.c:283 #, c-format msgid "" "%s: User selected new file:\n" "%s" msgstr "" "%s: Benutzer hat neue Datei ausgewählt:\n" "%s" #: src/rig-state.c:295 msgid "" "Selected file already exists.\n" "Overwrite file?" msgstr "" "Ausgewählte Datei existiert bereits.\n" "Datei überschreiben?" #: src/rig-state.c:313 src/rig-state.c:347 #, c-format msgid "" "There was an error saving the settings to:\n" "\n" " %s\n" "\n" " Examine the log messages for further info." msgstr "" "Fehler beim Speichern der Einstellung in:\n" "\n" " %s\n" "\n" " Schauen sie in die Logmitteilungen für weitere Informationen." #: src/rig-state.c:406 #, c-format msgid "%s: Error loading rig file (%s)" msgstr "%s: Fehler beim Laden der Anlagendatei (%s)" #: src/rig-state.c:419 #, c-format msgid "%s: Error reading rig id (%s)" msgstr "%s: Fehler beim Lesen der Anlagen-ID (%s)" #: src/rig-state.c:430 #, c-format msgid "" "%s: ID mismatch detected: state id is %d\n" "while current rig id is %d" msgstr "" "%s: ID-Diskrepanz festgestellt: Status-ID ist %d\n" "während derzeitige Anlagen-ID %d ist" #: src/rig-state.c:449 #, c-format msgid "%s: Applying settings (model=%d)" msgstr "%s: Einstellungen werden angewendet (Modell=%d)" #: src/rig-state.c:579 #, c-format msgid "%s: RIG ID is invalid (%d)" msgstr "%s: Anlagen-ID ist ungültig (%d)" #: src/rig-state.c:654 #, c-format msgid "%s: Error building state data (%s)" msgstr "%s: Fehler beim Erzeugen der Statusdaten (%s)" #: src/rig-state.c:665 #, c-format msgid "" "%s: Could not create data file (%s)\n" "%s" msgstr "" "%s: Datendateien konnten nicht erstellt werden (%s)\n" "%s" #: src/rig-state.c:682 #, c-format msgid "%s: Error writing config data (%s)" msgstr "%s: Fehler beim Schreiben der Konfigurationsdaten (%s)" #: src/rig-state.c:689 #, c-format msgid "%s: Wrote only %d instead of %d chars" msgstr "%s: Nur %d Zeichen anstatt von %d wurden geschrieben" #: src/rig-state.c:695 #, c-format msgid "" "%s: Rig state saved successfully to\n" "%s." msgstr "" "%s: Anlagenstatus wurde erfolgreich gespeichert in\n" "%s." #: src/rig-state.c:724 #, c-format msgid "" "Selected rig state has been saved for model %d,\n" "while the current rig model is %d.\n" "Do you want to try to apply settings?" msgstr "" "Ausgewählter Anlagenstatus für das Modell %d wurde gespeichert,\n" "während das derzeitige Anlagenmodell %d ist.\n" "Wollen Sie versuchen, die Einstellungen anzuwenden?" #: src/rig-state.c:771 src/rig-state.c:826 src/rig-state.c:869 #: src/rig-state.c:909 #, c-format msgid "" "%s:%d: Could nor read param %s::%s\n" "(%s)" msgstr "" "%s:%d: Parameter %s::%s konnte nicht gelesen werden\n" "(%s)" #: src/rig-state.c:788 #, c-format msgid "" "%s:%d:\n" "FLOAT value out of range: %.2f\n" "Floats expected to be between 0.0 and 1.0" msgstr "" "%s:%d:\n" "FLOAT Wert außerhalb des Bereichs: %.2f\n" "Floats werden zwischen 0.0 und 1.0 erwartet" grig-GRIG-0_9_0/po/fr.po000066400000000000000000001530741435534312400147430ustar00rootroot00000000000000# translation of fr.po to French # Copyright (C) 2001-2008 Alexandru Csete # This file is distributed under the same license as the grig package. # # Stéphane Fillod , 2008-2010. msgid "" msgstr "" "Project-Id-Version: fr\n" "Report-Msgid-Bugs-To: groundstation-developer@lists.sourcforge.net\n" "POT-Creation-Date: 2021-03-12 19:07+0100\n" "PO-Revision-Date: 2015-03-29 11:47+0000\n" "Last-Translator: Jean-Marc \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n>1;\n" "X-Launchpad-Export-Date: 2015-12-19 15:44+0000\n" "X-Generator: Launchpad (build 17865)\n" #: src/grig-about.c:58 msgid "" "Copyright (C) 2001-2009 Alexandru Csete OZ9AEC>\n" "\n" "Grig is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published\n" "by the Free Software Foundation; either version 2 of the License,\n" "or (at your option) any later version.\n" "\n" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU Library General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, you can find a copy on the FSF\n" "website http://www.fsf.org/ or you can write to the\n" "\n" "Free Software Foundation, Inc.\n" "51 Franklin Street - Fifth Floor\n" "Boston\n" "MA 02110-1301\n" "USA.\n" msgstr "" #: src/grig-about.c:91 src/rig-gui-message-window.c:687 msgid "Grig" msgstr "Grig" #: src/grig-about.c:94 msgid "Copyright (C) 2001-2007 Alexandru Csete OZ9AEC" msgstr "Copyright (C) 2001-2007 Alexandru Csete OZ9AEC" #: src/grig-about.c:98 msgid "Grig Website" msgstr "Site web de Grig" #: src/grig-about.c:108 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " Eliovir https://launchpad.net/~eliovir\n" " Jean-Marc https://launchpad.net/~m-balthazar\n" " Jean-Michel Vourgère https://launchpad.net/~jmb-deb\n" " Stéphane Fillod https://launchpad.net/~fillods" #: src/grig-config.c:68 msgid "Checking GRIG configuration." msgstr "Vérification de la configuration de GRIG" #: src/grig-config.c:106 #, c-format msgid "..Configuration directory: %s" msgstr "..Répertoire de configuration : %s" #: src/grig-config.c:107 src/rig-gui-message-window.c:80 msgid "ERROR" msgstr "ERREUR" #: src/grig-config.c:107 msgid "OK" msgstr "OK" #: src/grig-config.c:147 msgid "..Radio config files:" msgstr "..Fichiers de configuration radio :" #: src/grig-config.c:155 #, c-format msgid "%s: %s" msgstr "%s : %s" #: src/grig-config.c:172 #, c-format msgid "....%s OK" msgstr "....%s OK" #: src/grig-debug.c:60 src/rig-gui-message-window.c:78 msgid "NONE" msgstr "AUCUN" #: src/grig-debug.c:60 msgid "HAMLIB" msgstr "HAMLIB" #: src/grig-debug.c:60 src/rig-gui-message-window.c:485 msgid "GRIG" msgstr "GRIG" #: src/grig-debug.c:89 #, c-format msgid "%s: Debug handler initialised." msgstr "%s : gestionnaire de débogage initialisé." #: src/grig-debug.c:106 #, c-format msgid "%s: Shutting down debug handler." msgstr "%s : fermeture du gestionnaire de débogage." #: src/grig-menubar.c:59 msgid "_Radio" msgstr "_Radio" #: src/grig-menubar.c:60 msgid "_Settings" msgstr "_Paramètres" #: src/grig-menubar.c:61 msgid "_View" msgstr "_Vue" #: src/grig-menubar.c:62 msgid "_Tools" msgstr "_Outils" #: src/grig-menubar.c:63 msgid "_Help" msgstr "_Aide" #: src/grig-menubar.c:66 msgid "_Info" msgstr "_Informations" #: src/grig-menubar.c:66 msgid "Show info about radio" msgstr "Afficher les informations à propos de la radio" #: src/grig-menubar.c:67 msgid "St_op daemon" msgstr "A_rrêter le démon" #: src/grig-menubar.c:67 msgid "Stop the Grig daemon" msgstr "Arrêter le démon Grig" #: src/grig-menubar.c:68 msgid "St_art daemon" msgstr "_Démarrer le démon" #: src/grig-menubar.c:68 msgid "Start the Grig daemon" msgstr "Démarrer le démon Grig" #: src/grig-menubar.c:69 msgid "_Save State" msgstr "Enregi_strer l'état" #: src/grig-menubar.c:69 msgid "Save the state of the rig to a file" msgstr "Enregistrer l'état de la radio dans un fichier" #: src/grig-menubar.c:70 msgid "_Load State" msgstr "_Charger l'état" #: src/grig-menubar.c:70 msgid "Load the state of the rig from a file" msgstr "Charger l'état de la radio depuis un fichier" #: src/grig-menubar.c:71 msgid "E_xit" msgstr "_Quitter" #: src/grig-menubar.c:71 msgid "Exit the program" msgstr "Quitter le programme" #: src/grig-menubar.c:74 msgid "_Debug Level" msgstr "Niveau de _Débogage" #: src/grig-menubar.c:74 msgid "Set Hamlib debug level" msgstr "Définir le niveau de débogage de Hamlib" #: src/grig-menubar.c:77 msgid "Message _Window" msgstr "_Fenêtre de message" #: src/grig-menubar.c:77 msgid "Show window with debug messages" msgstr "Afficher la fenêtre des messages de débogage" #: src/grig-menubar.c:80 msgid "_SW Memory" msgstr "Mémoire _SW" #: src/grig-menubar.c:80 msgid "Software Memory Mamager" msgstr "Gestionnaire de mémoire logicielle" #: src/grig-menubar.c:81 msgid "_Band Map" msgstr "" #: src/grig-menubar.c:81 msgid "Show the band map" msgstr "" #: src/grig-menubar.c:82 msgid "S_pectrum Scope" msgstr "" #: src/grig-menubar.c:82 msgid "Show the spectrum scope" msgstr "" #: src/grig-menubar.c:85 msgid "_About Grig" msgstr "_À propos de Grig" #: src/grig-menubar.c:85 msgid "Show about dialog" msgstr "Afficher la boite de dialogue « À propos »" #: src/grig-menubar.c:91 msgid "_No Debug" msgstr "_Aucun débogage" #: src/grig-menubar.c:91 msgid "Don't show any debug mesages" msgstr "Ne pas afficher les messages de débogage" #: src/grig-menubar.c:92 msgid "_Bug" msgstr "_Bogue" #: src/grig-menubar.c:92 msgid "Show error messages caused by possible bugs" msgstr "Afficher les messages d'erreur causés par de possible bogues" #: src/grig-menubar.c:93 msgid "_Error" msgstr "_Erreur" #: src/grig-menubar.c:93 msgid "Show run-time error messages" msgstr "Afficher les messages d'erreur d'exécution" #: src/grig-menubar.c:94 msgid "_Warning" msgstr "_Avertissement" #: src/grig-menubar.c:94 msgid "Show warnings" msgstr "Afficher les avertissements" #: src/grig-menubar.c:95 msgid "_Verbose" msgstr "Ba_vard" #: src/grig-menubar.c:95 msgid "Verbose reporting" msgstr "" #: src/grig-menubar.c:96 msgid "_Trace" msgstr "_Trace" #: src/grig-menubar.c:96 msgid "Trace everything" msgstr "" #: src/grig-menubar.c:102 msgid "_RX Level Controls" msgstr "Commandes de niveaux _RX" #: src/grig-menubar.c:102 msgid "Show receiver level controls" msgstr "Afficher les commandes de niveaux de réception" #: src/grig-menubar.c:103 msgid "_TX Level Controls" msgstr "Commandes de niveaux _TX" #: src/grig-menubar.c:103 msgid "Show transmitter level controls" msgstr "Afficher les commandes de niveaux d'émission" #: src/grig-menubar.c:104 msgid "_DCS/CTCSS" msgstr "_DCS/CTCSS" #: src/grig-menubar.c:104 msgid "Show DCS and CTCSS controls" msgstr "Afficher les commandes DCS et CTCSS" #: src/grig-menubar.c:105 msgid "_Special Functions" msgstr "Fonctions _spéciales" #: src/grig-menubar.c:105 msgid "Radio specific functions" msgstr "Fonctions spécifiques radio" #: src/grig-menubar.c:217 #, c-format msgid "Failed to build menubar: %s" msgstr "Impossible de créer la barre de menus : %s" #: src/key-press-handler.c:57 msgid "Initialising key press handler" msgstr "Initialisation du gestionnaire de touche pressée" #: src/key-press-handler.c:67 msgid "Closing key press handler" msgstr "Fermeture du gestionnaire de touches pressées" #: src/main.c:170 msgid "Grig can not find some necessary data files.\n" msgstr "Grig n'arrive pas à trouver des fichiers de données nécessaires.\n" #: src/main.c:171 msgid "This usually means that your installation is incomplete.\n" msgstr "Cela signifie habituellement que votre installation est incomplète.\n" #: src/main.c:172 src/main.c:350 msgid "Sorry... but I can not continue..." msgstr "Désolé... mais je ne peux pas continuer..." #: src/main.c:348 msgid "Grig configuration check failed!\n" msgstr "Échec lors de la vérification de la configuration Grig !\n" #: src/main.c:349 msgid "This usually means that your configuration is broken.\n" msgstr "Cela signifie généralement que votre configuration est cassée.\n" #: src/main.c:352 msgid "Proposed solutions:\n" msgstr "Solutions proposées :\n" #: src/main.c:439 #, c-format msgid "GRIG: %s %s" msgstr "GRIG : %s %s" #: src/main.c:484 #, c-format msgid "" "Received signal %d\n" "Trying clean exit..." msgstr "" "Réception du signal %d\n" "Tentative de sortie propre..." #: src/main.c:560 msgid "" "Usage: grig [OPTION]...\n" "\n" msgstr "" "Utilisation : grig [OPTION]...\n" "\n" #: src/main.c:561 msgid " -m, --model=ID select radio model number; see --list\n" msgstr "" " -m, --model=ID sélectionner le numéro de modèle de radio ; " "voir --list\n" #: src/main.c:563 msgid " -r, --rig-file=DEVICE set device of the radio, eg. /dev/ttyS0\n" msgstr "" " -r, --rig-file=DEVICE sélectionner le fichier de périphérique de la " "radio, par exemple /dev/ttyS0\n" #: src/main.c:565 msgid " -s, --speed=BAUD set transfer rate (serial port only)\n" msgstr "" " -s, --speed=BAUD définir la vitesse de transfert (port série " "uniquement)\n" #: src/main.c:567 msgid " -c, --civaddr=ID set CI-V address (decimal, ICOM only)\n" msgstr "" " -c, --civaddr=ID définir l'adresse CI-V (décimal, ICOM " "seulement)\n" #: src/main.c:569 msgid "" " -C, --set-conf=param=val set config parameter (same as in rigctl)\n" msgstr "" " -C, --set-conf=param=val définir un paramètre de configuration (comme " "dans rigctl)\n" #: src/main.c:571 msgid " -d, --debug=LEVEL set hamlib debug level (0..5)\n" msgstr "" " -d, --debug=NIVEAU définir le niveau de débogage de hamlib " "(0..5)\n" #: src/main.c:573 msgid " -D, --delay=val set delay between commands in msec\n" msgstr "" " -D, --delay=val définir le délai entre les commandes en ms\n" #: src/main.c:575 msgid " -n, --nothread start daemon without using threads\n" msgstr "" " -n, --nothread démarrer le démon sans utiliser de threads\n" #: src/main.c:577 msgid " -l, --list list supported radios and exit\n" msgstr "" " -l, --list énumérer les radios prises en charge et " "quitter\n" #: src/main.c:579 msgid " -p, --enable-ptt enable PTT button\n" msgstr " -p, --enable-ptt activer le bouton PPP\n" #: src/main.c:581 msgid " -P, --enable-pwr enable POWER button\n" msgstr " -P, --enable-pwr activer le bouton MARCHE\n" #: src/main.c:583 msgid " -h, --help show this help message and exit\n" msgstr " -h, --help afficher ce message d'aide et quitter\n" #: src/main.c:585 msgid " -v, --version show version information and exit\n" msgstr "" " -v, --version afficher l'information sur la version et " "quitter\n" #: src/main.c:588 msgid "Example:" msgstr "Exemple :" #: src/main.c:590 msgid "" "Start grig using YAESU FT-990 connected to the first serial port, using 4800 " "baud and debug level set to warning:" msgstr "" "Démarrer grig en utilisant le YAESU FT-990 connecté au premier port série, à " "4800 bauds et avec un niveau de débogage fixé à avertissements :" #: src/main.c:596 msgid "or if you prefer the long options:" msgstr "ou si vous préférez les options longues :" #: src/main.c:601 msgid "It is usually enough to specify the model ID and the DEVICE." msgstr "Il est généralement suffisant de spécifier l'ID du modèle et le PORT" #: src/main.c:604 msgid "" "If you start grig without any options it will use the Dummy backend and set " "the debug level to RIG_DEBUG_NONE. If you don't specify the transfer rate " "for the serial port, the default value will be used by the backend and even " "if you specify a value, it can be overridden by the backend." msgstr "" "Si vous démarrez grig sans aucune option, il utilisera le backend Dummy et " "le niveau de débogage sera RIG_DEBUG_NONE. Si vous ne spécifiez pas la " "vitesse du port série, la valeur pas défaut sera utilisée par le moteur ; et " "même si vous spécifiez une valeur, elle peut être ignorée par le moteur." #: src/main.c:614 msgid "Debug levels:" msgstr "Niveaux de débogage :" #: src/main.c:616 msgid " 0 No debug, keep quiet.\n" msgstr " 0 Pas de débogage, mode silencieux.\n" #: src/main.c:617 msgid " 1 Serious bug.\n" msgstr " 1 Bogue sérieux.\n" #: src/main.c:618 msgid " 2 Error case (e.g. protocol, memory allocation).\n" msgstr " 2 Cas d'erreur (p.ex. protocole, allocation mémoire).\n" #: src/main.c:619 msgid " 3 Warnings.\n" msgstr " 3 Avertissements.\n" #: src/main.c:620 msgid " 4 Verbose information.\n" msgstr " 4 Bavard.\n" #: src/main.c:621 msgid " 5 Trace.\n" msgstr " 5 Trace.\n" #: src/main.c:633 #, c-format msgid "grig %s\n" msgstr "grig %s\n" #: src/main.c:634 msgid "Graphical User Interface for the Hamradio Control Libraries." msgstr "" "Interface utilisateur graphique pour les bibliothèques de contrôle " "radioamateur." #: src/main.c:637 msgid "Copyright (C) 2001-2007 Alexandru Csete." msgstr "Copyright (C) 2001-2007 Alexandru Csete." #: src/main.c:639 msgid "This is free software; see the source for copying conditions. " msgstr "" "Ceci est un logiciel libre ; voir les sources pour les conditions de copie. " #: src/main.c:641 msgid "" "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A " "PARTICULAR PURPOSE." msgstr "" #: src/main.c:687 msgid " ID Manufacturer Model Ver. Status\n" msgstr "" #: src/rig-daemon.c:397 msgid "No error" msgstr "Aucune erreur" #: src/rig-daemon.c:398 msgid "Invalid parameter" msgstr "Paramètre non valide" #: src/rig-daemon.c:399 msgid "Invalid configuration" msgstr "Configuration non valide" #: src/rig-daemon.c:400 msgid "Memory shortage" msgstr "Mémoire insuffisante" #: src/rig-daemon.c:401 msgid "Function not implemented" msgstr "Fonction non implémentée" #: src/rig-daemon.c:402 msgid "Communication timed out" msgstr "Délai d'attente de communication expiré" #: src/rig-daemon.c:403 msgid "I/O error" msgstr "Erreur E/S" #: src/rig-daemon.c:404 msgid "Internal Hamlib error :-(" msgstr "Erreur interne Hamlib :-(" #: src/rig-daemon.c:405 msgid "Protocol error" msgstr "Erreur de protocole" #: src/rig-daemon.c:406 msgid "Command rejected" msgstr "Commande refusée" #: src/rig-daemon.c:407 msgid "Command performed, but arg truncated" msgstr "Commande exécutée, mais argument tronqué" #: src/rig-daemon.c:408 msgid "Function not available" msgstr "Fonction non disponible" #: src/rig-daemon.c:409 msgid "VFO not targetable" msgstr "" #: src/rig-daemon.c:410 msgid "BUS error" msgstr "Erreur de bus" #: src/rig-daemon.c:411 msgid "Collision on the bus" msgstr "Collision sur le bus" #: src/rig-daemon.c:412 msgid "NULL RIG handle or invalid pointer param" msgstr "" #: src/rig-daemon.c:413 msgid "Invalid VFO" msgstr "VFO non valide" #: src/rig-daemon.c:414 msgid "Argument out of domain" msgstr "Argument hors du domaine" #: src/rig-daemon.c:481 #, c-format msgid "%s entered" msgstr "%s saisi" #: src/rig-daemon.c:523 #, c-format msgid "%s: Initializing rig (id=%d)" msgstr "%s : initialisation rig (id=%d)" #: src/rig-daemon.c:532 #, c-format msgid "%s: Init failed; Hamlib returned NULL!" msgstr "%s : échec de l'initialisation ; Hamlib a renvoyé NULL !" #: src/rig-daemon.c:566 #, c-format msgid "%s: Setting conf param (%s,%s)..." msgstr "%s : configuration du paramètre (%s,%s)..." #: src/rig-daemon.c:575 #, c-format msgid "%s: Set conf OK" msgstr "%s : configuration OK" #: src/rig-daemon.c:580 #, c-format msgid "%s: Set conf failed (%d)" msgstr "%s : échec de la configuration (%d)" #: src/rig-daemon.c:600 #, c-format msgid "%s: Failed to open rig port %s: %s (permissions?)" msgstr "%s : échec de l'ouverture du port du rig %s : %s (permissions ?)" #: src/rig-daemon.c:611 #, c-format msgid "%s: Init successfull, executing post-init" msgstr "%s : succès de l'initialisation, exécution post-init" #: src/rig-daemon.c:618 #, c-format msgid "%s: Starting rig daemon" msgstr "%s : démarage du démon rig" #: src/rig-daemon.c:637 #, c-format msgid "%s: Daemon timeout started, ID: %d" msgstr "" #: src/rig-daemon.c:658 #, c-format msgid "%s: Failed to start daemon thread" msgstr "" #: src/rig-daemon.c:661 #, c-format msgid "%s: Error %d: %s" msgstr "%s : erreur %d : %s" #: src/rig-daemon.c:671 #, c-format msgid "%s: Daemon thread started" msgstr "" #: src/rig-daemon.c:697 #, c-format msgid "%s: Sending stop signal to rig daemon" msgstr "" #: src/rig-daemon.c:731 #, c-format msgid "%s: Cleaning up rig" msgstr "" #: src/rig-daemon.c:803 #, c-format msgid "%s: GET bits: %d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" msgstr "" #: src/rig-daemon.c:826 #, c-format msgid "%s: SET bits: %d%d%d%d%d%d%d%d%d%d%d%d%dXXX" msgstr "" #: src/rig-daemon.c:880 #, c-format msgid "%s started." msgstr "%s démarré." #: src/rig-daemon.c:978 #, c-format msgid "%s stopped" msgstr "%s arrêté" #: src/rig-daemon.c:1024 #, c-format msgid "%s called." msgstr "%s appelé." #: src/rig-daemon.c:1159 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FREQ_1:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_GET_FREQ_1 :\n" "%s" #: src/rig-daemon.c:1186 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FREQ_1:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_SET_FREQ_1 :\n" "%s" #: src/rig-daemon.c:1243 src/rig-daemon.c:1311 #, c-format msgid "%s: I can't figure out available VFOs (got %d)" msgstr "" #: src/rig-daemon.c:1256 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FREQ_2:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_GET_FREQ_2 :\n" "%s" #: src/rig-daemon.c:1324 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FREQ_2:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_SET_FREQ_2 :\n" "%s" #: src/rig-daemon.c:1353 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_RIT:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_GET_RIT :\n" "%s" #: src/rig-daemon.c:1380 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_RIT:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_SET_RIT :\n" "%s" #: src/rig-daemon.c:1409 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_XIT:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_GET_XIT :\n" "%s" #: src/rig-daemon.c:1436 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_XIT:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_SET_XIT :\n" "%s" #: src/rig-daemon.c:1465 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VFO:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_GET_VFO :\n" "%s" #: src/rig-daemon.c:1492 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VFO:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_SET_VFO :\n" "%s" #: src/rig-daemon.c:1521 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PSTAT:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_GET_PSTAT :\n" "%s" #: src/rig-daemon.c:1548 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PSTAT:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_SET_PSTAT :\n" "%s" #: src/rig-daemon.c:1577 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PTT:\n" "%s" msgstr "" "%s : échec de l'exécution de RIG_CMD_GET_PTT :\n" "%s" #: src/rig-daemon.c:1604 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PTT:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_PTT:\n" "%s" #: src/rig-daemon.c:1634 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_MODE:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_MODE:\n" "%s" #: src/rig-daemon.c:1685 src/rig-daemon-check.c:409 #, c-format msgid "%s: Found frequency range for mode %d" msgstr "" #: src/rig-daemon.c:1688 src/rig-daemon-check.c:412 #, c-format msgid "%s: %.0f...(%.0f)...%.0f kHz" msgstr "%s : %.0f...(%.0f)...%.0f kHz" #: src/rig-daemon.c:1707 #, c-format msgid "%s: Can not find frequency range for this mode (%d)!Bug in backend?" msgstr "" #: src/rig-daemon.c:1780 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_MODE:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_MODE:\n" "%s" #: src/rig-daemon.c:1814 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_AGC:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_AGC:\n" "%s" #: src/rig-daemon.c:1844 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_AGC:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_AGC:\n" "%s" #: src/rig-daemon.c:1872 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ATT:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_ATT:\n" "%s" #: src/rig-daemon.c:1900 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ATT:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_ATT:\n" "%s" #: src/rig-daemon.c:1928 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PREAMP:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_PREAMP:\n" "%s" #: src/rig-daemon.c:1958 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PREAMP:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_PREAMP:\n" "%s" #: src/rig-daemon.c:1986 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_STRENGTH:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_STRENGTH:\n" "%s" #: src/rig-daemon.c:2015 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_POWER:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_POWER:\n" "%s" #: src/rig-daemon.c:2043 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_POWER:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_POWER:\n" "%s" #: src/rig-daemon.c:2070 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SWR:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_SWR:\n" "%s" #: src/rig-daemon.c:2097 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ALC:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_ALC:\n" "%s" #: src/rig-daemon.c:2126 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ALC:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_ALC:\n" "%s" #: src/rig-daemon.c:2151 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_LOCK:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_LOCK:\n" "%s" #: src/rig-daemon.c:2178 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_LOCK:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_LOCK:\n" "%s" #: src/rig-daemon.c:2202 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_TOGGLE:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_VFO_TOGGLE:\n" "%s" #: src/rig-daemon.c:2225 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_COPY:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_VFO_COPY:\n" "%s" #: src/rig-daemon.c:2248 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_XCHG:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_VFO_XCHG:\n" "%s" #: src/rig-daemon.c:2270 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_SPLIT:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_SPLIT:\n" "%s" #: src/rig-daemon.c:2291 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SPLIT:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_SPLIT:\n" "%s" #: src/rig-daemon.c:2316 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_AF:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_AF:\n" "%s" #: src/rig-daemon.c:2341 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_AF:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_AF:\n" "%s" #: src/rig-daemon.c:2367 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_RF:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_RF:\n" "%s" #: src/rig-daemon.c:2392 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_RF:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_RF:\n" "%s" #: src/rig-daemon.c:2418 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_SQL:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_SQL:\n" "%s" #: src/rig-daemon.c:2443 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SQL:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_SQL:\n" "%s" #: src/rig-daemon.c:2469 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_IFS:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_IFS:\n" "%s" #: src/rig-daemon.c:2494 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_IFS:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_IFS:\n" "%s" #: src/rig-daemon.c:2520 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_APF:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_APF:\n" "%s" #: src/rig-daemon.c:2545 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_APF:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_APF:\n" "%s" #: src/rig-daemon.c:2571 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_NR:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_NR:\n" "%s" #: src/rig-daemon.c:2596 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_NR:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_NR:\n" "%s" #: src/rig-daemon.c:2622 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_NOTCH:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_NOTCH:\n" "%s" #: src/rig-daemon.c:2647 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_NOTCH:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_NOTCH:\n" "%s" #: src/rig-daemon.c:2673 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PBT_IN:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_PBT_IN:\n" "%s" #: src/rig-daemon.c:2698 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PBT_IN:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_PBT_IN:\n" "%s" #: src/rig-daemon.c:2724 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PBT_OUT:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_PBT_OUT:\n" "%s" #: src/rig-daemon.c:2749 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PBT_OUT:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_PBT_OUT:\n" "%s" #: src/rig-daemon.c:2775 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_CW_PITCH:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_CW_PITCH:\n" "%s" #: src/rig-daemon.c:2800 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_CW_PITCH:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_CW_PITCH:\n" "%s" #: src/rig-daemon.c:2826 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_KEYSPD:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_KEYSPD:\n" "%s" #: src/rig-daemon.c:2851 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_KEYSPD:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_KEYSPD:\n" "%s" #: src/rig-daemon.c:2877 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_BKINDEL:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_BKINDEL:\n" "%s" #: src/rig-daemon.c:2902 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_BKINDEL:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_BKINDEL:\n" "%s" #: src/rig-daemon.c:2928 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_BALANCE:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_BALANCE:\n" "%s" #: src/rig-daemon.c:2953 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_BALANCE:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_BALANCE:\n" "%s" #: src/rig-daemon.c:2979 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VOXDEL:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_VOXDEL:\n" "%s" #: src/rig-daemon.c:3004 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VOXDEL:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_VOXDEL:\n" "%s" #: src/rig-daemon.c:3030 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VOXGAIN:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_VOXGAIN:\n" "%s" #: src/rig-daemon.c:3055 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VOXGAIN:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_VOXGAIN:\n" "%s" #: src/rig-daemon.c:3081 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ANTIVOX:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_ANTIVOX:\n" "%s" #: src/rig-daemon.c:3106 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ANTIVOX:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_ANTIVOX:\n" "%s" #: src/rig-daemon.c:3132 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_MICGAIN:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_MICGAIN:\n" "%s" #: src/rig-daemon.c:3157 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_MICGAIN:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_MICGAIN:\n" "%s" #: src/rig-daemon.c:3184 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_COMP:\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_COMP:\n" "%s" #: src/rig-daemon.c:3210 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FUNC(%s):\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_SET_FUNC(%s):\n" "%s" #: src/rig-daemon.c:3240 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FUNC(%s):\n" "%s" msgstr "" "%s: Échec de l'exécution de RIG_CMD_GET_FUNC(%s):\n" "%s" #: src/rig-daemon.c:3259 #, c-format msgid "%s: Unknown command %d (grig bug)" msgstr "%s: Commande inconnue %d (bogue grig)" #: src/rig-daemon.c:3352 #, c-format msgid "%s: %d" msgstr "%s : %d" #: src/rig-daemon-check.c:157 #, c-format msgid "%s: Can not find VFO list for this backend! Bug in backend?" msgstr "" #: src/rig-daemon-check.c:430 #, c-format msgid "%s: Can not find frequency range for this mode (%d)! Bug in backend?" msgstr "" #: src/rig-daemon-check.c:518 #, c-format msgid "%s: Could not get RF power" msgstr "" #: src/rig-daemon-check.c:533 #, c-format msgid "%s: Maximum RF power is %.3f watts" msgstr "" #: src/rig-daemon-check.c:545 #, c-format msgid "%s: Could not get signal strength" msgstr "" #: src/rig-daemon-check.c:560 #, c-format msgid "%s: Could not get SWR" msgstr "" #: src/rig-daemon-check.c:573 #, c-format msgid "%s: Could not get ALC" msgstr "" #: src/rig-daemon-check.c:586 #, c-format msgid "%s: Could not get AGC" msgstr "" #: src/rig-daemon-check.c:599 #, c-format msgid "%s: Could not get ATT" msgstr "" #: src/rig-daemon-check.c:612 #, c-format msgid "%s: Could not get PREAMP" msgstr "" #: src/rig-daemon-check.c:625 #, c-format msgid "%s: Could not get AF" msgstr "" #: src/rig-daemon-check.c:638 #, c-format msgid "%s: Could not get RF" msgstr "" #: src/rig-daemon-check.c:651 #, c-format msgid "%s: Could not get SQL" msgstr "" #: src/rig-daemon-check.c:666 #, c-format msgid "%s: Could not get IF shift" msgstr "" #: src/rig-daemon-check.c:679 #, c-format msgid "%s: Could not get APF" msgstr "" #: src/rig-daemon-check.c:692 #, c-format msgid "%s: Could not get NR" msgstr "" #: src/rig-daemon-check.c:705 #, c-format msgid "%s: Could not get NOTCH" msgstr "" #: src/rig-daemon-check.c:718 #, c-format msgid "%s: Could not get PBT IN" msgstr "" #: src/rig-daemon-check.c:731 #, c-format msgid "%s: Could not get PBT OUT" msgstr "" #: src/rig-daemon-check.c:744 #, c-format msgid "%s: Could not get CW pitch" msgstr "" #: src/rig-daemon-check.c:757 #, c-format msgid "%s: Could not get CW speed" msgstr "" #: src/rig-daemon-check.c:770 #, c-format msgid "%s: Could not get break-in delay" msgstr "" #: src/rig-daemon-check.c:783 #, c-format msgid "%s: Could not get balance" msgstr "" #: src/rig-daemon-check.c:796 #, c-format msgid "%s: Could not get VOX delay" msgstr "" #: src/rig-daemon-check.c:809 #, c-format msgid "%s: Could not get VOX gain" msgstr "" #: src/rig-daemon-check.c:822 #, c-format msgid "%s: Could not get anti-vox" msgstr "" #: src/rig-daemon-check.c:835 #, c-format msgid "%s: Could not get compression level" msgstr "%s : impossible d'obtenir le niveau de compression" #: src/rig-daemon-check.c:848 #, c-format msgid "%s: Could not get MIC gain" msgstr "" #: src/rig-daemon-check.c:954 #, c-format msgid "%s: Could not get LOCK status" msgstr "" #: src/rig-daemon-check.c:969 #, c-format msgid "%s: Could not get %s status" msgstr "" #: src/rig-data.c:352 src/rig-data.c:544 #, c-format msgid "%s: Invalid target: %d\n" msgstr "" #: src/rig-gui-buttons.c:148 src/rig-gui-smeter.c:75 msgid "Power" msgstr "" #: src/rig-gui-buttons.c:149 msgid "Power status" msgstr "Indicateur de mise en marche" #: src/rig-gui-buttons.c:193 msgid "PTT" msgstr "PPP" #: src/rig-gui-buttons.c:194 msgid "Push to talk" msgstr "Presser pour parler" #: src/rig-gui-buttons.c:238 msgid "Lock" msgstr "Verrouiller" #: src/rig-gui-buttons.c:239 msgid "Lock tuning dial" msgstr "" #: src/rig-gui-buttons.c:284 msgid "ATT OFF" msgstr "" #: src/rig-gui-buttons.c:307 msgid "Attenuator level" msgstr "Niveau atténuateur" #: src/rig-gui-buttons.c:344 msgid "PREAMP OFF" msgstr "PRÉAMP OFF" #: src/rig-gui-buttons.c:367 msgid "Preamp level" msgstr "Niveau préampli" #: src/rig-gui-ctrl2.c:86 src/rig-gui-info-data.h:172 msgid "AM" msgstr "AM" #: src/rig-gui-ctrl2.c:87 src/rig-gui-info-data.h:165 #: src/rig-gui-info-data.h:173 msgid "CW" msgstr "CW" #: src/rig-gui-ctrl2.c:88 src/rig-gui-info-data.h:174 msgid "USB" msgstr "USB" #: src/rig-gui-ctrl2.c:89 src/rig-gui-info-data.h:175 msgid "LSB" msgstr "LSB" #: src/rig-gui-ctrl2.c:90 src/rig-gui-info-data.h:176 msgid "RTTY" msgstr "RTTY" #: src/rig-gui-ctrl2.c:91 msgid "FM Narrow" msgstr "FM Étroit" #: src/rig-gui-ctrl2.c:92 msgid "FM Wide" msgstr "FM Large" #: src/rig-gui-ctrl2.c:93 msgid "CW Rev" msgstr "" #: src/rig-gui-ctrl2.c:94 msgid "RTTY Rev" msgstr "" #: src/rig-gui-ctrl2.c:95 msgid "AM Synch" msgstr "" #: src/rig-gui-ctrl2.c:96 msgid "Pkt (LSB)" msgstr "Pkt (LSB)" #: src/rig-gui-ctrl2.c:97 msgid "Pkt (USB)" msgstr "Pkt (USB)" #: src/rig-gui-ctrl2.c:98 msgid "Pkt (FM)" msgstr "Pkt (FM)" #: src/rig-gui-ctrl2.c:99 msgid "ECUSB" msgstr "ECUSB" #: src/rig-gui-ctrl2.c:100 msgid "ECLSB" msgstr "ECLSB" #: src/rig-gui-ctrl2.c:101 src/rig-gui-info-data.h:187 msgid "FAX" msgstr "FAX" #: src/rig-gui-ctrl2.c:207 msgid "AGC OFF" msgstr "Hors CAG" #: src/rig-gui-ctrl2.c:208 msgid "Super Fast" msgstr "Super Rapide" #: src/rig-gui-ctrl2.c:209 msgid "Fast" msgstr "Rapide" #: src/rig-gui-ctrl2.c:210 msgid "Medium" msgstr "Moyen" #: src/rig-gui-ctrl2.c:211 msgid "Slow" msgstr "Lent" #: src/rig-gui-ctrl2.c:212 msgid "Auto" msgstr "" #: src/rig-gui-ctrl2.c:214 msgid "Automatic Gain Control Level" msgstr "Niveau de Contrôle Automatique de Gain" #: src/rig-gui-ctrl2.c:320 msgid "Communication mode" msgstr "Mode de communication" #: src/rig-gui-ctrl2.c:359 msgid "Wide" msgstr "Large" #: src/rig-gui-ctrl2.c:360 msgid "Normal" msgstr "Normal" #: src/rig-gui-ctrl2.c:361 msgid "Narrow" msgstr "Étroit" #: src/rig-gui-ctrl2.c:362 msgid "[User]" msgstr "[Utilisateur]" #: src/rig-gui-ctrl2.c:384 msgid "Passband Width" msgstr "Largeur du filtre passe-bande" #: src/rig-gui-ctrl2.c:443 #, c-format msgid "ANT %d" msgstr "" #: src/rig-gui-ctrl2.c:460 msgid "Antenna Port" msgstr "Port Antenne" #: src/rig-gui-func.c:82 #, c-format msgid "%s: FUNC window already visible." msgstr "" #: src/rig-gui-func.c:93 #, c-format msgid "%s (Special Functions)" msgstr "%s (Fonctions Spéciales)" #: src/rig-gui-func.c:160 #, c-format msgid "%s: FUNC window is not visible." msgstr "" #: src/rig-gui-func.c:185 src/rig-gui-rx.c:242 src/rig-gui-tx.c:238 #, c-format msgid "%s:%d: Invalid level %d" msgstr "" #: src/rig-gui-func.c:227 src/rig-gui-rx.c:507 src/rig-gui-tx.c:463 msgid "Rig has no support." msgstr "" #: src/rig-gui-info.c:115 msgid "Radio Info" msgstr "Info Radio" #: src/rig-gui-info.c:250 msgid "RIT:" msgstr "RIT :" #: src/rig-gui-info.c:270 msgid "XIT:" msgstr "XIT :" #: src/rig-gui-info.c:289 msgid "IF-SHIFT:" msgstr "IF-SHIFT :" #: src/rig-gui-info.c:308 msgid "Max. Offsets" msgstr "" #: src/rig-gui-info.c:346 msgid "LEVEL" msgstr "NIVEAU" #: src/rig-gui-info.c:356 src/rig-gui-info.c:987 msgid "READ" msgstr "LIRE" #: src/rig-gui-info.c:364 src/rig-gui-info.c:995 msgid "WRITE" msgstr "ÉCRIRE" #: src/rig-gui-info.c:392 src/rig-gui-info.c:401 src/rig-gui-info.c:1023 #: src/rig-gui-info.c:1032 src/rig-gui-info.c:1110 msgid "-" msgstr "-" #: src/rig-gui-info.c:397 src/rig-gui-info.c:406 src/rig-gui-info.c:1028 #: src/rig-gui-info.c:1037 src/rig-gui-info.c:1115 msgid "X" msgstr "X" #: src/rig-gui-info.c:442 msgid "Port Type:" msgstr "Type Port:" #: src/rig-gui-info.c:460 src/rig-gui-info.c:489 src/rig-gui-info.c:518 #: src/rig-gui-info.c:632 src/rig-gui-info.c:667 msgid "Unknown" msgstr "Inconnu" #: src/rig-gui-info.c:471 msgid "DCD Type:" msgstr "Type DCD:" #: src/rig-gui-info.c:500 msgid "PTT Type:" msgstr "Type PTT" #: src/rig-gui-info.c:529 msgid "Serial Speed:" msgstr "Vitesse Série:" #: src/rig-gui-info.c:540 #, c-format msgid "%d..%d baud" msgstr "%d..%d baud" #: src/rig-gui-info.c:547 src/rig-gui-info.c:574 src/rig-gui-info.c:601 #: src/rig-gui-info.c:636 src/rig-gui-info.c:671 src/rig-gui-info-data.h:67 #: src/rig-gui-info-data.h:68 src/rig-gui-info-data.h:69 #: src/rig-gui-info-data.h:103 msgid "N/A" msgstr "N/A" #: src/rig-gui-info.c:558 msgid "Data bits:" msgstr "Bits données:" #: src/rig-gui-info.c:585 msgid "Stop bits:" msgstr "Bits arrêt:" #: src/rig-gui-info.c:612 msgid "Parity:" msgstr "Parité:" #: src/rig-gui-info.c:647 msgid "Handshake:" msgstr "Ctrl de flux:" #: src/rig-gui-info.c:683 msgid "Interface" msgstr "Interface" #: src/rig-gui-info.c:720 msgid "STEP" msgstr "PAS" #: src/rig-gui-info.c:730 msgid "MODES" msgstr "MODES" #: src/rig-gui-info.c:845 msgid "PREAMP:" msgstr "PRÉAMP" #: src/rig-gui-info.c:893 msgid "ATT:" msgstr "ATT ::" #: src/rig-gui-info.c:939 msgid "Front End" msgstr "" #: src/rig-gui-info.c:977 msgid "FUNCTION" msgstr "FONCTION" #: src/rig-gui-info.c:1071 msgid "VFO OP" msgstr "" #: src/rig-gui-info.c:1081 msgid "SET" msgstr "" #: src/rig-gui-info-data.h:44 msgid "PREAMP" msgstr "PRÉAMP" #: src/rig-gui-info-data.h:45 msgid "ATT" msgstr "ATT" #: src/rig-gui-info-data.h:46 src/rig-gui-info-data.h:82 msgid "VOX" msgstr "VOX" #: src/rig-gui-info-data.h:47 msgid "AF" msgstr "AF" #: src/rig-gui-info-data.h:48 msgid "RF" msgstr "RF" #: src/rig-gui-info-data.h:49 src/rig-gui-info-data.h:99 msgid "SQL" msgstr "SQL" #: src/rig-gui-info-data.h:50 msgid "IF" msgstr "IF" #: src/rig-gui-info-data.h:51 src/rig-gui-info-data.h:90 src/rig-gui-rx.c:412 msgid "APF" msgstr "APF" #: src/rig-gui-info-data.h:52 src/rig-gui-info-data.h:88 msgid "NR" msgstr "NR" #: src/rig-gui-info-data.h:53 msgid "PBT_IN" msgstr "PBT_IN" #: src/rig-gui-info-data.h:54 msgid "PBT_OUT" msgstr "PBT_OUT" #: src/rig-gui-info-data.h:55 msgid "CWPITCH" msgstr "CWPITCH" #: src/rig-gui-info-data.h:56 msgid "RFPOWER" msgstr "RFPOWER" #: src/rig-gui-info-data.h:57 msgid "MICGAIN" msgstr "MICGAIN" #: src/rig-gui-info-data.h:58 msgid "KEYSPD" msgstr "KEYSPD" #: src/rig-gui-info-data.h:59 msgid "NOTCHF" msgstr "NOTCHF" #: src/rig-gui-info-data.h:60 msgid "COMP" msgstr "COMP" #: src/rig-gui-info-data.h:61 msgid "AGC" msgstr "CAG" #: src/rig-gui-info-data.h:62 msgid "BKINDL" msgstr "BKINDL" #: src/rig-gui-info-data.h:63 msgid "BALANCE" msgstr "BALANCE" #: src/rig-gui-info-data.h:64 msgid "METER" msgstr "METER" #: src/rig-gui-info-data.h:65 msgid "VOXGAIN" msgstr "VOXGAIN" #: src/rig-gui-info-data.h:66 msgid "ANTIVOX" msgstr "ANTIVOX" #: src/rig-gui-info-data.h:70 msgid "RAWSTR" msgstr "RAWSTR" #: src/rig-gui-info-data.h:71 msgid "SQLSTAT" msgstr "SQLSTAT" #: src/rig-gui-info-data.h:72 src/rig-gui-smeter.c:76 msgid "SWR" msgstr "SWR" #: src/rig-gui-info-data.h:73 src/rig-gui-smeter.c:77 src/rig-gui-tx.c:347 msgid "ALC" msgstr "ALC" #: src/rig-gui-info-data.h:74 msgid "STRENGTH" msgstr "" #: src/rig-gui-info-data.h:79 msgid "FAST AGC" msgstr "" #: src/rig-gui-info-data.h:80 msgid "NB" msgstr "NB" #: src/rig-gui-info-data.h:81 src/rig-gui-tx.c:388 msgid "COMPR" msgstr "COMPR" #: src/rig-gui-info-data.h:83 msgid "TONE" msgstr "TONE" #: src/rig-gui-info-data.h:84 msgid "CTCSS" msgstr "CTCSS" #: src/rig-gui-info-data.h:85 msgid "SEMI BK" msgstr "" #: src/rig-gui-info-data.h:86 msgid "FULL BK" msgstr "" #: src/rig-gui-info-data.h:87 msgid "ANF" msgstr "ANF" #: src/rig-gui-info-data.h:89 msgid "AIP" msgstr "AIP" #: src/rig-gui-info-data.h:91 msgid "MON" msgstr "" #: src/rig-gui-info-data.h:92 msgid "MAN NOTCH" msgstr "" #: src/rig-gui-info-data.h:93 msgid "RNF" msgstr "RNF" #: src/rig-gui-info-data.h:94 msgid "AUTO RO" msgstr "" #: src/rig-gui-info-data.h:95 msgid "LOCK" msgstr "" #: src/rig-gui-info-data.h:96 msgid "MUTE" msgstr "MUTE" #: src/rig-gui-info-data.h:97 msgid "VOICE SCAN" msgstr "VOICE SCAN" #: src/rig-gui-info-data.h:98 msgid "REV TRX" msgstr "REV TRX" #: src/rig-gui-info-data.h:100 msgid "ABM" msgstr "" #: src/rig-gui-info-data.h:101 msgid "BEAT CANC" msgstr "" #: src/rig-gui-info-data.h:102 msgid "MAN BC" msgstr "" #: src/rig-gui-info-data.h:104 msgid "AFC" msgstr "AFC" #: src/rig-gui-info-data.h:105 msgid "SATMODE" msgstr "SATMODE" #: src/rig-gui-info-data.h:106 msgid "SCOPE" msgstr "SCOPE" #: src/rig-gui-info-data.h:107 msgid "RESUME" msgstr "RESUME" #: src/rig-gui-info-data.h:108 msgid "TBURST" msgstr "TBURST" #: src/rig-gui-info-data.h:109 msgid "TUNER" msgstr "TUNER" #: src/rig-gui-info-data.h:114 src/rig-gui-info-data.h:123 #: src/rig-gui-info-data.h:134 src/rig-gui-info-data.h:148 #: src/rig-gui-info-data.h:155 src/rig-gui-smeter.c:74 msgid "None" msgstr "Aucun" #: src/rig-gui-info-data.h:115 src/rig-gui-info-data.h:124 msgid "Legacy" msgstr "" #: src/rig-gui-info-data.h:116 msgid "SER_DTR" msgstr "" #: src/rig-gui-info-data.h:117 msgid "SER_RTS" msgstr "" #: src/rig-gui-info-data.h:118 src/rig-gui-info-data.h:128 msgid "PARPORT" msgstr "" #: src/rig-gui-info-data.h:125 msgid "SER_DSR" msgstr "" #: src/rig-gui-info-data.h:126 msgid "SER_CTS" msgstr "" #: src/rig-gui-info-data.h:127 msgid "SER_CAR" msgstr "" #: src/rig-gui-info-data.h:135 msgid "Serial" msgstr "Série" #: src/rig-gui-info-data.h:136 msgid "Network" msgstr "Réseau" #: src/rig-gui-info-data.h:137 msgid "Device" msgstr "Périphérique" #: src/rig-gui-info-data.h:138 msgid "Packet" msgstr "Paquet" #: src/rig-gui-info-data.h:139 msgid "DTMF" msgstr "DTMF" #: src/rig-gui-info-data.h:140 msgid "IrDA" msgstr "IrDA" #: src/rig-gui-info-data.h:141 msgid "RPC" msgstr "RPC" #: src/rig-gui-info-data.h:142 msgid "Parallel" msgstr "Parallèle" #: src/rig-gui-info-data.h:149 msgid "Odd" msgstr "Impaire" #: src/rig-gui-info-data.h:150 msgid "Even" msgstr "Pair" #: src/rig-gui-info-data.h:156 msgid "XONXOFF" msgstr "" #: src/rig-gui-info-data.h:157 msgid "Hardware" msgstr "Matériel" #: src/rig-gui-info-data.h:162 msgid "OFF" msgstr "Hors CAG" #: src/rig-gui-info-data.h:163 msgid "FREQ" msgstr "FRÉQ" #: src/rig-gui-info-data.h:164 msgid "RXMODE" msgstr "" #: src/rig-gui-info-data.h:166 msgid "EMG" msgstr "" #: src/rig-gui-info-data.h:167 msgid "JAP" msgstr "" #: src/rig-gui-info-data.h:177 msgid "FM" msgstr "FM" #: src/rig-gui-info-data.h:178 msgid "WFM" msgstr "" #: src/rig-gui-info-data.h:179 msgid "CWR" msgstr "CWR" #: src/rig-gui-info-data.h:180 msgid "RTTYR" msgstr "RTTYR" #: src/rig-gui-info-data.h:181 msgid "AMS" msgstr "AMS" #: src/rig-gui-info-data.h:182 msgid "PKTLSB" msgstr "" #: src/rig-gui-info-data.h:183 msgid "PKTUSB" msgstr "PKTUSB" #: src/rig-gui-info-data.h:184 msgid "PKTFM" msgstr "PKTFM" #: src/rig-gui-info-data.h:185 msgid "ECSSUSB" msgstr "ECSSUSB" #: src/rig-gui-info-data.h:186 msgid "ECSSLSB" msgstr "ECSSLSB" #: src/rig-gui-info-data.h:193 msgid "COPY A=B" msgstr "" #: src/rig-gui-info-data.h:194 msgid "XCHG A/B" msgstr "" #: src/rig-gui-info-data.h:195 msgid "VFO->MEM" msgstr "" #: src/rig-gui-info-data.h:196 msgid "MEM->VFO" msgstr "" #: src/rig-gui-info-data.h:197 msgid "MEMCLEAR" msgstr "" #: src/rig-gui-info-data.h:198 msgid "UP" msgstr "" #: src/rig-gui-info-data.h:199 msgid "DOWN" msgstr "" #: src/rig-gui-info-data.h:200 msgid "BAND UP" msgstr "" #: src/rig-gui-info-data.h:201 msgid "BAND DOWN" msgstr "" #: src/rig-gui-info-data.h:202 msgid "LEFT" msgstr "GAUCHE" #: src/rig-gui-info-data.h:203 msgid "RIGHT" msgstr "DROITE" #: src/rig-gui-info-data.h:204 msgid "TUNE" msgstr "" #: src/rig-gui-info-data.h:205 msgid "TOGGLE" msgstr "" #: src/rig-gui-keypad.c:289 msgid "ENT" msgstr "" #: src/rig-gui-keypad.c:291 msgid "Begin manual frequency entry mode" msgstr "Active le mode de saisie manuelle de la fréquence" #: src/rig-gui-keypad.c:301 msgid "CLR" msgstr "" #: src/rig-gui-keypad.c:303 msgid "Clear manual frequency entry mode" msgstr "Annule le mode de saisie manuelle de la fréquence" #: src/rig-gui-lcd.c:1396 msgid "kHz" msgstr "kHz" #: src/rig-gui-lcd.c:1421 msgid "RIT" msgstr "RIT" #: src/rig-gui-lcd.c:1472 msgid "VFO A" msgstr "VFO A" #: src/rig-gui-lcd.c:1476 msgid "VFO B" msgstr "VFO B" #: src/rig-gui-lcd.c:1480 msgid "VFO C" msgstr "VFO C" #: src/rig-gui-lcd.c:1484 msgid "MAIN VFO" msgstr "" #: src/rig-gui-lcd.c:1488 msgid "SUB VFO" msgstr "" #: src/rig-gui-lcd.c:1492 msgid "MEM" msgstr "MEM" #: src/rig-gui-lcd.c:1496 msgid "VFO ?" msgstr "" #: src/rig-gui-levels.c:52 msgid "Level Controls" msgstr "Contrôle Niveaux" #: src/rig-gui-levels.c:53 msgid "Show/hide level controls" msgstr "Affiche/cache les contrôles de niveaux" #: src/rig-gui-message-window.c:65 msgid "Time" msgstr "Heure" #: src/rig-gui-message-window.c:66 msgid "Source" msgstr "Source" #: src/rig-gui-message-window.c:67 msgid "Level" msgstr "Niveau" #: src/rig-gui-message-window.c:68 msgid "Message" msgstr "Message" #: src/rig-gui-message-window.c:79 msgid "BUG" msgstr "BOGUE" #: src/rig-gui-message-window.c:81 msgid "WARNING" msgstr "AVERTISSEMENT" #: src/rig-gui-message-window.c:82 msgid "DEBUG" msgstr "DÉBOGAGE" #: src/rig-gui-message-window.c:83 msgid "TRACE" msgstr "" #: src/rig-gui-message-window.c:162 msgid "Grig Message Window" msgstr "Fenêtre de Message Grig" #: src/rig-gui-message-window.c:407 msgid "Open Debug File" msgstr "Ouvrir un fichier de débogage" #: src/rig-gui-message-window.c:476 msgid "SYS" msgstr "" #: src/rig-gui-message-window.c:486 msgid "Log file seems corrupt" msgstr "Le fichier de log semble endommagé" #: src/rig-gui-message-window.c:509 #, c-format msgid "%s:%d: Error open debug log (%s)" msgstr "" #: src/rig-gui-message-window.c:681 msgid "Hamlib" msgstr "Hamlib" #: src/rig-gui-message-window.c:693 msgid "Other" msgstr "Autre" #: src/rig-gui-message-window.c:703 msgid "Bugs" msgstr "Bogues" #: src/rig-gui-message-window.c:709 msgid "Errors" msgstr "Erreurs" #: src/rig-gui-message-window.c:715 msgid "Warning" msgstr "Avertissement" #: src/rig-gui-message-window.c:721 msgid "Verbose" msgstr "Bavard" #: src/rig-gui-message-window.c:727 msgid "Trace" msgstr "Trace" #: src/rig-gui-message-window.c:740 msgid "Total" msgstr "Total" #: src/rig-gui-message-window.c:765 msgid " Summary " msgstr " Résumé " #: src/rig-gui-rx.c:97 #, c-format msgid "%s: RX window already visible." msgstr "" #: src/rig-gui-rx.c:108 #, c-format msgid "%s (RX Levels)" msgstr "%s (Niveaux RX)" #: src/rig-gui-rx.c:172 #, c-format msgid "%s: RX window is not visible." msgstr "" #: src/rig-gui-rx.c:284 msgid "AF Gain" msgstr "AF Gain" #: src/rig-gui-rx.c:304 msgid "RF Gain" msgstr "RF Gain" #: src/rig-gui-rx.c:331 msgid "IF Shift" msgstr "IF Shift" #: src/rig-gui-rx.c:351 msgid "CW Pitch" msgstr "CW Pitch" #: src/rig-gui-rx.c:371 msgid "PBT In" msgstr "PBT In" #: src/rig-gui-rx.c:391 msgid "PBT Out" msgstr "" #: src/rig-gui-rx.c:432 msgid "N.R." msgstr "N.R." #: src/rig-gui-rx.c:452 msgid "NOTCH" msgstr "" #: src/rig-gui-rx.c:472 msgid "Squelch" msgstr "Squelch" #: src/rig-gui-rx.c:492 msgid "Balance" msgstr "Balance" #: src/rig-gui-smeter.c:83 msgid "0..5" msgstr "0..5" #: src/rig-gui-smeter.c:84 msgid "0..10" msgstr "0..10" #: src/rig-gui-smeter.c:85 msgid "0..50" msgstr "0..50" #: src/rig-gui-smeter.c:86 msgid "0..100" msgstr "0..100" #: src/rig-gui-smeter.c:87 msgid "0..500" msgstr "0..500" #: src/rig-gui-smeter.c:430 msgid "Select TX mode for the meter" msgstr "Sélectionne le mode de mesure en émission" #: src/rig-gui-smeter.c:479 msgid "Select TX meter scale" msgstr "Sélectionne l'échelle de mesure en émission" #: src/rig-gui-tx.c:98 #, c-format msgid "%s: TX window already visible." msgstr "" #: src/rig-gui-tx.c:109 #, c-format msgid "%s (TX Levels)" msgstr "%s (Niveaux TX)" #: src/rig-gui-tx.c:176 #, c-format msgid "%s: TX window is not visible." msgstr "" #: src/rig-gui-tx.c:286 msgid "CW SPD" msgstr "" #: src/rig-gui-tx.c:306 msgid "BKIN DEL" msgstr "" #: src/rig-gui-tx.c:326 msgid "POWER" msgstr "" #: src/rig-gui-tx.c:368 msgid "MIC GAIN" msgstr "MIC GAIN" #: src/rig-gui-tx.c:408 msgid "VOX GAIN" msgstr "VOX GAIN" #: src/rig-gui-tx.c:428 msgid "VOX DEL" msgstr "" #: src/rig-gui-tx.c:448 msgid "ANTI VOX" msgstr "ANTI VOX" #: src/rig-gui-vfo.c:119 msgid "Main / Sub" msgstr "" #: src/rig-gui-vfo.c:120 msgid "Toggle active VFO" msgstr "" #: src/rig-gui-vfo.c:123 msgid "A / B" msgstr "A / B" #: src/rig-gui-vfo.c:124 msgid "Toggle between available VFOs" msgstr "" #: src/rig-gui-vfo.c:235 msgid "Main = Sub" msgstr "" #: src/rig-gui-vfo.c:236 msgid "Set Main VFO = Sub VFO" msgstr "" #: src/rig-gui-vfo.c:239 msgid "A = B" msgstr "A = B" #: src/rig-gui-vfo.c:240 msgid "Set VFO B = VFO A" msgstr "" #: src/rig-gui-vfo.c:304 msgid "Main«»Sub" msgstr "" #: src/rig-gui-vfo.c:305 msgid "Exchange Main and sub VFOs" msgstr "" #: src/rig-gui-vfo.c:308 msgid "A«»B" msgstr "A«»B" #: src/rig-gui-vfo.c:309 msgid "Exchange VFO A and B" msgstr "" #: src/rig-gui-vfo.c:370 msgid "Split" msgstr "" #: src/rig-gui-vfo.c:371 msgid "Toggle split mode operation" msgstr "" #: src/rig-gui-vfo.c:399 msgid "M / V" msgstr "" #: src/rig-gui-vfo.c:400 msgid "Toggle between memory and VFO" msgstr "" #: src/rig-selector.c:116 msgid "" "Connect to the selected radio.Grig will attempt to establish connection to " "the selected radio using the specified settings. If the connection is " "successful, the main application window will be loaded." msgstr "" #: src/rig-selector.c:125 msgid "Cancel radio selection. This will end grig." msgstr "" #: src/rig-selector.c:130 msgid "" "Add a new radio to the list.A new configuration window will be shown " "allowing you to select a radio and specify the connection settings." msgstr "" #: src/rig-selector.c:139 msgid "Delete the currently selected radio." msgstr "" #: src/rig-selector.c:145 msgid "Edit the settings for the currently selected radio." msgstr "" #: src/rig-selector.c:170 msgid "Select a Radio" msgstr "Sélectionnez une radio" #: src/rig-selector.c:230 msgid "Company" msgstr "Société" #: src/rig-selector.c:236 msgid "Model" msgstr "Modèle" #: src/rig-selector.c:242 msgid "Port" msgstr "Port" #: src/rig-selector.c:248 msgid "Speed" msgstr "Vitesse" #: src/rig-selector.c:254 msgid "CI-V" msgstr "" #: src/rig-selector.c:262 msgid "DTR" msgstr "DTR" #: src/rig-selector.c:270 msgid "RTS" msgstr "RTS" #: src/rig-selector.c:483 #, c-format msgid "%s:%s: Failed to delete %s" msgstr "" #: src/rig-selector.c:488 #, c-format msgid "%s:%s: Removed %s" msgstr "" #: src/rig-state.c:130 msgid "Load Rig State" msgstr "" #: src/rig-state.c:139 src/rig-state.c:262 msgid "Rig state files (*.rig)" msgstr "" #: src/rig-state.c:144 src/rig-state.c:267 msgid "All files" msgstr "Tous les fichiers" #: src/rig-state.c:164 #, c-format msgid "" "There was an error reading the settings from:\n" "\n" " %s\n" "\n" " Examine the log messages for further info." msgstr "" #: src/rig-state.c:182 #, c-format msgid "" "The selected file:\n" " %s\n" " does not exist or is not a regular file." msgstr "" #: src/rig-state.c:253 msgid "Save Rig State" msgstr "" #: src/rig-state.c:283 #, c-format msgid "" "%s: User selected new file:\n" "%s" msgstr "" #: src/rig-state.c:295 msgid "" "Selected file already exists.\n" "Overwrite file?" msgstr "" #: src/rig-state.c:313 src/rig-state.c:347 #, c-format msgid "" "There was an error saving the settings to:\n" "\n" " %s\n" "\n" " Examine the log messages for further info." msgstr "" #: src/rig-state.c:406 #, c-format msgid "%s: Error loading rig file (%s)" msgstr "" #: src/rig-state.c:419 #, c-format msgid "%s: Error reading rig id (%s)" msgstr "" #: src/rig-state.c:430 #, c-format msgid "" "%s: ID mismatch detected: state id is %d\n" "while current rig id is %d" msgstr "" #: src/rig-state.c:449 #, c-format msgid "%s: Applying settings (model=%d)" msgstr "" #: src/rig-state.c:579 #, c-format msgid "%s: RIG ID is invalid (%d)" msgstr "" #: src/rig-state.c:654 #, c-format msgid "%s: Error building state data (%s)" msgstr "" #: src/rig-state.c:665 #, c-format msgid "" "%s: Could not create data file (%s)\n" "%s" msgstr "" #: src/rig-state.c:682 #, c-format msgid "%s: Error writing config data (%s)" msgstr "" #: src/rig-state.c:689 #, c-format msgid "%s: Wrote only %d instead of %d chars" msgstr "" #: src/rig-state.c:695 #, c-format msgid "" "%s: Rig state saved successfully to\n" "%s." msgstr "" #: src/rig-state.c:724 #, c-format msgid "" "Selected rig state has been saved for model %d,\n" "while the current rig model is %d.\n" "Do you want to try to apply settings?" msgstr "" #: src/rig-state.c:771 src/rig-state.c:826 src/rig-state.c:869 #: src/rig-state.c:909 #, c-format msgid "" "%s:%d: Could nor read param %s::%s\n" "(%s)" msgstr "" #: src/rig-state.c:788 #, c-format msgid "" "%s:%d:\n" "FLOAT value out of range: %.2f\n" "Floats expected to be between 0.0 and 1.0" msgstr "" grig-GRIG-0_9_0/po/grig.pot000066400000000000000000001253111435534312400154410ustar00rootroot00000000000000# Grig: Gtk+ user interface for the Hamradio Control Libraries. # Copyright (C) 2009 Alexandru Csete # This file is distributed under the same license as the grig package. # Alexandru Csete , 2009 # Stephane Fillod , 2008 msgid "" msgstr "" "Project-Id-Version: grig 0.9.0\n" "Report-Msgid-Bugs-To: groundstation-developer@lists.sourcforge.net\n" "POT-Creation-Date: 2023-01-01 12:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/grig-about.c:58 msgid "" "Copyright (C) 2001-2009 Alexandru Csete OZ9AEC>\n" "\n" "Grig is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published\n" "by the Free Software Foundation; either version 2 of the License,\n" "or (at your option) any later version.\n" "\n" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU Library General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, you can find a copy on the FSF\n" "website http://www.fsf.org/ or you can write to the\n" "\n" "Free Software Foundation, Inc.\n" "51 Franklin Street - Fifth Floor\n" "Boston\n" "MA 02110-1301\n" "USA.\n" msgstr "" #: src/grig-about.c:91 src/rig-gui-message-window.c:687 msgid "Grig" msgstr "" #: src/grig-about.c:94 msgid "Copyright (C) 2001-2007 Alexandru Csete OZ9AEC" msgstr "" #: src/grig-about.c:98 msgid "Grig Website" msgstr "" #: src/grig-about.c:108 msgid "translator-credits" msgstr "" #: src/grig-config.c:68 msgid "Checking GRIG configuration." msgstr "" #: src/grig-config.c:106 #, c-format msgid "..Configuration directory: %s" msgstr "" #: src/grig-config.c:107 src/rig-gui-message-window.c:80 msgid "ERROR" msgstr "" #: src/grig-config.c:107 msgid "OK" msgstr "" #: src/grig-config.c:147 msgid "..Radio config files:" msgstr "" #: src/grig-config.c:155 #, c-format msgid "%s: %s" msgstr "" #: src/grig-config.c:172 #, c-format msgid "....%s OK" msgstr "" #: src/grig-debug.c:60 src/rig-gui-message-window.c:78 msgid "NONE" msgstr "" #: src/grig-debug.c:60 msgid "HAMLIB" msgstr "" #: src/grig-debug.c:60 src/rig-gui-message-window.c:485 msgid "GRIG" msgstr "" #: src/grig-debug.c:89 #, c-format msgid "%s: Debug handler initialised." msgstr "" #: src/grig-debug.c:106 #, c-format msgid "%s: Shutting down debug handler." msgstr "" #: src/grig-menubar.c:59 msgid "_Radio" msgstr "" #: src/grig-menubar.c:60 msgid "_Settings" msgstr "" #: src/grig-menubar.c:61 msgid "_View" msgstr "" #: src/grig-menubar.c:62 msgid "_Tools" msgstr "" #: src/grig-menubar.c:63 msgid "_Help" msgstr "" #: src/grig-menubar.c:66 msgid "_Info" msgstr "" #: src/grig-menubar.c:66 msgid "Show info about radio" msgstr "" #: src/grig-menubar.c:67 msgid "St_op daemon" msgstr "" #: src/grig-menubar.c:67 msgid "Stop the Grig daemon" msgstr "" #: src/grig-menubar.c:68 msgid "St_art daemon" msgstr "" #: src/grig-menubar.c:68 msgid "Start the Grig daemon" msgstr "" #: src/grig-menubar.c:69 msgid "_Save State" msgstr "" #: src/grig-menubar.c:69 msgid "Save the state of the rig to a file" msgstr "" #: src/grig-menubar.c:70 msgid "_Load State" msgstr "" #: src/grig-menubar.c:70 msgid "Load the state of the rig from a file" msgstr "" #: src/grig-menubar.c:71 msgid "E_xit" msgstr "" #: src/grig-menubar.c:71 msgid "Exit the program" msgstr "" #: src/grig-menubar.c:74 msgid "_Debug Level" msgstr "" #: src/grig-menubar.c:74 msgid "Set Hamlib debug level" msgstr "" #: src/grig-menubar.c:77 msgid "Message _Window" msgstr "" #: src/grig-menubar.c:77 msgid "Show window with debug messages" msgstr "" #: src/grig-menubar.c:80 msgid "_SW Memory" msgstr "" #: src/grig-menubar.c:80 msgid "Software Memory Mamager" msgstr "" #: src/grig-menubar.c:81 msgid "_Band Map" msgstr "" #: src/grig-menubar.c:81 msgid "Show the band map" msgstr "" #: src/grig-menubar.c:82 msgid "S_pectrum Scope" msgstr "" #: src/grig-menubar.c:82 msgid "Show the spectrum scope" msgstr "" #: src/grig-menubar.c:85 msgid "_About Grig" msgstr "" #: src/grig-menubar.c:85 msgid "Show about dialog" msgstr "" #: src/grig-menubar.c:91 msgid "_No Debug" msgstr "" #: src/grig-menubar.c:91 msgid "Don't show any debug mesages" msgstr "" #: src/grig-menubar.c:92 msgid "_Bug" msgstr "" #: src/grig-menubar.c:92 msgid "Show error messages caused by possible bugs" msgstr "" #: src/grig-menubar.c:93 msgid "_Error" msgstr "" #: src/grig-menubar.c:93 msgid "Show run-time error messages" msgstr "" #: src/grig-menubar.c:94 msgid "_Warning" msgstr "" #: src/grig-menubar.c:94 msgid "Show warnings" msgstr "" #: src/grig-menubar.c:95 msgid "_Verbose" msgstr "" #: src/grig-menubar.c:95 msgid "Verbose reporting" msgstr "" #: src/grig-menubar.c:96 msgid "_Trace" msgstr "" #: src/grig-menubar.c:96 msgid "Trace everything" msgstr "" #: src/grig-menubar.c:102 msgid "_RX Level Controls" msgstr "" #: src/grig-menubar.c:102 msgid "Show receiver level controls" msgstr "" #: src/grig-menubar.c:103 msgid "_TX Level Controls" msgstr "" #: src/grig-menubar.c:103 msgid "Show transmitter level controls" msgstr "" #: src/grig-menubar.c:104 msgid "_DCS/CTCSS" msgstr "" #: src/grig-menubar.c:104 msgid "Show DCS and CTCSS controls" msgstr "" #: src/grig-menubar.c:105 msgid "_Special Functions" msgstr "" #: src/grig-menubar.c:105 msgid "Radio specific functions" msgstr "" #: src/grig-menubar.c:217 #, c-format msgid "Failed to build menubar: %s" msgstr "" #: src/key-press-handler.c:57 msgid "Initialising key press handler" msgstr "" #: src/key-press-handler.c:67 msgid "Closing key press handler" msgstr "" #: src/main.c:170 msgid "Grig can not find some necessary data files.\n" msgstr "" #: src/main.c:171 msgid "This usually means that your installation is incomplete.\n" msgstr "" #: src/main.c:172 src/main.c:350 msgid "Sorry... but I can not continue..." msgstr "" #: src/main.c:348 msgid "Grig configuration check failed!\n" msgstr "" #: src/main.c:349 msgid "This usually means that your configuration is broken.\n" msgstr "" #: src/main.c:352 msgid "Proposed solutions:\n" msgstr "" #: src/main.c:439 #, c-format msgid "GRIG: %s %s" msgstr "" #: src/main.c:484 #, c-format msgid "" "Received signal %d\n" "Trying clean exit..." msgstr "" #: src/main.c:560 msgid "" "Usage: grig [OPTION]...\n" "\n" msgstr "" #: src/main.c:561 msgid " -m, --model=ID select radio model number; see --list\n" msgstr "" #: src/main.c:563 msgid " -r, --rig-file=DEVICE set device of the radio, eg. /dev/ttyS0\n" msgstr "" #: src/main.c:565 msgid " -s, --speed=BAUD set transfer rate (serial port only)\n" msgstr "" #: src/main.c:567 msgid " -c, --civaddr=ID set CI-V address (decimal, ICOM only)\n" msgstr "" #: src/main.c:569 msgid "" " -C, --set-conf=param=val set config parameter (same as in rigctl)\n" msgstr "" #: src/main.c:571 msgid " -d, --debug=LEVEL set hamlib debug level (0..5)\n" msgstr "" #: src/main.c:573 msgid " -D, --delay=val set delay between commands in msec\n" msgstr "" #: src/main.c:575 msgid " -n, --nothread start daemon without using threads\n" msgstr "" #: src/main.c:577 msgid " -l, --list list supported radios and exit\n" msgstr "" #: src/main.c:579 msgid " -p, --enable-ptt enable PTT button\n" msgstr "" #: src/main.c:581 msgid " -P, --enable-pwr enable POWER button\n" msgstr "" #: src/main.c:583 msgid " -h, --help show this help message and exit\n" msgstr "" #: src/main.c:585 msgid " -v, --version show version information and exit\n" msgstr "" #: src/main.c:588 msgid "Example:" msgstr "" #: src/main.c:590 msgid "" "Start grig using YAESU FT-990 connected to the first serial port, using 4800 " "baud and debug level set to warning:" msgstr "" #: src/main.c:596 msgid "or if you prefer the long options:" msgstr "" #: src/main.c:601 msgid "It is usually enough to specify the model ID and the DEVICE." msgstr "" #: src/main.c:604 msgid "" "If you start grig without any options it will use the Dummy backend and set " "the debug level to RIG_DEBUG_NONE. If you don't specify the transfer rate " "for the serial port, the default value will be used by the backend and even " "if you specify a value, it can be overridden by the backend." msgstr "" #: src/main.c:614 msgid "Debug levels:" msgstr "" #: src/main.c:616 msgid " 0 No debug, keep quiet.\n" msgstr "" #: src/main.c:617 msgid " 1 Serious bug.\n" msgstr "" #: src/main.c:618 msgid " 2 Error case (e.g. protocol, memory allocation).\n" msgstr "" #: src/main.c:619 msgid " 3 Warnings.\n" msgstr "" #: src/main.c:620 msgid " 4 Verbose information.\n" msgstr "" #: src/main.c:621 msgid " 5 Trace.\n" msgstr "" #: src/main.c:633 #, c-format msgid "grig %s\n" msgstr "" #: src/main.c:634 msgid "Graphical User Interface for the Hamradio Control Libraries." msgstr "" #: src/main.c:637 msgid "Copyright (C) 2001-2007 Alexandru Csete." msgstr "" #: src/main.c:639 msgid "This is free software; see the source for copying conditions. " msgstr "" #: src/main.c:641 msgid "" "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A " "PARTICULAR PURPOSE." msgstr "" #: src/main.c:687 msgid " ID Manufacturer Model Ver. Status\n" msgstr "" #: src/rig-daemon.c:397 msgid "No error" msgstr "" #: src/rig-daemon.c:398 msgid "Invalid parameter" msgstr "" #: src/rig-daemon.c:399 msgid "Invalid configuration" msgstr "" #: src/rig-daemon.c:400 msgid "Memory shortage" msgstr "" #: src/rig-daemon.c:401 msgid "Function not implemented" msgstr "" #: src/rig-daemon.c:402 msgid "Communication timed out" msgstr "" #: src/rig-daemon.c:403 msgid "I/O error" msgstr "" #: src/rig-daemon.c:404 msgid "Internal Hamlib error :-(" msgstr "" #: src/rig-daemon.c:405 msgid "Protocol error" msgstr "" #: src/rig-daemon.c:406 msgid "Command rejected" msgstr "" #: src/rig-daemon.c:407 msgid "Command performed, but arg truncated" msgstr "" #: src/rig-daemon.c:408 msgid "Function not available" msgstr "" #: src/rig-daemon.c:409 msgid "VFO not targetable" msgstr "" #: src/rig-daemon.c:410 msgid "BUS error" msgstr "" #: src/rig-daemon.c:411 msgid "Collision on the bus" msgstr "" #: src/rig-daemon.c:412 msgid "NULL RIG handle or invalid pointer param" msgstr "" #: src/rig-daemon.c:413 msgid "Invalid VFO" msgstr "" #: src/rig-daemon.c:414 msgid "Argument out of domain" msgstr "" #: src/rig-daemon.c:481 #, c-format msgid "%s entered" msgstr "" #: src/rig-daemon.c:523 #, c-format msgid "%s: Initializing rig (id=%d)" msgstr "" #: src/rig-daemon.c:532 #, c-format msgid "%s: Init failed; Hamlib returned NULL!" msgstr "" #: src/rig-daemon.c:566 #, c-format msgid "%s: Setting conf param (%s,%s)..." msgstr "" #: src/rig-daemon.c:575 #, c-format msgid "%s: Set conf OK" msgstr "" #: src/rig-daemon.c:580 #, c-format msgid "%s: Set conf failed (%d)" msgstr "" #: src/rig-daemon.c:600 #, c-format msgid "%s: Failed to open rig port %s: %s (permissions?)" msgstr "" #: src/rig-daemon.c:611 #, c-format msgid "%s: Init successfull, executing post-init" msgstr "" #: src/rig-daemon.c:618 #, c-format msgid "%s: Starting rig daemon" msgstr "" #: src/rig-daemon.c:637 #, c-format msgid "%s: Daemon timeout started, ID: %d" msgstr "" #: src/rig-daemon.c:658 #, c-format msgid "%s: Failed to start daemon thread" msgstr "" #: src/rig-daemon.c:661 #, c-format msgid "%s: Error %d: %s" msgstr "" #: src/rig-daemon.c:671 #, c-format msgid "%s: Daemon thread started" msgstr "" #: src/rig-daemon.c:697 #, c-format msgid "%s: Sending stop signal to rig daemon" msgstr "" #: src/rig-daemon.c:731 #, c-format msgid "%s: Cleaning up rig" msgstr "" #: src/rig-daemon.c:803 #, c-format msgid "%s: GET bits: %d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" msgstr "" #: src/rig-daemon.c:826 #, c-format msgid "%s: SET bits: %d%d%d%d%d%d%d%d%d%d%d%d%dXXX" msgstr "" #: src/rig-daemon.c:880 #, c-format msgid "%s started." msgstr "" #: src/rig-daemon.c:978 #, c-format msgid "%s stopped" msgstr "" #: src/rig-daemon.c:1024 #, c-format msgid "%s called." msgstr "" #: src/rig-daemon.c:1159 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FREQ_1:\n" "%s" msgstr "" #: src/rig-daemon.c:1186 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FREQ_1:\n" "%s" msgstr "" #: src/rig-daemon.c:1243 src/rig-daemon.c:1311 #, c-format msgid "%s: I can't figure out available VFOs (got %d)" msgstr "" #: src/rig-daemon.c:1256 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FREQ_2:\n" "%s" msgstr "" #: src/rig-daemon.c:1324 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FREQ_2:\n" "%s" msgstr "" #: src/rig-daemon.c:1353 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_RIT:\n" "%s" msgstr "" #: src/rig-daemon.c:1380 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_RIT:\n" "%s" msgstr "" #: src/rig-daemon.c:1409 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_XIT:\n" "%s" msgstr "" #: src/rig-daemon.c:1436 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_XIT:\n" "%s" msgstr "" #: src/rig-daemon.c:1465 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VFO:\n" "%s" msgstr "" #: src/rig-daemon.c:1492 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VFO:\n" "%s" msgstr "" #: src/rig-daemon.c:1521 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PSTAT:\n" "%s" msgstr "" #: src/rig-daemon.c:1548 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PSTAT:\n" "%s" msgstr "" #: src/rig-daemon.c:1577 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PTT:\n" "%s" msgstr "" #: src/rig-daemon.c:1604 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PTT:\n" "%s" msgstr "" #: src/rig-daemon.c:1634 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_MODE:\n" "%s" msgstr "" #: src/rig-daemon.c:1685 src/rig-daemon-check.c:409 #, c-format msgid "%s: Found frequency range for mode %d" msgstr "" #: src/rig-daemon.c:1688 src/rig-daemon-check.c:412 #, c-format msgid "%s: %.0f...(%.0f)...%.0f kHz" msgstr "" #: src/rig-daemon.c:1707 #, c-format msgid "%s: Can not find frequency range for this mode (%d)!Bug in backend?" msgstr "" #: src/rig-daemon.c:1780 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_MODE:\n" "%s" msgstr "" #: src/rig-daemon.c:1814 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_AGC:\n" "%s" msgstr "" #: src/rig-daemon.c:1844 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_AGC:\n" "%s" msgstr "" #: src/rig-daemon.c:1872 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ATT:\n" "%s" msgstr "" #: src/rig-daemon.c:1900 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ATT:\n" "%s" msgstr "" #: src/rig-daemon.c:1928 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PREAMP:\n" "%s" msgstr "" #: src/rig-daemon.c:1958 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PREAMP:\n" "%s" msgstr "" #: src/rig-daemon.c:1986 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_STRENGTH:\n" "%s" msgstr "" #: src/rig-daemon.c:2015 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_POWER:\n" "%s" msgstr "" #: src/rig-daemon.c:2043 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_POWER:\n" "%s" msgstr "" #: src/rig-daemon.c:2070 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SWR:\n" "%s" msgstr "" #: src/rig-daemon.c:2097 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ALC:\n" "%s" msgstr "" #: src/rig-daemon.c:2126 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ALC:\n" "%s" msgstr "" #: src/rig-daemon.c:2151 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_LOCK:\n" "%s" msgstr "" #: src/rig-daemon.c:2178 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_LOCK:\n" "%s" msgstr "" #: src/rig-daemon.c:2202 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_TOGGLE:\n" "%s" msgstr "" #: src/rig-daemon.c:2225 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_COPY:\n" "%s" msgstr "" #: src/rig-daemon.c:2248 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_XCHG:\n" "%s" msgstr "" #: src/rig-daemon.c:2270 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_SPLIT:\n" "%s" msgstr "" #: src/rig-daemon.c:2292 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SPLIT:\n" "%s" msgstr "" #: src/rig-daemon.c:2317 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_AF:\n" "%s" msgstr "" #: src/rig-daemon.c:2342 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_AF:\n" "%s" msgstr "" #: src/rig-daemon.c:2368 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_RF:\n" "%s" msgstr "" #: src/rig-daemon.c:2393 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_RF:\n" "%s" msgstr "" #: src/rig-daemon.c:2419 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_SQL:\n" "%s" msgstr "" #: src/rig-daemon.c:2444 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SQL:\n" "%s" msgstr "" #: src/rig-daemon.c:2470 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_IFS:\n" "%s" msgstr "" #: src/rig-daemon.c:2495 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_IFS:\n" "%s" msgstr "" #: src/rig-daemon.c:2521 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_APF:\n" "%s" msgstr "" #: src/rig-daemon.c:2546 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_APF:\n" "%s" msgstr "" #: src/rig-daemon.c:2572 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_NR:\n" "%s" msgstr "" #: src/rig-daemon.c:2597 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_NR:\n" "%s" msgstr "" #: src/rig-daemon.c:2623 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_NOTCH:\n" "%s" msgstr "" #: src/rig-daemon.c:2648 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_NOTCH:\n" "%s" msgstr "" #: src/rig-daemon.c:2674 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PBT_IN:\n" "%s" msgstr "" #: src/rig-daemon.c:2699 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PBT_IN:\n" "%s" msgstr "" #: src/rig-daemon.c:2725 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PBT_OUT:\n" "%s" msgstr "" #: src/rig-daemon.c:2750 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PBT_OUT:\n" "%s" msgstr "" #: src/rig-daemon.c:2776 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_CW_PITCH:\n" "%s" msgstr "" #: src/rig-daemon.c:2801 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_CW_PITCH:\n" "%s" msgstr "" #: src/rig-daemon.c:2827 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_KEYSPD:\n" "%s" msgstr "" #: src/rig-daemon.c:2852 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_KEYSPD:\n" "%s" msgstr "" #: src/rig-daemon.c:2878 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_BKINDEL:\n" "%s" msgstr "" #: src/rig-daemon.c:2903 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_BKINDEL:\n" "%s" msgstr "" #: src/rig-daemon.c:2929 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_BALANCE:\n" "%s" msgstr "" #: src/rig-daemon.c:2954 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_BALANCE:\n" "%s" msgstr "" #: src/rig-daemon.c:2980 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VOXDEL:\n" "%s" msgstr "" #: src/rig-daemon.c:3005 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VOXDEL:\n" "%s" msgstr "" #: src/rig-daemon.c:3031 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VOXGAIN:\n" "%s" msgstr "" #: src/rig-daemon.c:3056 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VOXGAIN:\n" "%s" msgstr "" #: src/rig-daemon.c:3082 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ANTIVOX:\n" "%s" msgstr "" #: src/rig-daemon.c:3107 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ANTIVOX:\n" "%s" msgstr "" #: src/rig-daemon.c:3133 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_MICGAIN:\n" "%s" msgstr "" #: src/rig-daemon.c:3158 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_MICGAIN:\n" "%s" msgstr "" #: src/rig-daemon.c:3185 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_COMP:\n" "%s" msgstr "" #: src/rig-daemon.c:3211 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FUNC(%s):\n" "%s" msgstr "" #: src/rig-daemon.c:3241 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FUNC(%s):\n" "%s" msgstr "" #: src/rig-daemon.c:3260 #, c-format msgid "%s: Unknown command %d (grig bug)" msgstr "" #: src/rig-daemon.c:3353 #, c-format msgid "%s: %d" msgstr "" #: src/rig-daemon-check.c:157 #, c-format msgid "%s: Can not find VFO list for this backend! Bug in backend?" msgstr "" #: src/rig-daemon-check.c:430 #, c-format msgid "%s: Can not find frequency range for this mode (%d)! Bug in backend?" msgstr "" #: src/rig-daemon-check.c:518 #, c-format msgid "%s: Could not get RF power" msgstr "" #: src/rig-daemon-check.c:533 #, c-format msgid "%s: Maximum RF power is %.3f watts" msgstr "" #: src/rig-daemon-check.c:545 #, c-format msgid "%s: Could not get signal strength" msgstr "" #: src/rig-daemon-check.c:560 #, c-format msgid "%s: Could not get SWR" msgstr "" #: src/rig-daemon-check.c:573 #, c-format msgid "%s: Could not get ALC" msgstr "" #: src/rig-daemon-check.c:586 #, c-format msgid "%s: Could not get AGC" msgstr "" #: src/rig-daemon-check.c:599 #, c-format msgid "%s: Could not get ATT" msgstr "" #: src/rig-daemon-check.c:612 #, c-format msgid "%s: Could not get PREAMP" msgstr "" #: src/rig-daemon-check.c:625 #, c-format msgid "%s: Could not get AF" msgstr "" #: src/rig-daemon-check.c:638 #, c-format msgid "%s: Could not get RF" msgstr "" #: src/rig-daemon-check.c:651 #, c-format msgid "%s: Could not get SQL" msgstr "" #: src/rig-daemon-check.c:666 #, c-format msgid "%s: Could not get IF shift" msgstr "" #: src/rig-daemon-check.c:679 #, c-format msgid "%s: Could not get APF" msgstr "" #: src/rig-daemon-check.c:692 #, c-format msgid "%s: Could not get NR" msgstr "" #: src/rig-daemon-check.c:705 #, c-format msgid "%s: Could not get NOTCH" msgstr "" #: src/rig-daemon-check.c:718 #, c-format msgid "%s: Could not get PBT IN" msgstr "" #: src/rig-daemon-check.c:731 #, c-format msgid "%s: Could not get PBT OUT" msgstr "" #: src/rig-daemon-check.c:744 #, c-format msgid "%s: Could not get CW pitch" msgstr "" #: src/rig-daemon-check.c:757 #, c-format msgid "%s: Could not get CW speed" msgstr "" #: src/rig-daemon-check.c:770 #, c-format msgid "%s: Could not get break-in delay" msgstr "" #: src/rig-daemon-check.c:783 #, c-format msgid "%s: Could not get balance" msgstr "" #: src/rig-daemon-check.c:796 #, c-format msgid "%s: Could not get VOX delay" msgstr "" #: src/rig-daemon-check.c:809 #, c-format msgid "%s: Could not get VOX gain" msgstr "" #: src/rig-daemon-check.c:822 #, c-format msgid "%s: Could not get anti-vox" msgstr "" #: src/rig-daemon-check.c:835 #, c-format msgid "%s: Could not get compression level" msgstr "" #: src/rig-daemon-check.c:848 #, c-format msgid "%s: Could not get MIC gain" msgstr "" #: src/rig-daemon-check.c:954 #, c-format msgid "%s: Could not get LOCK status" msgstr "" #: src/rig-daemon-check.c:969 #, c-format msgid "%s: Could not get %s status" msgstr "" #: src/rig-data.c:352 src/rig-data.c:544 #, c-format msgid "%s: Invalid target: %d\n" msgstr "" #: src/rig-gui-buttons.c:148 src/rig-gui-smeter.c:75 msgid "Power" msgstr "" #: src/rig-gui-buttons.c:149 msgid "Power status" msgstr "" #: src/rig-gui-buttons.c:193 msgid "PTT" msgstr "" #: src/rig-gui-buttons.c:194 msgid "Push to talk" msgstr "" #: src/rig-gui-buttons.c:238 msgid "Lock" msgstr "" #: src/rig-gui-buttons.c:239 msgid "Lock tuning dial" msgstr "" #: src/rig-gui-buttons.c:284 msgid "ATT OFF" msgstr "" #: src/rig-gui-buttons.c:307 msgid "Attenuator level" msgstr "" #: src/rig-gui-buttons.c:344 msgid "PREAMP OFF" msgstr "" #: src/rig-gui-buttons.c:367 msgid "Preamp level" msgstr "" #: src/rig-gui-ctrl2.c:86 src/rig-gui-info-data.h:172 msgid "AM" msgstr "" #: src/rig-gui-ctrl2.c:87 src/rig-gui-info-data.h:165 #: src/rig-gui-info-data.h:173 msgid "CW" msgstr "" #: src/rig-gui-ctrl2.c:88 src/rig-gui-info-data.h:174 msgid "USB" msgstr "" #: src/rig-gui-ctrl2.c:89 src/rig-gui-info-data.h:175 msgid "LSB" msgstr "" #: src/rig-gui-ctrl2.c:90 src/rig-gui-info-data.h:176 msgid "RTTY" msgstr "" #: src/rig-gui-ctrl2.c:91 msgid "FM Narrow" msgstr "" #: src/rig-gui-ctrl2.c:92 msgid "FM Wide" msgstr "" #: src/rig-gui-ctrl2.c:93 msgid "CW Rev" msgstr "" #: src/rig-gui-ctrl2.c:94 msgid "RTTY Rev" msgstr "" #: src/rig-gui-ctrl2.c:95 msgid "AM Synch" msgstr "" #: src/rig-gui-ctrl2.c:96 msgid "Pkt (LSB)" msgstr "" #: src/rig-gui-ctrl2.c:97 msgid "Pkt (USB)" msgstr "" #: src/rig-gui-ctrl2.c:98 msgid "Pkt (FM)" msgstr "" #: src/rig-gui-ctrl2.c:99 msgid "ECUSB" msgstr "" #: src/rig-gui-ctrl2.c:100 msgid "ECLSB" msgstr "" #: src/rig-gui-ctrl2.c:101 src/rig-gui-info-data.h:187 msgid "FAX" msgstr "" #: src/rig-gui-ctrl2.c:207 msgid "AGC OFF" msgstr "" #: src/rig-gui-ctrl2.c:208 msgid "Super Fast" msgstr "" #: src/rig-gui-ctrl2.c:209 msgid "Fast" msgstr "" #: src/rig-gui-ctrl2.c:210 msgid "Medium" msgstr "" #: src/rig-gui-ctrl2.c:211 msgid "Slow" msgstr "" #: src/rig-gui-ctrl2.c:212 msgid "Auto" msgstr "" #: src/rig-gui-ctrl2.c:214 msgid "Automatic Gain Control Level" msgstr "" #: src/rig-gui-ctrl2.c:320 msgid "Communication mode" msgstr "" #: src/rig-gui-ctrl2.c:359 msgid "Wide" msgstr "" #: src/rig-gui-ctrl2.c:360 msgid "Normal" msgstr "" #: src/rig-gui-ctrl2.c:361 msgid "Narrow" msgstr "" #: src/rig-gui-ctrl2.c:362 msgid "[User]" msgstr "" #: src/rig-gui-ctrl2.c:384 msgid "Passband Width" msgstr "" #: src/rig-gui-ctrl2.c:443 #, c-format msgid "ANT %d" msgstr "" #: src/rig-gui-ctrl2.c:460 msgid "Antenna Port" msgstr "" #: src/rig-gui-func.c:82 #, c-format msgid "%s: FUNC window already visible." msgstr "" #: src/rig-gui-func.c:93 #, c-format msgid "%s (Special Functions)" msgstr "" #: src/rig-gui-func.c:160 #, c-format msgid "%s: FUNC window is not visible." msgstr "" #: src/rig-gui-func.c:185 src/rig-gui-rx.c:242 src/rig-gui-tx.c:238 #, c-format msgid "%s:%d: Invalid level %d" msgstr "" #: src/rig-gui-func.c:227 src/rig-gui-rx.c:507 src/rig-gui-tx.c:463 msgid "Rig has no support." msgstr "" #: src/rig-gui-info.c:115 msgid "Radio Info" msgstr "" #: src/rig-gui-info.c:250 msgid "RIT:" msgstr "" #: src/rig-gui-info.c:270 msgid "XIT:" msgstr "" #: src/rig-gui-info.c:289 msgid "IF-SHIFT:" msgstr "" #: src/rig-gui-info.c:308 msgid "Max. Offsets" msgstr "" #: src/rig-gui-info.c:346 msgid "LEVEL" msgstr "" #: src/rig-gui-info.c:356 src/rig-gui-info.c:987 msgid "READ" msgstr "" #: src/rig-gui-info.c:364 src/rig-gui-info.c:995 msgid "WRITE" msgstr "" #: src/rig-gui-info.c:392 src/rig-gui-info.c:401 src/rig-gui-info.c:1023 #: src/rig-gui-info.c:1032 src/rig-gui-info.c:1110 msgid "-" msgstr "" #: src/rig-gui-info.c:397 src/rig-gui-info.c:406 src/rig-gui-info.c:1028 #: src/rig-gui-info.c:1037 src/rig-gui-info.c:1115 msgid "X" msgstr "" #: src/rig-gui-info.c:442 msgid "Port Type:" msgstr "" #: src/rig-gui-info.c:460 src/rig-gui-info.c:489 src/rig-gui-info.c:518 #: src/rig-gui-info.c:632 src/rig-gui-info.c:667 msgid "Unknown" msgstr "" #: src/rig-gui-info.c:471 msgid "DCD Type:" msgstr "" #: src/rig-gui-info.c:500 msgid "PTT Type:" msgstr "" #: src/rig-gui-info.c:529 msgid "Serial Speed:" msgstr "" #: src/rig-gui-info.c:540 #, c-format msgid "%d..%d baud" msgstr "" #: src/rig-gui-info.c:547 src/rig-gui-info.c:574 src/rig-gui-info.c:601 #: src/rig-gui-info.c:636 src/rig-gui-info.c:671 src/rig-gui-info-data.h:67 #: src/rig-gui-info-data.h:68 src/rig-gui-info-data.h:69 #: src/rig-gui-info-data.h:103 msgid "N/A" msgstr "" #: src/rig-gui-info.c:558 msgid "Data bits:" msgstr "" #: src/rig-gui-info.c:585 msgid "Stop bits:" msgstr "" #: src/rig-gui-info.c:612 msgid "Parity:" msgstr "" #: src/rig-gui-info.c:647 msgid "Handshake:" msgstr "" #: src/rig-gui-info.c:683 msgid "Interface" msgstr "" #: src/rig-gui-info.c:720 msgid "STEP" msgstr "" #: src/rig-gui-info.c:730 msgid "MODES" msgstr "" #: src/rig-gui-info.c:845 msgid "PREAMP:" msgstr "" #: src/rig-gui-info.c:893 msgid "ATT:" msgstr "" #: src/rig-gui-info.c:939 msgid "Front End" msgstr "" #: src/rig-gui-info.c:977 msgid "FUNCTION" msgstr "" #: src/rig-gui-info.c:1071 msgid "VFO OP" msgstr "" #: src/rig-gui-info.c:1081 msgid "SET" msgstr "" #: src/rig-gui-info-data.h:44 msgid "PREAMP" msgstr "" #: src/rig-gui-info-data.h:45 msgid "ATT" msgstr "" #: src/rig-gui-info-data.h:46 src/rig-gui-info-data.h:82 msgid "VOX" msgstr "" #: src/rig-gui-info-data.h:47 msgid "AF" msgstr "" #: src/rig-gui-info-data.h:48 msgid "RF" msgstr "" #: src/rig-gui-info-data.h:49 src/rig-gui-info-data.h:99 msgid "SQL" msgstr "" #: src/rig-gui-info-data.h:50 msgid "IF" msgstr "" #: src/rig-gui-info-data.h:51 src/rig-gui-info-data.h:90 src/rig-gui-rx.c:412 msgid "APF" msgstr "" #: src/rig-gui-info-data.h:52 src/rig-gui-info-data.h:88 msgid "NR" msgstr "" #: src/rig-gui-info-data.h:53 msgid "PBT_IN" msgstr "" #: src/rig-gui-info-data.h:54 msgid "PBT_OUT" msgstr "" #: src/rig-gui-info-data.h:55 msgid "CWPITCH" msgstr "" #: src/rig-gui-info-data.h:56 msgid "RFPOWER" msgstr "" #: src/rig-gui-info-data.h:57 msgid "MICGAIN" msgstr "" #: src/rig-gui-info-data.h:58 msgid "KEYSPD" msgstr "" #: src/rig-gui-info-data.h:59 msgid "NOTCHF" msgstr "" #: src/rig-gui-info-data.h:60 msgid "COMP" msgstr "" #: src/rig-gui-info-data.h:61 msgid "AGC" msgstr "" #: src/rig-gui-info-data.h:62 msgid "BKINDL" msgstr "" #: src/rig-gui-info-data.h:63 msgid "BALANCE" msgstr "" #: src/rig-gui-info-data.h:64 msgid "METER" msgstr "" #: src/rig-gui-info-data.h:65 msgid "VOXGAIN" msgstr "" #: src/rig-gui-info-data.h:66 msgid "ANTIVOX" msgstr "" #: src/rig-gui-info-data.h:70 msgid "RAWSTR" msgstr "" #: src/rig-gui-info-data.h:71 msgid "SQLSTAT" msgstr "" #: src/rig-gui-info-data.h:72 src/rig-gui-smeter.c:76 msgid "SWR" msgstr "" #: src/rig-gui-info-data.h:73 src/rig-gui-smeter.c:77 src/rig-gui-tx.c:347 msgid "ALC" msgstr "" #: src/rig-gui-info-data.h:74 msgid "STRENGTH" msgstr "" #: src/rig-gui-info-data.h:79 msgid "FAST AGC" msgstr "" #: src/rig-gui-info-data.h:80 msgid "NB" msgstr "" #: src/rig-gui-info-data.h:81 src/rig-gui-tx.c:388 msgid "COMPR" msgstr "" #: src/rig-gui-info-data.h:83 msgid "TONE" msgstr "" #: src/rig-gui-info-data.h:84 msgid "CTCSS" msgstr "" #: src/rig-gui-info-data.h:85 msgid "SEMI BK" msgstr "" #: src/rig-gui-info-data.h:86 msgid "FULL BK" msgstr "" #: src/rig-gui-info-data.h:87 msgid "ANF" msgstr "" #: src/rig-gui-info-data.h:89 msgid "AIP" msgstr "" #: src/rig-gui-info-data.h:91 msgid "MON" msgstr "" #: src/rig-gui-info-data.h:92 msgid "MAN NOTCH" msgstr "" #: src/rig-gui-info-data.h:93 msgid "RNF" msgstr "" #: src/rig-gui-info-data.h:94 msgid "AUTO RO" msgstr "" #: src/rig-gui-info-data.h:95 msgid "LOCK" msgstr "" #: src/rig-gui-info-data.h:96 msgid "MUTE" msgstr "" #: src/rig-gui-info-data.h:97 msgid "VOICE SCAN" msgstr "" #: src/rig-gui-info-data.h:98 msgid "REV TRX" msgstr "" #: src/rig-gui-info-data.h:100 msgid "ABM" msgstr "" #: src/rig-gui-info-data.h:101 msgid "BEAT CANC" msgstr "" #: src/rig-gui-info-data.h:102 msgid "MAN BC" msgstr "" #: src/rig-gui-info-data.h:104 msgid "AFC" msgstr "" #: src/rig-gui-info-data.h:105 msgid "SATMODE" msgstr "" #: src/rig-gui-info-data.h:106 msgid "SCOPE" msgstr "" #: src/rig-gui-info-data.h:107 msgid "RESUME" msgstr "" #: src/rig-gui-info-data.h:108 msgid "TBURST" msgstr "" #: src/rig-gui-info-data.h:109 msgid "TUNER" msgstr "" #: src/rig-gui-info-data.h:114 src/rig-gui-info-data.h:123 #: src/rig-gui-info-data.h:134 src/rig-gui-info-data.h:148 #: src/rig-gui-info-data.h:155 src/rig-gui-smeter.c:74 msgid "None" msgstr "" #: src/rig-gui-info-data.h:115 src/rig-gui-info-data.h:124 msgid "Legacy" msgstr "" #: src/rig-gui-info-data.h:116 msgid "SER_DTR" msgstr "" #: src/rig-gui-info-data.h:117 msgid "SER_RTS" msgstr "" #: src/rig-gui-info-data.h:118 src/rig-gui-info-data.h:128 msgid "PARPORT" msgstr "" #: src/rig-gui-info-data.h:125 msgid "SER_DSR" msgstr "" #: src/rig-gui-info-data.h:126 msgid "SER_CTS" msgstr "" #: src/rig-gui-info-data.h:127 msgid "SER_CAR" msgstr "" #: src/rig-gui-info-data.h:135 msgid "Serial" msgstr "" #: src/rig-gui-info-data.h:136 msgid "Network" msgstr "" #: src/rig-gui-info-data.h:137 msgid "Device" msgstr "" #: src/rig-gui-info-data.h:138 msgid "Packet" msgstr "" #: src/rig-gui-info-data.h:139 msgid "DTMF" msgstr "" #: src/rig-gui-info-data.h:140 msgid "IrDA" msgstr "" #: src/rig-gui-info-data.h:141 msgid "RPC" msgstr "" #: src/rig-gui-info-data.h:142 msgid "Parallel" msgstr "" #: src/rig-gui-info-data.h:149 msgid "Odd" msgstr "" #: src/rig-gui-info-data.h:150 msgid "Even" msgstr "" #: src/rig-gui-info-data.h:156 msgid "XONXOFF" msgstr "" #: src/rig-gui-info-data.h:157 msgid "Hardware" msgstr "" #: src/rig-gui-info-data.h:162 msgid "OFF" msgstr "" #: src/rig-gui-info-data.h:163 msgid "FREQ" msgstr "" #: src/rig-gui-info-data.h:164 msgid "RXMODE" msgstr "" #: src/rig-gui-info-data.h:166 msgid "EMG" msgstr "" #: src/rig-gui-info-data.h:167 msgid "JAP" msgstr "" #: src/rig-gui-info-data.h:177 msgid "FM" msgstr "" #: src/rig-gui-info-data.h:178 msgid "WFM" msgstr "" #: src/rig-gui-info-data.h:179 msgid "CWR" msgstr "" #: src/rig-gui-info-data.h:180 msgid "RTTYR" msgstr "" #: src/rig-gui-info-data.h:181 msgid "AMS" msgstr "" #: src/rig-gui-info-data.h:182 msgid "PKTLSB" msgstr "" #: src/rig-gui-info-data.h:183 msgid "PKTUSB" msgstr "" #: src/rig-gui-info-data.h:184 msgid "PKTFM" msgstr "" #: src/rig-gui-info-data.h:185 msgid "ECSSUSB" msgstr "" #: src/rig-gui-info-data.h:186 msgid "ECSSLSB" msgstr "" #: src/rig-gui-info-data.h:193 msgid "COPY A=B" msgstr "" #: src/rig-gui-info-data.h:194 msgid "XCHG A/B" msgstr "" #: src/rig-gui-info-data.h:195 msgid "VFO->MEM" msgstr "" #: src/rig-gui-info-data.h:196 msgid "MEM->VFO" msgstr "" #: src/rig-gui-info-data.h:197 msgid "MEMCLEAR" msgstr "" #: src/rig-gui-info-data.h:198 msgid "UP" msgstr "" #: src/rig-gui-info-data.h:199 msgid "DOWN" msgstr "" #: src/rig-gui-info-data.h:200 msgid "BAND UP" msgstr "" #: src/rig-gui-info-data.h:201 msgid "BAND DOWN" msgstr "" #: src/rig-gui-info-data.h:202 msgid "LEFT" msgstr "" #: src/rig-gui-info-data.h:203 msgid "RIGHT" msgstr "" #: src/rig-gui-info-data.h:204 msgid "TUNE" msgstr "" #: src/rig-gui-info-data.h:205 msgid "TOGGLE" msgstr "" #: src/rig-gui-keypad.c:289 msgid "ENT" msgstr "" #: src/rig-gui-keypad.c:291 msgid "Begin manual frequency entry mode" msgstr "" #: src/rig-gui-keypad.c:301 msgid "CLR" msgstr "" #: src/rig-gui-keypad.c:303 msgid "Clear manual frequency entry mode" msgstr "" #: src/rig-gui-lcd.c:1396 msgid "kHz" msgstr "" #: src/rig-gui-lcd.c:1421 msgid "RIT" msgstr "" #: src/rig-gui-lcd.c:1472 msgid "VFO A" msgstr "" #: src/rig-gui-lcd.c:1476 msgid "VFO B" msgstr "" #: src/rig-gui-lcd.c:1480 msgid "VFO C" msgstr "" #: src/rig-gui-lcd.c:1484 msgid "MAIN VFO" msgstr "" #: src/rig-gui-lcd.c:1488 msgid "SUB VFO" msgstr "" #: src/rig-gui-lcd.c:1492 msgid "MEM" msgstr "" #: src/rig-gui-lcd.c:1496 msgid "VFO ?" msgstr "" #: src/rig-gui-levels.c:52 msgid "Level Controls" msgstr "" #: src/rig-gui-levels.c:53 msgid "Show/hide level controls" msgstr "" #: src/rig-gui-message-window.c:65 msgid "Time" msgstr "" #: src/rig-gui-message-window.c:66 msgid "Source" msgstr "" #: src/rig-gui-message-window.c:67 msgid "Level" msgstr "" #: src/rig-gui-message-window.c:68 msgid "Message" msgstr "" #: src/rig-gui-message-window.c:79 msgid "BUG" msgstr "" #: src/rig-gui-message-window.c:81 msgid "WARNING" msgstr "" #: src/rig-gui-message-window.c:82 msgid "DEBUG" msgstr "" #: src/rig-gui-message-window.c:83 msgid "TRACE" msgstr "" #: src/rig-gui-message-window.c:162 msgid "Grig Message Window" msgstr "" #: src/rig-gui-message-window.c:407 msgid "Open Debug File" msgstr "" #: src/rig-gui-message-window.c:476 msgid "SYS" msgstr "" #: src/rig-gui-message-window.c:486 msgid "Log file seems corrupt" msgstr "" #: src/rig-gui-message-window.c:509 #, c-format msgid "%s:%d: Error open debug log (%s)" msgstr "" #: src/rig-gui-message-window.c:681 msgid "Hamlib" msgstr "" #: src/rig-gui-message-window.c:693 msgid "Other" msgstr "" #: src/rig-gui-message-window.c:703 msgid "Bugs" msgstr "" #: src/rig-gui-message-window.c:709 msgid "Errors" msgstr "" #: src/rig-gui-message-window.c:715 msgid "Warning" msgstr "" #: src/rig-gui-message-window.c:721 msgid "Verbose" msgstr "" #: src/rig-gui-message-window.c:727 msgid "Trace" msgstr "" #: src/rig-gui-message-window.c:740 msgid "Total" msgstr "" #: src/rig-gui-message-window.c:765 msgid " Summary " msgstr "" #: src/rig-gui-rx.c:97 #, c-format msgid "%s: RX window already visible." msgstr "" #: src/rig-gui-rx.c:108 #, c-format msgid "%s (RX Levels)" msgstr "" #: src/rig-gui-rx.c:172 #, c-format msgid "%s: RX window is not visible." msgstr "" #: src/rig-gui-rx.c:284 msgid "AF Gain" msgstr "" #: src/rig-gui-rx.c:304 msgid "RF Gain" msgstr "" #: src/rig-gui-rx.c:331 msgid "IF Shift" msgstr "" #: src/rig-gui-rx.c:351 msgid "CW Pitch" msgstr "" #: src/rig-gui-rx.c:371 msgid "PBT In" msgstr "" #: src/rig-gui-rx.c:391 msgid "PBT Out" msgstr "" #: src/rig-gui-rx.c:432 msgid "N.R." msgstr "" #: src/rig-gui-rx.c:452 msgid "NOTCH" msgstr "" #: src/rig-gui-rx.c:472 msgid "Squelch" msgstr "" #: src/rig-gui-rx.c:492 msgid "Balance" msgstr "" #: src/rig-gui-smeter.c:83 msgid "0..5" msgstr "" #: src/rig-gui-smeter.c:84 msgid "0..10" msgstr "" #: src/rig-gui-smeter.c:85 msgid "0..50" msgstr "" #: src/rig-gui-smeter.c:86 msgid "0..100" msgstr "" #: src/rig-gui-smeter.c:87 msgid "0..500" msgstr "" #: src/rig-gui-smeter.c:430 msgid "Select TX mode for the meter" msgstr "" #: src/rig-gui-smeter.c:479 msgid "Select TX meter scale" msgstr "" #: src/rig-gui-tx.c:98 #, c-format msgid "%s: TX window already visible." msgstr "" #: src/rig-gui-tx.c:109 #, c-format msgid "%s (TX Levels)" msgstr "" #: src/rig-gui-tx.c:176 #, c-format msgid "%s: TX window is not visible." msgstr "" #: src/rig-gui-tx.c:286 msgid "CW SPD" msgstr "" #: src/rig-gui-tx.c:306 msgid "BKIN DEL" msgstr "" #: src/rig-gui-tx.c:326 msgid "POWER" msgstr "" #: src/rig-gui-tx.c:368 msgid "MIC GAIN" msgstr "" #: src/rig-gui-tx.c:408 msgid "VOX GAIN" msgstr "" #: src/rig-gui-tx.c:428 msgid "VOX DEL" msgstr "" #: src/rig-gui-tx.c:448 msgid "ANTI VOX" msgstr "" #: src/rig-gui-vfo.c:119 msgid "Main / Sub" msgstr "" #: src/rig-gui-vfo.c:120 msgid "Toggle active VFO" msgstr "" #: src/rig-gui-vfo.c:123 msgid "A / B" msgstr "" #: src/rig-gui-vfo.c:124 msgid "Toggle between available VFOs" msgstr "" #: src/rig-gui-vfo.c:235 msgid "Main = Sub" msgstr "" #: src/rig-gui-vfo.c:236 msgid "Set Main VFO = Sub VFO" msgstr "" #: src/rig-gui-vfo.c:239 msgid "A = B" msgstr "" #: src/rig-gui-vfo.c:240 msgid "Set VFO B = VFO A" msgstr "" #: src/rig-gui-vfo.c:304 msgid "Main«»Sub" msgstr "" #: src/rig-gui-vfo.c:305 msgid "Exchange Main and sub VFOs" msgstr "" #: src/rig-gui-vfo.c:308 msgid "A«»B" msgstr "" #: src/rig-gui-vfo.c:309 msgid "Exchange VFO A and B" msgstr "" #: src/rig-gui-vfo.c:370 msgid "Split" msgstr "" #: src/rig-gui-vfo.c:371 msgid "Toggle split mode operation" msgstr "" #: src/rig-gui-vfo.c:399 msgid "M / V" msgstr "" #: src/rig-gui-vfo.c:400 msgid "Toggle between memory and VFO" msgstr "" #: src/rig-selector.c:116 msgid "" "Connect to the selected radio.Grig will attempt to establish connection to " "the selected radio using the specified settings. If the connection is " "successful, the main application window will be loaded." msgstr "" #: src/rig-selector.c:125 msgid "Cancel radio selection. This will end grig." msgstr "" #: src/rig-selector.c:130 msgid "" "Add a new radio to the list.A new configuration window will be shown " "allowing you to select a radio and specify the connection settings." msgstr "" #: src/rig-selector.c:139 msgid "Delete the currently selected radio." msgstr "" #: src/rig-selector.c:145 msgid "Edit the settings for the currently selected radio." msgstr "" #: src/rig-selector.c:170 msgid "Select a Radio" msgstr "" #: src/rig-selector.c:230 msgid "Company" msgstr "" #: src/rig-selector.c:236 msgid "Model" msgstr "" #: src/rig-selector.c:242 msgid "Port" msgstr "" #: src/rig-selector.c:248 msgid "Speed" msgstr "" #: src/rig-selector.c:254 msgid "CI-V" msgstr "" #: src/rig-selector.c:262 msgid "DTR" msgstr "" #: src/rig-selector.c:270 msgid "RTS" msgstr "" #: src/rig-selector.c:483 #, c-format msgid "%s:%s: Failed to delete %s" msgstr "" #: src/rig-selector.c:488 #, c-format msgid "%s:%s: Removed %s" msgstr "" #: src/rig-state.c:130 msgid "Load Rig State" msgstr "" #: src/rig-state.c:139 src/rig-state.c:262 msgid "Rig state files (*.rig)" msgstr "" #: src/rig-state.c:144 src/rig-state.c:267 msgid "All files" msgstr "" #: src/rig-state.c:164 #, c-format msgid "" "There was an error reading the settings from:\n" "\n" " %s\n" "\n" " Examine the log messages for further info." msgstr "" #: src/rig-state.c:182 #, c-format msgid "" "The selected file:\n" " %s\n" " does not exist or is not a regular file." msgstr "" #: src/rig-state.c:253 msgid "Save Rig State" msgstr "" #: src/rig-state.c:283 #, c-format msgid "" "%s: User selected new file:\n" "%s" msgstr "" #: src/rig-state.c:295 msgid "" "Selected file already exists.\n" "Overwrite file?" msgstr "" #: src/rig-state.c:313 src/rig-state.c:347 #, c-format msgid "" "There was an error saving the settings to:\n" "\n" " %s\n" "\n" " Examine the log messages for further info." msgstr "" #: src/rig-state.c:406 #, c-format msgid "%s: Error loading rig file (%s)" msgstr "" #: src/rig-state.c:419 #, c-format msgid "%s: Error reading rig id (%s)" msgstr "" #: src/rig-state.c:430 #, c-format msgid "" "%s: ID mismatch detected: state id is %d\n" "while current rig id is %d" msgstr "" #: src/rig-state.c:449 #, c-format msgid "%s: Applying settings (model=%d)" msgstr "" #: src/rig-state.c:579 #, c-format msgid "%s: RIG ID is invalid (%d)" msgstr "" #: src/rig-state.c:654 #, c-format msgid "%s: Error building state data (%s)" msgstr "" #: src/rig-state.c:665 #, c-format msgid "" "%s: Could not create data file (%s)\n" "%s" msgstr "" #: src/rig-state.c:682 #, c-format msgid "%s: Error writing config data (%s)" msgstr "" #: src/rig-state.c:689 #, c-format msgid "%s: Wrote only %d instead of %d chars" msgstr "" #: src/rig-state.c:695 #, c-format msgid "" "%s: Rig state saved successfully to\n" "%s." msgstr "" #: src/rig-state.c:724 #, c-format msgid "" "Selected rig state has been saved for model %d,\n" "while the current rig model is %d.\n" "Do you want to try to apply settings?" msgstr "" #: src/rig-state.c:771 src/rig-state.c:826 src/rig-state.c:869 #: src/rig-state.c:909 #, c-format msgid "" "%s:%d: Could nor read param %s::%s\n" "(%s)" msgstr "" #: src/rig-state.c:788 #, c-format msgid "" "%s:%d:\n" "FLOAT value out of range: %.2f\n" "Floats expected to be between 0.0 and 1.0" msgstr "" grig-GRIG-0_9_0/po/tr.po000066400000000000000000001265631435534312400147640ustar00rootroot00000000000000# Turkish translation for grig # Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 # This file is distributed under the same license as the grig package. # zeugma , 2011. # msgid "" msgstr "" "Project-Id-Version: grig\n" "Report-Msgid-Bugs-To: groundstation-developer@lists.sourcforge.net\n" "POT-Creation-Date: 2021-03-12 19:07+0100\n" "PO-Revision-Date: 2011-09-02 12:59+0000\n" "Last-Translator: zeugma \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2013-03-15 12:01+0000\n" "X-Generator: Launchpad (build 16532)\n" #: src/grig-about.c:58 msgid "" "Copyright (C) 2001-2009 Alexandru Csete OZ9AEC>\n" "\n" "Grig is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published\n" "by the Free Software Foundation; either version 2 of the License,\n" "or (at your option) any later version.\n" "\n" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU Library General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, you can find a copy on the FSF\n" "website http://www.fsf.org/ or you can write to the\n" "\n" "Free Software Foundation, Inc.\n" "51 Franklin Street - Fifth Floor\n" "Boston\n" "MA 02110-1301\n" "USA.\n" msgstr "" #: src/grig-about.c:91 src/rig-gui-message-window.c:687 msgid "Grig" msgstr "Grig" #: src/grig-about.c:94 msgid "Copyright (C) 2001-2007 Alexandru Csete OZ9AEC" msgstr "Telif Hakkı (C) 2001-2007 Alexandru Csete OZ9AEC" #: src/grig-about.c:98 msgid "Grig Website" msgstr "Grig Web sayfası" #: src/grig-about.c:108 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " zeugma https://launchpad.net/~sunder67" #: src/grig-config.c:68 msgid "Checking GRIG configuration." msgstr "" #: src/grig-config.c:106 #, c-format msgid "..Configuration directory: %s" msgstr "" #: src/grig-config.c:107 src/rig-gui-message-window.c:80 msgid "ERROR" msgstr "HATA" #: src/grig-config.c:107 msgid "OK" msgstr "TAMAM" #: src/grig-config.c:147 msgid "..Radio config files:" msgstr "" #: src/grig-config.c:155 #, c-format msgid "%s: %s" msgstr "%s: %s" #: src/grig-config.c:172 #, c-format msgid "....%s OK" msgstr "....%s TAMAM" #: src/grig-debug.c:60 src/rig-gui-message-window.c:78 msgid "NONE" msgstr "HİÇBİRİ" #: src/grig-debug.c:60 msgid "HAMLIB" msgstr "" #: src/grig-debug.c:60 src/rig-gui-message-window.c:485 msgid "GRIG" msgstr "GRIG" #: src/grig-debug.c:89 #, c-format msgid "%s: Debug handler initialised." msgstr "" #: src/grig-debug.c:106 #, c-format msgid "%s: Shutting down debug handler." msgstr "" #: src/grig-menubar.c:59 msgid "_Radio" msgstr "_Radyo" #: src/grig-menubar.c:60 msgid "_Settings" msgstr "_Ayarlar" #: src/grig-menubar.c:61 msgid "_View" msgstr "_Görünüm" #: src/grig-menubar.c:62 msgid "_Tools" msgstr "_Araçlar" #: src/grig-menubar.c:63 msgid "_Help" msgstr "_Yardım" #: src/grig-menubar.c:66 msgid "_Info" msgstr "_Bilgi" #: src/grig-menubar.c:66 msgid "Show info about radio" msgstr "" #: src/grig-menubar.c:67 msgid "St_op daemon" msgstr "" #: src/grig-menubar.c:67 msgid "Stop the Grig daemon" msgstr "" #: src/grig-menubar.c:68 msgid "St_art daemon" msgstr "" #: src/grig-menubar.c:68 msgid "Start the Grig daemon" msgstr "" #: src/grig-menubar.c:69 msgid "_Save State" msgstr "" #: src/grig-menubar.c:69 msgid "Save the state of the rig to a file" msgstr "" #: src/grig-menubar.c:70 msgid "_Load State" msgstr "" #: src/grig-menubar.c:70 msgid "Load the state of the rig from a file" msgstr "" #: src/grig-menubar.c:71 msgid "E_xit" msgstr "_Çıkış" #: src/grig-menubar.c:71 msgid "Exit the program" msgstr "Programdan çık" #: src/grig-menubar.c:74 msgid "_Debug Level" msgstr "" #: src/grig-menubar.c:74 msgid "Set Hamlib debug level" msgstr "" #: src/grig-menubar.c:77 msgid "Message _Window" msgstr "" #: src/grig-menubar.c:77 msgid "Show window with debug messages" msgstr "" #: src/grig-menubar.c:80 msgid "_SW Memory" msgstr "" #: src/grig-menubar.c:80 msgid "Software Memory Mamager" msgstr "" #: src/grig-menubar.c:81 msgid "_Band Map" msgstr "" #: src/grig-menubar.c:81 msgid "Show the band map" msgstr "" #: src/grig-menubar.c:82 msgid "S_pectrum Scope" msgstr "" #: src/grig-menubar.c:82 msgid "Show the spectrum scope" msgstr "" #: src/grig-menubar.c:85 msgid "_About Grig" msgstr "" #: src/grig-menubar.c:85 msgid "Show about dialog" msgstr "" #: src/grig-menubar.c:91 msgid "_No Debug" msgstr "" #: src/grig-menubar.c:91 msgid "Don't show any debug mesages" msgstr "" #: src/grig-menubar.c:92 msgid "_Bug" msgstr "" #: src/grig-menubar.c:92 msgid "Show error messages caused by possible bugs" msgstr "" #: src/grig-menubar.c:93 msgid "_Error" msgstr "_Hata" #: src/grig-menubar.c:93 msgid "Show run-time error messages" msgstr "" #: src/grig-menubar.c:94 msgid "_Warning" msgstr "" #: src/grig-menubar.c:94 msgid "Show warnings" msgstr "Uyarıları göster" #: src/grig-menubar.c:95 msgid "_Verbose" msgstr "" #: src/grig-menubar.c:95 msgid "Verbose reporting" msgstr "" #: src/grig-menubar.c:96 msgid "_Trace" msgstr "" #: src/grig-menubar.c:96 msgid "Trace everything" msgstr "" #: src/grig-menubar.c:102 msgid "_RX Level Controls" msgstr "" #: src/grig-menubar.c:102 msgid "Show receiver level controls" msgstr "" #: src/grig-menubar.c:103 msgid "_TX Level Controls" msgstr "" #: src/grig-menubar.c:103 msgid "Show transmitter level controls" msgstr "" #: src/grig-menubar.c:104 msgid "_DCS/CTCSS" msgstr "_DCS/CTCSS" #: src/grig-menubar.c:104 msgid "Show DCS and CTCSS controls" msgstr "" #: src/grig-menubar.c:105 msgid "_Special Functions" msgstr "" #: src/grig-menubar.c:105 msgid "Radio specific functions" msgstr "" #: src/grig-menubar.c:217 #, c-format msgid "Failed to build menubar: %s" msgstr "" #: src/key-press-handler.c:57 msgid "Initialising key press handler" msgstr "" #: src/key-press-handler.c:67 msgid "Closing key press handler" msgstr "" #: src/main.c:170 msgid "Grig can not find some necessary data files.\n" msgstr "" #: src/main.c:171 msgid "This usually means that your installation is incomplete.\n" msgstr "" #: src/main.c:172 src/main.c:350 msgid "Sorry... but I can not continue..." msgstr "" #: src/main.c:348 msgid "Grig configuration check failed!\n" msgstr "" #: src/main.c:349 msgid "This usually means that your configuration is broken.\n" msgstr "" #: src/main.c:352 msgid "Proposed solutions:\n" msgstr "" #: src/main.c:439 #, c-format msgid "GRIG: %s %s" msgstr "GRIG: %s %s" #: src/main.c:484 #, c-format msgid "" "Received signal %d\n" "Trying clean exit..." msgstr "" #: src/main.c:560 msgid "" "Usage: grig [OPTION]...\n" "\n" msgstr "" #: src/main.c:561 msgid " -m, --model=ID select radio model number; see --list\n" msgstr "" #: src/main.c:563 msgid " -r, --rig-file=DEVICE set device of the radio, eg. /dev/ttyS0\n" msgstr "" #: src/main.c:565 msgid " -s, --speed=BAUD set transfer rate (serial port only)\n" msgstr "" #: src/main.c:567 msgid " -c, --civaddr=ID set CI-V address (decimal, ICOM only)\n" msgstr "" #: src/main.c:569 msgid "" " -C, --set-conf=param=val set config parameter (same as in rigctl)\n" msgstr "" #: src/main.c:571 msgid " -d, --debug=LEVEL set hamlib debug level (0..5)\n" msgstr "" #: src/main.c:573 msgid " -D, --delay=val set delay between commands in msec\n" msgstr "" #: src/main.c:575 msgid " -n, --nothread start daemon without using threads\n" msgstr "" #: src/main.c:577 msgid " -l, --list list supported radios and exit\n" msgstr "" #: src/main.c:579 msgid " -p, --enable-ptt enable PTT button\n" msgstr "" #: src/main.c:581 msgid " -P, --enable-pwr enable POWER button\n" msgstr "" #: src/main.c:583 msgid " -h, --help show this help message and exit\n" msgstr "" #: src/main.c:585 msgid " -v, --version show version information and exit\n" msgstr "" #: src/main.c:588 msgid "Example:" msgstr "Örnek:" #: src/main.c:590 msgid "" "Start grig using YAESU FT-990 connected to the first serial port, using 4800 " "baud and debug level set to warning:" msgstr "" #: src/main.c:596 msgid "or if you prefer the long options:" msgstr "" #: src/main.c:601 msgid "It is usually enough to specify the model ID and the DEVICE." msgstr "" #: src/main.c:604 msgid "" "If you start grig without any options it will use the Dummy backend and set " "the debug level to RIG_DEBUG_NONE. If you don't specify the transfer rate " "for the serial port, the default value will be used by the backend and even " "if you specify a value, it can be overridden by the backend." msgstr "" #: src/main.c:614 msgid "Debug levels:" msgstr "" #: src/main.c:616 msgid " 0 No debug, keep quiet.\n" msgstr "" #: src/main.c:617 msgid " 1 Serious bug.\n" msgstr "" #: src/main.c:618 msgid " 2 Error case (e.g. protocol, memory allocation).\n" msgstr "" #: src/main.c:619 msgid " 3 Warnings.\n" msgstr "" #: src/main.c:620 msgid " 4 Verbose information.\n" msgstr "" #: src/main.c:621 msgid " 5 Trace.\n" msgstr "" #: src/main.c:633 #, c-format msgid "grig %s\n" msgstr "grig %s\n" #: src/main.c:634 msgid "Graphical User Interface for the Hamradio Control Libraries." msgstr "" #: src/main.c:637 msgid "Copyright (C) 2001-2007 Alexandru Csete." msgstr "Telif Hakkı (C) 2001-2007 Alexandru Csete." #: src/main.c:639 msgid "This is free software; see the source for copying conditions. " msgstr "" #: src/main.c:641 msgid "" "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A " "PARTICULAR PURPOSE." msgstr "" #: src/main.c:687 msgid " ID Manufacturer Model Ver. Status\n" msgstr "" #: src/rig-daemon.c:397 msgid "No error" msgstr "Hata yok" #: src/rig-daemon.c:398 msgid "Invalid parameter" msgstr "Geçersiz parametre" #: src/rig-daemon.c:399 msgid "Invalid configuration" msgstr "Geçersiz yapılanma" #: src/rig-daemon.c:400 msgid "Memory shortage" msgstr "" #: src/rig-daemon.c:401 msgid "Function not implemented" msgstr "" #: src/rig-daemon.c:402 msgid "Communication timed out" msgstr "" #: src/rig-daemon.c:403 msgid "I/O error" msgstr "G/Ç hatası" #: src/rig-daemon.c:404 msgid "Internal Hamlib error :-(" msgstr "" #: src/rig-daemon.c:405 msgid "Protocol error" msgstr "" #: src/rig-daemon.c:406 msgid "Command rejected" msgstr "" #: src/rig-daemon.c:407 msgid "Command performed, but arg truncated" msgstr "" #: src/rig-daemon.c:408 msgid "Function not available" msgstr "" #: src/rig-daemon.c:409 msgid "VFO not targetable" msgstr "" #: src/rig-daemon.c:410 msgid "BUS error" msgstr "" #: src/rig-daemon.c:411 msgid "Collision on the bus" msgstr "" #: src/rig-daemon.c:412 msgid "NULL RIG handle or invalid pointer param" msgstr "" #: src/rig-daemon.c:413 msgid "Invalid VFO" msgstr "" #: src/rig-daemon.c:414 msgid "Argument out of domain" msgstr "" #: src/rig-daemon.c:481 #, c-format msgid "%s entered" msgstr "" #: src/rig-daemon.c:523 #, c-format msgid "%s: Initializing rig (id=%d)" msgstr "" #: src/rig-daemon.c:532 #, c-format msgid "%s: Init failed; Hamlib returned NULL!" msgstr "" #: src/rig-daemon.c:566 #, c-format msgid "%s: Setting conf param (%s,%s)..." msgstr "" #: src/rig-daemon.c:575 #, c-format msgid "%s: Set conf OK" msgstr "" #: src/rig-daemon.c:580 #, c-format msgid "%s: Set conf failed (%d)" msgstr "" #: src/rig-daemon.c:600 #, c-format msgid "%s: Failed to open rig port %s: %s (permissions?)" msgstr "" #: src/rig-daemon.c:611 #, c-format msgid "%s: Init successfull, executing post-init" msgstr "" #: src/rig-daemon.c:618 #, c-format msgid "%s: Starting rig daemon" msgstr "" #: src/rig-daemon.c:637 #, c-format msgid "%s: Daemon timeout started, ID: %d" msgstr "" #: src/rig-daemon.c:658 #, c-format msgid "%s: Failed to start daemon thread" msgstr "" #: src/rig-daemon.c:661 #, c-format msgid "%s: Error %d: %s" msgstr "" #: src/rig-daemon.c:671 #, c-format msgid "%s: Daemon thread started" msgstr "" #: src/rig-daemon.c:697 #, c-format msgid "%s: Sending stop signal to rig daemon" msgstr "" #: src/rig-daemon.c:731 #, c-format msgid "%s: Cleaning up rig" msgstr "" #: src/rig-daemon.c:803 #, c-format msgid "%s: GET bits: %d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" msgstr "" #: src/rig-daemon.c:826 #, c-format msgid "%s: SET bits: %d%d%d%d%d%d%d%d%d%d%d%d%dXXX" msgstr "" #: src/rig-daemon.c:880 #, c-format msgid "%s started." msgstr "%s başladı." #: src/rig-daemon.c:978 #, c-format msgid "%s stopped" msgstr "%s kapatıldı" #: src/rig-daemon.c:1024 #, c-format msgid "%s called." msgstr "" #: src/rig-daemon.c:1159 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FREQ_1:\n" "%s" msgstr "" #: src/rig-daemon.c:1186 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FREQ_1:\n" "%s" msgstr "" #: src/rig-daemon.c:1243 src/rig-daemon.c:1311 #, c-format msgid "%s: I can't figure out available VFOs (got %d)" msgstr "" #: src/rig-daemon.c:1256 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FREQ_2:\n" "%s" msgstr "" #: src/rig-daemon.c:1324 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FREQ_2:\n" "%s" msgstr "" #: src/rig-daemon.c:1353 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_RIT:\n" "%s" msgstr "" #: src/rig-daemon.c:1380 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_RIT:\n" "%s" msgstr "" #: src/rig-daemon.c:1409 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_XIT:\n" "%s" msgstr "" #: src/rig-daemon.c:1436 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_XIT:\n" "%s" msgstr "" #: src/rig-daemon.c:1465 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VFO:\n" "%s" msgstr "" #: src/rig-daemon.c:1492 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VFO:\n" "%s" msgstr "" #: src/rig-daemon.c:1521 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PSTAT:\n" "%s" msgstr "" #: src/rig-daemon.c:1548 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PSTAT:\n" "%s" msgstr "" #: src/rig-daemon.c:1577 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PTT:\n" "%s" msgstr "" #: src/rig-daemon.c:1604 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PTT:\n" "%s" msgstr "" #: src/rig-daemon.c:1634 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_MODE:\n" "%s" msgstr "" #: src/rig-daemon.c:1685 src/rig-daemon-check.c:409 #, c-format msgid "%s: Found frequency range for mode %d" msgstr "" #: src/rig-daemon.c:1688 src/rig-daemon-check.c:412 #, c-format msgid "%s: %.0f...(%.0f)...%.0f kHz" msgstr "%s: %.0f...(%.0f)...%.0f kHz" #: src/rig-daemon.c:1707 #, c-format msgid "%s: Can not find frequency range for this mode (%d)!Bug in backend?" msgstr "" #: src/rig-daemon.c:1780 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_MODE:\n" "%s" msgstr "" #: src/rig-daemon.c:1814 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_AGC:\n" "%s" msgstr "" #: src/rig-daemon.c:1844 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_AGC:\n" "%s" msgstr "" #: src/rig-daemon.c:1872 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ATT:\n" "%s" msgstr "" #: src/rig-daemon.c:1900 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ATT:\n" "%s" msgstr "" #: src/rig-daemon.c:1928 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PREAMP:\n" "%s" msgstr "" #: src/rig-daemon.c:1958 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PREAMP:\n" "%s" msgstr "" #: src/rig-daemon.c:1986 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_STRENGTH:\n" "%s" msgstr "" #: src/rig-daemon.c:2015 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_POWER:\n" "%s" msgstr "" #: src/rig-daemon.c:2043 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_POWER:\n" "%s" msgstr "" #: src/rig-daemon.c:2070 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SWR:\n" "%s" msgstr "" #: src/rig-daemon.c:2097 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ALC:\n" "%s" msgstr "" #: src/rig-daemon.c:2126 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ALC:\n" "%s" msgstr "" #: src/rig-daemon.c:2151 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_LOCK:\n" "%s" msgstr "" #: src/rig-daemon.c:2178 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_LOCK:\n" "%s" msgstr "" #: src/rig-daemon.c:2202 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_TOGGLE:\n" "%s" msgstr "" #: src/rig-daemon.c:2225 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_COPY:\n" "%s" msgstr "" #: src/rig-daemon.c:2248 #, c-format msgid "" "%s: Failed to execute RIG_CMD_VFO_XCHG:\n" "%s" msgstr "" #: src/rig-daemon.c:2270 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_SPLIT:\n" "%s" msgstr "" #: src/rig-daemon.c:2291 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SPLIT:\n" "%s" msgstr "" #: src/rig-daemon.c:2316 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_AF:\n" "%s" msgstr "" #: src/rig-daemon.c:2341 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_AF:\n" "%s" msgstr "" #: src/rig-daemon.c:2367 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_RF:\n" "%s" msgstr "" #: src/rig-daemon.c:2392 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_RF:\n" "%s" msgstr "" #: src/rig-daemon.c:2418 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_SQL:\n" "%s" msgstr "" #: src/rig-daemon.c:2443 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_SQL:\n" "%s" msgstr "" #: src/rig-daemon.c:2469 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_IFS:\n" "%s" msgstr "" #: src/rig-daemon.c:2494 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_IFS:\n" "%s" msgstr "" #: src/rig-daemon.c:2520 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_APF:\n" "%s" msgstr "" #: src/rig-daemon.c:2545 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_APF:\n" "%s" msgstr "" #: src/rig-daemon.c:2571 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_NR:\n" "%s" msgstr "" #: src/rig-daemon.c:2596 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_NR:\n" "%s" msgstr "" #: src/rig-daemon.c:2622 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_NOTCH:\n" "%s" msgstr "" #: src/rig-daemon.c:2647 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_NOTCH:\n" "%s" msgstr "" #: src/rig-daemon.c:2673 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PBT_IN:\n" "%s" msgstr "" #: src/rig-daemon.c:2698 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PBT_IN:\n" "%s" msgstr "" #: src/rig-daemon.c:2724 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_PBT_OUT:\n" "%s" msgstr "" #: src/rig-daemon.c:2749 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_PBT_OUT:\n" "%s" msgstr "" #: src/rig-daemon.c:2775 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_CW_PITCH:\n" "%s" msgstr "" #: src/rig-daemon.c:2800 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_CW_PITCH:\n" "%s" msgstr "" #: src/rig-daemon.c:2826 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_KEYSPD:\n" "%s" msgstr "" #: src/rig-daemon.c:2851 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_KEYSPD:\n" "%s" msgstr "" #: src/rig-daemon.c:2877 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_BKINDEL:\n" "%s" msgstr "" #: src/rig-daemon.c:2902 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_BKINDEL:\n" "%s" msgstr "" #: src/rig-daemon.c:2928 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_BALANCE:\n" "%s" msgstr "" #: src/rig-daemon.c:2953 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_BALANCE:\n" "%s" msgstr "" #: src/rig-daemon.c:2979 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VOXDEL:\n" "%s" msgstr "" #: src/rig-daemon.c:3004 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VOXDEL:\n" "%s" msgstr "" #: src/rig-daemon.c:3030 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_VOXGAIN:\n" "%s" msgstr "" #: src/rig-daemon.c:3055 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_VOXGAIN:\n" "%s" msgstr "" #: src/rig-daemon.c:3081 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_ANTIVOX:\n" "%s" msgstr "" #: src/rig-daemon.c:3106 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_ANTIVOX:\n" "%s" msgstr "" #: src/rig-daemon.c:3132 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_MICGAIN:\n" "%s" msgstr "" #: src/rig-daemon.c:3157 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_MICGAIN:\n" "%s" msgstr "" #: src/rig-daemon.c:3184 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_COMP:\n" "%s" msgstr "" #: src/rig-daemon.c:3210 #, c-format msgid "" "%s: Failed to execute RIG_CMD_SET_FUNC(%s):\n" "%s" msgstr "" #: src/rig-daemon.c:3240 #, c-format msgid "" "%s: Failed to execute RIG_CMD_GET_FUNC(%s):\n" "%s" msgstr "" #: src/rig-daemon.c:3259 #, c-format msgid "%s: Unknown command %d (grig bug)" msgstr "" #: src/rig-daemon.c:3352 #, c-format msgid "%s: %d" msgstr "%s: %d" #: src/rig-daemon-check.c:157 #, c-format msgid "%s: Can not find VFO list for this backend! Bug in backend?" msgstr "" #: src/rig-daemon-check.c:430 #, c-format msgid "%s: Can not find frequency range for this mode (%d)! Bug in backend?" msgstr "" #: src/rig-daemon-check.c:518 #, c-format msgid "%s: Could not get RF power" msgstr "" #: src/rig-daemon-check.c:533 #, c-format msgid "%s: Maximum RF power is %.3f watts" msgstr "" #: src/rig-daemon-check.c:545 #, c-format msgid "%s: Could not get signal strength" msgstr "" #: src/rig-daemon-check.c:560 #, c-format msgid "%s: Could not get SWR" msgstr "" #: src/rig-daemon-check.c:573 #, c-format msgid "%s: Could not get ALC" msgstr "" #: src/rig-daemon-check.c:586 #, c-format msgid "%s: Could not get AGC" msgstr "" #: src/rig-daemon-check.c:599 #, c-format msgid "%s: Could not get ATT" msgstr "" #: src/rig-daemon-check.c:612 #, c-format msgid "%s: Could not get PREAMP" msgstr "" #: src/rig-daemon-check.c:625 #, c-format msgid "%s: Could not get AF" msgstr "" #: src/rig-daemon-check.c:638 #, c-format msgid "%s: Could not get RF" msgstr "" #: src/rig-daemon-check.c:651 #, c-format msgid "%s: Could not get SQL" msgstr "" #: src/rig-daemon-check.c:666 #, c-format msgid "%s: Could not get IF shift" msgstr "" #: src/rig-daemon-check.c:679 #, c-format msgid "%s: Could not get APF" msgstr "" #: src/rig-daemon-check.c:692 #, c-format msgid "%s: Could not get NR" msgstr "" #: src/rig-daemon-check.c:705 #, c-format msgid "%s: Could not get NOTCH" msgstr "" #: src/rig-daemon-check.c:718 #, c-format msgid "%s: Could not get PBT IN" msgstr "" #: src/rig-daemon-check.c:731 #, c-format msgid "%s: Could not get PBT OUT" msgstr "" #: src/rig-daemon-check.c:744 #, c-format msgid "%s: Could not get CW pitch" msgstr "" #: src/rig-daemon-check.c:757 #, c-format msgid "%s: Could not get CW speed" msgstr "" #: src/rig-daemon-check.c:770 #, c-format msgid "%s: Could not get break-in delay" msgstr "" #: src/rig-daemon-check.c:783 #, c-format msgid "%s: Could not get balance" msgstr "" #: src/rig-daemon-check.c:796 #, c-format msgid "%s: Could not get VOX delay" msgstr "" #: src/rig-daemon-check.c:809 #, c-format msgid "%s: Could not get VOX gain" msgstr "" #: src/rig-daemon-check.c:822 #, c-format msgid "%s: Could not get anti-vox" msgstr "" #: src/rig-daemon-check.c:835 #, c-format msgid "%s: Could not get compression level" msgstr "" #: src/rig-daemon-check.c:848 #, c-format msgid "%s: Could not get MIC gain" msgstr "" #: src/rig-daemon-check.c:954 #, c-format msgid "%s: Could not get LOCK status" msgstr "" #: src/rig-daemon-check.c:969 #, c-format msgid "%s: Could not get %s status" msgstr "" #: src/rig-data.c:352 src/rig-data.c:544 #, c-format msgid "%s: Invalid target: %d\n" msgstr "" #: src/rig-gui-buttons.c:148 src/rig-gui-smeter.c:75 msgid "Power" msgstr "Güç" #: src/rig-gui-buttons.c:149 msgid "Power status" msgstr "" #: src/rig-gui-buttons.c:193 msgid "PTT" msgstr "" #: src/rig-gui-buttons.c:194 msgid "Push to talk" msgstr "" #: src/rig-gui-buttons.c:238 msgid "Lock" msgstr "" #: src/rig-gui-buttons.c:239 msgid "Lock tuning dial" msgstr "" #: src/rig-gui-buttons.c:284 msgid "ATT OFF" msgstr "" #: src/rig-gui-buttons.c:307 msgid "Attenuator level" msgstr "" #: src/rig-gui-buttons.c:344 msgid "PREAMP OFF" msgstr "" #: src/rig-gui-buttons.c:367 msgid "Preamp level" msgstr "" #: src/rig-gui-ctrl2.c:86 src/rig-gui-info-data.h:172 msgid "AM" msgstr "" #: src/rig-gui-ctrl2.c:87 src/rig-gui-info-data.h:165 #: src/rig-gui-info-data.h:173 msgid "CW" msgstr "" #: src/rig-gui-ctrl2.c:88 src/rig-gui-info-data.h:174 msgid "USB" msgstr "USB" #: src/rig-gui-ctrl2.c:89 src/rig-gui-info-data.h:175 msgid "LSB" msgstr "" #: src/rig-gui-ctrl2.c:90 src/rig-gui-info-data.h:176 msgid "RTTY" msgstr "" #: src/rig-gui-ctrl2.c:91 msgid "FM Narrow" msgstr "" #: src/rig-gui-ctrl2.c:92 msgid "FM Wide" msgstr "" #: src/rig-gui-ctrl2.c:93 msgid "CW Rev" msgstr "" #: src/rig-gui-ctrl2.c:94 msgid "RTTY Rev" msgstr "" #: src/rig-gui-ctrl2.c:95 msgid "AM Synch" msgstr "" #: src/rig-gui-ctrl2.c:96 msgid "Pkt (LSB)" msgstr "" #: src/rig-gui-ctrl2.c:97 msgid "Pkt (USB)" msgstr "" #: src/rig-gui-ctrl2.c:98 msgid "Pkt (FM)" msgstr "" #: src/rig-gui-ctrl2.c:99 msgid "ECUSB" msgstr "" #: src/rig-gui-ctrl2.c:100 msgid "ECLSB" msgstr "" #: src/rig-gui-ctrl2.c:101 src/rig-gui-info-data.h:187 msgid "FAX" msgstr "" #: src/rig-gui-ctrl2.c:207 msgid "AGC OFF" msgstr "" #: src/rig-gui-ctrl2.c:208 msgid "Super Fast" msgstr "" #: src/rig-gui-ctrl2.c:209 msgid "Fast" msgstr "Hızlı" #: src/rig-gui-ctrl2.c:210 msgid "Medium" msgstr "Normal" #: src/rig-gui-ctrl2.c:211 msgid "Slow" msgstr "" #: src/rig-gui-ctrl2.c:212 msgid "Auto" msgstr "Otomaik" #: src/rig-gui-ctrl2.c:214 msgid "Automatic Gain Control Level" msgstr "" #: src/rig-gui-ctrl2.c:320 msgid "Communication mode" msgstr "" #: src/rig-gui-ctrl2.c:359 msgid "Wide" msgstr "" #: src/rig-gui-ctrl2.c:360 msgid "Normal" msgstr "Normal" #: src/rig-gui-ctrl2.c:361 msgid "Narrow" msgstr "" #: src/rig-gui-ctrl2.c:362 msgid "[User]" msgstr "" #: src/rig-gui-ctrl2.c:384 msgid "Passband Width" msgstr "" #: src/rig-gui-ctrl2.c:443 #, c-format msgid "ANT %d" msgstr "" #: src/rig-gui-ctrl2.c:460 msgid "Antenna Port" msgstr "" #: src/rig-gui-func.c:82 #, c-format msgid "%s: FUNC window already visible." msgstr "" #: src/rig-gui-func.c:93 #, c-format msgid "%s (Special Functions)" msgstr "" #: src/rig-gui-func.c:160 #, c-format msgid "%s: FUNC window is not visible." msgstr "" #: src/rig-gui-func.c:185 src/rig-gui-rx.c:242 src/rig-gui-tx.c:238 #, c-format msgid "%s:%d: Invalid level %d" msgstr "" #: src/rig-gui-func.c:227 src/rig-gui-rx.c:507 src/rig-gui-tx.c:463 msgid "Rig has no support." msgstr "" #: src/rig-gui-info.c:115 msgid "Radio Info" msgstr "" #: src/rig-gui-info.c:250 msgid "RIT:" msgstr "" #: src/rig-gui-info.c:270 msgid "XIT:" msgstr "" #: src/rig-gui-info.c:289 msgid "IF-SHIFT:" msgstr "" #: src/rig-gui-info.c:308 msgid "Max. Offsets" msgstr "" #: src/rig-gui-info.c:346 msgid "LEVEL" msgstr "SEVİYE" #: src/rig-gui-info.c:356 src/rig-gui-info.c:987 msgid "READ" msgstr "" #: src/rig-gui-info.c:364 src/rig-gui-info.c:995 msgid "WRITE" msgstr "" #: src/rig-gui-info.c:392 src/rig-gui-info.c:401 src/rig-gui-info.c:1023 #: src/rig-gui-info.c:1032 src/rig-gui-info.c:1110 msgid "-" msgstr "-" #: src/rig-gui-info.c:397 src/rig-gui-info.c:406 src/rig-gui-info.c:1028 #: src/rig-gui-info.c:1037 src/rig-gui-info.c:1115 msgid "X" msgstr "X" #: src/rig-gui-info.c:442 msgid "Port Type:" msgstr "" #: src/rig-gui-info.c:460 src/rig-gui-info.c:489 src/rig-gui-info.c:518 #: src/rig-gui-info.c:632 src/rig-gui-info.c:667 msgid "Unknown" msgstr "Bilinmeyen" #: src/rig-gui-info.c:471 msgid "DCD Type:" msgstr "" #: src/rig-gui-info.c:500 msgid "PTT Type:" msgstr "" #: src/rig-gui-info.c:529 msgid "Serial Speed:" msgstr "" #: src/rig-gui-info.c:540 #, c-format msgid "%d..%d baud" msgstr "" #: src/rig-gui-info.c:547 src/rig-gui-info.c:574 src/rig-gui-info.c:601 #: src/rig-gui-info.c:636 src/rig-gui-info.c:671 src/rig-gui-info-data.h:67 #: src/rig-gui-info-data.h:68 src/rig-gui-info-data.h:69 #: src/rig-gui-info-data.h:103 msgid "N/A" msgstr "YOK" #: src/rig-gui-info.c:558 msgid "Data bits:" msgstr "" #: src/rig-gui-info.c:585 msgid "Stop bits:" msgstr "" #: src/rig-gui-info.c:612 msgid "Parity:" msgstr "" #: src/rig-gui-info.c:647 msgid "Handshake:" msgstr "" #: src/rig-gui-info.c:683 msgid "Interface" msgstr "Arayüz" #: src/rig-gui-info.c:720 msgid "STEP" msgstr "" #: src/rig-gui-info.c:730 msgid "MODES" msgstr "" #: src/rig-gui-info.c:845 msgid "PREAMP:" msgstr "" #: src/rig-gui-info.c:893 msgid "ATT:" msgstr "" #: src/rig-gui-info.c:939 msgid "Front End" msgstr "" #: src/rig-gui-info.c:977 msgid "FUNCTION" msgstr "" #: src/rig-gui-info.c:1071 msgid "VFO OP" msgstr "" #: src/rig-gui-info.c:1081 msgid "SET" msgstr "" #: src/rig-gui-info-data.h:44 msgid "PREAMP" msgstr "" #: src/rig-gui-info-data.h:45 msgid "ATT" msgstr "" #: src/rig-gui-info-data.h:46 src/rig-gui-info-data.h:82 msgid "VOX" msgstr "" #: src/rig-gui-info-data.h:47 msgid "AF" msgstr "" #: src/rig-gui-info-data.h:48 msgid "RF" msgstr "" #: src/rig-gui-info-data.h:49 src/rig-gui-info-data.h:99 msgid "SQL" msgstr "SQL" #: src/rig-gui-info-data.h:50 msgid "IF" msgstr "" #: src/rig-gui-info-data.h:51 src/rig-gui-info-data.h:90 src/rig-gui-rx.c:412 msgid "APF" msgstr "" #: src/rig-gui-info-data.h:52 src/rig-gui-info-data.h:88 msgid "NR" msgstr "" #: src/rig-gui-info-data.h:53 msgid "PBT_IN" msgstr "" #: src/rig-gui-info-data.h:54 msgid "PBT_OUT" msgstr "" #: src/rig-gui-info-data.h:55 msgid "CWPITCH" msgstr "" #: src/rig-gui-info-data.h:56 msgid "RFPOWER" msgstr "" #: src/rig-gui-info-data.h:57 msgid "MICGAIN" msgstr "" #: src/rig-gui-info-data.h:58 msgid "KEYSPD" msgstr "" #: src/rig-gui-info-data.h:59 msgid "NOTCHF" msgstr "" #: src/rig-gui-info-data.h:60 msgid "COMP" msgstr "" #: src/rig-gui-info-data.h:61 msgid "AGC" msgstr "" #: src/rig-gui-info-data.h:62 msgid "BKINDL" msgstr "" #: src/rig-gui-info-data.h:63 msgid "BALANCE" msgstr "" #: src/rig-gui-info-data.h:64 msgid "METER" msgstr "" #: src/rig-gui-info-data.h:65 msgid "VOXGAIN" msgstr "" #: src/rig-gui-info-data.h:66 msgid "ANTIVOX" msgstr "" #: src/rig-gui-info-data.h:70 msgid "RAWSTR" msgstr "" #: src/rig-gui-info-data.h:71 msgid "SQLSTAT" msgstr "" #: src/rig-gui-info-data.h:72 src/rig-gui-smeter.c:76 msgid "SWR" msgstr "" #: src/rig-gui-info-data.h:73 src/rig-gui-smeter.c:77 src/rig-gui-tx.c:347 msgid "ALC" msgstr "" #: src/rig-gui-info-data.h:74 msgid "STRENGTH" msgstr "" #: src/rig-gui-info-data.h:79 msgid "FAST AGC" msgstr "" #: src/rig-gui-info-data.h:80 msgid "NB" msgstr "" #: src/rig-gui-info-data.h:81 src/rig-gui-tx.c:388 msgid "COMPR" msgstr "" #: src/rig-gui-info-data.h:83 msgid "TONE" msgstr "" #: src/rig-gui-info-data.h:84 msgid "CTCSS" msgstr "" #: src/rig-gui-info-data.h:85 msgid "SEMI BK" msgstr "" #: src/rig-gui-info-data.h:86 msgid "FULL BK" msgstr "" #: src/rig-gui-info-data.h:87 msgid "ANF" msgstr "" #: src/rig-gui-info-data.h:89 msgid "AIP" msgstr "" #: src/rig-gui-info-data.h:91 msgid "MON" msgstr "" #: src/rig-gui-info-data.h:92 msgid "MAN NOTCH" msgstr "" #: src/rig-gui-info-data.h:93 msgid "RNF" msgstr "" #: src/rig-gui-info-data.h:94 msgid "AUTO RO" msgstr "" #: src/rig-gui-info-data.h:95 msgid "LOCK" msgstr "" #: src/rig-gui-info-data.h:96 msgid "MUTE" msgstr "" #: src/rig-gui-info-data.h:97 msgid "VOICE SCAN" msgstr "" #: src/rig-gui-info-data.h:98 msgid "REV TRX" msgstr "" #: src/rig-gui-info-data.h:100 msgid "ABM" msgstr "" #: src/rig-gui-info-data.h:101 msgid "BEAT CANC" msgstr "" #: src/rig-gui-info-data.h:102 msgid "MAN BC" msgstr "" #: src/rig-gui-info-data.h:104 msgid "AFC" msgstr "" #: src/rig-gui-info-data.h:105 msgid "SATMODE" msgstr "" #: src/rig-gui-info-data.h:106 msgid "SCOPE" msgstr "" #: src/rig-gui-info-data.h:107 msgid "RESUME" msgstr "" #: src/rig-gui-info-data.h:108 msgid "TBURST" msgstr "" #: src/rig-gui-info-data.h:109 msgid "TUNER" msgstr "" #: src/rig-gui-info-data.h:114 src/rig-gui-info-data.h:123 #: src/rig-gui-info-data.h:134 src/rig-gui-info-data.h:148 #: src/rig-gui-info-data.h:155 src/rig-gui-smeter.c:74 msgid "None" msgstr "Yok" #: src/rig-gui-info-data.h:115 src/rig-gui-info-data.h:124 msgid "Legacy" msgstr "" #: src/rig-gui-info-data.h:116 msgid "SER_DTR" msgstr "" #: src/rig-gui-info-data.h:117 msgid "SER_RTS" msgstr "" #: src/rig-gui-info-data.h:118 src/rig-gui-info-data.h:128 msgid "PARPORT" msgstr "" #: src/rig-gui-info-data.h:125 msgid "SER_DSR" msgstr "" #: src/rig-gui-info-data.h:126 msgid "SER_CTS" msgstr "" #: src/rig-gui-info-data.h:127 msgid "SER_CAR" msgstr "" #: src/rig-gui-info-data.h:135 msgid "Serial" msgstr "" #: src/rig-gui-info-data.h:136 msgid "Network" msgstr "Ağ" #: src/rig-gui-info-data.h:137 msgid "Device" msgstr "Aygıt" #: src/rig-gui-info-data.h:138 msgid "Packet" msgstr "" #: src/rig-gui-info-data.h:139 msgid "DTMF" msgstr "" #: src/rig-gui-info-data.h:140 msgid "IrDA" msgstr "IrDA" #: src/rig-gui-info-data.h:141 msgid "RPC" msgstr "" #: src/rig-gui-info-data.h:142 msgid "Parallel" msgstr "Paralel" #: src/rig-gui-info-data.h:149 msgid "Odd" msgstr "" #: src/rig-gui-info-data.h:150 msgid "Even" msgstr "" #: src/rig-gui-info-data.h:156 msgid "XONXOFF" msgstr "" #: src/rig-gui-info-data.h:157 msgid "Hardware" msgstr "Donanım" #: src/rig-gui-info-data.h:162 msgid "OFF" msgstr "KAPALI" #: src/rig-gui-info-data.h:163 msgid "FREQ" msgstr "FREKANS" #: src/rig-gui-info-data.h:164 msgid "RXMODE" msgstr "" #: src/rig-gui-info-data.h:166 msgid "EMG" msgstr "" #: src/rig-gui-info-data.h:167 msgid "JAP" msgstr "" #: src/rig-gui-info-data.h:177 msgid "FM" msgstr "" #: src/rig-gui-info-data.h:178 msgid "WFM" msgstr "" #: src/rig-gui-info-data.h:179 msgid "CWR" msgstr "" #: src/rig-gui-info-data.h:180 msgid "RTTYR" msgstr "" #: src/rig-gui-info-data.h:181 msgid "AMS" msgstr "" #: src/rig-gui-info-data.h:182 msgid "PKTLSB" msgstr "" #: src/rig-gui-info-data.h:183 msgid "PKTUSB" msgstr "" #: src/rig-gui-info-data.h:184 msgid "PKTFM" msgstr "" #: src/rig-gui-info-data.h:185 msgid "ECSSUSB" msgstr "" #: src/rig-gui-info-data.h:186 msgid "ECSSLSB" msgstr "" #: src/rig-gui-info-data.h:193 msgid "COPY A=B" msgstr "" #: src/rig-gui-info-data.h:194 msgid "XCHG A/B" msgstr "" #: src/rig-gui-info-data.h:195 msgid "VFO->MEM" msgstr "" #: src/rig-gui-info-data.h:196 msgid "MEM->VFO" msgstr "" #: src/rig-gui-info-data.h:197 msgid "MEMCLEAR" msgstr "" #: src/rig-gui-info-data.h:198 msgid "UP" msgstr "" #: src/rig-gui-info-data.h:199 msgid "DOWN" msgstr "" #: src/rig-gui-info-data.h:200 msgid "BAND UP" msgstr "" #: src/rig-gui-info-data.h:201 msgid "BAND DOWN" msgstr "" #: src/rig-gui-info-data.h:202 msgid "LEFT" msgstr "" #: src/rig-gui-info-data.h:203 msgid "RIGHT" msgstr "" #: src/rig-gui-info-data.h:204 msgid "TUNE" msgstr "" #: src/rig-gui-info-data.h:205 msgid "TOGGLE" msgstr "" #: src/rig-gui-keypad.c:289 msgid "ENT" msgstr "" #: src/rig-gui-keypad.c:291 msgid "Begin manual frequency entry mode" msgstr "" #: src/rig-gui-keypad.c:301 msgid "CLR" msgstr "" #: src/rig-gui-keypad.c:303 msgid "Clear manual frequency entry mode" msgstr "" #: src/rig-gui-lcd.c:1396 msgid "kHz" msgstr "kHz" #: src/rig-gui-lcd.c:1421 msgid "RIT" msgstr "" #: src/rig-gui-lcd.c:1472 msgid "VFO A" msgstr "" #: src/rig-gui-lcd.c:1476 msgid "VFO B" msgstr "" #: src/rig-gui-lcd.c:1480 msgid "VFO C" msgstr "" #: src/rig-gui-lcd.c:1484 msgid "MAIN VFO" msgstr "" #: src/rig-gui-lcd.c:1488 msgid "SUB VFO" msgstr "" #: src/rig-gui-lcd.c:1492 msgid "MEM" msgstr "" #: src/rig-gui-lcd.c:1496 msgid "VFO ?" msgstr "" #: src/rig-gui-levels.c:52 msgid "Level Controls" msgstr "" #: src/rig-gui-levels.c:53 msgid "Show/hide level controls" msgstr "" #: src/rig-gui-message-window.c:65 msgid "Time" msgstr "" #: src/rig-gui-message-window.c:66 msgid "Source" msgstr "Kaynak" #: src/rig-gui-message-window.c:67 msgid "Level" msgstr "Seviye" #: src/rig-gui-message-window.c:68 msgid "Message" msgstr "İleti" #: src/rig-gui-message-window.c:79 msgid "BUG" msgstr "" #: src/rig-gui-message-window.c:81 msgid "WARNING" msgstr "UYARI" #: src/rig-gui-message-window.c:82 msgid "DEBUG" msgstr "" #: src/rig-gui-message-window.c:83 msgid "TRACE" msgstr "" #: src/rig-gui-message-window.c:162 msgid "Grig Message Window" msgstr "" #: src/rig-gui-message-window.c:407 msgid "Open Debug File" msgstr "" #: src/rig-gui-message-window.c:476 msgid "SYS" msgstr "" #: src/rig-gui-message-window.c:486 msgid "Log file seems corrupt" msgstr "" #: src/rig-gui-message-window.c:509 #, c-format msgid "%s:%d: Error open debug log (%s)" msgstr "" #: src/rig-gui-message-window.c:681 msgid "Hamlib" msgstr "" #: src/rig-gui-message-window.c:693 msgid "Other" msgstr "Diğer" #: src/rig-gui-message-window.c:703 msgid "Bugs" msgstr "" #: src/rig-gui-message-window.c:709 msgid "Errors" msgstr "Hatalar" #: src/rig-gui-message-window.c:715 msgid "Warning" msgstr "Uyarı" #: src/rig-gui-message-window.c:721 msgid "Verbose" msgstr "" #: src/rig-gui-message-window.c:727 msgid "Trace" msgstr "" #: src/rig-gui-message-window.c:740 msgid "Total" msgstr "Toplam" #: src/rig-gui-message-window.c:765 msgid " Summary " msgstr "" #: src/rig-gui-rx.c:97 #, c-format msgid "%s: RX window already visible." msgstr "" #: src/rig-gui-rx.c:108 #, c-format msgid "%s (RX Levels)" msgstr "" #: src/rig-gui-rx.c:172 #, c-format msgid "%s: RX window is not visible." msgstr "" #: src/rig-gui-rx.c:284 msgid "AF Gain" msgstr "" #: src/rig-gui-rx.c:304 msgid "RF Gain" msgstr "" #: src/rig-gui-rx.c:331 msgid "IF Shift" msgstr "" #: src/rig-gui-rx.c:351 msgid "CW Pitch" msgstr "" #: src/rig-gui-rx.c:371 msgid "PBT In" msgstr "" #: src/rig-gui-rx.c:391 msgid "PBT Out" msgstr "" #: src/rig-gui-rx.c:432 msgid "N.R." msgstr "" #: src/rig-gui-rx.c:452 msgid "NOTCH" msgstr "" #: src/rig-gui-rx.c:472 msgid "Squelch" msgstr "" #: src/rig-gui-rx.c:492 msgid "Balance" msgstr "Denge" #: src/rig-gui-smeter.c:83 msgid "0..5" msgstr "0..5" #: src/rig-gui-smeter.c:84 msgid "0..10" msgstr "0..10" #: src/rig-gui-smeter.c:85 msgid "0..50" msgstr "0..50" #: src/rig-gui-smeter.c:86 msgid "0..100" msgstr "0..100" #: src/rig-gui-smeter.c:87 msgid "0..500" msgstr "0..500" #: src/rig-gui-smeter.c:430 msgid "Select TX mode for the meter" msgstr "" #: src/rig-gui-smeter.c:479 msgid "Select TX meter scale" msgstr "" #: src/rig-gui-tx.c:98 #, c-format msgid "%s: TX window already visible." msgstr "" #: src/rig-gui-tx.c:109 #, c-format msgid "%s (TX Levels)" msgstr "" #: src/rig-gui-tx.c:176 #, c-format msgid "%s: TX window is not visible." msgstr "" #: src/rig-gui-tx.c:286 msgid "CW SPD" msgstr "" #: src/rig-gui-tx.c:306 msgid "BKIN DEL" msgstr "" #: src/rig-gui-tx.c:326 msgid "POWER" msgstr "" #: src/rig-gui-tx.c:368 msgid "MIC GAIN" msgstr "" #: src/rig-gui-tx.c:408 msgid "VOX GAIN" msgstr "" #: src/rig-gui-tx.c:428 msgid "VOX DEL" msgstr "" #: src/rig-gui-tx.c:448 msgid "ANTI VOX" msgstr "" #: src/rig-gui-vfo.c:119 msgid "Main / Sub" msgstr "" #: src/rig-gui-vfo.c:120 msgid "Toggle active VFO" msgstr "" #: src/rig-gui-vfo.c:123 msgid "A / B" msgstr "" #: src/rig-gui-vfo.c:124 msgid "Toggle between available VFOs" msgstr "" #: src/rig-gui-vfo.c:235 msgid "Main = Sub" msgstr "" #: src/rig-gui-vfo.c:236 msgid "Set Main VFO = Sub VFO" msgstr "" #: src/rig-gui-vfo.c:239 msgid "A = B" msgstr "A = B" #: src/rig-gui-vfo.c:240 msgid "Set VFO B = VFO A" msgstr "" #: src/rig-gui-vfo.c:304 msgid "Main«»Sub" msgstr "" #: src/rig-gui-vfo.c:305 msgid "Exchange Main and sub VFOs" msgstr "" #: src/rig-gui-vfo.c:308 msgid "A«»B" msgstr "A«»B" #: src/rig-gui-vfo.c:309 msgid "Exchange VFO A and B" msgstr "" #: src/rig-gui-vfo.c:370 msgid "Split" msgstr "" #: src/rig-gui-vfo.c:371 msgid "Toggle split mode operation" msgstr "" #: src/rig-gui-vfo.c:399 msgid "M / V" msgstr "" #: src/rig-gui-vfo.c:400 msgid "Toggle between memory and VFO" msgstr "" #: src/rig-selector.c:116 msgid "" "Connect to the selected radio.Grig will attempt to establish connection to " "the selected radio using the specified settings. If the connection is " "successful, the main application window will be loaded." msgstr "" #: src/rig-selector.c:125 msgid "Cancel radio selection. This will end grig." msgstr "" #: src/rig-selector.c:130 msgid "" "Add a new radio to the list.A new configuration window will be shown " "allowing you to select a radio and specify the connection settings." msgstr "" #: src/rig-selector.c:139 msgid "Delete the currently selected radio." msgstr "" #: src/rig-selector.c:145 msgid "Edit the settings for the currently selected radio." msgstr "" #: src/rig-selector.c:170 msgid "Select a Radio" msgstr "" #: src/rig-selector.c:230 msgid "Company" msgstr "" #: src/rig-selector.c:236 msgid "Model" msgstr "Model" #: src/rig-selector.c:242 msgid "Port" msgstr "" #: src/rig-selector.c:248 msgid "Speed" msgstr "Hız" #: src/rig-selector.c:254 msgid "CI-V" msgstr "" #: src/rig-selector.c:262 msgid "DTR" msgstr "" #: src/rig-selector.c:270 msgid "RTS" msgstr "" #: src/rig-selector.c:483 #, c-format msgid "%s:%s: Failed to delete %s" msgstr "" #: src/rig-selector.c:488 #, c-format msgid "%s:%s: Removed %s" msgstr "" #: src/rig-state.c:130 msgid "Load Rig State" msgstr "" #: src/rig-state.c:139 src/rig-state.c:262 msgid "Rig state files (*.rig)" msgstr "" #: src/rig-state.c:144 src/rig-state.c:267 msgid "All files" msgstr "Tüm dosyalar" #: src/rig-state.c:164 #, c-format msgid "" "There was an error reading the settings from:\n" "\n" " %s\n" "\n" " Examine the log messages for further info." msgstr "" #: src/rig-state.c:182 #, c-format msgid "" "The selected file:\n" " %s\n" " does not exist or is not a regular file." msgstr "" #: src/rig-state.c:253 msgid "Save Rig State" msgstr "" #: src/rig-state.c:283 #, c-format msgid "" "%s: User selected new file:\n" "%s" msgstr "" #: src/rig-state.c:295 msgid "" "Selected file already exists.\n" "Overwrite file?" msgstr "" #: src/rig-state.c:313 src/rig-state.c:347 #, c-format msgid "" "There was an error saving the settings to:\n" "\n" " %s\n" "\n" " Examine the log messages for further info." msgstr "" #: src/rig-state.c:406 #, c-format msgid "%s: Error loading rig file (%s)" msgstr "" #: src/rig-state.c:419 #, c-format msgid "%s: Error reading rig id (%s)" msgstr "" #: src/rig-state.c:430 #, c-format msgid "" "%s: ID mismatch detected: state id is %d\n" "while current rig id is %d" msgstr "" #: src/rig-state.c:449 #, c-format msgid "%s: Applying settings (model=%d)" msgstr "" #: src/rig-state.c:579 #, c-format msgid "%s: RIG ID is invalid (%d)" msgstr "" #: src/rig-state.c:654 #, c-format msgid "%s: Error building state data (%s)" msgstr "" #: src/rig-state.c:665 #, c-format msgid "" "%s: Could not create data file (%s)\n" "%s" msgstr "" #: src/rig-state.c:682 #, c-format msgid "%s: Error writing config data (%s)" msgstr "" #: src/rig-state.c:689 #, c-format msgid "%s: Wrote only %d instead of %d chars" msgstr "" #: src/rig-state.c:695 #, c-format msgid "" "%s: Rig state saved successfully to\n" "%s." msgstr "" #: src/rig-state.c:724 #, c-format msgid "" "Selected rig state has been saved for model %d,\n" "while the current rig model is %d.\n" "Do you want to try to apply settings?" msgstr "" #: src/rig-state.c:771 src/rig-state.c:826 src/rig-state.c:869 #: src/rig-state.c:909 #, c-format msgid "" "%s:%d: Could nor read param %s::%s\n" "(%s)" msgstr "" #: src/rig-state.c:788 #, c-format msgid "" "%s:%d:\n" "FLOAT value out of range: %.2f\n" "Floats expected to be between 0.0 and 1.0" msgstr "" grig-GRIG-0_9_0/src/000077500000000000000000000000001435534312400141335ustar00rootroot00000000000000grig-GRIG-0_9_0/src/.cvsignore000066400000000000000000000000461435534312400161330ustar00rootroot00000000000000Makefile Makefile.in grig .libs .deps grig-GRIG-0_9_0/src/Makefile.am000066400000000000000000000030141435534312400161650ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in # NB: don't define GDK_DISABLE_DEPRECATED/GTK_DISABLE_DEPRECATED # until the code base is converted to more recent gtk. AM_CPPFLAGS = \ @PACKAGE_CFLAGS@ -I.. \ -DG_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ -DDATADIR=\""$(datadir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)/grig"\" \ -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/grig"\" \ -DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" bin_PROGRAMS = grig grig_SOURCES = \ main.c \ compat.c compat.h \ grig-about.c grig-about.h \ grig-config.c grig-config.h \ grig-debug.c grig-debug.h \ grig-gtk-workarounds.c grig-gtk-workarounds.h \ grig-menubar.c grig-menubar.h \ key-press-handler.c key-press-handler.h \ radio-conf.c radio-conf.h \ rig-anomaly.c rig-anomaly.h \ rig-daemon.c rig-daemon.h \ rig-daemon-check.c rig-daemon-check.h \ rig-data.c rig-data.h \ rig-gui.c rig-gui.h \ rig-gui-buttons.c rig-gui-buttons.h \ rig-gui-ctrl2.c rig-gui-ctrl2.h \ rig-gui-info.c rig-gui-info.h rig-gui-info-data.h \ rig-gui-lcd.c rig-gui-lcd.h \ rig-gui-keypad.c rig-gui-keypad.h \ rig-gui-levels.c rig-gui-levels.h \ rig-gui-message-window.c rig-gui-message-window.h \ rig-gui-rx.c rig-gui-rx.h \ rig-gui-smeter.c rig-gui-smeter.h \ rig-gui-smeter-conv.c rig-gui-smeter-conv.h \ rig-gui-tx.c rig-gui-tx.h \ rig-gui-func.c rig-gui-func.h \ rig-gui-vfo.c rig-gui-vfo.h \ rig-selector.c rig-selector.h \ rig-state.c rig-state.h \ rig-utils.c rig-utils.h grig_LDADD = @PACKAGE_LIBS@ ## $(INTLLIBS) grig-GRIG-0_9_0/src/compat.c000066400000000000000000000104651435534312400155700ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete, OZ9AEC. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \brief Utilities to ensure compatibility across multiple platforms. */ #include #include "compat.h" #ifdef HAVE_CONFIG_H # include #endif /** \brief Get data directory. * * On linux it corresponds to the PACKAGE_DATA_DIR macro defined in config.h * The function returns a newly allocated gchar * which must be free when * it is no longer needed. */ gchar * get_data_dir () { gchar *dir = NULL; #ifdef G_OS_UNIX dir = g_strconcat (PACKAGE_DATA_DIR, G_DIR_SEPARATOR_S, "data", NULL); #else # ifdef G_OS_WIN32 gchar *buff = g_win32_get_package_installation_directory_of_module (NULL); dir = g_strconcat (buff, G_DIR_SEPARATOR_S, "share", G_DIR_SEPARATOR_S, "grig", G_DIR_SEPARATOR_S, "data", NULL); g_free (buff); # endif #endif return dir; } /** \brief Get absolute file name of a data file. * * This function returns the absolute file name of a data file. It is intended to * be a one-line filename constructor. * The returned gchar * should be freed when no longer needed. */ gchar * data_file_name (const gchar *data) { gchar *filename = NULL; gchar *buff; buff = get_data_dir (); filename = g_strconcat (buff, G_DIR_SEPARATOR_S, data, NULL); g_free (buff); return filename; } /** \brief Get pixmaps directory. * * On linux it corresponds to the PACKAGE_DATA_DIR/pixmaps/maps * The function returns a newly allocated gchar * which must be free when * it is no longer needed. */ gchar * get_pixmaps_dir () { gchar *dir = NULL; #ifdef G_OS_UNIX dir = g_strdup (PACKAGE_PIXMAPS_DIR); #else # ifdef G_OS_WIN32 gchar *buff = g_win32_get_package_installation_directory_of_module (NULL); dir = g_strconcat (buff, G_DIR_SEPARATOR_S, "share", G_DIR_SEPARATOR_S, "pixmaps", G_DIR_SEPARATOR_S, "grig", NULL); g_free (buff); # endif #endif return dir; } /** \brief Get absolute file name of a pixmap file. * * This function returns the absolute file name of a pixmap file. It is intended to * be a one-line filename constructor. * The returned gchar * should be freed when no longer needed. */ gchar * pixmap_file_name (const gchar *map) { gchar *filename = NULL; gchar *buff; buff = get_pixmaps_dir (); filename = g_strconcat (buff, G_DIR_SEPARATOR_S, map, NULL); g_free (buff); return filename; } /** \brief Get config directory. * \param subdir Optional subdirectory to append * \return A newly allocated string containing the conf dir. * * This funxction returns the absolute path of the user config directory * typically $HOME/.grig/ */ gchar * get_conf_dir (const gchar *subdir) { gchar *dir; if (subdir != NULL) { dir = g_strconcat (g_get_home_dir(), G_DIR_SEPARATOR_S, ".grig", G_DIR_SEPARATOR_S, subdir, NULL); } else { dir = g_strconcat (g_get_home_dir(), G_DIR_SEPARATOR_S, ".grig", NULL); } return dir; } grig-GRIG-0_9_0/src/compat.h000066400000000000000000000025251435534312400155730ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete, OZ9AEC. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef COMPAT_H #define COMPAT_H 1 gchar *get_data_dir (void); gchar *get_pixmaps_dir (void); gchar *pixmap_file_name (const gchar *map); gchar *data_file_name (const gchar *data); gchar *get_conf_dir (const gchar *subdir); #endif grig-GRIG-0_9_0/src/grig-about.c000066400000000000000000000101121435534312400163320ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file grig-about.c * \ingroup about * \brief About dialog window. * * This file contains the function to create and manage the about dialog box. */ #include #include #ifdef HAVE_CONFIG_H # include #endif #include "compat.h" #include "grig-about.h" const gchar *authors[] = { "Alexandru Csete, OZ9AEC.", "", "Contributors:", "Alessandro Zummo (keypad)", "Stephane Fillod (extra function, maintainer)", NULL }; const gchar license[] = N_("Copyright (C) 2001-2009 Alexandru Csete OZ9AEC>\n\n"\ "Grig is free software; you can redistribute it and/or modify\n"\ "it under the terms of the GNU General Public License as published\n"\ "by the Free Software Foundation; either version 2 of the License,\n"\ "or (at your option) any later version.\n\n"\ "This program is distributed in the hope that it will be useful,\n"\ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"\ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"\ "GNU Library General Public License for more details.\n\n"\ "You should have received a copy of the GNU General Public License\n"\ "along with this program; if not, you can find a copy on the FSF\n"\ "website http://www.fsf.org/ or you can write to the\n\n" "Free Software Foundation, Inc.\n"\ "51 Franklin Street - Fifth Floor\n" "Boston\n"\ "MA 02110-1301\n" "USA.\n"); /** \brief Show about dialog. * * This function creates and executes the about dialog. */ void grig_about_run () { GtkWidget *dialog; GdkPixbuf *icon; gchar *iconfile; dialog = gtk_about_dialog_new (); gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (dialog), _("Grig")); gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), VERSION); gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog), _("Copyright (C) 2001-2007 Alexandru Csete OZ9AEC")); gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), "http://groundstation.sourceforge.net/grig"); gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (dialog), _("Grig Website")); gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog), license); iconfile = pixmap_file_name ("grig-logo.png"); icon = gdk_pixbuf_new_from_file (iconfile, NULL); gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (dialog), icon); g_free (iconfile); g_object_unref (icon); gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), authors); gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (dialog), _("translator-credits")); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } grig-GRIG-0_9_0/src/grig-about.h000066400000000000000000000022661435534312400163520ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef GRIG_ABOUT_H #define GRIG_ABOUT_H 1 void grig_about_run (void); #endif grig-GRIG-0_9_0/src/grig-config.c000066400000000000000000000131451435534312400164760ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offsett: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \brief Grig configuration utilities. * \ingroup util * * These functions are used to read and save grig configuration data * to and from the grig.cfg file. For a description of the configuration * parameters see the Grig Technical Manual * */ #include #include #include #ifdef HAVE_CONFIG_H # include #endif #include "grig-debug.h" #include "grig-config.h" static gint check_grig_dir (void); static gint check_cfg_file (void); static gint check_rig_files (void); static gint check_rot_files (void); static gint check_mem_files (void); /** \brief Check configuration for compatibility. * \return TRUE if configuration is OK, FALSE if there was a non-fixable problem. * * This function checks the grig configuration for consistency and version * comaptibility. */ gint grig_config_check () { gboolean error = FALSE; grig_debug_local (RIG_DEBUG_VERBOSE, _("Checking GRIG configuration.")); /* check for .grig folder in user home directory */ error |= check_grig_dir (); error |= check_cfg_file (); error |= check_rig_files (); error |= check_rot_files (); error |= check_mem_files (); return !error; } /** \brief Check configuration directory. * \return 0 if successful, -1 if an error occurred. * * This function checks for the existence of the .grig directory in the * user's home folder and creates it if the directory doesn't already exist. */ static gint check_grig_dir () { gchar *dir; gint status = 0; dir = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, ".grig", NULL); if (!g_file_test (dir, G_FILE_TEST_IS_DIR)) { /* try to create directory */ status = g_mkdir (dir, 0750); } g_free (dir); grig_debug_local (RIG_DEBUG_VERBOSE, _("..Configuration directory: %s"), status ? _("ERROR") : _("OK")); return status; } static gint check_cfg_file () { gint status = 0; return status; } /** \brief Check version of .rig files and update if necessary * \return 0 if all checks/updates were successful, -1 if an error occurred * * This function checks all .rig files in the configuration directory. If the * config version is lower than GRIG_RIG_CFG_VER, it tries to update to the * new .rig format. If the config version is higher (i.e. grig has been downgraded) * the function raises an error flag. * * The function does nothing if the config version equals GRIG_RIG_CFG_VER. * */ static gint check_rig_files () { gint status = 0; GDir *dir = NULL; gchar *dirname; const gchar *fname; gchar *fpath; GError *err = NULL; grig_debug_local (RIG_DEBUG_VERBOSE, _("..Radio config files:")); /* scan .grig directory for .rig files */ dirname = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, ".grig", NULL); dir = g_dir_open (dirname, 0, &err); if (err != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s: %s"), __FUNCTION__, err->message); g_clear_error (&err); return -1; } while ((fname = g_dir_read_name (dir)) != NULL) { /* we are only interested in .rig files */ fpath = g_strconcat (dirname, G_DIR_SEPARATOR_S, fname, NULL); if ((!g_file_test (fpath, G_FILE_TEST_IS_DIR)) && (g_strrstr (fname, ".grc"))) { /* FIXME: check config version */ grig_debug_local (RIG_DEBUG_VERBOSE, _("....%s OK"), fname); } g_free (fpath); } g_dir_close (dir); g_free (dirname); return status; } /** \brief Check version of .rot files and update if necessary * \return 0 if all checks/updates were successful, -1 if an error occurred * * This function checks all .rot files in the configuration directory. If the * config version is lower than GRIG_ROT_CFG_VER, it tries to update to the * new .rot format. If the config version is higher (i.e. grig has been downgraded) * the function raises an error flag. * * The function does nothing if the config version equals GRIG_ROT_CFG_VER. * */ static gint check_rot_files () { gint status = 0; return status; } /** \brief Check version of .mem files and update if necessary * \return 0 if all checks/updates were successful, -1 if an error occurred * * This function checks all .mem files in the configuration directory. If the * config version is lower than GRIG_MEM_CFG_VER, it tries to update to the * new .mem format. If the config version is higher (i.e. grig has been downgraded) * the function raises an error flag. * * The function does nothing if the config version equals GRIG_MEM_CFG_VER. * */ static gint check_mem_files () { gint status = 0; return status; } grig-GRIG-0_9_0/src/grig-config.h000066400000000000000000000024531435534312400165030ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2004 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef GRIG_CONFIG_H #define GRIG_CONFIG_H 1 #define GRIG_CFG_VER 1 #define GRIG_RIG_CFG_VER 1 #define GRIG_ROT_CFG_VER 1 #define GRIG_MEM_CFG_VER 1 gint grig_config_check (void); #endif grig-GRIG-0_9_0/src/grig-debug.c000066400000000000000000000145721435534312400163240ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file grig-debug.c * \brief Manage debug messages. * * The functions in this file are used to log debug messages generated by * hamlib and grig itself. The debug messages are printed on stderr and * saved into a file, if the debug handler has been initialised with a file * name. */ #include #include #include #include #include #include #ifdef HAVE_CONFIG_H # include #endif #include "grig-debug.h" static enum rig_debug_level_e dbglvl = RIG_DEBUG_NONE; static gchar *logfname = NULL; /*static GIOChannel *logfile = NULL;*/ const gchar *SRC_TO_STR[] = {N_("NONE"), N_("HAMLIB"), N_("GRIG")}; static void manage_debug_message (debug_msg_src_t source, enum rig_debug_level_e debug_level, const gchar *message); /** \brief Initialise debug handler * \param filename File name of log file or NULL. * * This function initialises the debug handler so that it is ready to * manage debug messages coming from hamlib. If logfile is not NULL, the * debug messages will be saved to this file as well. */ void grig_debug_init (gchar *filename) { if (filename != NULL) { /*** FIXME: open file for write/append ***/ } /* set debug handler */ rig_set_debug_callback (grig_debug_hamlib_cb, NULL); /* send debug message to indicate readiness of debug handler */ grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Debug handler initialised."), __FUNCTION__); } /** \brief Close debug handler. * * This function cleans up the debug handler. Any further debug messages * will be handled by hamlib. */ void grig_debug_close () { /* send a final debug message */ grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Shutting down debug handler."), __FUNCTION__); /* remove debug handler */ rig_set_debug_callback (NULL, NULL); /* close log file if open */ } /** \brief Manage hamlib debug messages */ int grig_debug_hamlib_cb (enum rig_debug_level_e debug_level, rig_ptr_t user_data, const char *fmt, va_list ap) { gchar *msg; /* formatted debug message */ gchar **msgv; /* debug message line by line */ guint numlines; /* the number of lines in the message */ guint i; if (debug_level > dbglvl) return RIG_OK; /* create character string and split it in case it is a multi-line message */ msg = g_strdup_vprintf (fmt, ap); /* remove trailing \n */ g_strchomp (msg); /* split the message in case it is a multiline message */ msgv = g_strsplit_set (msg, "\n", 0); numlines = g_strv_length (msgv); g_free (msg); /* for each line in msgv, call the real debug handler which will print the debug message and save it to a logfile */ for (i = 0; i < numlines; i++) { manage_debug_message (MSG_SRC_HAMLIB, debug_level, msgv[i]); } g_strfreev (msgv); return RIG_OK; } /** \brief Manage GRIG debug messages. */ int grig_debug_local (enum rig_debug_level_e debug_level, const char *fmt, ...) { gchar *msg; /* formatted debug message */ gchar **msgv; /* debug message line by line */ guint numlines; /* the number of lines in the message */ guint i; va_list ap; if (debug_level > dbglvl) return RIG_OK; va_start (ap, fmt); /* create character string and split it in case it is a multi-line message */ msg = g_strdup_vprintf (fmt, ap); /* remove trailing \n */ g_strchomp (msg); /* split the message in case it is a multiline message */ msgv = g_strsplit_set (msg, "\n", 0); numlines = g_strv_length (msgv); g_free (msg); /* for each line in msgv, call the real debug handler which will print the debug message and save it to a logfile */ for (i = 0; i < numlines; i++) { manage_debug_message (MSG_SRC_GRIG, debug_level, msgv[i]); } va_end(ap); g_strfreev (msgv); return RIG_OK; } /** \brief Get the name of the current log file. * \return The name of the current log file or NULL. * * The function returns the name of the currently use log file or NULL * if the debug messages are not saved to file. In case of non NULL return * value, the function returns a newly allocated string that should be freed * by the caller when no longer needed. */ gchar * grig_debug_get_log_file () { if (logfname != NULL) { return g_strdup (logfname); } else { return NULL; } } static void manage_debug_message (debug_msg_src_t source, enum rig_debug_level_e debug_level, const gchar *message) { /* get the time */ GDateTime *tval = g_date_time_new_now_local (); gchar *msg_time = g_date_time_format (tval, "%Y/%m/%d %H:%M:%S"); g_fprintf (stderr, "%s%s%s%s%d%s%s\n", msg_time, GRIG_DEBUG_SEPARATOR, SRC_TO_STR[source], GRIG_DEBUG_SEPARATOR, debug_level, GRIG_DEBUG_SEPARATOR, message); g_free(msg_time); } void grig_debug_set_level (enum rig_debug_level_e level) { if ((level >= RIG_DEBUG_NONE) && (level <= RIG_DEBUG_TRACE)) { dbglvl = level; rig_set_debug (level); } } int grig_debug_get_level () { return (int) (dbglvl); } grig-GRIG-0_9_0/src/grig-debug.h000066400000000000000000000040221435534312400163160ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef GRIG_DEBUG_H #define GRIG_DEBUG_H 1 #include #include #define GRIG_DEBUG_SEPARATOR ";;" /** \brief Debug message sources. */ typedef enum { MSG_SRC_NONE = 0, /*!< No source, unknown source. */ MSG_SRC_HAMLIB = 1, /*!< Debug message comes from hamlib */ MSG_SRC_GRIG = 2 /*!< Debug message comes from grig itself */ } debug_msg_src_t; void grig_debug_init (gchar *filename); void grig_debug_close (void); int grig_debug_hamlib_cb (enum rig_debug_level_e debug_level, rig_ptr_t user_data, const char *fmt, va_list ap); int grig_debug_local (enum rig_debug_level_e debug_level, const char *fmt, ...); gchar *grig_debug_get_log_file (void); void grig_debug_set_level (enum rig_debug_level_e level); int grig_debug_get_level (void); #endif grig-GRIG-0_9_0/src/grig-gtk-workarounds.c000066400000000000000000000074421435534312400203750ustar00rootroot00000000000000/* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file grig-gtk-workarounds.c * \ingroup misc * \brief Utility functions to work around Gtk+bug and limitations. * * This file contains various utility functions to work around some bugs * and limitations in Gtk+. These are currently: * * Tooltips for GtkComboBox * * \bug These functionsshall eventually be removed as they appear or get * fixed in Gtk+ */ #include #include "compat.h" #include "grig-gtk-workarounds.h" /** \brief Create a horizontal pixmap button. * * The text will be placed to the right of the image. * file is only the icon name, not the full path. */ GtkWidget * grig_hpixmap_button (const gchar *file, const gchar *text, const gchar *tooltip) { GtkWidget *button; GtkWidget *image; GtkWidget *box; gchar *path; path = pixmap_file_name (file); image = gtk_image_new_from_file (path); g_free (path); box = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); if (text != NULL) gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); button = gtk_button_new (); gtk_widget_set_tooltip_text (button, tooltip); gtk_container_add (GTK_CONTAINER (button), box); return button; } /** \brief Create a vertical pixmap button. * * The text will be placed under the image. * file is only the icon name, not the full path. */ GtkWidget * grig_vpixmap_button (const gchar *file, const gchar *text, const gchar *tooltip) { GtkWidget *button; GtkWidget *image; GtkWidget *box; gchar *path; path = pixmap_file_name (file); image = gtk_image_new_from_file (path); g_free (path); box = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); if (text != NULL) gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); button = gtk_button_new (); gtk_widget_set_tooltip_text (button, tooltip); gtk_container_add (GTK_CONTAINER (button), box); return button; } /** \brief Create a horizontal pixmap button using stock pixmap. * * The text will be placed to the right of the image. * The icon size will be GTK_ICON_SIZE_BUTTON. */ GtkWidget * grig_hstock_button (const gchar *stock_id, const gchar *text, const gchar *tooltip) { GtkWidget *button; GtkWidget *image; GtkWidget *box; image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); box = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); if (text != NULL) gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); button = gtk_button_new (); gtk_widget_set_tooltip_text (button, tooltip); gtk_container_add (GTK_CONTAINER (button), box); return button; } grig-GRIG-0_9_0/src/grig-gtk-workarounds.h000066400000000000000000000030771435534312400204020ustar00rootroot00000000000000/* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef GRIG_GTK_WORKAROUNDS_H #define GRIG_GTK_WORKAROUNDS_H 1 GtkWidget *grig_hpixmap_button (const gchar *file, const gchar *text, const gchar *tooltip); GtkWidget *grig_vpixmap_button (const gchar *file, const gchar *text, const gchar *tooltip); GtkWidget *grig_hstock_button (const gchar *stock_id, const gchar *text, const gchar *tooltip); #endif grig-GRIG-0_9_0/src/grig-menubar.c000066400000000000000000000266471435534312400166750ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #include #include #include #include #include "grig-about.h" #include "grig-config.h" #include "grig-menubar.h" #include "rig-gui-info.h" #include "rig-gui-message-window.h" #include "rig-gui-rx.h" #include "rig-gui-tx.h" #include "rig-gui-func.h" #include "rig-state.h" #include "grig-debug.h" extern GtkWidget *grigapp; /* defined in main.c */ /* private function prototypes */ static void grig_menu_app_exit (GtkWidget *, gpointer); static void grig_menu_set_debug_level (GtkRadioAction *, gpointer); static void rx_window_cb (GtkToggleAction *toggleaction, gpointer data); static void tx_window_cb (GtkToggleAction *toggleaction, gpointer data); static void func_window_cb (GtkToggleAction *toggleaction, gpointer data); /** \brief Regular menu items. */ static GtkActionEntry entries[] = { { "FileMenu", NULL, N_("_Radio") }, { "SettingsMenu", NULL, N_("_Settings") }, { "ViewMenu", NULL, N_("_View") }, { "ToolsMenu", NULL, N_("_Tools") }, { "HelpMenu", NULL, N_("_Help") }, /* FileMenu */ { "Info", GTK_STOCK_DND, N_("_Info"), "I", N_("Show info about radio"), G_CALLBACK (rig_gui_info_run) }, { "Stop", GTK_STOCK_STOP, N_("St_op daemon"), NULL, N_("Stop the Grig daemon"), NULL }, { "Start", GTK_STOCK_EXECUTE, N_("St_art daemon"), NULL, N_("Start the Grig daemon"), NULL }, { "Save", GTK_STOCK_SAVE, N_("_Save State"), "S", N_("Save the state of the rig to a file"), G_CALLBACK (rig_state_save_cb) }, { "Load", GTK_STOCK_OPEN, N_("_Load State"), "O", N_("Load the state of the rig from a file"), G_CALLBACK (rig_state_load_cb) }, { "Exit", GTK_STOCK_QUIT, N_("E_xit"), "Q", N_("Exit the program"), G_CALLBACK (grig_menu_app_exit) }, /* SettingsMenu */ { "Debug", GTK_STOCK_HARDDISK, N_("_Debug Level"), NULL, N_("Set Hamlib debug level"), NULL }, /* ViewMenu */ { "MsgWin", GTK_STOCK_JUSTIFY_LEFT, N_("Message _Window"), NULL, N_("Show window with debug messages"), G_CALLBACK (rig_gui_message_window_show) }, /* ToolsMenu */ { "Mem", NULL, N_("_SW Memory"), NULL, N_("Software Memory Mamager"), NULL }, { "BandMap", GTK_STOCK_INDEX, N_("_Band Map"), NULL, N_("Show the band map"), NULL }, { "Spectrum", GTK_STOCK_JUMP_TO, N_("S_pectrum Scope"), NULL, N_("Show the spectrum scope"), NULL }, /* HelpMenu */ { "About", GTK_STOCK_ABOUT, N_("_About Grig"), NULL, N_("Show about dialog"), G_CALLBACK (grig_about_run) }, }; /** \brief Radio items for selectinghamlib debug level. */ static GtkRadioActionEntry radio_entries[] = { { "None", NULL, N_("_No Debug"), NULL, N_("Don't show any debug messages"), 0 }, { "Bug", NULL, N_("_Bug"), NULL, N_("Show error messages caused by possible bugs"), 1 }, { "Error", NULL, N_("_Error"), NULL, N_("Show run-time error messages"), 2 }, { "Warn", NULL, N_("_Warning"), NULL, N_("Show warnings"), 3 }, { "Verbose", NULL, N_("_Verbose"), NULL, N_("Verbose reporting"), 4 }, { "Trace", NULL, N_("_Trace"), NULL, N_("Trace everything"), 5 } }; static GtkToggleActionEntry toggle_entries[] = { { "LevelsRX", NULL, N_("_RX Level Controls"), NULL, N_("Show receiver level controls"), G_CALLBACK (rx_window_cb) }, { "LevelsTX", NULL, N_("_TX Level Controls"), NULL, N_("Show transmitter level controls"), G_CALLBACK (tx_window_cb) }, { "Tones", NULL, N_("_DCS/CTCSS"), NULL, N_("Show DCS and CTCSS controls"), NULL }, { "Func", GTK_STOCK_DIALOG_INFO, N_("_Special Functions"), NULL, N_("Radio specific functions"), G_CALLBACK (func_window_cb) }, }; /** \brief UI description string. */ static const char *menu_desc = "" " " "

" " " " " /*" " " " " "*/ " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " /* " " */ " " " " " " " " /* " " */ /* " " */ /* " " */ /* " " */ /* " " */ " " " " " " " " ""; static GtkUIManager *uimgr; /** \brief Create Grig menubar. * \return The menubar widget. * * This function creates and initializes the main menubar for grig. * It should be called from the main gui_create function. */ GtkWidget * grig_menubar_create () { GtkWidget *menubar; GtkActionGroup *actgrp; GtkAccelGroup *accgrp; GError *error; gint i; /* create action group */ actgrp = gtk_action_group_new ("MenuActions"); /* i18n */ for (i=0; imessage); g_error_free (error); return NULL; } /* now, finally, get the menubar */ menubar = gtk_ui_manager_get_widget (uimgr, "/GrigMenu"); return menubar; } /** \brief Exit application. * \param widget The widget which received the signal. * \param data User data (NULL). * * This function exits the main grig application. It is designed as a * callback function to be directly callable from the menubar, but it * does not use the parameters to anything. */ static void grig_menu_app_exit (GtkWidget *widget, gpointer data) { gtk_widget_destroy (grigapp); } /** \brief Set debug level. * \param action The GtkRadioAction item. * \param data Pointer to user data (not used). * * This function is called when the user selects a new debug level. * */ static void grig_menu_set_debug_level (GtkRadioAction *action, gpointer data) { grig_debug_set_level (gtk_radio_action_get_current_value (action)); } /** \brief Show/hide RX controls * * This function is called when the user selects the "RX controls" menu item. * Depending on the state of the item (on/off) we have to either open or close * the CW controls window */ static void rx_window_cb (GtkToggleAction *toggleaction, gpointer user_data) { if (gtk_toggle_action_get_active (toggleaction)) { rig_gui_rx_create (); } else { rig_gui_rx_close (); } } /** \brief Show/hide TX controls * * This function is called when the user selects the "TX controls" menu item. * Depending on the state of the item (on/off) we have to either open or close * the CW controls window */ static void tx_window_cb (GtkToggleAction *toggleaction, gpointer user_data) { if (gtk_toggle_action_get_active (toggleaction)) { rig_gui_tx_create (); } else { rig_gui_tx_close (); } } /** \brief Show/hide FUNC controls * * This function is called when the user selects the "Func controls" menu item. * Depending on the state of the item (on/off) we have to either open or close * the CW controls window */ static void func_window_cb (GtkToggleAction *toggleaction, gpointer user_data) { if (gtk_toggle_action_get_active (toggleaction)) { rig_gui_func_create (); } else { rig_gui_func_close (); } } /** \bried Force TX menu item. * * This function can be used to force the TX controls menu item to * TRUE or FALSE. This is useful when the TX controls window is closed * without any menu action */ void grig_menubar_force_tx_item (gboolean val) { GtkWidget *item = NULL; item = gtk_ui_manager_get_widget (uimgr, "/GrigMenu/ViewMenu/LevelsTX"); if (item != NULL) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), val); } /** \bried Force RX menu item. * * This function can be used to force the RX controls menu item to * TRUE or FALSE. This is useful when the RX controls window is closed * without any menu action */ void grig_menubar_force_rx_item (gboolean val) { GtkWidget *item = NULL; item = gtk_ui_manager_get_widget (uimgr, "/GrigMenu/ViewMenu/LevelsRX"); if (item != NULL) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), val); } /** \bried Force FUNC menu item. * * This function can be used to force the FUNC controls menu item to * TRUE or FALSE. This is useful when the FUNC controls window is closed * without any menu action */ void grig_menubar_force_func_item (gboolean val) { GtkWidget *item = NULL; item = gtk_ui_manager_get_widget (uimgr, "/GrigMenu/ViewMenu/Func"); if (item != NULL) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), val); } grig-GRIG-0_9_0/src/grig-menubar.h000066400000000000000000000025321435534312400166650ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef GRIG_MENUBAR_H #define GRIG_MENUBAR_H 1 GtkWidget *grig_menubar_create (void); void grig_menubar_force_tx_item (gboolean val); void grig_menubar_force_rx_item (gboolean val); void grig_menubar_force_func_item (gboolean val); #endif grig-GRIG-0_9_0/src/key-press-handler.c000066400000000000000000000057571435534312400176520ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file key-press-handler.c * \brief Manage key press events. * * This module is snoops key press events. To be written... */ #include #include #include #include #ifdef HAVE_CONFIG_H # include #endif #include "rig-data.h" #include "grig-debug.h" #include "rig-gui-lcd.h" #include "key-press-handler.h" static gint snooper (GtkWidget *grab_widget, GdkEventKey *event, gpointer func_data); static gint handler_id = -1; void key_press_handler_init () { grig_debug_local (RIG_DEBUG_VERBOSE, _("Initialising key press handler")); handler_id = gtk_key_snooper_install (snooper, NULL); } void key_press_handler_close () { grig_debug_local (RIG_DEBUG_VERBOSE, _("Closing key press handler")); gtk_key_snooper_remove (handler_id); } static gint snooper (GtkWidget *grab_widget, GdkEventKey *event, gpointer func_data) { gint stop_processing = FALSE; freq_t freq; switch (event->keyval) { /* Arrow Right: Increase frequency with lowest step */ case GDK_Right: if (event->type == GDK_KEY_PRESS) { freq = rig_data_get_freq (1) + rig_data_get_fstep (); rig_data_set_freq (1, freq); rig_gui_lcd_set_freq_digits(freq); } /* inhibit further processing of event */ stop_processing = TRUE; break; /* Arrow Left: Decrease frequency with lowest step */ case GDK_Left: if (event->type == GDK_KEY_PRESS) { freq = rig_data_get_freq (1) - rig_data_get_fstep (); rig_data_set_freq (1, freq); rig_gui_lcd_set_freq_digits(freq); } /* inhibit further processing of event */ stop_processing = TRUE; break; default: /* key is not handled */ stop_processing = FALSE; break; } return stop_processing; } grig-GRIG-0_9_0/src/key-press-handler.h000066400000000000000000000023021435534312400176360ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef KEY_PRESS_HANDLER_H #define KEY_PRESS_HANDLER_H 1 void key_press_handler_init (void); void key_press_handler_close (void); #endif grig-GRIG-0_9_0/src/main.c000066400000000000000000000473401435534312400152330ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file main.c * \ingroup main * \bief Main program file. * * Add some more text. * * \bug What do we do if we don't have getopt.h? Change to glib getopt in 2.6 * * \bug Debug level is not read from hamlib. Original debug level is * overwritten if used on rpcrig. */ #include #include #include #include #include #ifdef HAVE_CONFIG_H # include #endif #ifdef HAVE_GETOPT_H # include #endif #include "compat.h" #include "grig-config.h" #include "rig-gui.h" #include "grig-debug.h" #include "rig-gui-message-window.h" #include "rig-daemon.h" #include "rig-data.h" #include "rig-selector.h" #include "key-press-handler.h" /** \brief Main GUI application widget */ GtkWidget *grigapp; /* command line arguments */ /* FIXME: These need not be global! not in this baseline anyway. */ static gint rignum = 0; /*!< Flag indicating which radio to use.*/ static gchar *rigfile = NULL; /*!< The port where the rig is attached. */ static gchar *civaddr = NULL; /*!< CI-V address for ICOM rig. */ static gchar *rigconf = NULL; /*!< Configuration parameter. */ static gint rigspeed = 0; /*!< Optional serial speed. */ static gboolean listrigs = FALSE; /*!< List supported radios and exit. */ gint debug = RIG_DEBUG_NONE; /*!< Hamlib debug level. Note: not static since menubar.c needs access. */ static gint delay = 0; /*!< Command delay. */ static gboolean nothread = FALSE; /*!< Don't use threads, just a regular gtk-timeout. */ static gboolean pstat = FALSE; /*!< Enable power status button. */ static gboolean ptt = FALSE; /*!< Enable PTT button. */ static gboolean version = FALSE; /*!< Show version and exit. */ static gboolean help = FALSE; /*!< Show help and exit. */ //static gchar *rigcfg = NULL; /*!< .radio file name. */ /* group those which take no arg */ /** \brief Short options. */ #define SHORT_OPTIONS "m:r:s:c:C:d:D:nlpPhv" /** \brief Table of command line options. */ static struct option long_options[] = { {"model", 1, 0, 'm'}, {"rig-file", 1, 0, 'r'}, {"speed", 1, 0, 's'}, {"civaddr", 1, 0, 'c'}, {"set-conf", 1, 0, 'C'}, {"debug", 1, 0, 'd'}, {"delay", 1, 0, 'D'}, {"nothread", 0, 0, 'n'}, {"list", 0, 0, 'l'}, {"enable-ptt", 0, 0, 'p'}, {"enable-pwr", 0, 0, 'P'}, {"help", 0, 0, 'h'}, {"version", 0, 0, 'v'}, {NULL, 0, 0, 0} }; /** \brief Radio info to be used by list-rigs. */ typedef struct { gint id; /*!< Model ID. */ gchar *mfg; /*!< Manufacturer name (eg. KENWOOD). */ gchar *model; /*!< Radio model (eg. TS-440). */ gchar *version; /*!< Driver version (eg. 0.3.2) */ gint status; /*!< Driver status (0..5 use rig_strstatus). */ } grig_rig_info_t; /* Private function prototypes */ static void grig_list_rigs (void); static GtkWidget *grig_app_create (gint); static gint grig_app_delete (GtkWidget *, GdkEvent *, gpointer); static void grig_app_destroy (GtkWidget *, gpointer); static void grig_show_help (void); static void grig_show_version (void); static gint grig_list_add (const struct rig_caps *, void *); static gint grig_list_compare (gconstpointer, gconstpointer); static void grig_sig_handler (int sig); /** \bief Main program execution entry. * \param argc The number o command line arguments. * \param argv List of command line arguments. * \return Execution status (non-zero mean error occurred). * * Some description. * * \bug Add more text. * */ int main (int argc, char *argv[]) { gchar *fname; /* Initialize NLS support */ #ifdef ENABLE_NLS bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); bind_textdomain_codeset (PACKAGE, "UTF-8"); textdomain (PACKAGE); #endif gtk_set_locale (); gtk_init (&argc, &argv); /* setlocale (LCNUMERIC, "C"); */ /* check whether installation is complete by looking for some pixmps. This way we can avoid surprises later on, when exit is not an option anymore. */ //fname = g_strconcat (PACKAGE_PIXMAPS_DIR, G_DIR_SEPARATOR_S, "smeter.png", NULL); fname = pixmap_file_name ("smeter.png"); if (!g_file_test (fname, G_FILE_TEST_EXISTS)) { g_print ("\n\n"); g_print (_("Grig can not find some necessary data files.\n")); g_print (_("This usually means that your installation is incomplete.\n")); g_print (_("Sorry... but I can not continue...")); g_print ("\n\n"); g_print ("%s\n\n",fname); return 1; } g_free (fname); #if !GLIB_CHECK_VERSION(2,32,0) /* initialize threads; according to glib docs, this call will terminate the program if threads are not supported... then why doesn''t it work on FreeBSD? */ if (!g_thread_supported ()) g_thread_init (NULL); #endif /* decode command line arguments; this part of the code only sets the global flags and variables, whereafter we check each variable in descending priority order. This way it is easy to exit the program in case of -v -h and such. */ while(1) { int c; int option_index = 0; /* get next option */ c = getopt_long (argc, argv, SHORT_OPTIONS, long_options, &option_index); if (c == -1) break; switch (c) { /* set rig model*/ case 'm': if (!optarg) { help = TRUE; } else { rignum = atoi (optarg); } break; /* set rig port */ case 'r': if (!optarg) { help = TRUE; } else { rigfile = optarg; } break; /* set serial speed */ case 's': if (!optarg) { help = TRUE; } else { rigspeed = atoi (optarg); } break; /* set CIV address */ case 'c': if (!optarg) { help = TRUE; } else { civaddr = optarg; } break; /* set configuration parameter */ case 'C': if (!optarg) { help = TRUE; } else { rigconf = optarg; } break; /* list supported radios */ case 'l': listrigs = TRUE; break; /* set debug level */ case 'd': if (!optarg) { help = TRUE; } else { debug = atoi (optarg); } break; /* command delay */ case 'D': if (!optarg) { help = TRUE; } else { delay = atoi (optarg); } break; /* no threads */ case 'n': nothread = TRUE; break; /* enable PTT button */ case 'p': ptt = TRUE; break; /* enable POWER button */ case 'P': pstat = TRUE; break; /* show help */ case 'h': help = TRUE; break; /* show version */ case 'v': version = TRUE; break; /* unknown option: show usage */ default: help = TRUE; break; } } /* check command line option flags in decreasing priority. */ if (help) { grig_show_help (); return 0; } if (version) { grig_show_version (); return 0; } if (listrigs) { grig_list_rigs (); return 0; } /* we set hamlib debug level to TRACE while we fire up the daemon; it will be reset when we create the menubar */ grig_debug_set_level (RIG_DEBUG_TRACE); /* initialise debug handler */ grig_debug_init (NULL); /* check configuration */ if (!grig_config_check ()) { g_print ("\n\n"); g_print (_("Grig configuration check failed!\n")); g_print (_("This usually means that your configuration is broken.\n")); g_print (_("Sorry... but I can not continue...")); g_print ("\n\n"); g_print (_("Proposed solutions:\n")); return 1; } /* At this point, configuration is OK. */ /* 1. prio: .grc file */ /* 2. prio: -m or --model */ /* 3. prio: run rig-selector */ //g_print ("SELECT: %s\n", rig_selector_execute ()); /* launch rig daemon and pass the relevant command line options */ if (rig_daemon_start (rignum, rigfile, rigspeed, civaddr, rigconf, delay, nothread, ptt, pstat)) { return 1; } /* install key press event handler */ key_press_handler_init (); /* check whether the debug level is something meaningful (it could be set to something junk by user); if yes, set debuglevel, otherwise use RIG_DEBUG_WARN. */ if ((debug >= RIG_DEBUG_NONE) && (debug <= RIG_DEBUG_TRACE)) { grig_debug_set_level (debug); } else { grig_debug_set_level (RIG_DEBUG_WARN); } /* create application */ grigapp = grig_app_create (rignum); /* add contents */ gtk_container_add (GTK_CONTAINER (grigapp), rig_gui_create ()); gtk_widget_show (grigapp); gtk_main (); return 0; } /** \brief Create and initialize main application window. * \param rignum The index of the radio which is controlled by the app * \return A new GtkWindow widget. * * This function creates and initializes a new GtkWindow which can be used * by the main application to pack the rig controls in. * * \note This function creates no contents; that part is done by the * rig_gui.c package. */ static GtkWidget * grig_app_create (gint rignum) { GtkWidget *app; /* The main application */ gchar *title; /* the window title */ gchar *brand; gchar *model; gchar *icon; brand = rig_daemon_get_brand (); model = rig_daemon_get_model (); /* construct title */ title = g_strdup_printf (_("GRIG: %s %s"), brand, model); /* window icon file */ //icon = g_strconcat (PACKAGE_PIXMAPS_DIR, G_DIR_SEPARATOR_S, "ic910.png", NULL); icon = pixmap_file_name ("ic910.png"); /* create application */ app = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (app), title); gtk_window_set_icon_from_file (GTK_WINDOW (app), icon, NULL); g_free (title); g_free (brand); g_free (model); g_free (icon); /* connect delete and destroy signals */ g_signal_connect (G_OBJECT (app), "delete_event", G_CALLBACK (grig_app_delete), NULL); g_signal_connect (G_OBJECT (app), "destroy", G_CALLBACK (grig_app_destroy), NULL); /* register UNIX signals as well so that we have a chance to clean up hamlib. */ signal (SIGTERM, (void *) grig_sig_handler); signal (SIGINT, (void *) grig_sig_handler); signal (SIGABRT, (void *) grig_sig_handler); return app; } /** \brief Handle terminate signals. * \param sig The signal that has been received. * * This function is used to handle termination signals received by the program. * The currently caught signals are SIGTERM, SIGINT and SIGABRT. When one of * these signals is received, the function sends an error message to hamlib and * tries to make a clean exit. */ static void grig_sig_handler (int sig) { grig_debug_local (RIG_DEBUG_ERR, _("Received signal %d\n"\ "Trying clean exit..."), sig); gtk_widget_destroy (grigapp); } /** \brief Handle delete events. * \param widget The widget which received the delete event signal. * \param event Data structure describing the event. * \param data User data (NULL). * \param return Always FALSE to indicate that the app should be destroyed. * * This function handles the delete event received by the main application * window (eg. when the window is closed by the WM). This function simply * returns FALSE indicating that the main application window should be * destroyed by emitting the destroy signal. * */ static gint grig_app_delete (GtkWidget *widget, GdkEvent *event, gpointer data) { /* return FALSE so that Gtk+ will emit the destroy signal */ return FALSE; } /** \brief Handle destroy signals. * \param widget The widget which received the signal. * \param data User data (NULL). * * This function is called when the main application window receives the * destroy signal, ie. it is destroyed. This function signals all daemons * and other threads to stop and exits the Gtk+ main loop. * */ static void grig_app_destroy (GtkWidget *widget, gpointer data) { /* set debug level to TRACE */ grig_debug_set_level (RIG_DEBUG_TRACE); /* remove key press event handler */ key_press_handler_close (); /* stop daemons */ rig_daemon_stop (); /* GUI timers are stopped automatically */ /* stop timeouts */ /* shut down debug handler */ grig_debug_close (); /* exit Gtk+ */ gtk_main_quit (); } /** \brief Show help message. * * This function displays a brief help message for grig. */ static void grig_show_help () { g_print (_("Usage: grig [OPTION]...\n\n")); g_print (_(" -m, --model=ID "\ "select radio model number; see --list\n")); g_print (_(" -r, --rig-file=DEVICE "\ "set device of the radio, eg. /dev/ttyS0\n")); g_print (_(" -s, --speed=BAUD "\ "set transfer rate (serial port only)\n")); g_print (_(" -c, --civaddr=ID "\ "set CI-V address (decimal, ICOM only)\n")); g_print (_(" -C, --set-conf=param=val "\ "set config parameter (same as in rigctl)\n")); g_print (_(" -d, --debug=LEVEL "\ "set hamlib debug level (0..5)\n")); g_print (_(" -D, --delay=val "\ "set delay between commands in msec\n")); g_print (_(" -n, --nothread "\ "start daemon without using threads\n")); g_print (_(" -l, --list "\ "list supported radios and exit\n")); g_print (_(" -p, --enable-ptt "\ "enable PTT button\n")); g_print (_(" -P, --enable-pwr "\ "enable POWER button\n")); g_print (_(" -h, --help "\ "show this help message and exit\n")); g_print (_(" -v, --version "\ "show version information and exit\n")); g_print ("\n"); g_print (_("Example:")); g_print ("\n"); g_print (_("Start grig using YAESU FT-990 connected to the first "\ "serial port, using 4800 baud and debug level set to "\ "warning:")); g_print ("\n\n"); g_print (" grig -m 1016 -r /dev/ttyS0 -s 4800 -d 3"); g_print ("\n\n"); g_print (_("or if you prefer the long options:")); g_print ("\n\n"); g_print (" grig --model=1016 --rig-file=/dev/ttyS0 "\ "--speed=4800 --debug=3"); g_print ("\n\n"); g_print (_("It is usually enough to specify the model "\ "ID and the DEVICE.")); g_print ("\n\n"); g_print (_("If you start grig without any options it "\ "will use the Dummy backend "\ "and set the debug level to RIG_DEBUG_NONE. "\ "If you don't specify "\ "the transfer rate for the serial port, the "\ "default value will be "\ "used by the backend and even if you specify "\ "a value, it can be "\ "overridden by the backend.")); g_print ("\n\n"); g_print (_("Debug levels:")); g_print ("\n\n"); g_print (_(" 0 No debug, keep quiet.\n")); g_print (_(" 1 Serious bug.\n")); g_print (_(" 2 Error case (e.g. protocol, memory allocation).\n")); g_print (_(" 3 Warnings.\n")); g_print (_(" 4 Verbose information.\n")); g_print (_(" 5 Trace.\n")); g_print ("\n\n"); } /** \brief Show version info. * * This function shows the version information about grig. */ static void grig_show_version () { g_print (_("grig %s\n"), VERSION); g_print (_("Graphical User Interface for the "\ "Hamradio Control Libraries.")); g_print ("\n\n"); g_print (_("Copyright (C) 2001-2007 Alexandru Csete.")); g_print ("\n"); g_print (_("This is free software; see the source for "\ "copying conditions. ")); g_print (_("There is NO warranty; not even for MERCHANTABILITY " "or FITNESS FOR A PARTICULAR PURPOSE.")); g_print ("\n"); } /** \brief List rigs. * * This function lists the radios supported by hamlib. It shows the * manufacturer, model, driver version and driver status in a list * sorted by model number. * * The list of radios is obtained using the rig_list_foreach hamlib * function and storing each entry in a GArray. When all models have * been stored, the list is sorted by model number and printed. * * \bug Header string is not translated. * * \bug Should check retcode returned by rig_list_foreach. * * \sa grig_list_add, grig_list_compare */ static void grig_list_rigs () { GArray *array; gint i; grig_rig_info_t *info; /* create the array */ array = g_array_new (FALSE, FALSE, sizeof (grig_rig_info_t)); /* make hamlib quiet and load all backends */ grig_debug_set_level (RIG_DEBUG_NONE); rig_load_all_backends(); /* fill list using rig_list_foreach */ rig_list_foreach (grig_list_add, (void *) array); /* sort the array */ g_array_sort (array, grig_list_compare); g_print ("\n"); g_print (_(" ID Manufacturer Model "\ "Ver. Status\n")); g_print ("-----------------------------------------------"\ "----------------\n"); /* loop over each element of array; after printing one element free the dynamically allocated strings because GArray does not know about them */ for (i = 0; i < array->len; i++) { info = &g_array_index (array, grig_rig_info_t, i); g_print ("%5d %-16s %-22s %-6s %s\n", info->id, info->mfg, info->model, info->version, rig_strstatus (info->status)); /* free dynamic strings */ g_free (info->mfg); g_free (info->model); g_free (info->version); } g_print ("\n"); g_array_free (array,TRUE); } /** \brief Add new entry to list of radios. * \param caps Structure with the capabilities of thecurrent radio. * \param array Pointer to the GArray into which the new entry should be * stored. * \return Always 1 to keep rig_list_foreach running. * * This function is called by the rig_list_foreach hamlib function for each * supported radio. It copies the relevant data into a grig_rig_info_t * structure and adds the new entry to the GArray containing the list of * supported radios. * * \sa grig_list_rigs, grig_list_compare */ static gint grig_list_add (const struct rig_caps *caps, void *array) { grig_rig_info_t *info; /* create new entry */ info = g_malloc (sizeof (grig_rig_info_t)); /* fill values */ info->id = caps->rig_model; info->mfg = g_strdup (caps->mfg_name); info->model = g_strdup (caps->model_name); info->version = g_strdup (caps->version); info->status = caps->status; /* append new element to array */ array = (void *) g_array_append_vals ((GArray *) array, info, 1); /* keep on running */ return 1; } /** \brief Compare two rig info entries. * \param a Pointer to the first entry. * \param b Pointer to the second entry. * \return Negative value if a < b; zero if a = b; positive value if a > b. * * This function is used to compare two rig entries in the list of radios * when the list is sorted. It compares the model ID of the two radios. * * \sa grig_list_rigs, grig_list_add */ static gint grig_list_compare (gconstpointer a, gconstpointer b) { gint ida, idb; ida = ((grig_rig_info_t *) a)->id; idb = ((grig_rig_info_t *) b)->id; if (ida < idb) { return -1; } else if (ida > idb) { return 1; } else { return 0; } } grig-GRIG-0_9_0/src/radio-conf.c000066400000000000000000000111351435534312400163210ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #include #include #include #include "compat.h" #include "radio-conf.h" #define GROUP "Radio" #define KEY_VER "Version" #define KEY_MFG "Company" #define KEY_MODEL "Model" #define KEY_ID "ID" #define KEY_PORT "Port" #define KEY_SPEED "Speed" #define KEY_CIV "CIV" #define KEY_DTR "DTR" #define KEY_RTS "RTS" #define KEY_PTT "PTT" #define KEY_POW "POW" /** \brief REad radio configuration. * \param conf Pointer to a radio_conf_t structure where the data will be * stored. * * conf->name must contain the name of the configuration. The file name of * the configuration file is $HOME/.grig/name.grc */ gboolean radio_conf_read (radio_conf_t *conf) { GKeyFile *cfg = NULL; gchar *fname; if (conf->name == NULL) return FALSE; fname = g_strconcat (g_get_home_dir(), G_DIR_SEPARATOR_S, ".grig", G_DIR_SEPARATOR_S, conf->name, ".grc", NULL); /* open .grc file */ cfg = g_key_file_new (); g_key_file_load_from_file(cfg, fname, 0, NULL); if (cfg == NULL) { g_print ("%s: Could not load file %s\n", __FUNCTION__, fname); g_free (fname); return FALSE; } g_free (fname); /* read parameters */ /* FIXME error checking */ conf->company = g_key_file_get_string (cfg, GROUP, KEY_MFG, NULL); conf->model = g_key_file_get_string (cfg, GROUP, KEY_MODEL, NULL); conf->id = g_key_file_get_integer (cfg, GROUP, KEY_ID, NULL); conf->port = g_key_file_get_string (cfg, GROUP, KEY_PORT, NULL); conf->speed = g_key_file_get_integer (cfg, GROUP, KEY_SPEED, NULL); conf->civ = g_key_file_get_integer (cfg, GROUP, KEY_CIV, NULL); conf->dtr = g_key_file_get_integer (cfg, GROUP, KEY_DTR, NULL); conf->rts = g_key_file_get_integer (cfg, GROUP, KEY_RTS, NULL); conf->ptt = g_key_file_get_boolean (cfg, GROUP, KEY_PTT, NULL); conf->pow = g_key_file_get_boolean (cfg, GROUP, KEY_POW, NULL); conf->version = g_key_file_get_integer (cfg, GROUP, KEY_VER, NULL); g_key_file_free (cfg); return TRUE; } void radio_conf_save (radio_conf_t *conf) { GKeyFile *cfg = NULL; gchar *fname; gchar *data; gsize len; if (conf->name == NULL) return; /* create a config structure */ cfg = g_key_file_new(); g_key_file_set_string (cfg, GROUP, KEY_MFG, conf->company); g_key_file_set_string (cfg, GROUP, KEY_MODEL, conf->model); g_key_file_set_integer (cfg, GROUP, KEY_MFG, conf->id); g_key_file_set_string (cfg, GROUP, KEY_PORT, conf->port); g_key_file_set_integer (cfg, GROUP, KEY_SPEED, conf->speed); g_key_file_set_integer (cfg, GROUP, KEY_CIV, conf->civ); g_key_file_set_integer (cfg, GROUP, KEY_DTR, conf->dtr); g_key_file_set_integer (cfg, GROUP, KEY_RTS, conf->rts); g_key_file_set_boolean (cfg, GROUP, KEY_PTT, conf->ptt); g_key_file_set_boolean (cfg, GROUP, KEY_POW, conf->pow); g_key_file_set_integer (cfg, GROUP, KEY_VER, conf->version); /* convert to text sdata */ data = g_key_file_to_data (cfg, &len, NULL); fname = g_strconcat (g_get_home_dir(), G_DIR_SEPARATOR_S, ".grig", G_DIR_SEPARATOR_S, conf->name, ".grc", NULL); g_file_set_contents (fname, data, len, NULL); g_free (fname); g_free (data); g_key_file_free (cfg); } grig-GRIG-0_9_0/src/radio-conf.h000066400000000000000000000044241435534312400163310ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RADIO_CONF_H #define RADIO_CONF_H 1 #include /** \brief Possibilities for using DTR and CTS lines. */ typedef enum { LINE_OFF = 0, /*!< Turn line permanently OFF */ LINE_ON, /*!< Turn line permanently ON */ LINE_PTT, /*!< Use line for set PTT */ LINE_CW /*!< Use line for sending CW */ } ctrl_stat_t; /** \brief Radio configuration structure. */ typedef struct { gchar *name; /*!< Configuration name */ gchar *company; /*!< Rig manufacturer */ gchar *model; /*!< Rig model */ guint id; /*!< Hamlib ID of rig */ gchar *port; /*!< Port rig is attached to */ guint speed; /*!< Serial speed */ guint civ; /*!< CI-V address for icoms */ ctrl_stat_t dtr; /*!< DTR line usage */ ctrl_stat_t rts; /*!< RTS line usage */ gboolean ptt; /*!< Set/get PTT via CAT */ gboolean pow; /*!< Set/get power on/off via CAT */ guint version; /*!< Configuration version, see grig-config.h */ } radio_conf_t; gboolean radio_conf_read (radio_conf_t *conf); void radio_conf_save (radio_conf_t *conf); #endif grig-GRIG-0_9_0/src/rig-anomaly.c000066400000000000000000000154261435534312400165260ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-anomaly.c * \ingroup rigan * \brief Rig anomaly manager. * * This object manages the anomalies and errors that occur during communication * with the radio. The rig-daemon process raises a specific anomaly every time * the execution of a command does not succeed. The anomaly manager will then record the * anomaly and, if the same anomaly has occurred repeatedly within a certain time period, * disable the erroneous command. Therefore, this object needs access to the rig-data API. * Furthermore, in order to know about the various rig commands, this object needs * access to the rig-daemon data types as well. * * \bug File includes gtk.h but not really needed? */ #include #include #include "rig-data.h" #include "rig-daemon.h" #include "rig-anomaly.h" /** \brief Table defining the command disable threshold. * * If an anomaly has been raised a specific number of times * within a certain period, the * corresponding command is disabled. This table lists * the allowed number of erroneous executions within the time * specified in the ANOMALY_COUNT_PERIOD array. */ static const anomaly_count_t ANOMALY_COUNT_MAX = { 0, /* RIG_CMD_NONE */ 0, /* RIG_CMD_GET_FREQ_1 */ 0, /* RIG_CMD_SET_FREQ_1 */ 0, /* RIG_CMD_GET_FREQ_2 */ 0, /* RIG_CMD_SET_FREQ_2 */ 0, /* RIG_CMD_GET_RIT */ 0, /* RIG_CMD_SET_RIT */ 0, /* RIG_CMD_GET_XIT */ 0, /* RIG_CMD_SET_XIT */ 0, /* RIG_CMD_GET_VFO */ 0, /* RIG_CMD_SET_VFO */ 0, /* RIG_CMD_GET_PSTAT */ 0, /* RIG_CMD_SET_PSTAT */ 0, /* RIG_CMD_GET_PTT */ 0, /* RIG_CMD_SET_PTT */ 0, /* RIG_CMD_GET_MODE */ 0, /* RIG_CMD_SET_MODE */ 0, /* RIG_CMD_GET_STRENGTH */ 0 /* RIG_CMD_GET_PWR */ }; /** \brief Anomaly count periods. * * This table defines the periods in seconds during which * anomalies are accumulated. */ static const anomaly_period_t ANOMALY_COUNT_PERIOD = { 0.00, /* RIG_CMD_NONE */ 2.00, /* RIG_CMD_GET_FREQ_1 */ 2.00, /* RIG_CMD_SET_FREQ_1 */ 2.00, /* RIG_CMD_GET_FREQ_2 */ 2.00, /* RIG_CMD_SET_FREQ_2 */ 5.00, /* RIG_CMD_GET_RIT */ 5.00, /* RIG_CMD_SET_RIT */ 5.00, /* RIG_CMD_GET_XIT */ 5.00, /* RIG_CMD_SET_XIT */ 10.0, /* RIG_CMD_GET_VFO */ 10.0, /* RIG_CMD_SET_VFO */ 10.0, /* RIG_CMD_GET_PSTAT */ 10.0, /* RIG_CMD_SET_PSTAT */ 10.0, /* RIG_CMD_GET_PTT */ 10.0, /* RIG_CMD_SET_PTT */ 10.0, /* RIG_CMD_GET_MODE */ 10.0, /* RIG_CMD_SET_MODE */ 10.0, /* RIG_CMD_GET_STRENGTH */ 10.0 /* RIG_CMD_GET_PWR */ }; /** \brief The anomaly occurrence table. * * This table holds the accumulated number of anomalies * that have occurred within a certain time period. */ static anomaly_count_t ANOMALY_COUNT = { 0, /* RIG_CMD_NONE */ 0, /* RIG_CMD_GET_FREQ_1 */ 0, /* RIG_CMD_SET_FREQ_1 */ 0, /* RIG_CMD_GET_FREQ_2 */ 0, /* RIG_CMD_SET_FREQ_2 */ 0, /* RIG_CMD_GET_RIT */ 0, /* RIG_CMD_SET_RIT */ 0, /* RIG_CMD_GET_XIT */ 0, /* RIG_CMD_SET_XIT */ 0, /* RIG_CMD_GET_VFO */ 0, /* RIG_CMD_SET_VFO */ 0, /* RIG_CMD_GET_PSTAT */ 0, /* RIG_CMD_SET_PSTAT */ 0, /* RIG_CMD_GET_PTT */ 0, /* RIG_CMD_SET_PTT */ 0, /* RIG_CMD_GET_MODE */ 0, /* RIG_CMD_SET_MODE */ 0, /* RIG_CMD_GET_STRENGTH */ 0 /* RIG_CMD_GET_PWR */ }; /** \brief First occurrence of an anomaly. * * This table holds the time of the first occurrence of a given anomaly. */ static anomaly_time_t FIRST_ANOMALY = { 0, /* RIG_CMD_NONE */ 0, /* RIG_CMD_GET_FREQ_1 */ 0, /* RIG_CMD_SET_FREQ_1 */ 0, /* RIG_CMD_GET_FREQ_2 */ 0, /* RIG_CMD_SET_FREQ_2 */ 0, /* RIG_CMD_GET_RIT */ 0, /* RIG_CMD_SET_RIT */ 0, /* RIG_CMD_GET_XIT */ 0, /* RIG_CMD_SET_XIT */ 0, /* RIG_CMD_GET_VFO */ 0, /* RIG_CMD_SET_VFO */ 0, /* RIG_CMD_GET_PSTAT */ 0, /* RIG_CMD_SET_PSTAT */ 0, /* RIG_CMD_GET_PTT */ 0, /* RIG_CMD_SET_PTT */ 0, /* RIG_CMD_GET_MODE */ 0, /* RIG_CMD_SET_MODE */ 0, /* RIG_CMD_GET_STRENGTH */ 0 /* RIG_CMD_GET_PWR */ }; /** \brief Raise an anomaly. * \param cmd The command which is the source of the anomaly. * * This function increments the anomaly counter of the specified * command. Furthermore, if the command disabling threshold is exceeded * within a specific time period, it disables the command. * * The anomaly counter is reset if a command is disabled or if the * time elapsed since the first anomaly has exceeded the given * count period. * */ void rig_anomaly_raise (rig_cmd_t cmd) { /* check whether it is the first occurrence */ if ((ANOMALY_COUNT[cmd] == 0) || (FIRST_ANOMALY[cmd] == 0)) { /* first occurrence */ /* store the time */ } else { /* check whether the time elapsed since the first anomaly of this kind is longer than the accumulating period. */ if (TRUE) { /* elapsed time is longer; reset the counter to 1 and store the new time. */ } } /* test whether number of anomalies exceeds the threshold */ if (++ANOMALY_COUNT[cmd] >= ANOMALY_COUNT_MAX[cmd]) { /* disable the command */ /* reset the time and the counter */ } } grig-GRIG-0_9_0/src/rig-anomaly.h000066400000000000000000000031111435534312400165170ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_ANOMALY_H #define RIG_ANOMALY_H 1 #include #include "rig-daemon.h" /** \brief Type used to hold system times vs. rig command. */ typedef time_t anomaly_time_t[RIG_CMD_NUMBER]; /** \brief Type used to hold periods in seconds vs. rig command. */ typedef gfloat anomaly_period_t[RIG_CMD_NUMBER]; /** \brief Type used to hold anomaly occurrences vs. rig command. */ typedef guint8 anomaly_count_t[RIG_CMD_NUMBER]; void rig_anomaly_raise (rig_cmd_t); #endif grig-GRIG-0_9_0/src/rig-daemon-check.c000066400000000000000000000670301435534312400174020ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-daemon.c * \ingroup rigd * \brief Checks performed after rig init * * This file contains various supporting functions which are executed * after the radio has been initialized. * * \bug File includes gtk.h but not really needed? */ #include #include #include #include "rig-data.h" #include "grig-debug.h" #include "rig-daemon-check.h" /** \brief Check availability of power status. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This functions checks the availability of the power status * function by trying to read it and then trying to set it to * the read value. If the read command is unsuccessful the * write command is not executed since we don't know what to * set it to. * * \note Since bug #1082325 this is the only setting which is tested * for real. All other setting availabilities are just obtained * from the rig caps structure. * * \note See bug XXXXX there are rig, where one can only set the power * status and not read. The current implementationshould be safe * so we just check the claiimed availability. */ void rig_daemon_check_pwrstat (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { has_get->pstat = (myrig->caps->get_powerstat != NULL) ? TRUE : FALSE; has_set->pstat = (myrig->caps->set_powerstat != NULL) ? TRUE : FALSE; get->pstat = RIG_POWER_ON; } /** \brief Check PTT availability. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This function check the availability of the PTT status. The check is done * by reading the caps->get_ptt and caps->set_ptt. These are pointersto the * actual backend functions and should only be non-null if the backend atually * supports these operations. */ void rig_daemon_check_ptt (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { has_get->ptt = (myrig->caps->get_ptt != NULL) ? TRUE : FALSE; has_set->ptt = (myrig->caps->set_ptt != NULL) ? TRUE : FALSE; get->ptt = RIG_PTT_OFF; } /** \brief Check VFO availability. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This function check the availability of VFO selection. The check is done * by looking for in the rig_caps structure of myrig. */ void rig_daemon_check_vfo (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { int retcode; /* Hamlib status code */ vfo_t vfo = RIG_VFO_NONE; /* current VFO */ /* check whether we can get/set VFO */ has_get->vfo = (myrig->caps->get_vfo != NULL) ? TRUE : FALSE; has_set->vfo = (myrig->caps->set_vfo != NULL) ? TRUE : FALSE; /* check for VFO operations */ has_set->vfo_op_toggle = (myrig->caps->vfo_ops & RIG_OP_TOGGLE) ? TRUE : FALSE; has_set->vfo_op_copy = (myrig->caps->vfo_ops & RIG_OP_CPY) ? TRUE : FALSE; has_set->vfo_op_xchg = (myrig->caps->vfo_ops & RIG_OP_XCHG) ? TRUE : FALSE; /* Check for native split support; we blindly trust that all backends, which have any possibility to set/get this feature will have a function defined for it. NOTE: The current implementation of rig_set_split in hamlib can actually set split ON/OFF without native backend support. */ has_set->split = (myrig->caps->set_split_vfo != NULL) ? TRUE : FALSE; has_get->split = (myrig->caps->get_split_vfo != NULL) ? TRUE : FALSE; /* store available VFOs */ if (has_get->vfo || has_set->vfo) { if (myrig->state.vfo_list != 0) { rig_data_set_vfos (myrig->state.vfo_list); } else { grig_debug_local (RIG_DEBUG_BUG, _("%s: Can not find VFO list for this "\ "backend! Bug in backend?"), __FUNCTION__); } } /* try to get current VFO */ if (has_get->vfo) { retcode = rig_get_vfo (myrig, &vfo); if (retcode == RIG_OK) { get->vfo = vfo; } else { get->vfo = RIG_VFO_NONE; } } } /** \brief Check get/set frequency. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This function tests whether the rig is capable to get/set the frequency. * The test is done by checking the get_freq and set_freq pointers in the * rig_caps structure. Furthermore, if the rig is capable of getting the * frequency, the current frequency is read. */ void rig_daemon_check_freq (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { int retcode; /* Hamlib status code */ freq_t freq; /* current frequency */ /* check get/set freq availabilities */ has_get->freq1 = (myrig->caps->get_freq != NULL) ? TRUE : FALSE; has_set->freq1 = (myrig->caps->set_freq != NULL) ? TRUE : FALSE; if (has_get->freq1) { /* try to obtain current frequency */ retcode = rig_get_freq (myrig, RIG_VFO_CURR, &freq); if (retcode == RIG_OK) { get->freq1 = freq; } else { get->freq1 = 0.0; } } else { get->freq1 = 0.0; } } /** \brief Check RIT availability. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This function check the availability of the RIT value. The test is done * by checking the get_rit and set-rit pointers in the rig_caps structure. * Furthermore, if get_rit is available the current value is read and stored. * * \bug The code sets the ritstep to 10Hz. */ void rig_daemon_check_rit (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { int retcode; /* Hamlib status code */ shortfreq_t sfreq; /* current RIT setting */ /* checkfor RIT availability */ has_get->rit = (myrig->caps->get_rit != NULL && myrig->state.max_rit) ? TRUE : FALSE; has_set->rit = (myrig->caps->set_rit != NULL && myrig->state.max_rit) ? TRUE : FALSE; if (has_get->rit) { /* try to get RIT setting */ retcode = rig_get_rit (myrig, RIG_VFO_CURR, &sfreq); if (retcode == RIG_OK) { get->rit = sfreq; } else { get->rit = s_kHz(0.00); } } else { get->rit = s_kHz(0.00); } if (has_get->rit || has_set->rit) { /* get RIT range and tuning step */ get->ritmax = myrig->state.max_rit; get->ritstep = s_Hz(10); } else { get->ritmax = s_kHz(0.00); get->ritstep = s_Hz(0); } } /** \brief Check XIT availability. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This function check the availability of the XIT value. The test is done * by checking the get_xit and set-xit pointers in the rig_caps structure. * Furthermore, if get_xit is available the current value is read and stored. * * \bug The code sets the xitstep to 10Hz. */ void rig_daemon_check_xit (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { int retcode; /* Hamlib status code */ shortfreq_t sfreq; /* current XIT setting */ /* checkfor XIT availability */ has_get->xit = (myrig->caps->get_xit != NULL && myrig->state.max_xit) ? TRUE : FALSE; has_set->xit = (myrig->caps->set_xit != NULL && myrig->state.max_xit) ? TRUE : FALSE; if (has_get->xit) { /* try to get RIT setting */ retcode = rig_get_xit (myrig, RIG_VFO_CURR, &sfreq); if (retcode == RIG_OK) { get->xit = sfreq; } else { get->xit = s_kHz(0.00); } } else { get->xit = s_kHz(0.00); } if (has_get->xit || has_set->xit) { /* get XIT range and tuning step */ get->xitmax = myrig->state.max_xit; get->xitstep = s_Hz(10); } else { get->xitmax = s_kHz(0.00); get->xitstep = s_Hz(0); } } /** \brief Check mode and passband width availabilities. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This function tests the availability of the mode and passband width * settings. These are checked together because this is the way hamlib * manages them. * * This function also checks for the frequency range and resolution for * the current mode and also builds the global list of available modes. * * \bug much of the freq. range code is similar to ode in the RIG_CMD_GET_MODE code */ void rig_daemon_check_mode (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { int retcode; /* Hamlib status code */ rmode_t mode; /* current mode */ pbwidth_t pbw; /* current passband width */ int i = 0; /* iterator */ int found_mode = 0; /* flag to indicate found mode */ has_get->mode = (myrig->caps->get_mode != NULL) ? TRUE : FALSE; has_set->mode = (myrig->caps->set_mode != NULL) ? TRUE : FALSE; has_get->pbw = has_get->mode; has_set->pbw = has_set->mode; /* try to get mode and passband width */ retcode = rig_get_mode (myrig, RIG_VFO_CURR, &mode, &pbw); if (retcode == RIG_OK) { get->mode = mode; /* convert and store the new passband width */ if (pbw == rig_passband_wide (myrig, mode)) { get->pbw = RIG_DATA_PB_WIDE; } else if (pbw == rig_passband_narrow (myrig, mode)) { get->pbw = RIG_DATA_PB_NARROW; } else { get->pbw = RIG_DATA_PB_NORMAL; } /* initialize the frequency range and tuning step note: we loop through *all* ranges so that we can create a list of supported modes as well */ while (!RIG_IS_FRNG_END(myrig->state.rx_range_list[i])) { /* store modes */ get->allmodes |= myrig->state.rx_range_list[i].modes; /* store antennas */ get->allantennas |= myrig->state.rx_range_list[i].ant; /* if we have not yet found a mode AND this list is good for current mode AND the current frequency is within this range */ if (!found_mode && ((mode & myrig->state.rx_range_list[i].modes) == mode) && (get->freq1 >= myrig->state.rx_range_list[i].startf) && (get->freq1 <= myrig->state.rx_range_list[i].endf)) { found_mode = 1; get->fmin = myrig->state.rx_range_list[i].startf; get->fmax = myrig->state.rx_range_list[i].endf; grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Found frequency range for mode %d"), __FUNCTION__, mode); grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: %.0f...(%.0f)...%.0f kHz"), __FUNCTION__, get->fmin / 1.0e3, get->freq1 / 1.0e3, get->fmax / 1.0e3); } else { i++; } } /* if we did not find any suitable range there could be a bug in the backend! */ if (!found_mode) { grig_debug_local (RIG_DEBUG_BUG, _("%s: Can not find frequency range for this "\ "mode (%d)! Bug in backend?"), __FUNCTION__, mode); } /* get the smallest tuning step */ get->fstep = rig_get_resolution (myrig, mode); } else { get->mode = RIG_MODE_NONE; get->pbw = RIG_PASSBAND_NORMAL; /* initialize frequency range and tuning step to what? */ get->fmin = kHz(30); get->fmax = GHz(1); get->fstep = Hz(10); } } /** \brief Check level setting and reading availabilities. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This function tests the availability of various level settings. * Please note, that while some levels are both readable and writeable, others * are only readable (eg. signal strength, SWR). Only the levels supported * by grig are tested. */ void rig_daemon_check_level (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { int retcode; /* Hamlib status code */ setting_t haslevel; /* available level settings */ value_t val; /* generic value */ int i = 0; float maxpwr = 0.0; /* get available read levels */ haslevel = rig_has_get_level (myrig, GRIG_LEVEL_RD); /* unmask bits */ has_get->power = ((haslevel & RIG_LEVEL_RFPOWER) ? 1 : 0); has_get->strength = ((haslevel & RIG_LEVEL_STRENGTH) ? 1 : 0); has_get->swr = ((haslevel & RIG_LEVEL_SWR) ? 1 : 0); has_get->alc = ((haslevel & RIG_LEVEL_ALC) ? 1 : 0); has_get->agc = ((haslevel & RIG_LEVEL_AGC) ? 1 : 0); has_get->att = ((haslevel & RIG_LEVEL_ATT) ? 1 : 0); has_get->preamp = ((haslevel & RIG_LEVEL_PREAMP) ? 1 : 0); has_get->afg = ((haslevel & RIG_LEVEL_AF) ? 1 : 0); has_get->rfg = ((haslevel & RIG_LEVEL_RF) ? 1 : 0); has_get->sql = ((haslevel & RIG_LEVEL_SQL) ? 1 : 0); has_get->ifs = ((haslevel & RIG_LEVEL_IF) ? 1 : 0); has_get->apf = ((haslevel & RIG_LEVEL_APF) ? 1 : 0); has_get->nr = ((haslevel & RIG_LEVEL_NR) ? 1 : 0); has_get->notch = ((haslevel & RIG_LEVEL_NOTCHF) ? 1 : 0); has_get->pbtin = ((haslevel & RIG_LEVEL_PBT_IN) ? 1 : 0); has_get->pbtout = ((haslevel & RIG_LEVEL_PBT_OUT) ? 1 : 0); has_get->cwpitch = ((haslevel & RIG_LEVEL_CWPITCH) ? 1 : 0); has_get->keyspd = ((haslevel & RIG_LEVEL_KEYSPD) ? 1 : 0); has_get->bkindel = ((haslevel & RIG_LEVEL_BKINDL) ? 1 : 0); has_get->balance = ((haslevel & RIG_LEVEL_BALANCE) ? 1 : 0); has_get->voxdel = ((haslevel & RIG_LEVEL_VOXDELAY) ? 1 : 0); has_get->voxg = ((haslevel & RIG_LEVEL_VOXGAIN) ? 1 : 0); has_get->antivox = ((haslevel & RIG_LEVEL_ANTIVOX) ? 1 : 0); has_get->micg = ((haslevel & RIG_LEVEL_MICGAIN) ? 1 : 0); has_get->comp = ((haslevel & RIG_LEVEL_COMP) ? 1 : 0); /* read values */ if (has_get->power) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_RFPOWER, &val); if (retcode == RIG_OK) { get->power = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get RF power"), __FUNCTION__); } /* find and store max RF power */ while (!RIG_IS_FRNG_END(myrig->state.tx_range_list[i])) { if ((myrig->state.tx_range_list[i].high_power / 1000.0) > maxpwr) { /* remember, power is in mW, we use watts only */ maxpwr = myrig->state.tx_range_list[i].high_power / 1000.0; } i++; } rig_data_set_max_rfpwr (maxpwr); grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Maximum RF power is %.3f watts"), __FUNCTION__, maxpwr); } if (has_get->strength) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_STRENGTH, &val); if (retcode == RIG_OK) { get->strength = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get signal strength"), __FUNCTION__); get->strength = -54; } } if (has_get->swr) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_SWR, &val); if (retcode == RIG_OK) { get->swr = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get SWR"), __FUNCTION__); } } if (has_get->alc) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ALC, &val); if (retcode == RIG_OK) { get->alc = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get ALC"), __FUNCTION__); } } if (has_get->agc) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_AGC, &val); if (retcode == RIG_OK) { get->agc = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get AGC"), __FUNCTION__); } } if (has_get->att) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ATT, &val); if (retcode == RIG_OK) { get->att = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get ATT"), __FUNCTION__); } } if (has_get->preamp) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PREAMP, &val); if (retcode == RIG_OK) { get->preamp = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get PREAMP"), __FUNCTION__); } } if (has_get->afg) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_AF, &val); if (retcode == RIG_OK) { get->afg = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get AF"), __FUNCTION__); } } if (has_get->rfg) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_RF, &val); if (retcode == RIG_OK) { get->rfg = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get RF"), __FUNCTION__); } } if (has_get->sql) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_SQL, &val); if (retcode == RIG_OK) { get->sql = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get SQL"), __FUNCTION__); } } if (has_get->ifs) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_IF, &val); if (retcode == RIG_OK) { get->ifs = val.i; get->ifsmax = myrig->state.max_ifshift; get->ifsstep = s_Hz(10); } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get IF shift"), __FUNCTION__); } } if (has_get->apf) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_APF, &val); if (retcode == RIG_OK) { get->apf = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get APF"), __FUNCTION__); } } if (has_get->nr) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_NR, &val); if (retcode == RIG_OK) { get->nr = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get NR"), __FUNCTION__); } } if (has_get->notch) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_NOTCHF, &val); if (retcode == RIG_OK) { get->notch = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get NOTCH"), __FUNCTION__); } } if (has_get->pbtin) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PBT_IN, &val); if (retcode == RIG_OK) { get->pbtin = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get PBT IN"), __FUNCTION__); } } if (has_get->pbtout) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PBT_OUT, &val); if (retcode == RIG_OK) { get->pbtout = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get PBT OUT"), __FUNCTION__); } } if (has_get->cwpitch) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_CWPITCH, &val); if (retcode == RIG_OK) { get->cwpitch = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get CW pitch"), __FUNCTION__); } } if (has_get->keyspd) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_KEYSPD, &val); if (retcode == RIG_OK) { get->keyspd = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get CW speed"), __FUNCTION__); } } if (has_get->bkindel) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_BKINDL, &val); if (retcode == RIG_OK) { get->bkindel = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get break-in delay"), __FUNCTION__); } } if (has_get->balance) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_BALANCE, &val); if (retcode == RIG_OK) { get->balance = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get balance"), __FUNCTION__); } } if (has_get->voxdel) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOXDELAY, &val); if (retcode == RIG_OK) { get->voxdel = val.i; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get VOX delay"), __FUNCTION__); } } if (has_get->voxg) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOXGAIN, &val); if (retcode == RIG_OK) { get->voxg = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get VOX gain"), __FUNCTION__); } } if (has_get->antivox) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ANTIVOX, &val); if (retcode == RIG_OK) { get->antivox = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get anti-vox"), __FUNCTION__); } } if (has_get->comp) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_COMP, &val); if (retcode == RIG_OK) { get->comp = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get compression level"), __FUNCTION__); } } if (has_get->micg) { retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_MICGAIN, &val); if (retcode == RIG_OK) { get->micg = val.f; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get MIC gain"), __FUNCTION__); } } /* get available write levels */ haslevel = rig_has_set_level (myrig, GRIG_LEVEL_WR); /* we don't perform explicit testing of set levels (like we did with the get levels) since we might not have any good values to send */ has_set->power = ((haslevel & RIG_LEVEL_RFPOWER) ? 1 : 0); has_set->agc = ((haslevel & RIG_LEVEL_AGC) ? 1 : 0); has_set->att = ((haslevel & RIG_LEVEL_ATT) ? 1 : 0); has_set->preamp = ((haslevel & RIG_LEVEL_PREAMP) ? 1 : 0); has_set->afg = ((haslevel & RIG_LEVEL_AF) ? 1 : 0); has_set->rfg = ((haslevel & RIG_LEVEL_RF) ? 1 : 0); has_set->sql = ((haslevel & RIG_LEVEL_SQL) ? 1 : 0); has_set->ifs = ((haslevel & RIG_LEVEL_IF) ? 1 : 0); has_set->apf = ((haslevel & RIG_LEVEL_APF) ? 1 : 0); has_set->nr = ((haslevel & RIG_LEVEL_NR) ? 1 : 0); has_set->notch = ((haslevel & RIG_LEVEL_NOTCHF) ? 1 : 0); has_set->pbtin = ((haslevel & RIG_LEVEL_PBT_IN) ? 1 : 0); has_set->pbtout = ((haslevel & RIG_LEVEL_PBT_OUT) ? 1 : 0); has_set->cwpitch = ((haslevel & RIG_LEVEL_CWPITCH) ? 1 : 0); has_set->keyspd = ((haslevel & RIG_LEVEL_KEYSPD) ? 1 : 0); has_set->bkindel = ((haslevel & RIG_LEVEL_BKINDL) ? 1 : 0); has_set->balance = ((haslevel & RIG_LEVEL_BALANCE) ? 1 : 0); has_set->voxdel = ((haslevel & RIG_LEVEL_VOXDELAY) ? 1 : 0); has_set->voxg = ((haslevel & RIG_LEVEL_VOXGAIN) ? 1 : 0); has_set->antivox = ((haslevel & RIG_LEVEL_ANTIVOX) ? 1 : 0); has_set->micg = ((haslevel & RIG_LEVEL_MICGAIN) ? 1 : 0); has_set->comp = ((haslevel & RIG_LEVEL_COMP) ? 1 : 0); /* initialise preamp and att arrays in rig-data */ if (has_get->att || has_set->att) { int i = 0; while ((i < HAMLIB_MAXDBLSTSIZ) && (myrig->state.attenuator[i] != 0)) { rig_data_set_att_data (i, myrig->state.attenuator[i]); i++; } } if (has_get->preamp || has_set->preamp) { int i = 0; while ((i < HAMLIB_MAXDBLSTSIZ) && (myrig->state.preamp[i] != 0)) { rig_data_set_preamp_data (i, myrig->state.preamp[i]); i++; } } /* FIXME: AGC ARRAY? */ } /** \brief Check FUNC setting and reading availabilities. * \param rig The radio handle. * \param get Pointer to shared data 'get'. * \param has_get Pointer to shared data 'has_get'. * \param has_set Pointer to shared data 'has_set'. * * This function tests the availability of various special functions, * which are available through the rig_setfunc and rig_get_func API calls. * Only the functions supported by grig are tested. */ void rig_daemon_check_func (RIG *myrig, grig_settings_t *get, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { int retcode; /* Hamlib status code */ setting_t hasfunc; /* available func settings */ int val; /* generic value */ int i; /* setting index */ setting_t func; /* setting iterated */ /* get available read funcs */ hasfunc = rig_has_get_func (myrig, GRIG_FUNC_RD); /* unmask bits */ has_get->lock = ((hasfunc & RIG_FUNC_LOCK) ? 1 : 0); for (i=0; i < RIG_SETTING_MAX; i++) { func = rig_idx2setting(i); has_get->funcs[i] = rig_has_get_func(myrig, func) ? 1 : 0; } /* read values */ if (has_get->lock) { retcode = rig_get_func (myrig, RIG_VFO_CURR, RIG_FUNC_LOCK, &val); if (retcode == RIG_OK) { get->lock = val; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get LOCK status"), __FUNCTION__); } } for (i=0; i < RIG_SETTING_MAX; i++) { func = rig_idx2setting(i); if (has_get->funcs[i]) { retcode = rig_get_func (myrig, RIG_VFO_CURR, func, &val); if (retcode == RIG_OK) { get->funcs[i] = val; } else { /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not get %s status"), __FUNCTION__, rig_strfunc(func)); } } } /* get available write funcs */ hasfunc = rig_has_set_func (myrig, GRIG_FUNC_WR); /* we don't perform explicit testing of set functions (like we did with the get levels) since we might not have any good values to send */ has_set->lock = ((hasfunc & RIG_FUNC_LOCK) ? 1 : 0); for (i=0; i < RIG_SETTING_MAX; i++) { func = rig_idx2setting(i); has_set->funcs[i] = rig_has_set_func(myrig, func) ? 1 : 0; } } grig-GRIG-0_9_0/src/rig-daemon-check.h000066400000000000000000000040571435534312400174070ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_DAEMON_CHECK_H #define RIG_DAEMON_CHECK_H 1 #include "rig-data.h" void rig_daemon_check_pwrstat (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); void rig_daemon_check_ptt (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); void rig_daemon_check_vfo (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); void rig_daemon_check_freq (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); void rig_daemon_check_rit (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); void rig_daemon_check_xit (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); void rig_daemon_check_mode (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); void rig_daemon_check_level (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); void rig_daemon_check_func (RIG *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); #endif grig-GRIG-0_9_0/src/rig-daemon.c000066400000000000000000002254221435534312400163300ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-daemon.c * \ingroup rigd * \brief Radio control interface to hamlib. * * This object is responsible for interfacing the Hamradio Control Libraries * (hamlib). * * After initialization of the radio it starts a cyclic thread which will * execute some pre-defined commands. Because some manufacturers discourage * aggressive polling while in TX mode, the daemon will only acquire very * few things while in this mode. * * More about cycles and periods... * */ #include #include #include #include #include #include "grig-config.h" #include "grig-debug.h" #include "rig-anomaly.h" #include "rig-data.h" #include "rig-gui-smeter.h" #include "rig-daemon-check.h" #include "rig-daemon.h" RIG *myrig; /*!< The rig structure. We keep this public so GUI can access the info fields. */ //#define GRIG_DEBUG 1 #ifdef GRIG_DEBUG static const rig_cmd_t DEF_RX_CYCLE[C_MAX_CMD_PER_CYCLE] = { RIG_CMD_VFO_TOGGLE, RIG_CMD_VFO_COPY, RIG_CMD_VFO_XCHG, RIG_CMD_SET_SPLIT, RIG_CMD_GET_SPLIT, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_NONE }; #else /** \brief Matrix defining the default RX cycle. * * More description of the idea. * */ static const rig_cmd_t DEF_RX_CYCLE[C_MAX_CMD_PER_CYCLE] = { RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_SET_PSTAT, RIG_CMD_GET_PSTAT, RIG_CMD_SET_KEYSPD, RIG_CMD_GET_KEYSPD, RIG_CMD_SET_LOCK, RIG_CMD_SET_AF, RIG_CMD_GET_AF, RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_SET_BKINDEL, RIG_CMD_GET_BKINDEL, RIG_CMD_SET_ATT, RIG_CMD_GET_ATT, RIG_CMD_SET_RIT, RIG_CMD_GET_RIT, RIG_CMD_SET_RF, RIG_CMD_GET_RF, RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_GET_LOCK, RIG_CMD_SET_VFO, RIG_CMD_GET_VFO, RIG_CMD_SET_VOXDEL, RIG_CMD_GET_VOXDEL, RIG_CMD_SET_PTT, RIG_CMD_GET_PTT, RIG_CMD_SET_IFS, RIG_CMD_GET_IFS, RIG_CMD_SET_AF, RIG_CMD_GET_AF, RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_SET_VOXGAIN, RIG_CMD_GET_VOXGAIN, RIG_CMD_SET_AGC, RIG_CMD_GET_AGC, RIG_CMD_SET_SQL, RIG_CMD_GET_SQL, RIG_CMD_VFO_TOGGLE, RIG_CMD_VFO_COPY, RIG_CMD_VFO_XCHG, RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_SET_ANTIVOX, RIG_CMD_GET_ANTIVOX, RIG_CMD_SET_PBT_IN, RIG_CMD_GET_PBT_IN, RIG_CMD_SET_PBT_OUT, RIG_CMD_GET_PBT_OUT, RIG_CMD_SET_AF, RIG_CMD_GET_AF, RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_SET_CW_PITCH, RIG_CMD_GET_CW_PITCH, RIG_CMD_SET_PREAMP, RIG_CMD_GET_PREAMP, RIG_CMD_SET_SPLIT, RIG_CMD_GET_SPLIT, RIG_CMD_SET_MICGAIN, RIG_CMD_GET_MICGAIN, RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_SET_MODE, RIG_CMD_GET_MODE, RIG_CMD_SET_BALANCE, RIG_CMD_GET_BALANCE, RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_SET_VFO, RIG_CMD_GET_VFO, RIG_CMD_SET_PTT, RIG_CMD_GET_PTT, RIG_CMD_SET_COMP, RIG_CMD_GET_COMP, RIG_CMD_VFO_TOGGLE, RIG_CMD_VFO_COPY, RIG_CMD_VFO_XCHG, RIG_CMD_SET_AF, RIG_CMD_GET_AF, RIG_CMD_GET_STRENGTH, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_FREQ_1, RIG_CMD_SET_APF, RIG_CMD_GET_APF, RIG_CMD_SET_NR, RIG_CMD_GET_NR, RIG_CMD_SET_NOTCH, RIG_CMD_GET_NOTCH, RIG_CMD_SET_FUNC, RIG_CMD_GET_FUNC }; #endif /** \brief Matrix defining the default TX cycle. * * More description. * * \note Some radios do not like being polled while in TX mode so * we make TX cycle easy... * */ static const rig_cmd_t DEF_TX_CYCLE[C_MAX_CMD_PER_CYCLE] = { RIG_CMD_SET_PTT, RIG_CMD_SET_FREQ_1, RIG_CMD_SET_POWER, RIG_CMD_GET_POWER, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_SWR, RIG_CMD_GET_ALC, RIG_CMD_NONE, RIG_CMD_SET_LOCK, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_PTT, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_SET_POWER, RIG_CMD_GET_POWER, RIG_CMD_GET_SWR, RIG_CMD_GET_PTT, RIG_CMD_NONE, RIG_CMD_SET_ALC, RIG_CMD_GET_ALC, RIG_CMD_GET_FREQ_1, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_SET_POWER, RIG_CMD_GET_PTT, RIG_CMD_NONE, RIG_CMD_GET_POWER, RIG_CMD_GET_SWR, RIG_CMD_GET_ALC, RIG_CMD_NONE, RIG_CMD_SET_PTT, RIG_CMD_NONE, RIG_CMD_GET_ALC, RIG_CMD_GET_POWER, RIG_CMD_GET_SWR, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_ALC, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_SET_PTT, RIG_CMD_SET_FREQ_1, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_ALC, RIG_CMD_GET_POWER, RIG_CMD_GET_SWR, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_SET_MICGAIN, RIG_CMD_GET_MICGAIN, RIG_CMD_GET_PTT, RIG_CMD_GET_POWER, RIG_CMD_GET_SWR, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_SET_FREQ_1, RIG_CMD_GET_PTT, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_POWER, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_PTT, RIG_CMD_GET_SWR, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_ALC, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_SET_PTT, RIG_CMD_SET_POWER, RIG_CMD_NONE, RIG_CMD_GET_FREQ_1, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_PTT, RIG_CMD_GET_POWER, RIG_CMD_GET_SWR, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_GET_ALC, RIG_CMD_GET_PTT, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_SET_MICGAIN, RIG_CMD_GET_MICGAIN, RIG_CMD_GET_PTT, RIG_CMD_GET_POWER, RIG_CMD_GET_SWR, RIG_CMD_NONE, RIG_CMD_NONE, RIG_CMD_SET_COMP, RIG_CMD_GET_COMP }; /** \brief Conversion table to convert rig error to string */ static const gchar *ERR_TO_STR[] = { N_("No error"), N_("Invalid parameter"), N_("Invalid configuration"), N_("Memory shortage"), N_("Function not implemented"), N_("Communication timed out"), N_("I/O error"), N_("Internal Hamlib error :-("), N_("Protocol error"), N_("Command rejected"), N_("Command performed, but arg truncated"), N_("Function not available"), N_("VFO not targetable"), N_("BUS error"), N_("Collision on the bus"), N_("NULL RIG handle or invalid pointer param"), N_("Invalid VFO"), N_("Argument out of domain") }; static gboolean stopdaemon = FALSE; /*!< Used to signal the daemon thread that it should stop */ static gboolean daemonclear = FALSE; /*!< Used to signal back when daemon is finished */ static gint cmd_delay = 0; /*!< Delay between two RX commands TX = 3*RX */ static gint timeoutid = -1; /*!< The ID of the timeout callback when we don't use threads. */ static gboolean timeout_busy = FALSE; /*!< Flag used to avoid to callbacks at the same time. */ static gboolean suspended = FALSE; /*!< Flag indicating whether the daemon is susended or not. */ /* private function prototypes */ static void rig_daemon_post_init (gboolean, gboolean); static gpointer rig_daemon_cycle (gpointer); static gint rig_daemon_cycle_cb (gpointer); static gint rig_daemon_exec_cmd (rig_cmd_t, grig_settings_t *, grig_settings_t *, grig_cmd_avail_t *, grig_cmd_avail_t *, grig_cmd_avail_t *); /** \brief Start radio control daemon. * \param rignum The Hamlib ID of the radio (0 to use default). * \param port The port device (NULL to use default). * \param speed The serial speed (0 to use default). * \param civaddr CIV address for ICOM rigs (NULL means no need to set conf). * \param rigconf Additional config options necessary for some rigs. * \param cmddel Delay between two RX commands. * \param nothread Whether to use threads (FALSE) or just a timeout callback. * \return 0 if the daemon has been initialized correctly. * * This function initializes the radio and starts the control daemon. The rignum * parameter is the rig ID in hamlib. * * The \a rigconf parameter contains one or more configuration options that are * necessary for some rigs. The syntax is param=value and if more than one config * options are specified, they are separated by comma. * * \note The default port is /dev/ttyS0 for regular backends and localhost for RPC rig. * */ int rig_daemon_start (int rigid, const gchar *port, int speed, const gchar *civaddr, const gchar *rigconf, gint cmddel, gboolean nothread, gboolean ptt, gboolean pstat) { gchar *rigport; gint retcode; gchar **confvec; gchar **confent; GError *err = NULL; /* used when starting daemon thread */ #if GLIB_CHECK_VERSION(2,32,0) GThread* thread = NULL; #endif grig_debug_local (RIG_DEBUG_TRACE, _("%s entered"), __FUNCTION__); /* in order to be sure that we have a sensible command delay we set it already here */ if (cmddel > 0) { cmd_delay = cmddel; } else { cmd_delay = C_DEF_RX_CMD_DELAY; } /* check if rig is already initialized */ if (myrig != NULL) { return 1; } /* use dummy backend if no ID specified */ if (!rigid) { rigid = 1; } /* use default port, if none specified; localhost for RPC rig first serial port otherwise. */ if (port == NULL) { if (rigid == 1901) { rigport = g_strdup ("localhost"); } else { rigport = g_strdup ("/dev/ttyS0"); } } else { rigport = g_strdup (port); } grig_debug_local (RIG_DEBUG_TRACE, _("%s: Initializing rig (id=%d)"), __FUNCTION__, rigid); /* initialize rig */ myrig = rig_init (rigid); if (myrig == NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Init failed; Hamlib returned NULL!"), __FUNCTION__); g_free (rigport); return 1; } /* configure and open rig device */ strncpy (myrig->state.rigport.pathname, rigport, HAMLIB_FILPATHLEN-1); g_free (rigport); /* set speed if any special whishes */ if (speed) { myrig->state.rigport.parm.serial.rate = speed; } if (civaddr) { retcode = rig_set_conf (myrig, rig_token_lookup (myrig, "civaddr"), civaddr); } /* split conf parameter string; */ if (rigconf) { guint i = 0; confvec = g_strsplit (rigconf, ",", 0); /* split each conf entity into param and val and set conf */ while (confvec[i]) { confent = g_strsplit (confvec[i], "=", 2); grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Setting conf param (%s,%s)..."), __FUNCTION__, confent[0], confent[1]); retcode = rig_set_conf (myrig, rig_token_lookup (myrig, confent[0]), confent[1]); if (retcode == RIG_OK) { grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Set conf OK"), __FUNCTION__); } else { grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Set conf failed (%d)"), __FUNCTION__, retcode); } i++; g_strfreev (confent); } g_strfreev (confvec); } #ifndef DISABLE_HW /* open rig */ retcode = rig_open (myrig); if (retcode != RIG_OK) { /* send error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to open rig port %s: %s (permissions?)"), __FUNCTION__, myrig->state.rigport.pathname, rigerror(retcode)); rig_cleanup (myrig); return 1; } #endif grig_debug_local (RIG_DEBUG_TRACE, _("%s: Init successful, executing post-init"), __FUNCTION__); /* get capabilities and settings */ rig_daemon_post_init (ptt, pstat); grig_debug_local (RIG_DEBUG_TRACE, _("%s: Starting rig daemon"), __FUNCTION__); #ifndef DISABLE_HW /* if nothread flag is TRUE start a usual timeout, otherwise fork a separate thread. */ if (nothread == TRUE) { /* we start a regular g_timeout; we use C_MAX_CYCLES * C_MAX_CMD_PER_CYCLE * cmd_delay for delay. */ timeoutid = g_timeout_add (2 * C_MAX_CYCLES * C_MAX_CMD_PER_CYCLE * cmd_delay, rig_daemon_cycle_cb, NULL); grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Daemon timeout started, ID: %d"), __FUNCTION__, timeoutid); } else { #if !GLIB_CHECK_VERSION(2,32,0) g_thread_create (rig_daemon_cycle, NULL, FALSE, &err); #else thread = g_thread_try_new ("daemon thread", rig_daemon_cycle, NULL, &err); if (thread != NULL) { g_thread_unref(thread); } #endif /* check whether any error occurred when starting the daemon thread; if yes, close rig and return with error code (assuming that err->code will be non-zero) */ if (err != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to start daemon thread"), __FUNCTION__); grig_debug_local (RIG_DEBUG_ERR, _("%s: Error %d: %s"), __FUNCTION__, err->code, err->message); rig_close (myrig); rig_cleanup (myrig); return err->code; } else { grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Daemon thread started"), __FUNCTION__); } } #endif return 0; } /** \brief Stop the radio control daemon. * * This function stops the radio control daemon and frees the resources used * by the control process and backends. */ void rig_daemon_stop () { guint i = 0; /* send a debug message */ grig_debug_local (RIG_DEBUG_TRACE, _("%s: Sending stop signal to rig daemon"), __FUNCTION__); /* if we are running in time-out mode we can remove the callback directly here; otherwise, send stop signal to daemon and wait until 'daemonclear' flag is TRUE or we time out (in case of time out we also send and error message */ if (timeoutid != -1) { g_source_remove (timeoutid); } else { stopdaemon = TRUE; /* wait until flag is clear or we time out */ while ((daemonclear == FALSE) && (i*C_RIG_DAEMON_STOP_SLEEP_TIME < C_RIG_DAEMON_STOP_TIMEOUT)) { i++; g_usleep (C_RIG_DAEMON_STOP_SLEEP_TIME * 1000); } /* print an error message if the flag has not been cleared */ if (daemonclear == FALSE) { g_print ("\n\nCRITICAL: Daemon process has not been shut down properly. "\ "You may have a zombie hanging around :-(\n\n"); } } /* send a debug message */ grig_debug_local (RIG_DEBUG_TRACE, _("%s: Cleaning up rig"), __FUNCTION__); #ifndef DISABLE_HW /* close radio device */ rig_close (myrig); #endif /* clean up hamlib */ rig_cleanup (myrig); myrig = NULL; } /** \brief Execute post initialization tasks. * \param ptt Flag indicating whether to enable PTT. * \param pstat Flag indicting whether to enable POWER. * * This function executes some tasks after initialization of the radio * hardware. These include testing the radio capabilities and obtaining * the current settings. The test results are communicated to the user * via the rig_debug() Hamlib function. * */ static void rig_daemon_post_init (gboolean ptt, gboolean pstat) { grig_settings_t *get; /* pointer to shared data 'get' */ grig_settings_t *set; /* pointer to shared data 'set' */ grig_cmd_avail_t *has_get; /* pointer to shared data 'has_get' */ grig_cmd_avail_t *has_set; /* pointer to shared data 'has_set' */ /* get pointers to shared data */ get = rig_data_get_get_addr (); set = rig_data_get_set_addr (); has_get = rig_data_get_has_get_addr (); has_set = rig_data_get_has_set_addr (); /* check command availabilities */ if (pstat == TRUE) { rig_daemon_check_pwrstat (myrig, get, has_get, has_set); } else { has_get->pstat = FALSE; has_set->pstat = FALSE; get->pstat = RIG_POWER_ON; set->pstat = RIG_POWER_ON; } if (ptt == TRUE) { rig_daemon_check_ptt (myrig, get, has_get, has_set); } else { has_get->ptt = FALSE; has_set->ptt = FALSE; get->ptt = RIG_PTT_OFF; set->ptt = RIG_PTT_OFF; } rig_daemon_check_vfo (myrig, get, has_get, has_set); rig_daemon_check_freq (myrig, get, has_get, has_set); rig_daemon_check_rit (myrig, get, has_get, has_set); rig_daemon_check_xit (myrig, get, has_get, has_set); rig_daemon_check_mode (myrig, get, has_get, has_set); rig_daemon_check_level (myrig, get, has_get, has_set); rig_daemon_check_func (myrig, get, has_get, has_set); /* debug info about detected has-get caps */ grig_debug_local (RIG_DEBUG_TRACE, _("%s: GET bits: %d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d"), __FUNCTION__, has_get->pstat, has_get->ptt, has_get->att, has_get->preamp, has_get->vfo, has_get->mode, has_get->pbw, has_get->freq1, has_get->freq2, has_get->rit, has_get->xit, has_get->agc, has_get->power, has_get->strength, has_get->swr, has_get->alc); /*** FIXME: FUNC **/ /* debug info about detected has-set caps */ grig_debug_local (RIG_DEBUG_TRACE, _("%s: SET bits: %d%d%d%d%d%d%d%d%d%d%d%d%dXXX"), __FUNCTION__, has_set->pstat, has_set->ptt, has_set->att, has_set->preamp, has_set->vfo, has_set->mode, has_set->pbw, has_set->freq1, has_set->freq2, has_set->rit, has_set->xit, has_set->agc, has_set->power /* not settable has_get->strength, has_get->swr, has_get->alc */ ); } /** \brief Radio control daemon main cycle (threaded version). * \param data Unused. * \return Always NULL. * * This function implements the main cycle of the radio control daemon. The executed * commands are defined in the DEF_RX_CYCLE and DEF_TX_CYCLE constant arrays. */ static gpointer rig_daemon_cycle (gpointer data) { grig_settings_t *get; /* pointer to shared data 'get' */ grig_settings_t *set; /* pointer to shared data 'set' */ grig_cmd_avail_t *new; /* pointer to shared data 'new' */ grig_cmd_avail_t *has_get; /* pointer to shared data 'has_get' */ grig_cmd_avail_t *has_set; /* pointer to shared data 'has_set' */ guint step; /* step counter */ /* get pointers to shared data */ get = rig_data_get_get_addr (); set = rig_data_get_set_addr (); new = rig_data_get_new_addr (); has_get = rig_data_get_has_get_addr (); has_set = rig_data_get_has_set_addr (); /* send a debug message */ grig_debug_local (RIG_DEBUG_TRACE, _("%s started."), __FUNCTION__); /* loop forever until reception of STOP signal */ while (stopdaemon == FALSE) { /* first we check whether rig is powered ON since some rigs will not talk to us in power-off tate. NOTE: code should be safe even if rig does not support get_powerstat since get->pstat is set to ON if rig does not have functionality. */ if (get->pstat == RIG_POWER_ON) { /* execute one cylce; note that the switch between the RX and TX tables can happen within a cycle :-) */ for (step = 0; step < C_MAX_CMD_PER_CYCLE; step++) { /* only execute commands if the daemon is not suspended. */ if (!suspended) { /* check whether we are in RX or TX mode; */ if (get->ptt == RIG_PTT_OFF) { /* Execute a receiver command */ rig_daemon_exec_cmd (DEF_RX_CYCLE[step], get, set, new, has_get, has_set); /* slow motion in debug mode */ #ifdef GRIG_DEBUG g_usleep (5000 * cmd_delay); #else g_usleep (1000 * cmd_delay); #endif } else { /* Execute transmitter command */ rig_daemon_exec_cmd (DEF_TX_CYCLE[step], get, set, new, has_get, has_set); /* slow motion in debug mode */ #ifdef GRIG_DEBUG g_usleep (15000 * cmd_delay); #else g_usleep (3000 * cmd_delay); #endif } } } } /* otherwise check the power status, but only if daemon is not suspended */ else { if (!suspended) { rig_daemon_exec_cmd (RIG_CMD_SET_PSTAT, get, set, new, has_get, has_set); /* slow motion in debug mode */ /* If the rig has been powered OFF, we only execute set_pstat in order to be compatible with as many rigs as possible. Even like this, there is no guarantee that the rig will react to a wake-up command. */ /* #ifdef GRIG_DEBUG */ /* g_usleep (15000 * cmd_delay); */ /* #else */ /* g_usleep (3000 * cmd_delay); */ /* #endif */ /* rig_daemon_exec_cmd (RIG_CMD_GET_PSTAT, */ /* get, set, new, */ /* has_get, has_set); */ } /* slow motion in debug mode */ #ifdef GRIG_DEBUG g_usleep (15000 * cmd_delay); #else g_usleep (3000 * cmd_delay); #endif } } /* send a debug message */ grig_debug_local (RIG_DEBUG_TRACE, _("%s stopped"), __FUNCTION__); /* set clear flag to indicate that daemon terminated */ daemonclear = TRUE; return NULL; } /** \brief Radio control daemon main cycle (callback version). * \param data Unused. * \return Always TRUE. * * This function implements the main cycle of the radio control daemon. The executed * commands are defined in the DEF_RX_CYCLE and DEF_TX_CYCLE constant arrays. */ static gint rig_daemon_cycle_cb (gpointer data) { grig_settings_t *get; /* pointer to shared data 'get' */ grig_settings_t *set; /* pointer to shared data 'set' */ grig_cmd_avail_t *new; /* pointer to shared data 'new' */ grig_cmd_avail_t *has_get; /* pointer to shared data 'has_get' */ grig_cmd_avail_t *has_set; /* pointer to shared data 'has_set' */ guint step; /* step counter */ /* check whether the previous callback has terminated. if not, skip this cycle. */ if (timeout_busy == TRUE) { return TRUE; } timeout_busy = TRUE; /* get pointers to shared data */ get = rig_data_get_get_addr (); set = rig_data_get_set_addr (); new = rig_data_get_new_addr (); has_get = rig_data_get_has_get_addr (); has_set = rig_data_get_has_set_addr (); /* send a debug message */ grig_debug_local (RIG_DEBUG_TRACE, _("%s called."), __FUNCTION__); /* first we check whether rig is powered ON since some rigs will not talk to us in power-off state. NOTE: code should be safe even if rig does not support get_powerstat since get->pstat is set to ON if rig does not have functionality. */ if (get->pstat == RIG_POWER_ON) { for (step = 0; step < C_MAX_CMD_PER_CYCLE; step++) { /* check whether we are in RX or TX mode; */ if (get->ptt == RIG_PTT_OFF) { /* Execute receiver command; sleep for cmd_delay ms if command has been executed */ if (rig_daemon_exec_cmd (DEF_RX_CYCLE[step], get, set, new, has_get, has_set)) { /* slow motion in debug mode */ #ifdef GRIG_DEBUG g_usleep (5000 * cmd_delay); #else g_usleep (1000 * cmd_delay); #endif } } else { /* Execute transmitter command; sleep for cmd_delay ms if command has been executed */ if (rig_daemon_exec_cmd (DEF_TX_CYCLE[step], get, set, new, has_get, has_set)) { /* slow motion in debug mode */ #ifdef GRIG_DEBUG g_usleep (10000 * cmd_delay); #else g_usleep (2000 * cmd_delay); #endif } } } } /* otherwise check the power status only */ else { if (rig_daemon_exec_cmd (RIG_CMD_SET_PSTAT, get, set, new, has_get, has_set)) { /* slow motion in debug mode */ #ifdef GRIG_DEBUG g_usleep (15000 * cmd_delay); #else g_usleep (3000 * cmd_delay); #endif } rig_daemon_exec_cmd (RIG_CMD_GET_PSTAT, get, set, new, has_get, has_set); } timeout_busy = FALSE; return TRUE; } /** \brief Execute a specific command. * \param cmd The command to be executed. * \param get Pointer to the 'get' command buffer. * \param set Pointer to the 'set' command buffer. * \param new Pointer to the 'new' command buffer. * \param has_get Pointer to get capabilities record. * \param has_set Pointer to set capabilities record. * \return 1 if the command has been executed, 0 otherwise. * * This function is responsible for the execution of the specified rig command. * First, it checks whether the command is supported by the current radio, if yes, * it executes the corresponding hamlib API call. If the command execution is not * successful, an anomaly report is sent to the rig error manager which will take * care of any further actions like disabling repeatedly failing commands. * * \note The 'get' commands use local buffers for the acquired value and do not * write directly to the shared memory. This way the contents of the shared memory * do not get corrupted if the command execution was erroneous. */ static gint rig_daemon_exec_cmd (rig_cmd_t cmd, grig_settings_t *get, grig_settings_t *set, grig_cmd_avail_t *new, grig_cmd_avail_t *has_get, grig_cmd_avail_t *has_set) { int retcode; gint status = 0; setting_t func; int i; switch (cmd) { /* No command. Do nothing */ case RIG_CMD_NONE: break; /* get primary frequency */ case RIG_CMD_GET_FREQ_1: /* check whether command is available */ if (has_get->freq1) { freq_t freq; /* try to execute command */ retcode = rig_get_freq (myrig, RIG_VFO_CURR, &freq); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_FREQ_1:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_FREQ_1); } else { get->freq1 = freq; } status = 1; } break; /* set primary frequency */ case RIG_CMD_SET_FREQ_1: /* check whether command is available */ if (has_set->freq1 && new->freq1) { /* try to execute command */ retcode = rig_set_freq (myrig, RIG_VFO_CURR, set->freq1); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_FREQ_1:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_FREQ_1); } /* reset flag */ new->freq1 = FALSE; get->freq1 = set->freq1; status = 1; } break; /* get secondary frequency */ case RIG_CMD_GET_FREQ_2: /* check whether command is available */ if (has_get->freq2) { freq_t freq; vfo_t vfo; /* find out which is the secondary VFO */ switch (get->vfo) { /* VFO A */ case RIG_VFO_A: vfo = RIG_VFO_B; break; /* VFO B or C; grig is too stupid to know about 3 VFOs ... or at least I am to lazy to bother about 3 VFOs ;) */ case RIG_VFO_B: case RIG_VFO_C: vfo = RIG_VFO_A; break; /* Main VFO */ case RIG_VFO_MAIN: vfo = RIG_VFO_SUB; break; /* Sub VFO */ case RIG_VFO_SUB: vfo = RIG_VFO_MAIN; break; /* trouble... */ case RIG_VFO_CURR: case RIG_VFO_NONE: default: /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: I can't figure out available VFOs (got %d)"), __FUNCTION__, get->vfo); vfo = RIG_VFO_NONE; break; } /* try to execute command */ retcode = rig_get_freq (myrig, vfo, &freq); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_FREQ_2:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_FREQ_2); } else { get->freq2 = freq; } status = 1; } break; /* set secondary frequency */ case RIG_CMD_SET_FREQ_2: /* check whether command is available */ if (has_set->freq2 && new->freq2) { vfo_t vfo; /* find out which is the secondary VFO */ switch (get->vfo) { /* VFO A */ case RIG_VFO_A: vfo = RIG_VFO_B; break; /* VFO B or C; grig is too stupid to know about 3 VFOs ... or at least I am to lazy to bother about 3 VFOs ;) */ case RIG_VFO_B: case RIG_VFO_C: vfo = RIG_VFO_A; break; /* Main VFO */ case RIG_VFO_MAIN: vfo = RIG_VFO_SUB; break; /* Sub VFO */ case RIG_VFO_SUB: vfo = RIG_VFO_MAIN; break; /* trouble... */ case RIG_VFO_CURR: case RIG_VFO_NONE: default: /* send an error report */ grig_debug_local (RIG_DEBUG_ERR, _("%s: I can't figure out available VFOs (got %d)"), __FUNCTION__, get->vfo); vfo = RIG_VFO_NONE; break; } /* try to execute command */ retcode = rig_set_freq (myrig, vfo, set->freq2); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_FREQ_2:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_FREQ_2); } /* reset flag */ new->freq2 = FALSE; get->freq2 = set->freq2; status = 1; } break; /* get RIT offset */ case RIG_CMD_GET_RIT: /* check whether command is available */ if (has_get->rit) { shortfreq_t rit; /* try to execute command */ retcode = rig_get_rit (myrig, RIG_VFO_CURR, &rit); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_RIT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_RIT); } else { get->rit = rit; } status = 1; } break; /* set RIT offset */ case RIG_CMD_SET_RIT: /* check whether command is available */ if (has_set->rit && new->rit) { /* try to execute command */ retcode = rig_set_rit (myrig, RIG_VFO_CURR, set->rit); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_RIT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_RIT); } /* reset flag */ new->rit = FALSE; get->rit = set->rit; status = 1; } break; /* get XIT offset */ case RIG_CMD_GET_XIT: /* check whether command is available */ if (has_get->xit) { shortfreq_t xit; /* try to execute command */ retcode = rig_get_xit (myrig, RIG_VFO_CURR, &xit); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_XIT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_XIT); } else { get->xit = xit; } status = 1; } break; /* set XIT offset */ case RIG_CMD_SET_XIT: /* check whether command is available */ if (has_set->xit && new->xit) { /* try to execute command */ retcode = rig_set_xit (myrig, RIG_VFO_CURR, set->xit); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_XIT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_XIT); } /* reset flag */ new->xit = FALSE; get->xit = set->xit; status = 1; } break; /* get current VFO */ case RIG_CMD_GET_VFO: /* check whether command is available */ if (has_get->vfo) { vfo_t vfo; /* try to execute command */ retcode = rig_get_vfo (myrig, &vfo); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_VFO:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_VFO); } else { get->vfo = vfo; } status = 1; } break; /* set current VFO */ case RIG_CMD_SET_VFO: /* check whether command is available */ if (has_set->vfo && new->vfo) { /* try to execute command */ retcode = rig_set_vfo (myrig, set->vfo); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_VFO:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_VFO); } /* reset flag */ new->vfo = FALSE; get->vfo = set->vfo; status = 1; } break; /* get power status */ case RIG_CMD_GET_PSTAT: /* check whether command is available */ if (has_get->pstat) { powerstat_t pstat; /* try to execute command */ retcode = rig_get_powerstat (myrig, &pstat); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_PSTAT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_PSTAT); } else { get->pstat = pstat; } status = 1; } break; /* set power status */ case RIG_CMD_SET_PSTAT: /* check whether command is available */ if (has_set->pstat && new->pstat) { /* try to execute command */ retcode = rig_set_powerstat (myrig, set->pstat); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_PSTAT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_PSTAT); } /* reset flag */ new->pstat = FALSE; get->pstat = set->pstat; status = 1; } break; /* get PTT status */ case RIG_CMD_GET_PTT: /* check whether command is available */ if (has_get->ptt) { ptt_t ptt; /* try to execute command */ retcode = rig_get_ptt (myrig, RIG_VFO_CURR, &ptt); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_PTT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_PTT); } else { get->ptt = ptt; } status = 1; } break; /* set PTT status */ case RIG_CMD_SET_PTT: /* check whether command is available */ if (has_set->ptt && new->ptt) { /* try to execute command */ retcode = rig_set_ptt (myrig, RIG_VFO_CURR, set->ptt); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_PTT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_PTT); } /* reset flag */ new->ptt = FALSE; get->ptt = set->ptt; status = 1; } break; /* get current mode and passband width */ case RIG_CMD_GET_MODE: /* check whether command is available */ if (has_get->mode || has_get->pbw) { rmode_t mode; pbwidth_t pbw; /* try to execute command */ retcode = rig_get_mode (myrig, RIG_VFO_CURR, &mode, &pbw); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_MODE:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_MODE); } else { int i = 0; /* iterator */ int found_mode = 0; /* flag to indicate found mode */ /* convert and store the new passband width; note: RIG_PASSBAND_NORMAL = 0, which is also the value returned by rig_passband_wide and rig_passband_narrow if these passbands are not defined in the backend. */ if ((pbw == rig_passband_wide (myrig, mode)) && (pbw > 0)) { get->pbw = RIG_DATA_PB_WIDE; } else if ((pbw == rig_passband_narrow (myrig, mode)) && (pbw > 0)) { get->pbw = RIG_DATA_PB_NARROW; } else { get->pbw = RIG_DATA_PB_NORMAL; } /* if mode has changed we need to update frequency limits */ if (get->mode != mode) { get->mode = mode; /* FIXME: VY SIMILAR CODE IS PRESENT IN RIG_DAEMON_CHECK_MODE */ /* get frequency limits for this mode; we use the rx_range_list stored in the rig_state structure */ while (!RIG_IS_FRNG_END(myrig->state.rx_range_list[i]) && !found_mode) { /* is this list good for current mode? is the current frequency within this range? */ if (((mode & myrig->state.rx_range_list[i].modes) == mode) && (get->freq1 >= myrig->state.rx_range_list[i].startf) && (get->freq1 <= myrig->state.rx_range_list[i].endf)) { found_mode = 1; get->fmin = myrig->state.rx_range_list[i].startf; get->fmax = myrig->state.rx_range_list[i].endf; grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Found frequency range for mode %d"), __FUNCTION__, mode); grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: %.0f...(%.0f)...%.0f kHz"), __FUNCTION__, get->fmin / 1.0e3, get->freq1 / 1.0e3, get->fmax / 1.0e3); } else { i++; } } /* if we did not find any suitable range there could be a bug in the backend! */ if (!found_mode) { grig_debug_local (RIG_DEBUG_BUG, _("%s: Can not find frequency range for this mode (%d)!"\ "Bug in backend?"), __FUNCTION__, mode); } /* get the smallest tuning step */ get->fstep = rig_get_resolution (myrig, mode); } } status = 1; } break; /* set current mode and passband width */ case RIG_CMD_SET_MODE: /* check whether command is available */ if ((has_set->mode && new->mode) || (has_set->pbw && new->pbw)) { pbwidth_t pbw; rmode_t mode; if (new->mode) { mode = set->mode; } else { mode = get->mode; } /* don't modify pbw unless asked by user */ if (new->pbw) { switch (set->pbw) { case RIG_DATA_PB_WIDE: pbw = rig_passband_wide (myrig, mode); break; case RIG_DATA_PB_NORMAL: pbw = rig_passband_normal (myrig, mode); break; case RIG_DATA_PB_NARROW: pbw = rig_passband_narrow (myrig, mode); break; default: /* we have no idea what to set! */ pbw = rig_passband_normal (myrig, mode); break; } } else { switch (get->pbw) { case RIG_DATA_PB_WIDE: pbw = rig_passband_wide (myrig, mode); break; case RIG_DATA_PB_NORMAL: pbw = rig_passband_normal (myrig, mode); break; case RIG_DATA_PB_NARROW: pbw = rig_passband_narrow (myrig, mode); break; default: /* we have no idea what to set! */ pbw = rig_passband_normal (myrig, mode); break; } } /* try to execute command */ retcode = rig_set_mode (myrig, RIG_VFO_CURR, set->mode, pbw); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_MODE:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_MODE); } if (new->mode) { get->mode = set->mode; new->mode = FALSE; } if (new->pbw) { get->pbw = set->pbw; new->pbw = FALSE; } status = 1; } break; /* get AGC level */ case RIG_CMD_GET_AGC: /* check whether command is available */ if (has_get->agc) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_AGC, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_AGC:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_AGC); } else { get->agc = val.i; } status = 1; } break; /* set AGC level */ case RIG_CMD_SET_AGC: /* check whether command is available */ if (has_set->agc && new->agc) { value_t val; val.i = set->agc; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_AGC, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_AGC:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_AGC); } /* reset flag */ new->agc = FALSE; get->agc = set->agc; status = 1; } break; /* get attenuator level */ case RIG_CMD_GET_ATT: /* check whether command is available */ if (has_get->att) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ATT, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_ATT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_ATT); } else { get->att = val.i; } } break; /* set attenuator level */ case RIG_CMD_SET_ATT: /* check whether command is available */ if (has_set->att && new->att) { value_t val; val.i = set->att; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ATT, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_ATT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_ATT); } /* reset flag */ new->att = FALSE; get->att = set->att; status = 1; } break; /* get pre-amp level */ case RIG_CMD_GET_PREAMP: /* check whether command is available */ if (has_get->preamp) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PREAMP, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_PREAMP:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_PREAMP); } else { get->preamp = val.i; } status = 1; } break; /* set pre-amp level */ case RIG_CMD_SET_PREAMP: /* check whether command is available */ if (has_set->preamp && new->preamp) { value_t val; val.i = set->preamp; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PREAMP, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_PREAMP:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_PREAMP); } /* reset flag */ new->preamp = FALSE; get->preamp = set->preamp; status = 1; } break; /* get signal strength, S-meter */ case RIG_CMD_GET_STRENGTH: /* check whether command is available */ if (has_get->strength) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_STRENGTH, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_STRENGTH:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_STRENGTH); } else { get->strength = val.i; } status = 1; } break; /* set transmitter power */ case RIG_CMD_SET_POWER: /* check whether command is available */ if (has_set->power && new->power) { value_t val; val.f = set->power; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_RFPOWER, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_POWER:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_POWER); } /* reset flag */ new->power = FALSE; get->power = set->power; status = 1; } break; /* get transmitter power */ case RIG_CMD_GET_POWER: /* check whether command is available */ if (has_get->power && (rig_gui_smeter_get_tx_mode() == SMETER_TX_MODE_POWER)) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_RFPOWER, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_POWER:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_POWER); } else { get->power = val.f; } status = 1; } break; /* get SWR */ case RIG_CMD_GET_SWR: /* check whether command is available */ if (has_get->swr && (rig_gui_smeter_get_tx_mode() == SMETER_TX_MODE_SWR)) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_SWR, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_SWR:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_SWR); } else { get->swr = val.f; } status = 1; } break; /* get ALC */ case RIG_CMD_GET_ALC: /* check whether command is available */ if (has_get->alc && (rig_gui_smeter_get_tx_mode() == SMETER_TX_MODE_ALC)) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ALC, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_ALC:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_ALC); } else { get->alc = val.f; } status = 1; } break; /* set ALC */ case RIG_CMD_SET_ALC: /* check whether command is available */ if (has_set->alc && new->alc) { value_t val; val.f = set->alc; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ALC, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_ALC:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_ALC); } /* reset flag */ new->alc = FALSE; status = 1; } break; /* set LOCK status */ case RIG_CMD_SET_LOCK: if (has_set->lock && new->lock) { retcode = rig_set_func (myrig, RIG_VFO_CURR, RIG_FUNC_LOCK, set->lock); if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_LOCK:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_LOCK); } get->lock = set->lock; new->lock = 0; status = 1; } break; /* get LOCK status */ case RIG_CMD_GET_LOCK: /* check whether command is available */ if (has_get->lock) { int lock; /* try to execute command */ retcode = rig_get_func (myrig, RIG_VFO_CURR, RIG_FUNC_LOCK, &lock); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_LOCK:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_LOCK); } else { get->lock = lock; } status = 1; } break; /* execute RIG_OP_TOGGLE */ case RIG_CMD_VFO_TOGGLE: if (has_set->vfo_op_toggle && new->vfo_op_toggle) { retcode = rig_vfo_op (myrig, RIG_VFO_CURR, RIG_OP_TOGGLE); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_VFO_TOGGLE:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_VFO_TOGGLE); } new->vfo_op_toggle = 0; status = 1; } break; /* execute RIG_OP_COPY */ case RIG_CMD_VFO_COPY: if (has_set->vfo_op_copy && new->vfo_op_copy) { retcode = rig_vfo_op (myrig, RIG_VFO_CURR, RIG_OP_CPY); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_VFO_COPY:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_VFO_COPY); } new->vfo_op_copy = 0; status = 1; } break; /* execute RIG_OP_XCHG */ case RIG_CMD_VFO_XCHG: if (has_set->vfo_op_xchg && new->vfo_op_xchg) { retcode = rig_vfo_op (myrig, RIG_VFO_CURR, RIG_OP_XCHG); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_VFO_XCHG:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_VFO_XCHG); } new->vfo_op_xchg = 0; status = 1; } break; /* set split on or off */ case RIG_CMD_SET_SPLIT: if (has_set->split && new->split) { retcode = rig_set_split_vfo (myrig, RIG_VFO_RX, set->split, RIG_VFO_TX); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_SPLIT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_SPLIT); } new->split = 0; status = 1; } break; case RIG_CMD_GET_SPLIT: if (has_get->split) { vfo_t tx_vfo; retcode = rig_get_split_vfo (myrig, RIG_VFO_RX, &get->split, &tx_vfo); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_SPLIT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_SPLIT); } status = 1; } break; case RIG_CMD_SET_AF: /* check whether command is available */ if (has_set->afg && new->afg) { value_t val; val.f = set->afg; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_AF, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_AF:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_AF); } /* reset flag */ new->afg = FALSE; get->afg = set->afg; status = 1; } break; case RIG_CMD_GET_AF: /* check whether command is available */ if (has_get->afg) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_AF, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_AF:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_AF); } else { get->afg = val.f; } status = 1; } break; case RIG_CMD_SET_RF: /* check whether command is available */ if (has_set->rfg && new->rfg) { value_t val; val.f = set->rfg; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_RF, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_RF:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_RF); } /* reset flag */ new->rfg = FALSE; get->rfg = set->rfg; status = 1; } break; case RIG_CMD_GET_RF: /* check whether command is available */ if (has_get->rfg) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_RF, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_RF:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_RF); } else { get->rfg = val.f; } status = 1; } break; case RIG_CMD_SET_SQL: /* check whether command is available */ if (has_set->sql && new->sql) { value_t val; val.f = set->sql; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_SQL, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_SQL:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_SQL); } /* reset flag */ new->sql = FALSE; get->sql = set->sql; status = 1; } break; case RIG_CMD_GET_SQL: /* check whether command is available */ if (has_get->sql) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_SQL, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_SQL:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_SQL); } else { get->sql = val.f; } status = 1; } break; case RIG_CMD_SET_IFS: /* check whether command is available */ if (has_set->ifs && new->ifs) { value_t val; val.i = set->ifs; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_IF, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_IFS:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_IFS); } /* reset flag */ new->ifs = FALSE; get->ifs = set->ifs; status = 1; } break; case RIG_CMD_GET_IFS: /* check whether command is available */ if (has_get->ifs) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_IF, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_IFS:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_IFS); } else { get->ifs = val.i; } status = 1; } break; case RIG_CMD_SET_APF: /* check whether command is available */ if (has_set->apf && new->apf) { value_t val; val.f = set->apf; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_APF, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_APF:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_APF); } /* reset flag */ new->apf = FALSE; get->apf = set->apf; status = 1; } break; case RIG_CMD_GET_APF: /* check whether command is available */ if (has_get->apf) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_APF, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_APF:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_APF); } else { get->apf = val.f; } status = 1; } break; case RIG_CMD_SET_NR: /* check whether command is available */ if (has_set->nr && new->nr) { value_t val; val.f = set->nr; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_NR, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_NR:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_NR); } /* reset flag */ new->nr = FALSE; get->nr = set->nr; status = 1; } break; case RIG_CMD_GET_NR: /* check whether command is available */ if (has_get->nr) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_NR, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_NR:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_NR); } else { get->nr = val.f; } status = 1; } break; case RIG_CMD_SET_NOTCH: /* check whether command is available */ if (has_set->notch && new->notch) { value_t val; val.i = set->notch; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_NOTCHF, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_NOTCH:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_NOTCH); } /* reset flag */ new->notch = FALSE; get->notch = set->notch; status = 1; } break; case RIG_CMD_GET_NOTCH: /* check whether command is available */ if (has_get->notch) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_NOTCHF, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_NOTCH:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_NOTCH); } else { get->notch = val.i; } status = 1; } break; case RIG_CMD_SET_PBT_IN: /* check whether command is available */ if (has_set->pbtin && new->pbtin) { value_t val; val.f = set->pbtin; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PBT_IN, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_PBT_IN:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_PBT_IN); } /* reset flag */ new->pbtin = FALSE; get->pbtin = set->pbtin; status = 1; } break; case RIG_CMD_GET_PBT_IN: /* check whether command is available */ if (has_get->pbtin) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PBT_IN, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_PBT_IN:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_PBT_IN); } else { get->pbtin = val.f; } status = 1; } break; case RIG_CMD_SET_PBT_OUT: /* check whether command is available */ if (has_set->pbtout && new->pbtout) { value_t val; val.f = set->pbtout; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PBT_OUT, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_PBT_OUT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_PBT_OUT); } /* reset flag */ new->pbtout = FALSE; get->pbtout = set->pbtout; status = 1; } break; case RIG_CMD_GET_PBT_OUT: /* check whether command is available */ if (has_get->pbtout) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_PBT_OUT, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_PBT_OUT:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_PBT_OUT); } else { get->pbtout = val.f; } status = 1; } break; case RIG_CMD_SET_CW_PITCH: /* check whether command is available */ if (has_set->cwpitch && new->cwpitch) { value_t val; val.i = set->cwpitch; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_CWPITCH, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_CW_PITCH:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_CW_PITCH); } /* reset flag */ new->cwpitch = FALSE; get->cwpitch = set->cwpitch; status = 1; } break; case RIG_CMD_GET_CW_PITCH: /* check whether command is available */ if (has_get->cwpitch) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_CWPITCH, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_CW_PITCH:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_CW_PITCH); } else { get->cwpitch = val.i; } status = 1; } break; case RIG_CMD_SET_KEYSPD: /* check whether command is available */ if (has_set->keyspd && new->keyspd) { value_t val; val.i = set->keyspd; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_KEYSPD, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_KEYSPD:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_KEYSPD); } /* reset flag */ new->keyspd = FALSE; get->keyspd = set->keyspd; status = 1; } break; case RIG_CMD_GET_KEYSPD: /* check whether command is available */ if (has_get->keyspd) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_KEYSPD, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_KEYSPD:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_KEYSPD); } else { get->keyspd = val.i; } status = 1; } break; case RIG_CMD_SET_BKINDEL: /* check whether command is available */ if (has_set->bkindel && new->bkindel) { value_t val; val.i = set->bkindel; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_BKINDL, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_BKINDEL:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_BKINDEL); } /* reset flag */ new->bkindel = FALSE; get->bkindel = set->bkindel; status = 1; } break; case RIG_CMD_GET_BKINDEL: /* check whether command is available */ if (has_get->bkindel) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_BKINDL, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_BKINDEL:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_BKINDEL); } else { get->bkindel = val.i; } status = 1; } break; case RIG_CMD_SET_BALANCE: /* check whether command is available */ if (has_set->balance && new->balance) { value_t val; val.f = set->balance; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_BALANCE, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_BALANCE:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_BALANCE); } /* reset flag */ new->balance = FALSE; get->balance = set->balance; status = 1; } break; case RIG_CMD_GET_BALANCE: /* check whether command is available */ if (has_get->balance) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_BALANCE, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_BALANCE:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_BALANCE); } else { get->balance = val.f; } status = 1; } break; case RIG_CMD_SET_VOXDEL: /* check whether command is available */ if (has_set->voxdel && new->voxdel) { value_t val; val.i = set->voxdel; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOXDELAY, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_VOXDEL:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_VOXDEL); } /* reset flag */ new->voxdel = FALSE; get->voxdel = set->voxdel; status = 1; } break; case RIG_CMD_GET_VOXDEL: /* check whether command is available */ if (has_get->voxdel) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOXDELAY, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_VOXDEL:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_VOXDEL); } else { get->voxdel = val.i; } status = 1; } break; case RIG_CMD_SET_VOXGAIN: /* check whether command is available */ if (has_set->voxg && new->voxg) { value_t val; val.f = set->voxg; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOXGAIN, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_VOXGAIN:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_VOXGAIN); } /* reset flag */ new->voxg = FALSE; get->voxg = set->voxg; status = 1; } break; case RIG_CMD_GET_VOXGAIN: /* check whether command is available */ if (has_get->voxg) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_VOXGAIN, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_VOXGAIN:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_VOXGAIN); } else { get->voxg = val.f; } status = 1; } break; case RIG_CMD_SET_ANTIVOX: /* check whether command is available */ if (has_set->antivox && new->antivox) { value_t val; val.f = set->antivox; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ANTIVOX, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_ANTIVOX:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_ANTIVOX); } /* reset flag */ new->antivox = FALSE; get->antivox = set->antivox; status = 1; } break; case RIG_CMD_GET_ANTIVOX: /* check whether command is available */ if (has_get->antivox) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_ANTIVOX, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_ANTIVOX:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_ANTIVOX); } else { get->antivox = val.f; } status = 1; } break; case RIG_CMD_SET_MICGAIN: /* check whether command is available */ if (has_set->micg && new->micg) { value_t val; val.f = set->micg; /* try to execute command */ retcode = rig_set_level (myrig, RIG_VFO_CURR, RIG_LEVEL_MICGAIN, val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_MICGAIN:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_MICGAIN); } /* reset flag */ new->micg = FALSE; get->micg = set->micg; status = 1; } break; case RIG_CMD_GET_MICGAIN: /* check whether command is available */ if (has_get->micg) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_MICGAIN, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_MICGAIN:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_MICGAIN); } else { get->micg = val.f; } status = 1; } break; case RIG_CMD_SET_COMP: break; case RIG_CMD_GET_COMP: /* check whether command is available */ if (has_get->comp) { value_t val; /* try to execute command */ retcode = rig_get_level (myrig, RIG_VFO_CURR, RIG_LEVEL_COMP, &val); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_COMP:\n%s"), __FUNCTION__, ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_COMP); } else { get->comp = val.f; } status = 1; } break; /* set FUNC's status */ case RIG_CMD_SET_FUNC: for (i = 0; i < RIG_SETTING_MAX; i++) { func = rig_idx2setting(i); if (has_set->funcs[i] && new->funcs[i]) { retcode = rig_set_func (myrig, RIG_VFO_CURR, func, set->funcs[i]); if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_SET_FUNC(%s):\n%s"), __FUNCTION__, rig_strfunc(func), ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_SET_FUNC); } get->funcs[i] = set->funcs[i]; new->funcs[i] = 0; status = 1; } } break; /* get FUNC's status */ case RIG_CMD_GET_FUNC: for (i = 0; i < RIG_SETTING_MAX; i++) { func = rig_idx2setting(i); /* check whether command is available */ if (has_get->funcs[i]) { int func_status; /* try to execute command */ retcode = rig_get_func (myrig, RIG_VFO_CURR, func, &func_status); /* raise anomaly if execution did not succeed */ if (retcode != RIG_OK) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Failed to execute RIG_CMD_GET_FUNC(%s):\n%s"), __FUNCTION__, rig_strfunc(func), ERR_TO_STR[abs(retcode)]); rig_anomaly_raise (RIG_CMD_GET_FUNC); } else { get->funcs[i] = func_status; } status = 1; } } break; /* bug in grig! */ default: grig_debug_local (RIG_DEBUG_BUG, _("%s: Unknown command %d (grig bug)"), __FUNCTION__, cmd); break; } return status; } /** \brief Get hamlib id of radio. * \return The id of the rig */ gint rig_daemon_get_rig_id () { if (myrig == NULL) { return -1; } return myrig->caps->rig_model; } /** \brief Get radio brand. * \return A character string containing the radio brand. * * This function returns the brand of the currently active radio. * If no radio has yet been initialised the function returns NULL. * The returned string should be freed when no longer needed. */ gchar * rig_daemon_get_brand () { gchar *text; if (myrig == NULL) { return NULL; } text = g_strdup (myrig->caps->mfg_name); return text; } /** \brief Get radio model. * \return A character string containing the radio model. * * This function returns the model of the currently active radio. * If no radio has yet been initialised the function returns NULL. * The returned string should be freed when no longer needed. */ gchar * rig_daemon_get_model () { gchar *text; if (myrig == NULL) { return NULL; } text = g_strdup (myrig->caps->model_name); return text; } /** \brief Get command delay. * \return The current command delay in msec. * * This function returns the current command delay * in milliseconds. This allows the GUI to have a rough idea * about what delay to use in the readback timeout functions. */ gint rig_daemon_get_delay () { return cmd_delay; } /** \brief Suspend daemon. * \param spnd Flag indicating whether to suspend or re-enable the daemon. * * This function can be used to suspend the daemon without shutting it down. * TRUE means suspend the daemon while FALSE means re-enable execution. * When in suspended mode, the daemon will keep on executing it's cycles, * but no commands will be sent to hamlib, as long as the daemon is suspended. */ void rig_daemon_set_suspend (gboolean spnd) { suspended = spnd; grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: %d"), __FUNCTION__, spnd); } /** \brief Check suspended status of daemon. * \return TRUE if the daemon is suspended, FALSE otherwise. * * This function can be used to check whether the daemon is currently suspended * or not. */ gboolean rig_daemon_get_suspend (void) { return suspended; } grig-GRIG-0_9_0/src/rig-daemon.h000066400000000000000000000130701435534312400163270ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_DAEMON_H #define RIG_DAEMON_H 1 #define C_MAX_CMD_PER_CYCLE 101 /*!< Max number of commands executed in one cycle */ #define C_MAX_CYCLES 6 /*!< Number of cycles */ #define C_DEF_RX_CMD_DELAY 10 /*!< Default delay between two RX commands [msec] */ #define C_RIG_DAEMON_STOP_TIMEOUT 10000 /*!< Timeout to let the daemon process stop [msec] */ #define C_RIG_DAEMON_STOP_SLEEP_TIME 100 /*!< Time to sleep between successive attempts to cheack the clear flag. [msec] */ /** \brief List of available commands. * * This enumeration lists the available commands that can be executed by the RIG daemon. * These values should be used to define each daemon cycle. */ typedef enum { RIG_CMD_NONE = 0, /*!< Not command. Can be used for delays between commands. */ RIG_CMD_GET_FREQ_1, /*!< Command to acquire primary frequency from rig. */ RIG_CMD_SET_FREQ_1, /*!< Command to set primary frequency. */ RIG_CMD_GET_FREQ_2, /*!< Command to acquire secondary frequency from rig. */ RIG_CMD_SET_FREQ_2, /*!< Command to set secondary frequency. */ RIG_CMD_GET_RIT, /*!< Command to get current RIT value. */ RIG_CMD_SET_RIT, /*!< Command to set new RIT value. */ RIG_CMD_GET_XIT, /*!< Command to get current XIT value. */ RIG_CMD_SET_XIT, /*!< Command to set new XIT value. */ RIG_CMD_GET_VFO, /*!< Command to get currently active VFO. */ RIG_CMD_SET_VFO, /*!< Command to select new VFO. */ RIG_CMD_GET_PSTAT, /*!< Command to read power status (mains pwr, ON/OFF/STDBY). */ RIG_CMD_SET_PSTAT, /*!< Command to set new power status (ON/OFF/STDBY). */ RIG_CMD_GET_PTT, /*!< Command to get the current PTT status. */ RIG_CMD_SET_PTT, /*!< Command to set the current PTT status. */ RIG_CMD_GET_MODE, /*!< Command to get the current mode and passband width. */ RIG_CMD_SET_MODE, /*!< Command to set the new mode and/or passband width. */ RIG_CMD_GET_AGC, /*!< Command to get the automatic gain control level. */ RIG_CMD_SET_AGC, /*!< Command to set the automatic gain control level. */ RIG_CMD_GET_ATT, /*!< Command to get the attenuator level. */ RIG_CMD_SET_ATT, /*!< Command to set the attenuator level. */ RIG_CMD_GET_PREAMP, /*!< Command to get the pre-amplifier level. */ RIG_CMD_SET_PREAMP, /*!< Command to set the pre-amplifier level. */ RIG_CMD_SET_SPLIT, /*!< Command to set split mode ON/OFF. */ RIG_CMD_GET_SPLIT, /*!< Command to retrieve the current status of split. */ /* levels */ RIG_CMD_SET_AF, RIG_CMD_GET_AF, RIG_CMD_SET_RF, RIG_CMD_GET_RF, RIG_CMD_SET_SQL, RIG_CMD_GET_SQL, RIG_CMD_SET_IFS, RIG_CMD_GET_IFS, RIG_CMD_SET_APF, RIG_CMD_GET_APF, RIG_CMD_SET_NR, RIG_CMD_GET_NR, RIG_CMD_SET_NOTCH, RIG_CMD_GET_NOTCH, RIG_CMD_SET_PBT_IN, RIG_CMD_GET_PBT_IN, RIG_CMD_SET_PBT_OUT, RIG_CMD_GET_PBT_OUT, RIG_CMD_SET_CW_PITCH, RIG_CMD_GET_CW_PITCH, RIG_CMD_SET_KEYSPD, RIG_CMD_GET_KEYSPD, RIG_CMD_SET_BKINDEL, RIG_CMD_GET_BKINDEL, RIG_CMD_SET_BALANCE, RIG_CMD_GET_BALANCE, RIG_CMD_SET_VOXDEL, RIG_CMD_GET_VOXDEL, RIG_CMD_SET_VOXGAIN, RIG_CMD_GET_VOXGAIN, RIG_CMD_SET_ANTIVOX, RIG_CMD_GET_ANTIVOX, RIG_CMD_SET_MICGAIN, RIG_CMD_GET_MICGAIN, RIG_CMD_SET_COMP, RIG_CMD_GET_COMP, RIG_CMD_GET_STRENGTH, /*!< Command to get signal strength. */ RIG_CMD_SET_POWER, /*!< Command to set TX power. */ RIG_CMD_GET_POWER, /*!< Command to get TX power. */ RIG_CMD_GET_SWR, /*!< Command to get SWR level. */ RIG_CMD_SET_ALC, /*!< Command to set ALC level. */ RIG_CMD_GET_ALC, /*!< Command to get ALC level. */ RIG_CMD_GET_LOCK, /*!< Command to get LOCK status. */ RIG_CMD_SET_LOCK, /*!< Command to set LOCK status. */ RIG_CMD_VFO_TOGGLE, /*!< Executes RIG_OP_TOGGLE. */ RIG_CMD_VFO_COPY, /*!< Executes RIG_OP_CPY. */ RIG_CMD_VFO_XCHG, /*!< Executes RIG_OP_XCHG. */ RIG_CMD_SET_FUNC, /*!< Command to set func. */ RIG_CMD_GET_FUNC, /*!< Command to get func. */ RIG_CMD_NUMBER /*!< Number of available commands. */ } rig_cmd_t; int rig_daemon_start (int, const gchar *, int, const gchar *, const gchar *, gint, gboolean, gboolean, gboolean); void rig_daemon_stop (void); void rig_daemon_set_suspend (gboolean); gboolean rig_daemon_get_suspend (void); gchar *rig_daemon_get_brand (void); gchar *rig_daemon_get_model (void); gint rig_daemon_get_rig_id (void); gint rig_daemon_get_delay (void); #endif grig-GRIG-0_9_0/src/rig-data.c000066400000000000000000000705401435534312400157750ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-data.c * \ingroup shdata * \brief Shared data between rig daemon and GUI. * * This object implements the data structures that are shared between * the rig daemon and the GUI. These data include commanded and acquired * rig settings. * * Although the data is global and publicly available, the idea is that * while the rig daemon should access them directly, the GUI should * only use the API functions. * * \note The rig-daemon object is responsible for the correct initialization * of the shared data structures and their contents before they can * be accessed by the GUI. * * \note 'set' functions will also modify the 'get' variable to avoid temporary * flipping to he current value (in case the daemon does not update the * 'get' variable before the GUI reads it again). * * \bug Must add rig_data_has_get_xxx and rig_data_has_set_xxx functions. * * \bug File includes gtk.h but not really needed? */ #include #include #include #include "rig-data.h" grig_settings_t set; /*!< These values are sent to the radio. */ grig_settings_t get; /*!< These values are read from the radio. */ grig_cmd_avail_t new; /*!< Flags to indicate whether new value is available. */ grig_cmd_avail_t has_set; /*!< Flags to indicate writing capabilities. */ grig_cmd_avail_t has_get; /*!< Flags to indicate reading capabilities. */ /** \brief List of attenuator values (absolute values). */ static int att[HAMLIB_MAXDBLSTSIZ]; /** \brief List of preamp values. */ static int preamp[HAMLIB_MAXDBLSTSIZ]; /** \brief Bit field of available VFO's */ static int vfo_list; /** \brief Maximum power in W */ static float maxpwr = 0.0; /** \brief Getavailable VFOs. * \return Bit field of available VFOs. * * This function returns the available VFOs in a bit field * Although the details of the bitfield can be deduced from the hamlib api * documentation, grig is only interested in the symbolic references like * RIG_VFO_A, RIG_VFO_B and such. */ int rig_data_get_vfos () { return vfo_list; } /** \brief Set available VFOs. * \param vfos Bit field of available VFOs. * * This function sets the bit field of available VFOs. * It should be used by the daemon after the VFOs are checked. */ void rig_data_set_vfos (int vfos) { vfo_list = vfos; } /** \brief Set attenuator data. * \param index The index of the element to set * \param data The value of the element. * * This function sets the element at index in the att array to data. * This function is usedby the rig-daemon-check function to initialise * the attenuator array. */ void rig_data_set_att_data (int index, int data) { if ((index >= 0) && (index < HAMLIB_MAXDBLSTSIZ)) att[index] = data; } /** \brief Get attenuator value. * \param index The index of the element. * \return The value at index. * * This function returns the attenuator vlue stored at index. * the function can be used by the GUI to initialise the attenuator * widget. */ int rig_data_get_att_data (int index) { if ((index >= 0) && (index < HAMLIB_MAXDBLSTSIZ)) { return att[index]; } else { return 0; } } /** \brief Get array index of a specific att value. * \param data The att value to check. * \return The array index of data. -1 if data not in array. * * This function scans the att array for data and returns it's array * index if data can be found in the array. */ int rig_data_get_att_index (int data) { int i = 0; /* invali att value */ if (data <= 0) return -1; /* scan through the array */ while ((i < HAMLIB_MAXDBLSTSIZ) && (att[i] != 0)) { if (att[i] == data) { return i; } i++; } /* data not in array */ return -1; } /** \brief Set preamp data. * \param index The index of the element to set * \param data The value of the element. * * This function sets the element at index in the preamp array to data. * This function is usedby the rig-daemon-check function to initialise * the preamp array. */ void rig_data_set_preamp_data (int index, int data) { if ((index >= 0) && (index < HAMLIB_MAXDBLSTSIZ)) preamp[index] = data; } /** \brief Get preamp value. * \param index The index of the element. * \return The value at index. * * This function returns the preamp value stored at index. * the function can be used by the GUI to initialise the preamp * widget. */ int rig_data_get_preamp_data (int index) { if ((index >= 0) && (index < HAMLIB_MAXDBLSTSIZ)) { return preamp[index]; } else { return 0; } } /** \brief Get array index of a specific preamp value. * \param data The preamp value to check. * \return The array index of data. -1 if data not in array. * * This function scans the preamp array for data and returns it's array * index if data can be found in the array. */ int rig_data_get_preamp_index (int data) { int i = 0; /* invalid preamp value */ if (data <= 0) return -1; /* scan through the array */ while ((i < HAMLIB_MAXDBLSTSIZ) && (preamp[i] != 0)) { if (preamp[i] == data) { return i; } i++; } /* data not in array */ return -1; } /** \brief Set power status. * \param pwr The new power status. * * This function sets the targeted power status to pwr. */ void rig_data_set_pstat (powerstat_t pwr) { set.pstat = pwr; get.pstat = pwr; new.pstat = 1; } /** \brief Set PTT status. * \param ptt The new PTT status. * * This function sets the targeted PTT status to ptt. */ void rig_data_set_ptt (ptt_t ptt) { set.ptt = ptt; get.ptt = ptt; new.ptt = 1; } /** \brief Set TX power. * \param power The new TX power. * * This function sets the desired TX power. */ void rig_data_set_power (float power) { set.power = power; get.power = power; new.power = TRUE; } /** \brief Set mode. * \param mode The new mode. * * This function sets the targeted mode to mode. * * \note The current Hamlib API requires that the mode and passband width * are set within the same function call. */ void rig_data_set_mode (rmode_t mode) { set.mode = mode; get.mode = mode; new.mode = 1; } /** \brief Set passband width. * \param pbw The new passband width. * * This function set the targeted passband width to pbw. * * \note The current Hamlib API requires that the mode and passband width * are set within the same function call. */ void rig_data_set_pbwidth (rig_data_pbw_t pbw) { set.pbw = pbw; get.pbw = pbw; new.pbw = 1; } /** \brief Set frequency. * \param int Number indicating which frequency to set. 1 corresponds to * the main/primary/working frequency and 2 to the secondary. * \param freq The new frequency. * * This function sets the targeted frequency to frew. */ void rig_data_set_freq (int num, freq_t freq) { switch (num) { /* primary frequency */ case 1: set.freq1 = freq; get.freq1 = freq; new.freq1 = 1; break; /* secondary frequency */ case 2: set.freq2 = freq; get.freq2 = freq; new.freq2 = 1; break; /* this is a bug */ default: g_warning (_("%s: Invalid target: %d\n"), __FUNCTION__, num); break; } } /** \brief Set RIT offset. * \param rit The new RIT offset. * * This function sets the targeted RIT offset to rit. */ void rig_data_set_rit (shortfreq_t rit) { set.rit = rit; get.rit = rit; new.rit = 1; } /** \brief Set XIT offset. * \param rit The new XIT offset. * * This function sets the targeted XIT offset to xit. */ void rig_data_set_xit (shortfreq_t xit) { set.xit = xit; get.xit = xit; new.xit = 1; } /** \brief Set AGC level. * \param rit The new AGC level. * * This function sets the targeted AGC level to agc. */ void rig_data_set_agc (int agc) { set.agc = agc; get.agc = agc; new.agc = 1; } /** \brief Set attenuator level. * \param rit The new attenuator level. * * This function sets the targeted attenuator level to att. */ void rig_data_set_att (int att) { set.att = att; get.att = att; new.att = 1; } /** \brief Set pre-amplifier level. * \param rit The new pre-amplifier level. * * This function sets the targeted pre-amplifier level to preamp. */ void rig_data_set_preamp (int preamp) { set.preamp = preamp; get.preamp = preamp; new.preamp = 1; } /** \brief Set antenna. * \param antenna The new antenna. * * This function sets the targeted antenna to antenna. */ void rig_data_set_antenna (ant_t antenna) { set.antenna = antenna; get.antenna = antenna; new.antenna = 1; } /** \brief Get power status. * \return The current power status. * * This function returns the current power status. */ powerstat_t rig_data_get_pstat () { return get.pstat; } /** \brief Get PTT status. * \return The current PTT status. * * This function returns the current PTT status. */ ptt_t rig_data_get_ptt () { return get.ptt; } /* SET and GET VFO */ vfo_t rig_data_get_vfo () { return get.vfo; } void rig_data_set_vfo (vfo_t vfo) { set.vfo = vfo; get.vfo = vfo; new.vfo = 1; } int rig_data_has_get_vfo () { return has_get.vfo; } int rig_data_has_set_vfo () { return has_set.vfo; } /** \brief Get current mode. * \return The current mode. * * This function returns the current mode. */ rmode_t rig_data_get_mode () { return get.mode; } /** \brief Get current passband width. * \returns The current passband width. * * This function returns the current passband width. */ rig_data_pbw_t rig_data_get_pbwidth () { return get.pbw; } /** \brief Get current frequency. * \param num Integer indicating which frequency to obtain. * \return The current frequency. * * This function returns the current frequnecy of the specified target. * If num is 1 the value of the primary frequency is returned, while if * num is equal to 2 the value of the secondary frequency is returned. */ freq_t rig_data_get_freq (int num) { switch (num) { /* primary frequency */ case 1: return get.freq1; break; /* secondary frequency */ case 2: return get.freq2; break; /* bug */ default: g_warning (_("%s: Invalid target: %d\n"), __FUNCTION__, num); return get.freq1; break; } } /** \brief Get lower frequency limit. * \return The current lower frequency limit. * * This function returns the lower frequency limit which applies to * the current mode. */ freq_t rig_data_get_fmin () { return get.fmin; } /** \brief Get upper frequency limit. * \return The current upper frequency limit. * * This function returns the upper frequency limit which applies to * the current mode. */ freq_t rig_data_get_fmax () { return get.fmax; } /** \brief Get tuning step. * \return The current tuning step. * * This function returns the tuning step corresponding to the * current mode. */ shortfreq_t rig_data_get_fstep () { return get.fstep; } /** \brief Get RIT offset. * \return The current value of the RIT offset. * * This function returns the current value of the RIT offset. */ shortfreq_t rig_data_get_rit () { return get.rit; } /** \brief Get XIT offset. * \return The current value of the XIT offset. * * This function returns the current value of the XIT offset. */ shortfreq_t rig_data_get_xit () { return get.xit; } /** \brief Get AGC level. * \return The current value of the AGC. * * This function returns the current value of the AGC. */ int rig_data_get_agc () { return get.agc; } /** \brief Get attenuator level. * \return The current value of the attenuator. * * This function returns the current value of the attenuator. */ int rig_data_get_att () { return get.att; } /** \brief Get preamp level. * \return The current value of the preamp. * * This function returns the current value of the preamp. */ int rig_data_get_preamp () { return get.preamp; } /** \brief Get signal strength. * \return The current value of the signal strength. * * This function returns the current value of the signal strength. */ int rig_data_get_strength () { return get.strength; } /** \brief Get TX power. * \return The current value of the TX power. * * This function returns the current value of the TX power. */ float rig_data_get_power () { return get.power; } /** \brief Get SWR. * \return The current value of the SWR. * * This function returns the current value of the SWR. */ float rig_data_get_swr () { return get.swr; } /** \brief Get ALC. * \return The current value of the ALC. * * This function returns the current value of the ALC. */ float rig_data_get_alc () { return get.alc; } void rig_data_set_alc (float alc) { set.alc = alc; new.alc = TRUE; } /** \brief Get current antenna. * \return The current antenna. * * This function returns the current antenna. */ ant_t rig_data_get_antenna () { return get.antenna; } /** \brief Get availablility of signal strength readback. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.strength variable. */ int rig_data_has_get_strength () { return has_get.strength; } /** \brief Get availablility of power status. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.pstat variable. */ int rig_data_has_get_pstat () { return has_get.pstat; } /** \brief Get availablility of PTT. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.ptt variable. */ int rig_data_has_get_ptt () { return has_get.ptt; } /** \brief Get availablility of RIT. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.rit variable. */ int rig_data_has_get_rit () { return has_get.rit; } /** \brief Get availablility of XIT. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.xit variable. */ int rig_data_has_get_xit () { return has_get.xit; } /** \brief Get availablility of RIT. * \return 1 if available, otherwise 0. * * This function returns the value of the has_set.rit variable. */ int rig_data_has_set_rit () { return has_set.rit; } /** \brief Get availablility of XIT. * \return 1 if available, otherwise 0. * * This function returns the value of the has_set.xit variable. */ int rig_data_has_set_xit () { return has_set.xit; } /** \brief Get availablility of AGC. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.agc variable. */ int rig_data_has_get_agc () { return has_get.agc; } /** \brief Get availablility of attenuator. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.att variable. */ int rig_data_has_get_att () { return has_get.att; } /** \brief Get availablility of pre-amp. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.preamp variable. */ int rig_data_has_get_preamp () { return has_get.preamp; } /** \brief Get availability of reading primary frequency. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.freq1 variable. * */ int rig_data_has_get_freq1 () { return has_get.freq1; } /** \brief Get availability of reading secondary frequency. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.freq2 variable. * */ int rig_data_has_get_freq2 () { return has_get.freq2; } /** \brief Get availability of reading TX power. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.power variable. * */ int rig_data_has_get_power () { return has_get.power; } int rig_data_has_set_power () { return has_set.power; } /** \brief Get availability of reading SWR. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.swr variable. * */ int rig_data_has_get_swr () { return has_get.swr; } /** \brief Get availability of reading ALC. * \return 1 if available, otherwise 0. * * This function returns the value of the has_get.alc variable. * */ int rig_data_has_get_alc () { return has_get.alc; } int rig_data_has_set_alc () { return has_set.alc; } /** \brief Get availablility of power status. * \return 1 if available, otherwise 0. * * This function returns the value of the has_set.pstat variable. */ int rig_data_has_set_pstat () { return has_set.pstat; } /** \brief Get availablility of PTT. * \return 1 if available, otherwise 0. * * This function returns the value of the has_set.ptt variable. */ int rig_data_has_set_ptt () { return has_set.ptt; } /** \brief Some text. * \return description * * Detailed description. * * \bug writeme * * \bug should have 1 or 2 as param like get_freq */ int rig_data_has_set_freq1 () { return has_set.freq1; } /** \brief Some text. * \return description * * Detailed description. * * \bug writeme */ int rig_data_has_set_freq2 () { return has_set.freq2; } /** \brief Some text. * \return description * * Detailed description. * * \bug writeme */ int rig_data_has_set_att () { return has_set.att; } /** \brief Some text. * \return description * * Detailed description. * * \bug writeme */ int rig_data_has_set_preamp () { return has_set.preamp; } /** \brief Get lower RIT limit. * \return The current lower RIT limit. * * This function returns the lower RIT limit which applies to * the current mode. */ shortfreq_t rig_data_get_ritmin () { return -get.ritmax; } /** \brief Get upper RIT limit. * \return The current upper RIT limit. * * This function returns the upper RIT limit which applies to * the current mode. */ shortfreq_t rig_data_get_ritmax () { return get.ritmax; } /** \brief Get RIT tuning step. * \return The current RIT tuning step. * * This function returns the RIT tuning step corresponding to the * current mode. */ shortfreq_t rig_data_get_ritstep () { return get.ritstep; } /** \brief Get lower XIT limit. * \return The current lower XIT limit. * * This function returns the lower XIT limit which applies to * the current mode. */ shortfreq_t rig_data_get_xitmin () { return -get.xitmax; } /** \brief Get upper XIT limit. * \return The current upper XIT limit. * * This function returns the upper XIT limit which applies to * the current mode. */ shortfreq_t rig_data_get_xitmax () { return get.xitmax; } /** \brief Get XIT tuning step. * \return The current XIT tuning step. * * This function returns the XIT tuning step corresponding to the * current mode. */ shortfreq_t rig_data_get_xitstep () { return get.xitstep; } /*** FUNC ***/ int rig_data_has_set_func (setting_t func) { return has_set.funcs[rig_setting2idx(func)]; } int rig_data_has_get_func (setting_t func) { return has_get.funcs[rig_setting2idx(func)]; } void rig_data_set_func (setting_t func, int status) { set.funcs[rig_setting2idx(func)] = status; new.funcs[rig_setting2idx(func)] = 1; } int rig_data_get_func (setting_t func) { return get.funcs[rig_setting2idx(func)]; } /*** LOCK ***/ int rig_data_has_set_lock () { return has_set.lock; } int rig_data_has_get_lock () { return has_get.lock; } void rig_data_set_lock (int lock) { set.lock = lock; new.lock = 1; } int rig_data_get_lock () { return get.lock; } /* VFO TOGGLE */ int rig_data_has_vfo_op_toggle () { return has_set.vfo_op_toggle; } void rig_data_vfo_op_toggle () { set.vfo_op_toggle = 1; new.vfo_op_toggle = 1; } /* VFO COPY */ int rig_data_has_vfo_op_copy () { return has_set.vfo_op_copy; } void rig_data_vfo_op_copy () { set.vfo_op_copy = 1; new.vfo_op_copy = 1; } /* VFO EXCHANGE */ int rig_data_has_vfo_op_xchg () { return has_set.vfo_op_xchg; } void rig_data_vfo_op_xchg () { set.vfo_op_xchg = 1; new.vfo_op_xchg = 1; } /* set SPLIT ON/OFF */ int rig_data_has_set_split () { return has_set.split; } int rig_data_has_get_split () { return has_get.split; } void rig_data_set_split (int split) { if (split) set.split = RIG_SPLIT_ON; else set.split = RIG_SPLIT_OFF; new.split = TRUE; } int rig_data_get_split () { return (get.split == RIG_SPLIT_ON ? 1 : 0); } /** \brief Get address of 'get' variable. * \return A pointer to the shared data. * * This function is used to obtain the address of the 'get' global data. * This is primarily used by the radio daemon for fast access to the data * structure. */ grig_settings_t * rig_data_get_get_addr () { return &get; } /** \brief Get address of 'set' variable. * \return A pointer to the shared data. * * This function is used to obtain the address of the 'set' global data. * This is primarily used by the radio daemon for fast access to the data * structure. */ grig_settings_t * rig_data_get_set_addr () { return &set; } /** \brief Get address of 'new' variable. * \return A pointer to the shared data. * * This function is used to obtain the address of the 'new' global data. * This is primarily used by the radio daemon for fast access to the data * structure. */ grig_cmd_avail_t * rig_data_get_new_addr () { return &new; } /** \brief Get address of 'has_set' variable. * \return A pointer to the shared data. * * This function is used to obtain the address of the 'has_set' global data. * This is primarily used by the radio daemon for fast access to the data * structure. */ grig_cmd_avail_t * rig_data_get_has_set_addr () { return &has_set; } /** \brief Get address of 'has_get' variable. * \return A pointer to the shared data. * * This function is used to obtain the address of the 'has_get' global data. * This is primarily used by the radio daemon for fast access to the data * structure. */ grig_cmd_avail_t * rig_data_get_has_get_addr () { return &has_get; } /** \brief Get the modes bitfield */ int rig_data_get_all_modes () { return get.allmodes; } /** \brief Get the antenna bitfield */ int rig_data_get_all_antennas () { return get.allantennas; } /** \brief Store the maximum RF power level */ void rig_data_set_max_rfpwr (float maxpow) { maxpwr = maxpow; } /** \brief Get maximum RF power level */ float rig_data_get_max_rfpwr () { return maxpwr; } /* AF gain */ int rig_data_has_get_afg (void) { return has_get.afg; } int rig_data_has_set_afg (void) { return has_set.afg; } float rig_data_get_afg (void) { return get.afg; } void rig_data_set_afg (float afg) { set.afg = afg; get.afg = afg; new.afg = TRUE; } /* RF gain */ int rig_data_has_get_rfg (void) { return has_get.rfg; } int rig_data_has_set_rfg (void) { return has_set.rfg; } float rig_data_get_rfg (void) { return get.rfg; } void rig_data_set_rfg (float rfg) { set.rfg = rfg; get.rfg = rfg; new.rfg = TRUE; } /* SQL */ int rig_data_has_get_sql (void) { return has_get.sql; } int rig_data_has_set_sql (void) { return has_set.sql; } float rig_data_get_sql (void) { return get.sql; } void rig_data_set_sql (float sql) { set.sql = sql; get.sql = sql; new.sql = TRUE; } /* IF shift */ int rig_data_has_get_ifs (void) { return has_get.ifs; } int rig_data_has_set_ifs (void) { return has_set.ifs; } int rig_data_get_ifs (void) { return get.ifs; } void rig_data_set_ifs (int ifs) { set.ifs = ifs; get.ifs = ifs; new.ifs = TRUE; } shortfreq_t rig_data_get_ifsmax () { return get.ifsmax; } shortfreq_t rig_data_get_ifsstep () { return get.ifsstep; } /* APF */ int rig_data_has_get_apf (void) { return has_get.apf; } int rig_data_has_set_apf (void) { return has_set.apf; } float rig_data_get_apf (void) { return get.apf; } void rig_data_set_apf (float apf) { set.apf = apf; get.apf = apf; new.apf = TRUE; } /* NR */ int rig_data_has_get_nr (void) { return has_get.nr; } int rig_data_has_set_nr (void) { return has_set.nr; } float rig_data_get_nr (void) { return get.nr; } void rig_data_set_nr (float nr) { set.nr = nr; get.nr = nr; new.nr = TRUE; } /* Notch */ int rig_data_has_get_notch (void) { return has_get.notch; } int rig_data_has_set_notch (void) { return has_set.notch; } int rig_data_get_notch (void) { return get.notch; } void rig_data_set_notch (int notch) { set.notch = notch; get.notch = notch; new.notch = TRUE; } /* PBT in */ int rig_data_has_get_pbtin (void) { return has_get.pbtin; } int rig_data_has_set_pbtin (void) { return has_set.pbtin; } float rig_data_get_pbtin (void) { return get.pbtin; } void rig_data_set_pbtin (float pbt) { set.pbtin = pbt; get.pbtin = pbt; new.pbtin = TRUE; } /* PBT out */ int rig_data_has_get_pbtout (void) { return has_get.pbtout; } int rig_data_has_set_pbtout (void) { return has_set.pbtout; } float rig_data_get_pbtout (void) { return get.pbtout; } void rig_data_set_pbtout (float pbt) { set.pbtout = pbt; get.pbtout = pbt; new.pbtout = TRUE; } /* CW pitch */ int rig_data_has_get_cwpitch (void) { return has_get.cwpitch; } int rig_data_has_set_cwpitch (void) { return has_set.cwpitch; } int rig_data_get_cwpitch (void) { return get.cwpitch; } void rig_data_set_cwpitch (int cwp) { set.cwpitch = cwp; get.cwpitch = cwp; new.cwpitch = TRUE; } /* keyer speed */ int rig_data_has_get_keyspd (void) { return has_get.keyspd; } int rig_data_has_set_keyspd (void) { return has_set.keyspd; } int rig_data_get_keyspd (void) { return get.keyspd; } void rig_data_set_keyspd (int keyspd) { set.keyspd = keyspd; get.keyspd = keyspd; new.keyspd = TRUE; } /* break-in delay */ int rig_data_has_get_bkindel (void) { return has_get.bkindel; } int rig_data_has_set_bkindel (void) { return has_set.bkindel; } int rig_data_get_bkindel (void) { return get.bkindel; } void rig_data_set_bkindel (int bkindel) { set.bkindel = bkindel; get.bkindel = bkindel; new.bkindel = TRUE; } /* balance */ int rig_data_has_get_balance (void) { return has_get.balance; } int rig_data_has_set_balance (void) { return has_set.balance; } float rig_data_get_balance (void) { return get.balance; } void rig_data_set_balance (float bal) { set.balance = bal; get.balance = bal; new.balance = TRUE; } /* VOX delay */ int rig_data_has_get_voxdel (void) { return has_get.voxdel; } int rig_data_has_set_voxdel (void) { return has_set.voxdel; } int rig_data_get_voxdel (void) { return get.voxdel; } void rig_data_set_voxdel (int voxdel) { set.voxdel = voxdel; get.voxdel = voxdel; new.voxdel = TRUE; } /* VOX gain */ int rig_data_has_get_voxg (void) { return has_get.voxg; } int rig_data_has_set_voxg (void) { return has_set.voxg; } float rig_data_get_voxg (void) { return get.voxg; } void rig_data_set_voxg (float voxg) { set.voxg = voxg; get.voxg = voxg; new.voxg = TRUE; } /* anti VOX */ int rig_data_has_get_antivox (void) { return has_get.antivox; } int rig_data_has_set_antivox (void) { return has_set.antivox; } float rig_data_get_antivox (void) { return get.antivox; } void rig_data_set_antivox (float antivox) { set.antivox = antivox; get.antivox = antivox; new.antivox = TRUE; } /* MIC gain */ int rig_data_has_get_micg (void) { return has_get.micg; } int rig_data_has_set_micg (void) { return has_set.micg; } float rig_data_get_micg (void) { return get.micg; } void rig_data_set_micg (float micg) { set.micg = micg; get.micg = micg; new.micg = TRUE; } /* compression */ int rig_data_has_get_comp (void) { return has_get.comp; } int rig_data_has_set_comp (void) { return has_set.comp; } float rig_data_get_comp (void) { return get.comp; } void rig_data_set_comp (float comp) { set.comp = comp; get.comp = comp; new.comp = TRUE; } grig-GRIG-0_9_0/src/rig-data.h000066400000000000000000000373241435534312400160050ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /**** FIXME: Add support for double-reading of some values. For example, ALC and RF power should support both meter reading as well as setting */ /** \file rig-data.h * \ingroup shdata * \brief Data type definitions for shared rig data. * * This file contains the data type definitions for the shared rig data * object. * * \bug package is incomplete! * * \bug tx meter levels are not ok... need response from hamlib */ #ifndef RIG_DATA_H #define RIG_DATA_H 1 #include /** \brief Grig representation of passband widths. * * Grig has to keep it's own passband values due to the fact * that the passband width is varying with the mode and the * GUI is not supposed to poll hamlib in order to have the * correct numerical value of the passband width. Therefore we * use this representation and the daemon will convert it while * talking to hamlib. */ typedef enum rig_data_pbw_e { RIG_DATA_PB_WIDE = 0, /**!< Passband corresponding to wide */ RIG_DATA_PB_NORMAL, /**!< Passband corresponding to normal */ RIG_DATA_PB_NARROW /**!< Passband corresponding to narrow */ } rig_data_pbw_t; /** \brief Structure representing rig settings * * This structure is used to hold rig settings (frequency, mode, vfo, etc). * One structure holds the values commanded by the user while the other * holds the actual settings obtained from the rig. */ typedef struct { powerstat_t pstat; /*!< Power status (ON/OFF). */ ptt_t ptt; /*!< PTT status (ON/OFF). */ int lock; /*!< Dial lock rig_set_func */ vfo_t vfo; /*!< VFO. */ rmode_t mode; /*!< Mode. */ rig_data_pbw_t pbw; /*!< Passband width. */ freq_t freq1; /*!< Primary (working) frequency. */ freq_t freq2; /*!< Secondary frequency. */ shortfreq_t rit; /*!< RIT. */ shortfreq_t xit; /*!< XIT. */ int agc; /*!< AGC level. */ int att; /*!< Attenuator. */ int preamp; /*!< Pre-amplifier. */ split_t split; /*!< Spit ON/OFF. */ ant_t antenna; /*!< Antenna. */ /* R/W levels */ float afg; /*!< AF gain */ float rfg; /*!< RF gain */ float sql; /*!< Squelch */ int ifs; /*!< IF shitf in Hz */ float apf; /*!< APF */ float nr; /*!< Noise reduction */ int notch; /*!< Notch freq */ float pbtin; /*!< PBT in */ float pbtout; /*!< PBT out */ int cwpitch; /*!< CW pitch */ int keyspd; /*!< keyer speed */ int bkindel; /*!< break in delay in tens of dots :-L */ float balance; /*!< balance */ int voxdel; /*!< Vox delay tenth of sec */ float voxg; /*!< Vox gain */ float antivox; /*!< Antivox */ float micg; /*!< Mic gain */ float comp; /*!< Compression */ float power; /*!< TX power. */ /* read only fields */ int strength; /*!< Signal strength. */ float swr; /*!< SWR. */ float alc; /*!< ALC. */ /* func's */ int funcs[RIG_SETTING_MAX]; /*!< Func's */ /* write only fields */ int vfo_op_toggle; /*!< Toggle VFO */ int vfo_op_copy; /*!< Copy VFO */ int vfo_op_xchg; /*!< Exchange VFO */ /* more or less constant values */ freq_t fmin; /*!< Lower frequency limit for current mode. */ freq_t fmax; /*!< Upper frequency limit for current mode. */ shortfreq_t fstep; /*!< Smallest frequency step for current mode. */ shortfreq_t ritmax; /*!< Absolute max RIT. */ shortfreq_t ritstep; /*!< Smallest RIT step. */ shortfreq_t xitmax; /*!< Absolute max XIT. */ shortfreq_t xitstep; /*!< Smallest XIT step. */ shortfreq_t ifsmax; /*!< Absolute max IF shift. */ shortfreq_t ifsstep; /*!< Smallest IF shift step. */ int allmodes; /*!< Bit field of all supported modes. */ int allantennas;/*!< Bit field of all supported antennas. */ } grig_settings_t; typedef struct { int pstat; int ptt; int lock; int vfo; int mode; int pbw; int freq1; int freq2; int rit; int xit; int agc; int att; int preamp; int split; int vfo_op_toggle; int vfo_op_copy; int vfo_op_xchg; int antenna; /* R/W levels */ int afg; /*!< AF gain */ int rfg; /*!< RF gain */ int sql; /*!< Squelch */ int ifs; /*!< IF shitf in Hz */ int apf; /*!< APF */ int nr; /*!< Noise reduction */ int notch; /*!< Notch freq */ int pbtin; /*!< PBT in */ int pbtout; /*!< PBT out */ int cwpitch; /*!< CW pitch */ int keyspd; /*!< keyer speed */ int bkindel; /*!< break in delay in tens of dots :-L */ int balance; /*!< balance */ int voxdel; /*!< Vox delay tenth of sec */ int voxg; /*!< Vox gain */ int antivox; /*!< Antivox */ int micg; /*!< Mic gain */ int comp; /*!< Compression */ int power; /*!< TX power. */ /* read only fields */ int strength; int swr; int alc; int funcs[RIG_SETTING_MAX]; } grig_cmd_avail_t; #define GRIG_LEVEL_RD (RIG_LEVEL_RFPOWER | RIG_LEVEL_AGC | RIG_LEVEL_SWR | RIG_LEVEL_ALC | \ RIG_LEVEL_STRENGTH | RIG_LEVEL_ATT | RIG_LEVEL_PREAMP | \ RIG_LEVEL_VOXDELAY | RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_SQL | \ RIG_LEVEL_IF | RIG_LEVEL_APF | RIG_LEVEL_NR | RIG_LEVEL_PBT_IN | \ RIG_LEVEL_PBT_OUT | RIG_LEVEL_CWPITCH | \ RIG_LEVEL_MICGAIN | RIG_LEVEL_KEYSPD | RIG_LEVEL_NOTCHF | \ RIG_LEVEL_COMP | RIG_LEVEL_BKINDL | RIG_LEVEL_BALANCE | \ RIG_LEVEL_VOXGAIN | RIG_LEVEL_ANTIVOX) #define GRIG_LEVEL_WR (RIG_LEVEL_RFPOWER | RIG_LEVEL_AGC | RIG_LEVEL_ATT | RIG_LEVEL_PREAMP | \ RIG_LEVEL_VOXDELAY | RIG_LEVEL_AF | RIG_LEVEL_RF | RIG_LEVEL_SQL | \ RIG_LEVEL_IF | RIG_LEVEL_APF | RIG_LEVEL_NR | RIG_LEVEL_PBT_IN | \ RIG_LEVEL_PBT_OUT | RIG_LEVEL_CWPITCH | \ RIG_LEVEL_MICGAIN | RIG_LEVEL_KEYSPD | RIG_LEVEL_NOTCHF | \ RIG_LEVEL_COMP | RIG_LEVEL_BKINDL | RIG_LEVEL_BALANCE | \ RIG_LEVEL_VOXGAIN | RIG_LEVEL_ANTIVOX) #define GRIG_FUNC_RD (RIG_FUNC_LOCK) #define GRIG_FUNC_WR (RIG_FUNC_LOCK) #define GRIG_VFO_OP (RIG_OP_TOGGLE | RIG_OP_CPY | RIG_OP_XCHG) /* init functions */ void rig_data_init (void); void rig_data_free (void); int rig_data_initialized (void); /* init and get preamp, att and vfo data */ void rig_data_set_att_data (int index, int data); int rig_data_get_att_data (int index); int rig_data_get_att_index (int data); void rig_data_set_preamp_data (int index, int data); int rig_data_get_preamp_data (int index); int rig_data_get_preamp_index (int data); int rig_data_get_vfos (void); void rig_data_set_vfos (int); int rig_data_get_all_modes (void); int rig_data_get_all_antennas (void); /* FIXME: group functions according to functionality */ /* set functions */ void rig_data_set_pstat (powerstat_t); void rig_data_set_ptt (ptt_t); void rig_data_set_mode (rmode_t); void rig_data_set_pbwidth (rig_data_pbw_t); void rig_data_set_freq (int, freq_t); void rig_data_set_rit (shortfreq_t); void rig_data_set_xit (shortfreq_t); void rig_data_set_agc (int); void rig_data_set_att (int); void rig_data_set_preamp (int); void rig_data_set_split (int); void rig_data_set_max_rfpwr (float); void rig_data_set_antenna (ant_t); #define rig_data_set_freq1(x) (rig_data_set_freq(1,x)) #define rig_data_set_freq2(x) (rig_data_set_freq(2,x)) /* get functions */ powerstat_t rig_data_get_pstat (void); ptt_t rig_data_get_ptt (void); rmode_t rig_data_get_mode (void); rig_data_pbw_t rig_data_get_pbwidth (void); freq_t rig_data_get_freq (int); shortfreq_t rig_data_get_rit (void); shortfreq_t rig_data_get_xit (void); int rig_data_get_agc (void); int rig_data_get_att (void); int rig_data_get_preamp (void); int rig_data_get_strength (void); float rig_data_get_swr (void); freq_t rig_data_get_fmin (void); freq_t rig_data_get_fmax (void); shortfreq_t rig_data_get_fstep (void); shortfreq_t rig_data_get_ritmin (void); shortfreq_t rig_data_get_ritmax (void); shortfreq_t rig_data_get_ritstep (void); shortfreq_t rig_data_get_xitmin (void); shortfreq_t rig_data_get_xitmax (void); shortfreq_t rig_data_get_xitstep (void); int rig_data_get_split (void); float rig_data_get_max_rfpwr (void); ant_t rig_data_get_antenna (void); /* has_get functions */ int rig_data_has_get_pstat (void); int rig_data_has_get_ptt (void); /* int rig_data_has_get_mode (void); */ /* int rig_data_has_get_pbwidth (void); */ int rig_data_has_get_freq1 (void); int rig_data_has_get_freq2 (void); int rig_data_has_get_rit (void); int rig_data_has_get_xit (void); int rig_data_has_get_agc (void); int rig_data_has_get_att (void); int rig_data_has_get_preamp (void); int rig_data_has_get_strength (void); int rig_data_has_get_swr (void); int rig_data_has_get_split (void); /* has_set functions */ int rig_data_has_set_pstat (void); int rig_data_has_set_ptt (void); int rig_data_has_set_freq1 (void); int rig_data_has_set_freq2 (void); int rig_data_has_set_rit (void); int rig_data_has_set_xit (void); int rig_data_has_set_att (void); int rig_data_has_set_preamp (void); int rig_data_has_set_split (void); /* ALC */ float rig_data_get_alc (void); void rig_data_set_alc (float); int rig_data_has_get_alc (void); int rig_data_has_set_alc (void); /* RF power */ int rig_data_has_get_power (void); int rig_data_has_set_power (void); float rig_data_get_power (void); void rig_data_set_power (float); /* AF gain */ int rig_data_has_get_afg (void); int rig_data_has_set_afg (void); float rig_data_get_afg (void); void rig_data_set_afg (float afg); /* RF gain */ int rig_data_has_get_rfg (void); int rig_data_has_set_rfg (void); float rig_data_get_rfg (void); void rig_data_set_rfg (float rfg); /* SQL */ int rig_data_has_get_sql (void); int rig_data_has_set_sql (void); float rig_data_get_sql (void); void rig_data_set_sql (float sql); /* IF shift */ int rig_data_has_get_ifs (void); int rig_data_has_set_ifs (void); int rig_data_get_ifs (void); void rig_data_set_ifs (int ifs); shortfreq_t rig_data_get_ifsmax (void); shortfreq_t rig_data_get_ifsstep (void); /* APF */ int rig_data_has_get_apf (void); int rig_data_has_set_apf (void); float rig_data_get_apf (void); void rig_data_set_apf (float apf); /* NR */ int rig_data_has_get_nr (void); int rig_data_has_set_nr (void); float rig_data_get_nr (void); void rig_data_set_nr (float nr); /* Notch */ int rig_data_has_get_notch (void); int rig_data_has_set_notch (void); int rig_data_get_notch (void); void rig_data_set_notch (int notch); /* PBT in */ int rig_data_has_get_pbtin (void); int rig_data_has_set_pbtin (void); float rig_data_get_pbtin (void); void rig_data_set_pbtin (float pbt); /* PBT out */ int rig_data_has_get_pbtout (void); int rig_data_has_set_pbtout (void); float rig_data_get_pbtout (void); void rig_data_set_pbtout (float pbt); /* CW pitch */ int rig_data_has_get_cwpitch (void); int rig_data_has_set_cwpitch (void); int rig_data_get_cwpitch (void); void rig_data_set_cwpitch (int cwp); /* keyer speed */ int rig_data_has_get_keyspd (void); int rig_data_has_set_keyspd (void); int rig_data_get_keyspd (void); void rig_data_set_keyspd (int keyspd); /* break-in delay */ int rig_data_has_get_bkindel (void); int rig_data_has_set_bkindel (void); int rig_data_get_bkindel (void); void rig_data_set_bkindel (int bkindel); /* balance */ int rig_data_has_get_balance (void); int rig_data_has_set_balance (void); float rig_data_get_balance (void); void rig_data_set_balance (float bal); /* VOX delay */ int rig_data_has_get_voxdel (void); int rig_data_has_set_voxdel (void); int rig_data_get_voxdel (void); void rig_data_set_voxdel (int voxdel); /* VOX gain */ int rig_data_has_get_voxg (void); int rig_data_has_set_voxg (void); float rig_data_get_voxg (void); void rig_data_set_voxg (float voxg); /* anti VOX */ int rig_data_has_get_antivox (void); int rig_data_has_set_antivox (void); float rig_data_get_antivox (void); void rig_data_set_antivox (float antivox); /* MIC gain */ int rig_data_has_get_micg (void); int rig_data_has_set_micg (void); float rig_data_get_micg (void); void rig_data_set_micg (float micg); /* compression */ int rig_data_has_get_comp (void); int rig_data_has_set_comp (void); float rig_data_get_comp (void); void rig_data_set_comp (float comp); /* func */ int rig_data_has_get_func (setting_t func); int rig_data_has_set_func (setting_t func); int rig_data_get_func (setting_t func); void rig_data_set_func (setting_t func, int status); /* LOCK */ int rig_data_has_set_lock (void); int rig_data_has_get_lock (void); void rig_data_set_lock (int lock); int rig_data_get_lock (void); /* VFO TOGGLE */ int rig_data_has_vfo_op_toggle (void); void rig_data_vfo_op_toggle (void); /* VFO COPY */ int rig_data_has_vfo_op_copy (void); void rig_data_vfo_op_copy (void); /* VFO COPY */ int rig_data_has_vfo_op_xchg (void); void rig_data_vfo_op_xchg (void); /* SET and GET VFO */ int rig_data_has_get_vfo (void); int rig_data_has_set_vfo (void); vfo_t rig_data_get_vfo (void); void rig_data_set_vfo (vfo_t); /* address acquisition functions */ grig_settings_t *rig_data_get_get_addr (void); grig_settings_t *rig_data_get_set_addr (void); grig_cmd_avail_t *rig_data_get_new_addr (void); grig_cmd_avail_t *rig_data_get_has_set_addr (void); grig_cmd_avail_t *rig_data_get_has_get_addr (void); #endif grig-GRIG-0_9_0/src/rig-gui-buttons.c000066400000000000000000000454201435534312400173430ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #include #include #include #include "rig-data.h" #include "rig-utils.h" #include "grig-gtk-workarounds.h" #include "rig-gui-buttons.h" /** \brief Enumerated values representing the widgets. * * These values are used by the timeout function to identify * each particular widget within the main container. The values * are attached to the widgets. */ typedef enum rig_gui_buttons_e { RIG_GUI_POWER_BUTTON = 1, /*!< The Power button */ RIG_GUI_PTT_BUTTON, /*!< The PTT button */ RIG_GUI_LOCK_BUTTON, /*!< Lock dial function */ RIG_GUI_ATT_SELECTOR, /*!< Attenuator selector. */ RIG_GUI_PREAMP_SELECTOR /*!< Preamp selector. */ } rig_gui_buttons_t; /** \brief Key to use for attaching widget ID */ #define WIDGET_ID_KEY "ID" /** \brief Key to use for attaching signal handler ID */ #define HANDLER_ID_KEY "SIG" /* private function prototypes */ static GtkWidget *rig_gui_buttons_create_power_button (void); static GtkWidget *rig_gui_buttons_create_ptt_button (void); static GtkWidget *rig_gui_buttons_create_lock_button (void); static GtkWidget *rig_gui_buttons_create_att_selector (void); static GtkWidget *rig_gui_buttons_create_preamp_selector (void); static void rig_gui_buttons_power_cb (GtkWidget *, gpointer); static void rig_gui_buttons_ptt_cb (GtkWidget *, gpointer); static void rig_gui_buttons_lock_cb (GtkWidget *, gpointer); static void rig_gui_buttons_att_cb (GtkWidget *, gpointer); static void rig_gui_buttons_preamp_cb (GtkWidget *, gpointer); static gint rig_gui_buttons_timeout_exec (gpointer); static gint rig_gui_buttons_timeout_stop (gpointer); static void rig_gui_buttons_update (GtkWidget *, gpointer); /** \brief Create power, mode, filter and agc buttons. * \return a composite widget containing the controls. * * This function creates the widgets which are used to set the power, * mode, bandwidth and AGC. */ GtkWidget * rig_gui_buttons_create () { GtkWidget *vbox; /* container */ guint timerid; /* create vertical box and add widgets */ vbox = gtk_vbox_new (FALSE, 0); /* add controls */ gtk_box_pack_start (GTK_BOX (vbox), rig_gui_buttons_create_power_button (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), rig_gui_buttons_create_ptt_button (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), rig_gui_buttons_create_lock_button (), FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (vbox), rig_gui_buttons_create_preamp_selector (), FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (vbox), rig_gui_buttons_create_att_selector (), FALSE, FALSE, 0); /* start readback timer */ timerid = g_timeout_add (RIG_GUI_BUTTONS_DEF_TVAL, rig_gui_buttons_timeout_exec, vbox); /* register timer_stop function at exit */ gtk_quit_add (gtk_main_level (), rig_gui_buttons_timeout_stop, GUINT_TO_POINTER (timerid)); gtk_widget_show_all (vbox); return vbox; } /** \brief Create power button. * \return The power button widget. * * This function creates the widget which is used to control the * power state of the rig. */ static GtkWidget * rig_gui_buttons_create_power_button () { GtkWidget *button; powerstat_t pstat; gint sigid; /* create button widget */ button = gtk_toggle_button_new_with_label (_("Power")); gtk_widget_set_tooltip_text (button, _("Power status")); /* set correct state */ pstat = rig_data_get_pstat (); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), pstat ? TRUE : FALSE); if (!rig_data_has_set_pstat ()) { gtk_widget_set_sensitive (button, FALSE); } /* connect "toggle" signal */ sigid = g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (rig_gui_buttons_power_cb), NULL); /* set handler ID */ g_object_set_data (G_OBJECT (button), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); /* set widget ID */ g_object_set_data (G_OBJECT (button), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_POWER_BUTTON)); return button; } /** \brief Create PTT button. * \return The power button widget. * * This function creates the widget which is used to control the * PTT state of the rig. */ static GtkWidget * rig_gui_buttons_create_ptt_button () { GtkWidget *button; ptt_t ptt; gint sigid; /* create button widget */ button = gtk_toggle_button_new_with_label (_("PTT")); gtk_widget_set_tooltip_text (button, _("Push to talk")); /* set correct state */ ptt = rig_data_get_ptt (); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), ptt ? TRUE : FALSE); if (!rig_data_has_set_ptt ()) { gtk_widget_set_sensitive (button, FALSE); } /* connect "toggle" signal */ sigid = g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (rig_gui_buttons_ptt_cb), NULL); /* set handler ID */ g_object_set_data (G_OBJECT (button), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); /* set widget ID */ g_object_set_data (G_OBJECT (button), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_PTT_BUTTON)); return button; } /** \brief Create LOCK button. * \return The lock button widget. * * This function creates the widget which is used to control the * dial LOCK ON/OFF. */ static GtkWidget * rig_gui_buttons_create_lock_button () { GtkWidget *button; int status; gint sigid; /* create button widget */ button = gtk_toggle_button_new_with_label (_("Lock")); gtk_widget_set_tooltip_text (button, _("Lock tuning dial")); /* set correct state */ status = rig_data_get_lock (); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), status ? TRUE : FALSE); if (!rig_data_has_set_lock ()) { gtk_widget_set_sensitive (button, FALSE); } /* connect "toggle" signal */ sigid = g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (rig_gui_buttons_lock_cb), NULL); /* set handler ID */ g_object_set_data (G_OBJECT (button), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); /* set widget ID */ g_object_set_data (G_OBJECT (button), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_LOCK_BUTTON)); return button; } /** \brief Create ATT selector. * \return */ static GtkWidget * rig_gui_buttons_create_att_selector () { GtkWidget *att; gint i = 0; gchar *text; gint sigid; att = gtk_combo_box_new_text (); /* add ATT OFF ie. 0 dB */ gtk_combo_box_append_text (GTK_COMBO_BOX (att), _("ATT OFF")); /* note: HAMLIB_MAXDBLSTSIZ is defined in hamlib; it is the max size of the ATT and preamp arrays. */ while ((i < HAMLIB_MAXDBLSTSIZ) && rig_data_get_att_data (i)) { text = g_strdup_printf ("-%d dB", rig_data_get_att_data (i)); gtk_combo_box_append_text (GTK_COMBO_BOX (att), text); g_free (text); i++; } /* get current ATT value; remember that -1 => ATT OFF which is the 0th element in the combo box list. */ i = rig_data_get_att_index (rig_data_get_att ()) + 1; gtk_combo_box_set_active (GTK_COMBO_BOX (att), i); if (!rig_data_has_set_att ()) { gtk_widget_set_sensitive (att, FALSE); } gtk_widget_set_tooltip_text (att, _("Attenuator level")); /* connect 'changed' signal */ sigid = g_signal_connect (G_OBJECT (att), "changed", G_CALLBACK (rig_gui_buttons_att_cb), NULL); /* set handler ID */ g_object_set_data (G_OBJECT (att), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); /* set widget ID */ g_object_set_data (G_OBJECT (att), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_ATT_SELECTOR)); return att; } /** \brief Create preamp selector. * \return */ static GtkWidget * rig_gui_buttons_create_preamp_selector () { GtkWidget *preamp; gint i = 0; gchar *text; gint sigid; preamp = gtk_combo_box_new_text (); /* add ATT OFF ie. 0 dB */ gtk_combo_box_append_text (GTK_COMBO_BOX (preamp), _("PREAMP OFF")); /* note: HAMLIB_MAXDBLSTSIZ is defined in hamlib; it is the max size of the ATT and preamp arrays. */ while ((i < HAMLIB_MAXDBLSTSIZ) && rig_data_get_preamp_data (i)) { text = g_strdup_printf ("%d dB", rig_data_get_preamp_data (i)); gtk_combo_box_append_text (GTK_COMBO_BOX (preamp), text); g_free (text); i++; } /* get current preamp value; remember that -1 => PREAMP OFF which is the 0th element in the combo box list. */ i = rig_data_get_preamp_index (rig_data_get_preamp ()) + 1; gtk_combo_box_set_active (GTK_COMBO_BOX (preamp), i); if (!rig_data_has_set_preamp ()) { gtk_widget_set_sensitive (preamp, FALSE); } gtk_widget_set_tooltip_text (preamp, _("Preamp level")); /* connect 'changed' signal */ sigid = g_signal_connect (G_OBJECT (preamp), "changed", G_CALLBACK (rig_gui_buttons_preamp_cb), NULL); /* set handler ID */ g_object_set_data (G_OBJECT (preamp), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); /* set widget ID */ g_object_set_data (G_OBJECT (preamp), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_PREAMP_SELECTOR)); return preamp; } /** \brief Set power status. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user clicks on the 'Power' button. * It check the status of the button and sets the power status accordingly. */ static void rig_gui_buttons_power_cb (GtkWidget *widget, gpointer data) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { rig_data_set_pstat (RIG_POWER_ON); } else { rig_data_set_pstat (RIG_POWER_OFF); } } /** \brief Set PTT status. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user clicks on the 'PTT' button. * It check the status of the button and sets the PTT status accordingly. */ static void rig_gui_buttons_ptt_cb (GtkWidget *widget, gpointer data) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { rig_data_set_ptt (RIG_PTT_ON); } else { rig_data_set_ptt (RIG_PTT_OFF); } } /** \brief Set LOCK status. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user clicks on the 'LOCK' button. * It check the status of the button and sets the LOCK status accordingly. */ static void rig_gui_buttons_lock_cb (GtkWidget *widget, gpointer data) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { rig_data_set_lock (1); } else { rig_data_set_lock (0); } } /** \brief Select attenuator level. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user selects a new attenuator level. * It acquires the selected menu item, converts it to hamlib ATT value * and sends the new value to the rig-data component. */ static void rig_gui_buttons_att_cb (GtkWidget *widget, gpointer data) { gint index; /* get selected item */ index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); /* convert it and send to rig-data */ rig_data_set_att (rig_data_get_att_data (index-1)); } /** \brief Select preamp level. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user selects a new preamp level. * It acquires the selected menu item, converts it to hamlib preamp value * and sends the new value to the rig-data component. */ static void rig_gui_buttons_preamp_cb (GtkWidget *widget, gpointer data) { gint index; /* get selected item */ index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); /* convert it and send to rig-data */ rig_data_set_preamp (rig_data_get_preamp_data (index-1)); } /** \brief Execute timeout function. * \param vbox The composite widget containing the controls. * \return Always TRUE to keep the timer running. * * This function reads the relevant rig settings from the rid-data object and * updates the control widgets within vbox. The function is called peridically * by the Gtk+ scheduler. * * \note Because this is an internal service, no checks are made on the sanity * of the parameter (ie. whether it really is the vbox we think it is). */ static gint rig_gui_buttons_timeout_exec (gpointer vbox) { /* update each child widget of the container */ gtk_container_foreach (GTK_CONTAINER (vbox), rig_gui_buttons_update, NULL); return TRUE; } /** \brief Stop timeout function. * \param timer The ID of the timer to stop. * \return Always TRUE. * * This function is used to stop the readback timer just before the * program is quit. It should be called automatically by Gtk+ when * the gtk_main_loop is exited. */ static gint rig_gui_buttons_timeout_stop (gpointer timer) { g_source_remove (GPOINTER_TO_UINT (timer)); return TRUE; } /** \brief Update control widget. * \param widget The widget to update. * \param data User data; always NULL. * * This function is called by the periodic timeout function in * order to update the control widgets. It is called with one * widget at a time. The function then checks the internal ID * of the widget and updates it accordingly. * * \note No checks are done to compare the current rig setting * with the widget settings, instead the callback signal * is blocked and the widget state is set to the rig state. * Hereafter the signal handler is unblocked again. * * \note We don't check the availability of the get functionssince * it is done by the daemon an we wish to display some values * anyway. */ static void rig_gui_buttons_update (GtkWidget *widget, gpointer data) { guint id; gint handler; powerstat_t pstat; ptt_t ptt; int attidx; /* get widget id */ id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (widget), WIDGET_ID_KEY)); switch (id) { /* power button */ case RIG_GUI_POWER_BUTTON: /* get power status */ pstat = rig_data_get_pstat (); /* get signal handler ID */ handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), HANDLER_ID_KEY)); /* block the signal handler */ g_signal_handler_block (G_OBJECT (widget), handler); /* set widget state */ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), pstat ? TRUE : FALSE); /* unblock signal handler */ g_signal_handler_unblock (G_OBJECT (widget), handler); break; /* ptt button */ case RIG_GUI_PTT_BUTTON: /* get PTT status */ ptt = rig_data_get_ptt (); /* get signal handler ID */ handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), HANDLER_ID_KEY)); /* block the signal handler */ g_signal_handler_block (G_OBJECT (widget), handler); /* set widget state */ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), ptt ? TRUE : FALSE); /* unblock signal handler */ g_signal_handler_unblock (G_OBJECT (widget), handler); break; /* ATT selector */ case RIG_GUI_ATT_SELECTOR: /* get signal handler ID */ handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), HANDLER_ID_KEY)); /* block the signal handler */ g_signal_handler_block (G_OBJECT (widget), handler); /* get current ATT value; remember that -1 => ATT OFF which is the 0th element in the combo box list. */ attidx = rig_data_get_att_index (rig_data_get_att ()) + 1; gtk_combo_box_set_active (GTK_COMBO_BOX (widget), attidx); /* unblock signal handler */ g_signal_handler_unblock (G_OBJECT (widget), handler); break; /* PREAMP selector */ case RIG_GUI_PREAMP_SELECTOR: /* get signal handler ID */ handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), HANDLER_ID_KEY)); /* block the signal handler */ g_signal_handler_block (G_OBJECT (widget), handler); /* get current preamp value; remember that -1 => ATT OFF which is the 0th element in the combo box list. */ attidx = rig_data_get_preamp_index (rig_data_get_preamp ()) + 1; gtk_combo_box_set_active (GTK_COMBO_BOX (widget), attidx); /* unblock signal handler */ g_signal_handler_unblock (G_OBJECT (widget), handler); break; default: break; } } grig-GRIG-0_9_0/src/rig-gui-buttons.h000066400000000000000000000027711435534312400173520ustar00rootroot00000000000000 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_BUTTONS_H #define RIG_GUI_BUTTONS_H 1 /** \brief Minimum delay in msec between widget updates. */ #define RIG_GUI_BUTTONS_MIN_TVAL 500 /** \brief Default delay in msec between widget updates. */ #define RIG_GUI_BUTTONS_DEF_TVAL 967 /** \brief Maximum delay in msec between widget updates. */ #define RIG_GUI_BUTTONS_MAX_TVAL 10000 GtkWidget *rig_gui_buttons_create (void); #endif grig-GRIG-0_9_0/src/rig-gui-ctrl2.c000066400000000000000000000524531435534312400166770ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \bug should disable widgets if not available! */ #include #include #include #include "rig-data.h" #include "rig-utils.h" #include "grig-gtk-workarounds.h" #include "rig-gui-ctrl2.h" /** \brief Enumerated values representing the widgets. * * These values are used by the timeout function to identify * each particular widget within the main container. The values * are attached to the widgets. */ typedef enum rig_gui_ctrl2_e { RIG_GUI_MODE_SELECTOR = 1, /*!< The mode selector */ RIG_GUI_FILTER_SELECTOR, /*!< The filter/passband width selector */ RIG_GUI_AGC_SELECTOR, /*!< The AGC selector */ RIG_GUI_ANTENNA_SELECTOR /*!< The antenna selector */ } rig_gui_ctrl2_t; /** \brief Key to use for attaching widget ID */ #define WIDGET_ID_KEY "ID" /** \brief Key to use for attaching signal handler ID */ #define HANDLER_ID_KEY "SIG" /** \brief Table to convert mode index to combo box index * * The hamlib modes can be converted to a linear index using the * rig_utils_mode_to_index function. That index can be used in this * table to find the actual index in the mode selection combo box. * The reason that these two indices are not the same is, that grig * only shows the modes, which are supported by the rig. * * \note -1 means that the mode is not supported by the rig and thus * not present in the combo box. * * \note RIG_MODE_NONE is not present, thus the first entry is RIG_MODE_AM. */ gint midx2cidx[16] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}; /** \brief Table to convert mode index to string */ const gchar *midx2str[16] = { N_("AM"), N_("CW"), N_("USB"), N_("LSB"), N_("RTTY"), N_("FM Narrow"), N_("FM Wide"), N_("CW Rev"), N_("RTTY Rev"), N_("AM Synch"), N_("Pkt (LSB)"), N_("Pkt (USB)"), N_("Pkt (FM)"), N_("ECUSB"), N_("ECLSB"), N_("FAX") }; /** \brief Table to convert combo box index to hamlib mode. */ gint cidx2mode[16] = { RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE, RIG_MODE_NONE }; /* private function prototypes */ static GtkWidget *rig_gui_ctrl2_create_agc_selector (void); static GtkWidget *rig_gui_ctrl2_create_mode_selector (void); static GtkWidget *rig_gui_ctrl2_create_filter_selector (void); static GtkWidget *rig_gui_ctrl2_create_antenna_selector (void); static void rig_gui_ctrl2_agc_cb (GtkWidget *, gpointer); static void rig_gui_ctrl2_mode_cb (GtkWidget *, gpointer); static void rig_gui_ctrl2_filter_cb (GtkWidget *, gpointer); static void rig_gui_ctrl2_antenna_cb (GtkWidget *, gpointer); static gint rig_gui_ctrl2_timeout_exec (gpointer); static gint rig_gui_ctrl2_timeout_stop (gpointer); static void rig_gui_ctrl2_update (GtkWidget *, gpointer); /** \brief Create mode, filter, agc, and antenna buttons. * \return a composite widget containing the controls. * * This function creates the widgets which are used to select the * mode, bandwidth, AGC, and antenna. */ GtkWidget * rig_gui_ctrl2_create () { GtkWidget *vbox; /* container */ guint timerid; /* create vertical box and add widgets */ vbox = gtk_vbox_new (FALSE, 0); /* add controls */ gtk_box_pack_start (GTK_BOX (vbox), rig_gui_ctrl2_create_mode_selector (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), rig_gui_ctrl2_create_filter_selector (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), rig_gui_ctrl2_create_agc_selector (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), rig_gui_ctrl2_create_antenna_selector (), FALSE, FALSE, 0); /* start readback timer */ timerid = g_timeout_add (RIG_GUI_CTRL2_DEF_TVAL, rig_gui_ctrl2_timeout_exec, vbox); /* register timer_stop function at exit */ gtk_quit_add (gtk_main_level (), rig_gui_ctrl2_timeout_stop, GUINT_TO_POINTER (timerid)); gtk_widget_show_all (vbox); return vbox; } /** \brief Create AGC selector. * \return The AGC selector widget. * * This function creates the widget used to select the AGC setting. * The used widget is a GtkComboBox * * \bug Grig does not implement the RIG_AGC_USER option! */ static GtkWidget * rig_gui_ctrl2_create_agc_selector () { GtkWidget *combo; gint sigid; /* create and initialize widget */ combo = gtk_combo_box_new_text (); /* FIXME: Hamlib does also have 'user' */ gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("AGC OFF")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Super Fast")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Fast")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Medium")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Slow")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Auto")); gtk_widget_set_tooltip_text (combo, _("Automatic Gain Control Level")); /* select current level */ switch (rig_data_get_agc ()) { case RIG_AGC_OFF: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); break; case RIG_AGC_SUPERFAST: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 1); break; case RIG_AGC_FAST: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 2); break; case RIG_AGC_MEDIUM: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 3); break; case RIG_AGC_SLOW: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 4); break; case RIG_AGC_AUTO: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 5); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), -1); break; } /* connect 'changed' signal */ sigid = g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (rig_gui_ctrl2_agc_cb), NULL); /* set widget ID */ g_object_set_data (G_OBJECT (combo), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_AGC_SELECTOR)); /* set handler ID */ g_object_set_data (G_OBJECT (combo), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); return combo; } /** \brief Create mode selector. * \return The mode selector widget. * * This function creates the widget used to select the current mode. * The numerical values for the different modes is not linear * (1, 2, 3, 4, ...). They are defined as individual bits in a * 16 bit integer (1, 2, 4, 8, ...). Thus, to convert between * hamlib mode and combo box index we use the following relations: * * index = rint[log(mode)/log(2)] * mode = 1 << index * * These conversions are done using dedicated functions in the * rig-utils package. * * \bug Grig does not implement the RIG_MODE_NONE mode. */ static GtkWidget * rig_gui_ctrl2_create_mode_selector () { GtkWidget *combo; gint sigid; gint index = 0; gint i,mode; /* create and initialize widget */ combo = gtk_combo_box_new_text (); /* loop over all modes */ for (i = 0; i < 16; i++) { mode = 1 << i; /* if this mode is supported, add entry to combo box, store indices and increment combo box index */ if (rig_data_get_all_modes () & mode) { gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _(midx2str[i])); midx2cidx[i] = index; cidx2mode[index] = mode; index++; } } /* set current mode */ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), midx2cidx[rig_utils_mode_to_index (rig_data_get_mode ())]); gtk_widget_set_tooltip_text (combo, _("Communication mode")); /* connect 'changed' signal */ sigid = g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (rig_gui_ctrl2_mode_cb), NULL); /* set widget ID */ g_object_set_data (G_OBJECT (combo), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_MODE_SELECTOR)); /* set handler ID */ g_object_set_data (G_OBJECT (combo), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); return combo; } /** \brief Create filter selector. * \return The filter selctor widget. * * This function creates the filter/bandwidth selector widget. The current * implementation only supports the traditional RIG_PASSBAND_NARROW, RIG_PASSBAND_NORMAL * and RIG_PASSBAND_WIDE. */ static GtkWidget * rig_gui_ctrl2_create_filter_selector () { GtkWidget *combo; gint sigid; /* create and initialize widget */ combo = gtk_combo_box_new_text (); /* Add items */ gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Wide")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Normal")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Narrow")); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("[User]")); /* set current passband width */ switch (rig_data_get_pbwidth ()) { case RIG_DATA_PB_WIDE: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); break; case RIG_DATA_PB_NORMAL: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 1); break; case RIG_DATA_PB_NARROW: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 2); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 3); break; } gtk_widget_set_tooltip_text (combo, _("Passband Width")); /* connect 'changed' signal */ sigid = g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (rig_gui_ctrl2_filter_cb), NULL); /* set widget ID */ g_object_set_data (G_OBJECT (combo), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_FILTER_SELECTOR)); /* set handler ID */ g_object_set_data (G_OBJECT (combo), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); return combo; } /** \brief Create antenna selector. * \return The antenna selector widget. * * This function creates the widget used to select the current antenna. * The numerical values for the different antenna is not linear * (1, 2, 3, 4, ...). They are defined as individual bits in a * 16 bit integer (1, 2, 4, 8, ...). Thus, to convert between * hamlib mode and combo box index we use the following relations: * * index = rint[log(mode)/log(2)] * mode = 1 << index * * These conversions are done using dedicated functions in the * rig-utils package. * * \bug Grig does not implement the RIG_ANT_NONE antenna. */ static GtkWidget * rig_gui_ctrl2_create_antenna_selector () { GtkWidget *combo; gint sigid; gint index = 0; gint i,antenna; gchar antstr[16]; /* create and initialize widget */ combo = gtk_combo_box_new_text (); /* loop over all antennas */ for (i = 0; i < 8; i++) { antenna = 1 << i; /* if this antenna is supported, add entry to combo box, store indices and increment combo box index */ if (rig_data_get_all_antennas () & antenna) { snprintf(antstr, sizeof(antstr)-1, _("ANT %d"), i+1); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), antstr); midx2cidx[i] = index; cidx2mode[index] = antenna; index++; } } /* set current antenna */ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), midx2cidx[rig_utils_mode_to_index (rig_data_get_antenna ())]); /* add tooltips when widget is realized */ gtk_widget_set_tooltip_text (combo, _("Antenna Port")); /* connect 'changed' signal */ sigid = g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (rig_gui_ctrl2_antenna_cb), NULL); /* set widget ID */ g_object_set_data (G_OBJECT (combo), WIDGET_ID_KEY, GUINT_TO_POINTER (RIG_GUI_ANTENNA_SELECTOR)); /* set handler ID */ g_object_set_data (G_OBJECT (combo), HANDLER_ID_KEY, GINT_TO_POINTER (sigid)); return combo; } /** \brief Select AGC delay. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user selects a new AGC value. * It acquires the selected menu item and set the agc level accordingly. * * \note Numerically MEDIUM > SLOW > FAST (mediumwas added to hamlib too late) */ static void rig_gui_ctrl2_agc_cb (GtkWidget *widget, gpointer data) { switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) { case 0: rig_data_set_agc (RIG_AGC_OFF); break; case 1: rig_data_set_agc (RIG_AGC_SUPERFAST); break; case 2: rig_data_set_agc (RIG_AGC_FAST); break; case 3: rig_data_set_agc (RIG_AGC_MEDIUM); break; case 4: rig_data_set_agc (RIG_AGC_SLOW); break; case 5: rig_data_set_agc (RIG_AGC_AUTO); break; default: /* internal error; bug */ break; } } /** \brief Select mode. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user selects a new mode. * It acquires the selected menu item, converts it to hamlib mode type * and sends the new mode to the rig-data component. */ static void rig_gui_ctrl2_mode_cb (GtkWidget *widget, gpointer data) { gint index; /* get selected item */ index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); /* convert it and send to rig-data */ rig_data_set_mode (cidx2mode[index]); } /** \brief Select passband width. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user selects a new passband width. * */ static void rig_gui_ctrl2_filter_cb (GtkWidget *widget, gpointer data) { gint index; /* get selected item */ index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); if (index > 2) index = 1; /* send it to rig-data */ rig_data_set_pbwidth (index); } /** \brief Select antenna. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user selects a new antenna. * It acquires the selected menu item, converts it to hamlib antenna type * and sends the new antenna to the rig-data component. */ static void rig_gui_ctrl2_antenna_cb (GtkWidget *widget, gpointer data) { gint index; /* get selected item */ index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); /* convert it and send to rig-data */ rig_data_set_antenna (cidx2mode[index]); } /** \brief Execute timeout function. * \param vbox The composite widget containing the controls. * \return Always TRUE to keep the timer running. * * This function reads the relevant rig settings from the rid-data object and * updates the control widgets within vbox. The function is called peridically * by the Gtk+ scheduler. * * \note Because this is an internal service, no checks are made on the sanity * of the parameter (ie. whether it really is the vbox we think it is). */ static gint rig_gui_ctrl2_timeout_exec (gpointer vbox) { /* update each child widget of the container */ gtk_container_foreach (GTK_CONTAINER (vbox), rig_gui_ctrl2_update, NULL); return TRUE; } /** \brief Stop timeout function. * \param timer The ID of the timer to stop. * \return Always TRUE. * * This function is used to stop the readback timer just before the * program is quit. It should be called automatically by Gtk+ when * the gtk_main_loop is exited. */ static gint rig_gui_ctrl2_timeout_stop (gpointer timer) { g_source_remove (GPOINTER_TO_UINT (timer)); return TRUE; } /** \brief Update control widget. * \param widget The widget to update. * \param data User data; always NULL. * * This function is called by the periodic timeout function in * order to update the control widgets. It is called with one * widget at a time. The function then checks the internal ID * of the widget and updates it accordingly. * * \note No checks are done to compare the current rig setting * with the widget settings, instead the callback signal * is blocked and the widget state is set to the rig state. * Hereafter the signal handler is unblocked again. */ static void rig_gui_ctrl2_update (GtkWidget *widget, gpointer data) { guint id; gint handler; /* get widget id */ id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (widget), WIDGET_ID_KEY)); switch (id) { /* agc selector */ case RIG_GUI_AGC_SELECTOR: /* get signal handler ID */ handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), HANDLER_ID_KEY)); /* block the signal handler */ g_signal_handler_block (G_OBJECT (widget), handler); /* select current level; because we don't support all available AGC settings (like RIG_AGC_USER), we need to handle each supported case individually. */ switch (rig_data_get_agc ()) { case RIG_AGC_OFF: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); break; case RIG_AGC_SUPERFAST: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); break; case RIG_AGC_FAST: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2); break; case RIG_AGC_MEDIUM: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 3); break; case RIG_AGC_SLOW: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 4); break; case RIG_AGC_AUTO: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 5); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), -1); break; } /* unblock signal handler */ g_signal_handler_unblock (G_OBJECT (widget), handler); break; /* mode selector */ case RIG_GUI_MODE_SELECTOR: /* get signal handler ID */ handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), HANDLER_ID_KEY)); /* block the signal handler */ g_signal_handler_block (G_OBJECT (widget), handler); /* set current mode */ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), midx2cidx[rig_utils_mode_to_index (rig_data_get_mode ())]); /* unblock signal handler */ g_signal_handler_unblock (G_OBJECT (widget), handler); break; /* filter selector */ case RIG_GUI_FILTER_SELECTOR: /* get signal handler ID */ handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), HANDLER_ID_KEY)); /* block the signal handler */ g_signal_handler_block (G_OBJECT (widget), handler); /* set current passband width */ switch (rig_data_get_pbwidth ()) { case RIG_DATA_PB_WIDE: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); break; case RIG_DATA_PB_NARROW: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); break; } /* unblock signal handler */ g_signal_handler_unblock (G_OBJECT (widget), handler); break; /* antenna selector */ case RIG_GUI_ANTENNA_SELECTOR: /* get signal handler ID */ handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), HANDLER_ID_KEY)); /* block the signal handler */ g_signal_handler_block (G_OBJECT (widget), handler); /* set current antenna */ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), midx2cidx[rig_utils_mode_to_index (rig_data_get_antenna ())]); /* unblock signal handler */ g_signal_handler_unblock (G_OBJECT (widget), handler); break; default: break; } } grig-GRIG-0_9_0/src/rig-gui-ctrl2.h000066400000000000000000000027551435534312400167040ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_CTRL2_H #define RIG_GUI_CTRL2_H 1 /** \brief Minimum delay in msec between widget updates. */ #define RIG_GUI_CTRL2_MIN_TVAL 1100 /** \brief Default delay in msec between widget updates. */ #define RIG_GUI_CTRL2_DEF_TVAL 1790 /** \brief Maximum delay in msec between widget updates. */ #define RIG_GUI_CTRL2_MAX_TVAL 10000 GtkWidget *rig_gui_ctrl2_create (void); #endif grig-GRIG-0_9_0/src/rig-gui-func.c000066400000000000000000000133371435534312400166020ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \brief FUNC controls * * This module implements all the FUNC controls except LOCK * which is handled in the main window. */ #include #include #include #include #include "rig-data.h" #include "rig-utils.h" #include "rig-gui-func.h" #include "grig-debug.h" #include "grig-menubar.h" /* defined in main.c */ extern GtkWidget *grigapp; static gint func_window_delete (GtkWidget *widget, GdkEvent *event, gpointer data); static void func_window_destroy (GtkWidget *widget, gpointer data); static void create_controls (GtkBox *box); static void bool_state_cb (GtkToggleButton *toggle_button, gpointer data); static gboolean func_levels_update (gpointer data); static GtkWidget *dialog; static gboolean visible = FALSE; static guint timerid = 0; /* controls */ static GtkWidget *fctrls[RIG_SETTING_MAX]; /* handler ids */ static gulong hids[RIG_SETTING_MAX]; /** \brief Create level controls. * \return A container widget containing the controls. * * This function creates and initializes the level controls for grig. * The controls are hidden by default using a GtkExpander widget. */ void rig_gui_func_create () { GtkWidget *hbox; gchar *title; if (visible) { grig_debug_local (RIG_DEBUG_BUG, _("%s: FUNC window already visible."), __FUNCTION__); return; } /* create hbox and add toggle buttons */ hbox = gtk_hbox_new (TRUE, 5); create_controls (GTK_BOX (hbox)); /* create dialog window */ title = g_strdup_printf (_("%s (Special Functions)"), gtk_window_get_title (GTK_WINDOW (grigapp))); /* create dialog window */ dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (grigapp), GTK_DIALOG_DESTROY_WITH_PARENT, NULL); g_free (title); gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 50); /* allow interaction with other windows */ gtk_window_set_modal (GTK_WINDOW (dialog), FALSE); g_signal_connect (dialog, "delete_event", G_CALLBACK (func_window_delete), NULL); g_signal_connect (dialog, "destroy", G_CALLBACK (func_window_destroy), NULL); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox); visible = TRUE; gtk_widget_show_all (dialog); /* start callback */ timerid = g_timeout_add (1073, func_levels_update, NULL); } static gint func_window_delete (GtkWidget *widget, GdkEvent *event, gpointer data) { /* force menu item to unset */ grig_menubar_force_func_item (FALSE); /* return FALSE so that Gtk+ will emit the destroy signal */ return FALSE; } static void func_window_destroy (GtkWidget *widget, gpointer data) { /* stop callback */ g_source_remove (timerid); timerid = 0; /* clear func-active flag in rig-data */ visible = FALSE; } void rig_gui_func_close () { if (!visible) { grig_debug_local (RIG_DEBUG_BUG, _("%s: FUNC window is not visible."), __FUNCTION__); return; } gtk_widget_destroy (dialog); } /** \brief Common callback used by bool state * */ static void bool_state_cb (GtkToggleButton *toggle_button, gpointer data) { int func = GPOINTER_TO_INT (data); int value = gtk_toggle_button_get_active (toggle_button); rig_data_set_func (func, value); #if 0 default: grig_debug_local (RIG_DEBUG_BUG, _("%s:%d: Invalid level %d"), __FILE__, __LINE__, level); break; } #endif } static void create_controls (GtkBox *box) { setting_t func; guint count = 0; int i; const gchar *funcstr; for (i=0; i Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_FUNC_H #define RIG_GUI_FUNC_H 1 void rig_gui_func_create (void); void rig_gui_func_close (void); #endif grig-GRIG-0_9_0/src/rig-gui-info-data.h000066400000000000000000000077551435534312400175250ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui-info-data.h * \ingroup info * \brief Constant data structures for rig info. * */ #ifndef RIG_GUI_INFO_DATA_H #define RIG_GUI_INFO_DATA_H 1 /** \brief string representations for RIG_LEVEL symbolic references. */ const gchar *RIG_LEVEL_STR[] = { N_("PREAMP"), N_("ATT"), N_("VOX"), N_("AF"), N_("RF"), N_("SQL"), N_("IF"), N_("APF"), N_("NR"), N_("PBT_IN"), N_("PBT_OUT"), N_("CWPITCH"), N_("RFPOWER"), N_("MICGAIN"), N_("KEYSPD"), N_("NOTCHF"), N_("COMP"), N_("AGC"), N_("BKINDL"), N_("BALANCE"), N_("METER"), N_("VOXGAIN"), N_("ANTIVOX"), N_("N/A"), N_("N/A"), N_("N/A"), N_("RAWSTR"), N_("SQLSTAT"), N_("SWR"), N_("ALC"), N_("STRENGTH") }; /** \brief string representations for RIG_FUNC symbolic references. */ const gchar *RIG_FUNC_STR[] = { N_("FAST AGC"), N_("NB"), N_("COMPR"), N_("VOX"), N_("TONE"), N_("CTCSS"), N_("SEMI BK"), N_("FULL BK"), N_("ANF"), N_("NR"), N_("AIP"), N_("APF"), N_("MON"), N_("MAN NOTCH"), N_("RNF"), N_("AUTO RO"), N_("LOCK"), N_("MUTE"), N_("VOICE SCAN"), N_("REV TRX"), N_("SQL"), N_("ABM"), N_("BEAT CANC"), N_("MAN BC"), N_("N/A"), N_("AFC"), N_("SATMODE"), N_("SCOPE"), N_("RESUME"), N_("TBURST"), N_("TUNER") }; /** \brief String representations for PTT_TYPE_T symbolic references. */ const gchar *PTT_TYPE_STR[] = { N_("None"), N_("Legacy"), N_("SER_DTR"), N_("SER_RTS"), N_("PARPORT") }; /** \brief String representations for DCD_TYPE_T symbolic references. */ const gchar *DCD_TYPE_STR[] = { N_("None"), N_("Legacy"), N_("SER_DSR"), N_("SER_CTS"), N_("SER_CAR"), N_("PARPORT") }; /** \brief String representations for RIG_PORT_T symbolic references. */ const gchar *RIG_PORT_STR[] = { N_("None"), N_("Serial"), N_("Network"), N_("Device"), N_("Packet"), N_("DTMF"), N_("IrDA"), N_("RPC"), N_("Parallel") }; /** \brief String representations for SERIAL_PARITY_E symbolic references. */ const gchar *RIG_PARITY_STR[] = { N_("None"), N_("Odd"), N_("Even") }; /** \brief String representations for SERIAL_HANDSHAKE_E symbolic references. */ const gchar *RIG_HANDSHAKE_STR[] = { N_("None"), N_("XONXOFF"), N_("Hardware") }; /** \brief String representations for announce symbolic references. */ const gchar *ANN_STR[] = { N_("OFF"), N_("FREQ"), N_("RXMODE"), N_("CW"), N_("EMG"), N_("JAP") }; /** \brief String representation for mode symbolic references. */ const gchar *MODE_STR[] = { N_("AM"), N_("CW"), N_("USB"), N_("LSB"), N_("RTTY"), N_("FM"), N_("WFM"), N_("CWR"), N_("RTTYR"), N_("AMS"), N_("PKTLSB"), N_("PKTUSB"), N_("PKTFM"), N_("ECSSUSB"), N_("ECSSLSB"), N_("FAX") }; /** \brief String representation for VFO ops. */ const gchar *RIG_OP_STR[] = { N_("COPY A=B"), N_("XCHG A/B"), N_("VFO->MEM"), N_("MEM->VFO"), N_("MEMCLEAR"), N_("UP"), N_("DOWN"), N_("BAND UP"), N_("BAND DOWN"), N_("LEFT"), N_("RIGHT"), N_("TUNE"), N_("TOGGLE") }; #endif grig-GRIG-0_9_0/src/rig-gui-info.c000066400000000000000000000722711435534312400166040ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui-info.c * \ingroup info * \brief Radio info box. * * The purpose of this package is to show the contents of the rig_caps * structure in a nicely organized fashion. */ #include #include #include #include "rig-data.h" #include "rig-gui-info.h" #include "rig-gui-info-data.h" extern GtkWidget *grigapp; /* defined in main.c */ extern RIG *myrig; /* define in rig-demon.c */ /* subsystem containers */ static GtkWidget *rig_gui_info_create_header (void); static GtkWidget *rig_gui_info_create_offset_frame (void); static GtkWidget *rig_gui_info_create_level_frame (void); static GtkWidget *rig_gui_info_create_if_frame (void); static GtkWidget *rig_gui_info_create_tunstep_frame (void); static GtkWidget *rig_gui_info_create_frontend_frame (void); static GtkWidget *rig_gui_info_create_func_frame (void); static GtkWidget *rig_gui_info_create_vfo_ops_frame (void); /** \brief Create info dialog. * * This function creates the dialog window which is used for showing * the radio capabilities. */ void rig_gui_info_run () { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *vbox1; GtkWidget *vbox2; GtkWidget *vbox3; GtkWidget *vbox4; vbox1 = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox1), rig_gui_info_create_if_frame (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox1), rig_gui_info_create_offset_frame (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox1), rig_gui_info_create_frontend_frame (), FALSE, FALSE, 0); vbox2 = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox2), rig_gui_info_create_level_frame (), TRUE, TRUE, 0); vbox3 = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox3), rig_gui_info_create_func_frame (), TRUE, TRUE, 0); vbox4 = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox4), rig_gui_info_create_tunstep_frame (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox4), rig_gui_info_create_vfo_ops_frame (), TRUE, TRUE, 0); /* main horisontal box */ hbox = gtk_hbox_new (TRUE, 15); gtk_box_pack_start (GTK_BOX (hbox), vbox1, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), vbox3, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), vbox4, TRUE, TRUE, 0); /* create dialog and add hbox */ dialog = gtk_dialog_new_with_buttons (_("Radio Info"), GTK_WINDOW (grigapp), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE, GTK_RESPONSE_NONE, NULL); /* Ensure that the dialog box is destroyed when the user responds. */ g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), rig_gui_info_create_header (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), gtk_hseparator_new (), FALSE, FALSE, 10); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 10); gtk_widget_show_all (dialog); } /** \brief Create header. * \return The header widget which can be packed into themain container. * * This function creates the header of the radio info dialog. The header * consists of the brand, model and driver info. The text is arranged in a * table with 3 rows and 2 columns. The brand and model is placed in the * upper row, the driver version is in the middle row and the driver status * is in the lower row. */ static GtkWidget * rig_gui_info_create_header () { GtkWidget *table; GtkWidget *label; gchar *text; /* create the main table */ table = gtk_table_new (4, 2, FALSE); /* create label showing brand and model */ label = gtk_label_new (NULL); text = g_strdup_printf ("%s %s", myrig->caps->mfg_name, myrig->caps->model_name); gtk_label_set_markup (GTK_LABEL (label), text); g_free (text); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 2, 0, 1); /* driver version */ label = gtk_label_new (NULL); text = g_strdup ("Driver Version:"); gtk_label_set_markup (GTK_LABEL (label), text); g_free (text); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0); label = gtk_label_new (NULL); text = g_strdup_printf (" %s", myrig->caps->version); gtk_label_set_markup (GTK_LABEL (label), text); g_free (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0); /* driver status */ label = gtk_label_new (NULL); text = g_strdup ("Driver Status:"); gtk_label_set_markup (GTK_LABEL (label), text); g_free (text); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0); label = gtk_label_new (NULL); text = g_strdup_printf (" %s", rig_strstatus (myrig->caps->status)); gtk_label_set_markup (GTK_LABEL (label), text); g_free (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0); /* copyright label */ label = gtk_label_new (NULL); text = g_strdup ("Driver License:"); gtk_label_set_markup (GTK_LABEL (label), text); g_free (text); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0); label = gtk_label_new (NULL); text = g_strdup_printf (" %s", myrig->caps->copyright); gtk_label_set_markup (GTK_LABEL (label), text); g_free (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0); return table; } /** \brief Create frame containing offset info. * \return Frame containing the widgets. * * This function creates the widgets to display various * offset information. The container is made of a 3x2 table * showing RIT, XIT and IF-Shift and is surrounded by a nice * frame. */ static GtkWidget * rig_gui_info_create_offset_frame () { GtkWidget *frame; GtkWidget *table; GtkWidget *label; gchar *text; table = gtk_table_new (3, 2, TRUE); label = gtk_label_new (_("RIT:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* use UTF-8 code for plus/minus */ text = g_strdup_printf ("\302\261%.2f kHz", ((gfloat) myrig->caps->max_rit) / 1000.0); label = gtk_label_new (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); g_free (text); label = gtk_label_new (_("XIT:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); text = g_strdup_printf ("\302\261%.2f kHz", ((gfloat) myrig->caps->max_xit) / 1000.0); label = gtk_label_new (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); g_free (text); label = gtk_label_new (_("IF-SHIFT:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); text = g_strdup_printf ("\302\261%.2f kHz", ((gfloat) myrig->caps->max_ifshift) / 1000.0); label = gtk_label_new (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); g_free (text); frame = gtk_frame_new (_("Max. Offsets")); gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5); gtk_container_add (GTK_CONTAINER (frame), table); return frame; } /** \brief Create frame containing levels info. * \return Frame containing the widgets. * * This function creates the widget used to display the set and get * level availabilities. The various levels are listed in a vertical * table and for each of them a label indicates * whether the level is available or not (actually one label for read and * one for write). * * READ WRITE * * LEVEL 1 X X * LEVEL 2 X * */ static GtkWidget * rig_gui_info_create_level_frame () { GtkWidget *swin; GtkWidget *table; GtkWidget *label; setting_t levels_rd; setting_t levels_wr; guint i; table = gtk_table_new (30, 3, FALSE); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("LEVEL")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("READ")); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("WRITE")); gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* get levels */ levels_rd = rig_has_get_level (myrig, 0xFFFFFFFF); levels_wr = rig_has_set_level (myrig, 0xFFFFFFFF); /* loop over all levels; unfortunately there is no nice way to avoid the empty values but, since there are not so many of them, it is all right... */ for (i = 0; i < 31; i++) { /* add RIG_LEVEL_STR[i] to the row i+1 */ label = gtk_label_new (RIG_LEVEL_STR[i]); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, i+1, i+2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* add READ label to row i+1 */ label = gtk_label_new (_("-")); gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, i+1, i+2); if (levels_rd & (1 << i)) { gtk_label_set_text (GTK_LABEL (label), _("X")); } /* add WRITE label to row i+1 */ label = gtk_label_new (_("-")); gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, i+1, i+2); if (levels_wr & (1 << i)) { gtk_label_set_text (GTK_LABEL (label), _("X")); } } /* scrolled window and frame */ swin = gtk_scrolled_window_new (NULL,NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), table); return swin; } /** \brief Create interface frame. * \return Container widget containing the individual settings. * * This function creates the info widgets to show the rig port type, DCD type, * PTT type, parity and handshake. * */ static GtkWidget * rig_gui_info_create_if_frame () { GtkWidget *frame; GtkWidget *table; GtkWidget *label; gchar *text; table = gtk_table_new (7, 2, FALSE); /* connection type */ label = gtk_label_new (_("Port Type:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); /* protection against index out of range */ if ((myrig->caps->port_type >= RIG_PORT_NONE) && (myrig->caps->port_type <= RIG_PORT_PARALLEL)) { gtk_label_set_text (GTK_LABEL (label), RIG_PORT_STR[myrig->caps->port_type]); } else { gtk_label_set_text (GTK_LABEL (label), _("Unknown")); } gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* DCD */ label = gtk_label_new (_("DCD Type:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); /* protection against index out of range */ if ((myrig->caps->dcd_type >= RIG_DCD_NONE) && (myrig->caps->dcd_type <= RIG_DCD_PARALLEL)) { gtk_label_set_text (GTK_LABEL (label), DCD_TYPE_STR[myrig->caps->dcd_type]); } else { gtk_label_set_text (GTK_LABEL (label), _("Unknown")); } gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* PTT */ label = gtk_label_new (_("PTT Type:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); /* protection against index out of range */ if ((myrig->caps->ptt_type >= RIG_PTT_NONE) && (myrig->caps->ptt_type <= RIG_PTT_PARALLEL)) { gtk_label_set_text (GTK_LABEL (label), PTT_TYPE_STR[myrig->caps->dcd_type]); } else { gtk_label_set_text (GTK_LABEL (label), _("Unknown")); } gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* serial speed */ label = gtk_label_new (_("Serial Speed:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); if (myrig->caps->port_type == RIG_PORT_SERIAL) { text = g_strdup_printf (_("%d..%d baud"), myrig->caps->serial_rate_min, myrig->caps->serial_rate_max); gtk_label_set_text (GTK_LABEL (label), text); g_free (text); } else { gtk_label_set_text (GTK_LABEL (label), _("N/A")); } gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* data bits */ label = gtk_label_new (_("Data bits:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); if (myrig->caps->port_type == RIG_PORT_SERIAL) { text = g_strdup_printf ("%d", myrig->caps->serial_data_bits); gtk_label_set_text (GTK_LABEL (label), text); g_free (text); } else { gtk_label_set_text (GTK_LABEL (label), _("N/A")); } gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* stop bits */ label = gtk_label_new (_("Stop bits:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); if (myrig->caps->port_type == RIG_PORT_SERIAL) { text = g_strdup_printf ("%d", myrig->caps->serial_stop_bits); gtk_label_set_text (GTK_LABEL (label), text); g_free (text); } else { gtk_label_set_text (GTK_LABEL (label), _("N/A")); } gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* serial parity */ label = gtk_label_new (_("Parity:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); if (myrig->caps->port_type == RIG_PORT_SERIAL) { /* protection against index out of range */ if ((myrig->caps->serial_parity >= RIG_PARITY_NONE) && (myrig->caps->serial_parity <= RIG_PARITY_EVEN)) { gtk_label_set_text (GTK_LABEL (label), RIG_PARITY_STR[myrig->caps->serial_parity]); } else { gtk_label_set_text (GTK_LABEL (label), _("Unknown")); } } else { gtk_label_set_text (GTK_LABEL (label), _("N/A")); } gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* serial handshake */ label = gtk_label_new (_("Handshake:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); if (myrig->caps->port_type == RIG_PORT_SERIAL) { /* protection against index out of range */ if ((myrig->caps->serial_handshake >= RIG_HANDSHAKE_NONE) && (myrig->caps->serial_handshake <= RIG_HANDSHAKE_HARDWARE)) { gtk_label_set_text (GTK_LABEL (label), RIG_HANDSHAKE_STR[myrig->caps->serial_handshake]); } else { gtk_label_set_text (GTK_LABEL (label), _("Unknown")); } } else { gtk_label_set_text (GTK_LABEL (label), _("N/A")); } gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* frame */ frame = gtk_frame_new (_("Interface")); gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5); gtk_container_add (GTK_CONTAINER (frame), table); return frame; } /** \brief Create tuning steps list. * \return A container widget listing the tuning steps. * * This function creates the container widget which is used to list the * available tuning steps forthe rig. For each available tuning step it * lists the modes for which the tuning step can beused. * * The container structure is very similar to the one found in the level * container (table packed in a scrolled window). */ static GtkWidget * rig_gui_info_create_tunstep_frame () { GtkWidget *swin; GtkWidget *table; GtkWidget *label; guint i,j; gchar *text; gchar *buffer; /* Create a table with enough rows to show the max possible number of unique tuning steps. */ table = gtk_table_new (HAMLIB_TSLSTSIZ, 2, FALSE); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("STEP")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 5, 0); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("MODES")); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_SHRINK, GTK_SHRINK, 5, 0); /* pseudo code: for each available tuning step i { add tuning step to row i for each mode j { if mode is in bitfield for tuning step i { append mode j to cell (i,1) } } } */ /* for each available tuning ste */ for (i = 0; i < HAMLIB_TSLSTSIZ; i++) { gboolean firsthit = TRUE; /* indicates whether found mode is the first one for the current tuning step. */ /* if tuning step is zero stop (note that the RIG_IS_TS_END macro seem to be buggy, at least when used on the dummy backend */ if (myrig->caps->tuning_steps[i].ts == 0) { i = HAMLIB_TSLSTSIZ; } /* otherwise continue */ else { /* create tuning step label */ text = g_strdup_printf ("%ld Hz", myrig->caps->tuning_steps[i].ts); label = gtk_label_new (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, i+1, i+2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); g_free (text); /* for each mode */ for (j = 0; j < 16; j++) { /* if the mode is in the bitfield for this tuning step */ if (myrig->caps->tuning_steps[i].modes & (1 << j)) { /* append mode string to text buffer; note that the first mode requires special attention, since text is empty. */ if (!firsthit) { buffer = g_strdup_printf ("%s %s", text, MODE_STR[j]); g_free (text); } else { buffer = g_strdup_printf ("%s", MODE_STR[j]); firsthit = FALSE; } text = g_strdup (buffer); g_free (buffer); } } /* create label containing the modes */ label = gtk_label_new (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, i+1, i+2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); } } /* scrolled window and frame */ swin = gtk_scrolled_window_new (NULL,NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), table); return swin; } /** \brief Create front end info frame. * \return A container widget containing the info. * * This function creates the widgets used to display the front end * information (pre-amp, attenuator). */ static GtkWidget * rig_gui_info_create_frontend_frame () { GtkWidget *frame; GtkWidget *table; GtkWidget *label; gchar *text; gchar *buffer; guint i; gint data; table = gtk_table_new (2, 2, FALSE); label = gtk_label_new (_("PREAMP:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); text = g_strdup (""); /* loop over all available preamp values and concatenate them into a label */ for (i = 0; i < HAMLIB_MAXDBLSTSIZ; i++) { data = rig_data_get_preamp_data (i); /* check whether we have a real data or we have reached the terminator */ if (data == 0) { i = HAMLIB_MAXDBLSTSIZ; } else { if (i > 0) { buffer = g_strdup_printf ("%s %ddB", text, data); g_free (text); text = g_strdup (buffer); g_free (buffer); } else { g_free (text); text = g_strdup_printf ("%ddB", data); } } } label = gtk_label_new (text); g_free (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (_("ATT:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); text = g_strdup (""); /* loop over all available attenuator values and concatenate them into a label */ for (i = 0; i < HAMLIB_MAXDBLSTSIZ; i++) { data = rig_data_get_att_data (i); /* check whether we have a real data or we have reached the terminator */ if (data == 0) { i = HAMLIB_MAXDBLSTSIZ; } else { if (i > 0) { buffer = g_strdup_printf ("%s; -%ddB", text, data); g_free (text); text = g_strdup (buffer); g_free (buffer); } else { text = g_strdup_printf ("-%ddB", data); } } } label = gtk_label_new (text); g_free (text); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); frame = gtk_frame_new (_("Front End")); gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5); gtk_container_add (GTK_CONTAINER (frame), table); return frame; } /** \brief Create frame containing functions info. * \return Frame containing the widgets. * * This function creates the widget used to display the set and get * special function availabilities. The various functions are listed in a vertical * table and for each of them a label indicates * whether the function is available or not (actually one label for read and * one for write). * * READ WRITE * * FUNC 1 X X * FUNC 2 X * */ static GtkWidget * rig_gui_info_create_func_frame () { GtkWidget *swin; GtkWidget *table; GtkWidget *label; setting_t funcs_rd; setting_t funcs_wr; guint i; table = gtk_table_new (30, 3, FALSE); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("FUNCTION")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("READ")); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("WRITE")); gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* get levels */ funcs_rd = rig_has_get_func (myrig, 0xFFFFFFFF); funcs_wr = rig_has_set_func (myrig, 0xFFFFFFFF); /* loop over all levels; unfortunately there is no nice way to avoid the empty values but, since there are not so many of them, it is all right... */ for (i = 0; i < 31; i++) { /* add RIG_FUNC_STR[i] to the row i+1 */ label = gtk_label_new (RIG_FUNC_STR[i]); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, i+1, i+2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* add READ label to row i+1 */ label = gtk_label_new (_("-")); gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, i+1, i+2); if (funcs_rd & (1 << i)) { gtk_label_set_text (GTK_LABEL (label), _("X")); } /* add WRITE label to row i+1 */ label = gtk_label_new (_("-")); gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, i+1, i+2); if (funcs_wr & (1 << i)) { gtk_label_set_text (GTK_LABEL (label), _("X")); } } /* scrolled window and frame */ swin = gtk_scrolled_window_new (NULL,NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), table); return swin; } /** \brief Create frame containing VFO ops info. * \return Frame containing the widgets. * */ static GtkWidget * rig_gui_info_create_vfo_ops_frame () { GtkWidget *swin; GtkWidget *table; GtkWidget *label; setting_t vfo_ops; guint i; table = gtk_table_new (14, 2, FALSE); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("VFO OP")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), _("SET")); gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* get vfo ops */ vfo_ops = myrig->caps->vfo_ops & 0xFFFFFFFF; /* loop over all levels; unfortunately there is no nice way to avoid the empty values but, since there are not so many of them, it is all right... */ for (i = 0; i < 13; i++) { /* add RIG_FUNC_STR[i] to the row i+1 */ label = gtk_label_new (RIG_OP_STR[i]); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, i+1, i+2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); /* add READ label to row i+1 */ label = gtk_label_new (_("-")); gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, i+1, i+2); if (vfo_ops & (1 << i)) { gtk_label_set_text (GTK_LABEL (label), _("X")); } } /* scrolled window and frame */ swin = gtk_scrolled_window_new (NULL,NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), table); return swin; } grig-GRIG-0_9_0/src/rig-gui-info.h000066400000000000000000000022741435534312400166050ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_INFO_H #define RIG_GUI_INFO_H 1 void rig_gui_info_run (void); #endif grig-GRIG-0_9_0/src/rig-gui-keypad.c000066400000000000000000000171701435534312400171230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2008 Alessandro Zummo Authors: Alessandro Zummo Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #include #include #include #include #include "rig-data.h" #include "rig-utils.h" #include "grig-gtk-workarounds.h" #include "grig-debug.h" #include "rig-gui-keypad.h" #include "rig-gui-lcd.h" static char *labels[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", }; /* private function prototypes */ static GtkWidget *rig_gui_keypad_create_button(gint num, GrigKeypad *self); static GtkWidget *rig_gui_keypad_create_enter(void); static GtkWidget *rig_gui_keypad_create_clear(void); /* callbacks */ static void rig_gui_keypad_enter_cb(GtkWidget * widget, gpointer data) { GrigKeypad *self = data; if (self->enabled) grig_keypad_disable(self); else grig_keypad_enable(self); g_signal_emit_by_name(self, "grig-keypad-enter-pressed"); } static void rig_gui_keypad_clear_cb(GtkWidget * widget, gpointer data) { GrigKeypad *self = data; grig_keypad_disable(self); g_signal_emit_by_name(self, "grig-keypad-clear-pressed"); } static void rig_gui_keypad_num_cb(GtkWidget * widget, gpointer data) { GrigKeypad *self = data; gint num = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(widget), "number")); g_signal_emit_by_name(self, "grig-keypad-num-pressed", num); } static gint rig_gui_keypad_key_press_cb(GtkWidget * widget, GdkEventKey *e, gpointer data) { GrigKeypad *self = data; if (e->type != GDK_KEY_PRESS) return FALSE; if (e->keyval == GDK_Insert) { rig_gui_keypad_enter_cb(widget, data); return TRUE; } if (!self->enabled) return FALSE; if (e->keyval >= '0' && e->keyval <= '9') { g_signal_emit_by_name(self, "grig-keypad-num-pressed", e->keyval - '0'); return TRUE; } /* numeric keypad */ if (e->keyval >= GDK_KP_0 && e->keyval <= GDK_KP_9) { g_signal_emit_by_name(self, "grig-keypad-num-pressed", e->keyval - GDK_KP_0); return TRUE; } if (e->keyval == GDK_Delete) { rig_gui_keypad_clear_cb(widget, data); return TRUE; } return FALSE; } /* class */ GtkWidget * grig_keypad_new(void) { return GTK_WIDGET(g_object_new(GRIG_KEYPAD_TYPE, NULL)); } static void grig_keypad_init(GrigKeypad * self) { gint i, j; self->enabled = FALSE; gtk_table_resize(GTK_TABLE(self), 3, 4); gtk_table_set_homogeneous(GTK_TABLE(self), TRUE); /* create buttons 1 - 9 */ for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { gint index = (3 * i) + j + 1; self->buttons[index] = rig_gui_keypad_create_button(index, self); gtk_table_attach_defaults(GTK_TABLE(self), self->buttons[index], j, j + 1, i, i + 1); gtk_widget_set_sensitive(self->buttons[index], FALSE); } } /* create CLR, 0, ENT */ self->buttons[0] = rig_gui_keypad_create_button(0, self); self->clear = rig_gui_keypad_create_clear(); self->enter = rig_gui_keypad_create_enter(); gtk_widget_set_sensitive(self->buttons[0], FALSE); gtk_widget_set_sensitive(self->clear, FALSE); /* attach CLR, 0, ENT */ gtk_table_attach_defaults(GTK_TABLE(self), self->clear, 0, 1, 3, 4); gtk_table_attach_defaults(GTK_TABLE(self), self->buttons[0], 1, 2, 3, 4); gtk_table_attach_defaults(GTK_TABLE(self), self->enter, 2, 3, 3, 4); /* create new signals */ /* XXX maybe this should go in class_init? */ g_signal_new("grig-keypad-enter-pressed", GTK_TYPE_WIDGET, G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); g_signal_new("grig-keypad-clear-pressed", GTK_TYPE_WIDGET, G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); g_signal_new("grig-keypad-num-pressed", GTK_TYPE_WIDGET, G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /* connect signal handlers */ g_signal_connect(G_OBJECT(self->enter), "pressed", G_CALLBACK(rig_gui_keypad_enter_cb), self); g_signal_connect(G_OBJECT(self->clear), "pressed", G_CALLBACK(rig_gui_keypad_clear_cb), self); gtk_key_snooper_install(rig_gui_keypad_key_press_cb, self); } GType grig_keypad_get_type(void) { static GType grig_keypad_type = 0; if (!grig_keypad_type) { static const GTypeInfo grig_keypad_info = { sizeof(GrigKeypadClass), NULL, NULL, NULL, NULL, NULL, sizeof(GrigKeypad), 0, (GInstanceInitFunc) grig_keypad_init, }; grig_keypad_type = g_type_register_static(GTK_TYPE_TABLE, "GrigKeypad", &grig_keypad_info, 0); } return grig_keypad_type; } /* exported functions */ /* enables everything but CLR */ void grig_keypad_enable(GrigKeypad * self) { gint i; for (i = 0; i < 10; i++) { gtk_widget_set_sensitive(self->buttons[i], TRUE); } gtk_widget_set_sensitive(self->clear, TRUE); self->enabled = TRUE; } /* disables everything but ENT */ void grig_keypad_disable(GrigKeypad * self) { gint i; for (i = 0; i < 10; i++) { gtk_widget_set_sensitive(self->buttons[i], FALSE); } gtk_widget_set_sensitive(self->clear, FALSE); gtk_widget_set_sensitive(self->enter, TRUE); self->enabled = FALSE; } /* internal functions */ static GtkWidget * rig_gui_keypad_create_button(gint num, GrigKeypad *self) { GtkWidget *button; button = gtk_button_new_with_label(labels[num]); g_object_set_data(G_OBJECT(button), "number", GINT_TO_POINTER(num)); g_signal_connect(G_OBJECT(button), "pressed", G_CALLBACK(rig_gui_keypad_num_cb), self); return button; } static GtkWidget * rig_gui_keypad_create_enter(void) { GtkWidget *button; button = gtk_button_new_with_label(_("ENT")); gtk_widget_set_tooltip_text (button, _("Begin manual frequency entry mode")); return button; } static GtkWidget * rig_gui_keypad_create_clear(void) { GtkWidget *button; button = gtk_button_new_with_label(_("CLR")); gtk_widget_set_tooltip_text (button, _("Clear manual frequency entry mode")); return button; } grig-GRIG-0_9_0/src/rig-gui-keypad.h000066400000000000000000000022131435534312400171200ustar00rootroot00000000000000#ifndef __GRIG_KEYPAD_H__ #define __GRIG_KEYPAD_H__ #include #include #include G_BEGIN_DECLS #define GRIG_KEYPAD_TYPE (grig_keypad_get_type ()) #define GRIG_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GRIG_KEYPAD_TYPE, GrigKeypad)) #define GRIG_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GRIG_KEYPAD_TYPE, GrigKeypadClass)) #define IS_GRIG_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GRIG_KEYPAD_TYPE)) #define IS_GRIG_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GRIG_KEYPAD_TYPE)) typedef struct _GrigKeypad GrigKeypad; typedef struct _GrigKeypadClass GrigKeypadClass; struct _GrigKeypad { GtkTable table; GtkWidget *buttons[10]; GtkWidget *enter; GtkWidget *clear; gboolean enabled; }; struct _GrigKeypadClass { GtkTableClass parent_class; void (* grig_keypad) (GrigKeypad *obj); }; GType grig_keypad_get_type (void); GtkWidget* grig_keypad_new (void); void grig_keypad_disable(GrigKeypad *obj); void grig_keypad_enable(GrigKeypad *obj); G_END_DECLS #endif /* __GRIG_KEYPAD_H__ */ grig-GRIG-0_9_0/src/rig-gui-lcd.c000066400000000000000000001176531435534312400164170ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui-lcd.c * \ingroup lcd * \brief LCD display. * * The main purpose of the LCD display widget is to show the current frequency * and to provide easy access to set the current working frequency. The display * has 6 large digits left of the decmal and three small digits right of the * decimal. It is therefore capable to display the frequency with 1 Hz of * accuracy below 1 GHz and with 1kHz of accuracy above 1 GHz. * * The master widget consists of a GtkDrawingArea holding on which the digits * are drawn (one for each display digit). The digits are pixmaps loaded from * two files, one containing the * normal sized digits and the other containing the small digits. The size of * the canvas is calculated from the size of the digits. * * In order to have predictable behaviour the pixmap files containing the * digits need to contain 12 equal-sized digits and a comma: '0123456789 -.' * Each of these digits will then be stored in a GdkPixbuf and used on the * canvas as necessary. Furthermore, the last column in the pixmaps must * contain alternting pixels with the foreground and the background color * which will be used on the canvas. * * The comma need not have the same size as the digits; it may be smaller. * When the pixmap is read, the size of the digits is calclated as follows: \code DIGIT_WIDTH = IMG_WIDTH div 12 COMMA_WIDTH = IMG_WIDTH mod 12 - 1 (first column contains color info) DIGIT_HEIGHT = IMG_HEIGHT \endcode * It is therefore quite important that IMG_WIDTH mod 11 > 0 and that the * width of the decimal separator is less than 10 pixels. * * \bug Currently it does not work with f >= 1 GHz * * \bug RIT/XIT can display up to 9.99 * * \bug Needs to be cleaned up! * * \bug Mouse events are caught only if RIG has set_freq capabilities. * set_rit / set_xit capability must be checked explicitly by the * RIT/XIT handling code. */ #include #include #include #include #include #ifdef HAVE_CONFIG_H # include #endif #include #include "compat.h" #include "rig-data.h" #include "grig-gtk-workarounds.h" #include "rig-gui-lcd.h" /** \brief Event objects. * * This enumeration is used to identify on which object * a particular event has occurred. */ typedef enum { EVENT_OBJECT_NONE = -1, /*!< No object. */ EVENT_OBJECT_FREQ_1G, /*!< 1 GHz frequency digit. */ EVENT_OBJECT_FREQ_100M, /*!< 100 MHz frequency digit. */ EVENT_OBJECT_FREQ_10M, /*!< 10 MHz frequency digit. */ EVENT_OBJECT_FREQ_1M, /*!< 1 MHz frequency digit. */ EVENT_OBJECT_FREQ_100k, /*!< 100 kHz frequency digit. */ EVENT_OBJECT_FREQ_10k, /*!< 10 kHz frequency digit. */ EVENT_OBJECT_FREQ_1k, /*!< 1 kHz frequency digit. */ EVENT_OBJECT_FREQ_100, /*!< 100 Hz frequency digit. */ EVENT_OBJECT_FREQ_10, /*!< 10 Hz frequency digit. */ EVENT_OBJECT_FREQ_1, /*!< 1 Hz frequency digit. */ EVENT_OBJECT_RIT_1k, /*!< 1 kHz RIT digit. */ EVENT_OBJECT_RIT_100, /*!< 100 Hz RIT digit. */ EVENT_OBJECT_RIT_10 /*!< 10 Hz RIT digit. */ } event_object_t; /** \brief The space between the edge of the LCD and contents in pixels. */ #define LCD_MARGIN 50 /** \brief Pixmaps containing normal sized digits. */ static GdkPixbuf *digits_normal[13]; /** \brief Pixmaps containing small sized digits. */ static GdkPixbuf *digits_small[13]; static GdkPixmap *buffer; lcd_t lcd; /* private function prototypes */ static void rig_gui_lcd_load_digits (const gchar *fname); static gboolean rig_gui_lcd_expose_cb (GtkWidget *, GdkEventExpose *, gpointer); static gboolean rig_gui_lcd_handle_event (GtkWidget *, GdkEvent *, gpointer); static event_object_t rig_gui_lcd_get_event_object (GdkEvent *event); static void rig_gui_lcd_calc_dim (void); static void rig_gui_lcd_draw_text (void); static void rig_gui_lcd_draw_digit (gint position, char digit); static gint rig_gui_lcd_timeout_exec (gpointer); static gint rig_gui_lcd_timeout_stop (gpointer); static void ritval_to_bytearr (gchar *, shortfreq_t); static void rig_gui_lcd_update_vfo (void); /** \brief Create LCD display widget. * \return The LCD display widget. * * This function creates and initializes the LCD display widget which is * used to display the frequency. */ GtkWidget * rig_gui_lcd_create () { guint timerid; guint i; /* init data */ lcd.exposed = FALSE; lcd.manual = FALSE; /* load digit pixmaps from file */ rig_gui_lcd_load_digits (NULL); /* calculate frequently used sizes and positions */ rig_gui_lcd_calc_dim (); /* clear freqs buffers */ for (i=0; i<10; i++) { lcd.freqs1[i] = 'X'; } for (i=0; i<4; i++) { lcd.rits[i] = 'X'; lcd.xits[i] = 'X'; } g_signal_new("freq-changed", GTK_TYPE_WIDGET, G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /* create canvas */ lcd.canvas = gtk_drawing_area_new (); gtk_widget_set_size_request (lcd.canvas, lcd.width, lcd.height); /* connect expose handler which will take care of adding contents. */ g_signal_connect (G_OBJECT (lcd.canvas), "expose_event", G_CALLBACK (rig_gui_lcd_expose_cb), NULL); /* connect mouse events but only if rig has set_freq; XXX THIS IS A BUG SINCE WE DON'T DISTINGUISH BETWEEN SET_FREQ AND SET_RIT/SET_XIT. */ #ifndef DISABLE_HW if (rig_data_has_set_freq1 ()) { #endif gtk_widget_add_events (lcd.canvas, GDK_BUTTON_PRESS_MASK); g_signal_connect (G_OBJECT (lcd.canvas), "event", G_CALLBACK (rig_gui_lcd_handle_event), NULL); #ifndef DISABLE_HW } #endif /* start readback timer but only if service is available or we are in DISABLE_HW mode */ #ifndef DISABLE_HW if (rig_data_has_get_freq1 ()) { #endif timerid = g_timeout_add (RIG_GUI_LCD_DEF_TVAL, rig_gui_lcd_timeout_exec, NULL); /* register timer_stop function at exit */ gtk_quit_add (gtk_main_level (), rig_gui_lcd_timeout_stop, GUINT_TO_POINTER (timerid)); #ifndef DISABLE_HW } #endif gtk_widget_show_all (lcd.canvas); return lcd.canvas; } /** \brief Load digit pixmaps into memory. * \param name The base file name. * * This function loads the pixmaps containing the digits, splits them and * stores each individual digit in memory for later use. The function also * obtains the drawing area bg/fg colors based on the loaded * digits. Because the first column in the pixmap contains the background and * foreground colors, the dimensions of each digits is calculated as follows: \code W = (pixmap_width - 1) / 12 H = pixmap_height \endcode * The parameter name is used to specify the files from which the digits should * be loaded. If name is NULL, the default pixmaps will be read. Otherwise grig * will look for $PACKAGE_PIXMAPS_DIR/name_normal.png and * $PACKAGE_PIXMAPS_DIR/name_small.png * * \bug No fallback exists if standard pixmap is not where it is supposed to be! * */ static void rig_gui_lcd_load_digits (const gchar *name) { GdkPixbuf *digits; /* pixmap in memory */ gint i; guint dw,dh,cw; /* width and height of a digit and width of comma */ gint bps,rs; /* bits pr.ample and rowstride */ gchar *fname; gchar *tmp; guchar *pixels; /* normal digits */ if (name == NULL) { //fname = g_strconcat (PACKAGE_PIXMAPS_DIR, G_DIR_SEPARATOR_S, // "digits_normal.png", NULL); fname = pixmap_file_name ("digits_normal.png"); } else { //fname = g_strconcat (PACKAGE_PIXMAPS_DIR, G_DIR_SEPARATOR_S, // name, "_normal.png", NULL); tmp = g_strconcat (name, "_normal.png", NULL); fname = pixmap_file_name (tmp); g_free (tmp); } /* load pixmap */ digits = gdk_pixbuf_new_from_file (fname, NULL); g_free (fname); /* calculate digit size */ dw = gdk_pixbuf_get_width (digits) / 12; dh = gdk_pixbuf_get_height (digits); /* split pixmap into digits */ for (i=0; i<12; i++) { digits_normal[i] = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, dw, dh); gdk_pixbuf_copy_area (digits, 1 + dw*i, 0, dw, dh, digits_normal[i], 0, 0); } /* decimal point */ cw = gdk_pixbuf_get_width (digits) % 12 - 1; digits_normal[12] = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, cw, dh); gdk_pixbuf_copy_area (digits, 1 + dw*12, 0, cw, dh, digits_normal[12], 0, 0); /* get background and foreground colors */ bps = gdk_pixbuf_get_bits_per_sample (digits); rs = gdk_pixbuf_get_rowstride (digits); pixels = gdk_pixbuf_get_pixels (digits); /* get each 8-bit component and scale to 16-bits; we use floating point aritmetics to allow more than 16 bits per sample. */ lcd.fg.red = (guint16) (pixels[(bps/8)*0] * (65535.0 / (pow (2, bps) - 1))); lcd.fg.green = (guint16) (pixels[(bps/8)*1] * (65535.0 / (pow (2, bps) - 1))); lcd.fg.blue = (guint16) (pixels[(bps/8)*2] * (65535.0 / (pow (2, bps) - 1))); lcd.bg.red = (guint16) (pixels[(bps/8)*0 + rs] * (65535.0 / (pow (2, bps) - 1))); lcd.bg.green = (guint16) (pixels[(bps/8)*1 + rs] * (65535.0 / (pow (2, bps) - 1))); lcd.bg.blue = (guint16) (pixels[(bps/8)*2 + rs] * (65535.0 / (pow (2, bps) - 1))); g_object_unref (digits); /* small digits */ if (name == NULL) { //fname = g_strconcat (PACKAGE_PIXMAPS_DIR, G_DIR_SEPARATOR_S, // "digits_small.png", NULL); fname = pixmap_file_name ("digits_small.png"); } else { //fname = g_strconcat (PACKAGE_PIXMAPS_DIR, G_DIR_SEPARATOR_S, // name, "_small.png", NULL); tmp = g_strconcat (name, "_small.png", NULL); fname = pixmap_file_name (tmp); g_free (tmp); } /* load pixmap */ digits = gdk_pixbuf_new_from_file (fname, NULL); g_free (fname); /* calculate digit size */ dw = gdk_pixbuf_get_width (digits) / 12; dh = gdk_pixbuf_get_height (digits); /* split pixmap into digits */ for (i=0; i<12; i++) { digits_small[i] = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, dw, dh); gdk_pixbuf_copy_area (digits, 1 + dw*i, 0, dw, dh, digits_small[i], 0, 0); } /* decimal point */ cw = gdk_pixbuf_get_width (digits) % 12 - 1; digits_small[12] = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, cw, dh); gdk_pixbuf_copy_area (digits, 1 + dw*12, 0, cw, dh, digits_small[12], 0, 0); /* get background and foreground colors */ bps = gdk_pixbuf_get_bits_per_sample (digits); rs = gdk_pixbuf_get_rowstride (digits); g_object_unref (digits); } /** \brief Handle expose events for the drawing area. * \param widget The drawing area widget. * \param event The event. * \param data User data; always NULL. * * This function is called when the drawing area widget is finalized * and exposed. It is used to finish the initialization of those * parameters, which need attributes from visible widgets. * * \bug canvas height is hadcoded according to smeter height. * * \bug recreates graphics context on every call (memory leak) */ static gboolean rig_gui_lcd_expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) { guint i; /* finalize the graphics context */ lcd.gc1 = gdk_gc_new (GDK_DRAWABLE (widget->window)); gdk_gc_set_rgb_fg_color (lcd.gc1, &lcd.fg); gdk_gc_set_rgb_bg_color (lcd.gc1, &lcd.bg); gdk_gc_set_line_attributes (lcd.gc1, 1, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); lcd.gc2 = gdk_gc_new (GDK_DRAWABLE (widget->window)); gdk_gc_set_rgb_fg_color (lcd.gc2, &lcd.bg); gdk_gc_set_rgb_bg_color (lcd.gc2, &lcd.fg); gdk_gc_set_line_attributes (lcd.gc2, 1, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); /* draw border around the meter */ gdk_draw_rectangle (GDK_DRAWABLE (widget->window), lcd.gc2, TRUE, 0, 0, lcd.width, lcd.height); gdk_draw_rectangle (GDK_DRAWABLE (widget->window), lcd.gc1, FALSE, 0, 0, lcd.width-1, lcd.height-1); /* force digit update by clearing internal string buffer */ for (i=0; i<10; i++) { lcd.freqs1[i] = 'X'; } rig_gui_lcd_set_freq_digits (lcd.freq1); /* force digit update by clearing internal string buffer */ for (i=0; i<4; i++) { lcd.rits[i] = 'X'; } rig_gui_lcd_set_rit_digits (lcd.rit); /* large dot */ gdk_draw_pixbuf (GDK_DRAWABLE (widget->window), NULL, digits_normal[12], 0, 0, lcd.dots[0].x, lcd.dots[0].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); /* small dot */ gdk_draw_pixbuf (GDK_DRAWABLE (widget->window), NULL, digits_small[12], 0, 0, lcd.dots[1].x, lcd.dots[1].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); /* initialize offscreen buffer */ buffer = gdk_pixmap_new (GDK_DRAWABLE (lcd.canvas->window), lcd.width, lcd.height, -1); /* draw text */ rig_gui_lcd_draw_text (); /* force VFO update by clearing internal vfo state */ lcd.vfo = RIG_VFO_NONE; rig_gui_lcd_update_vfo (); /* indicate that widget is ready to be used */ lcd.exposed = TRUE; return TRUE; } /** \brief Handle drawing area events. * \param widget The drawing area widget receiving the evend. * \param event The received event * \param data User data; always NULL. * \return TRUE if the event can be handled, FALSE otherwise. * * This function is called every time an event occurs on the drawing area. * The function currently handles three type of events: * \li GDK_EXPOSE: The drawing area has been exposed and needs to be redrawn * \li GDK_BUTTON_PRES: One of the three mouse button has been pressed * \li GDK_SCROLL: The scroll wheel of the mouse has been used * All other events are ignored in which case FALSE is returned to notify the * parent that the event has not been handled. * * The detailed management of each of the three events is done by other internal * functions. * * \bug Cyclomatic omplexity to high? * * \sa rig_gui_lcd_expose_cb, rig_gui_lcd_get_event_object */ static gboolean rig_gui_lcd_handle_event (GtkWidget *widget, GdkEvent *event, gpointer data) { event_object_t object; /* event object */ freq_t deltaf; /* frequency change */ freq_t newfreq; /* new frequency. */ shortfreq_t deltar; /* RIT/XIT change */ shortfreq_t newrit; /* new RIT/XIT value */ guint power; /* usd for 10**power */ gchar *str; /* in case of expose-event call the expose event handler */ switch (event->type) { /* drawing area has been exposed */ case GDK_EXPOSE: return rig_gui_lcd_expose_cb (widget, (GdkEventExpose *) event, data); break; /* button press */ case GDK_BUTTON_PRESS: object = rig_gui_lcd_get_event_object (event); /* if no object, just return */ if (object == EVENT_OBJECT_NONE) { return FALSE; } else if (object > EVENT_OBJECT_FREQ_1) { /* RIT/XIT event; object is in the range 10..12 */ power = 13 - object; deltar = pow (10, power); if (deltar < rig_data_get_ritstep ()) { // return TRUE; deltar = rig_data_get_ritstep (); } /* check which mouse button */ switch (event->button.button) { /* LEFT button: inrease frequency */ case 1: /* ensure correct sign flip */ if ((lcd.rit < 0) && (deltar > abs (lcd.rit))) newrit = -lcd.rit; else newrit = lcd.rit + deltar; /* check whether we are within current frequency range; if so, apply new frequency */ if (newrit <= rig_data_get_ritmax ()) { rig_data_set_rit (newrit); rig_gui_lcd_set_rit_digits (newrit); } break; /* MIDDLE button: clear digit */ case 2: /* convert current frequency to string and clear corresponding digit; then convert back to freq_t WARNING: don't use lcd.freqs1 because it is not 0-terminated; it's just a byte array! */ str = g_strdup_printf ("%5d", lcd.rit); str[object-9] = '0'; newrit = (freq_t) g_strtod (str, NULL); /* try new frequency */ if (newrit >= rig_data_get_ritmin ()) { rig_data_set_rit (newrit); rig_gui_lcd_set_rit_digits (newrit); } g_free (str); break; /* RIGHT button: decrease frequency */ case 3: /* ensure correct sign flip */ if ((lcd.rit > 0) && (deltar > lcd.rit)) newrit = -lcd.rit; else newrit = lcd.rit - deltar; /* check whether we are within current frequency range; if so, apply new frequency */ if (newrit >= rig_data_get_ritmin ()) { rig_data_set_rit (newrit); rig_gui_lcd_set_rit_digits (newrit); } break; default: break; } /* case */ } /* else if object > EVENT_OBJECT_FREQ_1 */ else { /* frequency event; object is in the range 0..9 with 0 corresponding to 1 GHz */ power = 9 - object; deltaf = pow (10, power); if (deltaf < rig_data_get_fstep ()) { // return TRUE; deltaf = rig_data_get_fstep (); } /* check which mouse button */ switch (event->button.button) { /* LEFT button: inrease frequency */ case 1: newfreq = lcd.freq1 + deltaf; /* check whether we are within current frequency range; if so, apply new frequency */ if (newfreq <= rig_data_get_fmax ()) { rig_data_set_freq (1, newfreq); rig_gui_lcd_set_freq_digits (newfreq); } break; /* MIDDLE button: clear digit */ case 2: /* convert current frequency to string and clear corresponding digit; then convert back to freq_t WARNING: don't use lcd.freqs1 because it is not 0-terminated; it's just a byte array! */ str = g_strdup_printf ("%10.0f", lcd.freq1); str[object] = '0'; newfreq = (freq_t) g_strtod (str, NULL); /* try new frequency */ if (newfreq >= rig_data_get_fmin ()) { rig_data_set_freq (1, newfreq); rig_gui_lcd_set_freq_digits (newfreq); } g_free (str); break; /* RIGHT button: decrease frequency */ case 3: newfreq = lcd.freq1 - deltaf; /* check whether we are within current frequency range; if so, apply new frequency */ if (newfreq >= rig_data_get_fmin ()) { rig_data_set_freq (1, newfreq); rig_gui_lcd_set_freq_digits (newfreq); } break; default: break; } /* case event->button.button */ } /* else */ return TRUE; break; /* mouse wheel */ case GDK_SCROLL: object = rig_gui_lcd_get_event_object (event); /* if no object, just return */ if (object == EVENT_OBJECT_NONE) { return FALSE; } else if (object > EVENT_OBJECT_FREQ_1) { /* RIT/XIT event; object is in the range 10..12 */ power = 13 - object; deltar = pow (10, power); if (deltar < rig_data_get_ritstep ()) { // return TRUE; deltar = rig_data_get_ritstep (); } /* check which mouse button */ switch (event->scroll.direction) { /* WHEEL UP: inrease frequency */ case GDK_SCROLL_UP: /* ensure correct sign flip */ if ((lcd.rit < 0) && (deltar > abs (lcd.rit))) newrit = -lcd.rit; else newrit = lcd.rit + deltar; /* check whether we are within current frequency range; if so, apply new frequency */ if (newrit <= rig_data_get_ritmax ()) { rig_data_set_rit (newrit); rig_gui_lcd_set_rit_digits (newrit); } break; /* SCROLL DOWN: decrease frequency */ case GDK_SCROLL_DOWN: /* ensure correct sign flip */ if ((lcd.rit > 0) && (deltar > lcd.rit)) newrit = -lcd.rit; else newrit = lcd.rit - deltar; /* check whether we are within current frequency range; if so, apply new frequency */ if (newrit >= rig_data_get_ritmin ()) { rig_data_set_rit (newrit); rig_gui_lcd_set_rit_digits (newrit); } break; default: break; } /* case */ } else { /* frequency event object is in the range 0..9 with 0 corresponding to 1 GHz */ power = 9 - object; deltaf = pow (10, power); if (deltaf < rig_data_get_fstep ()) { // return TRUE; deltaf = rig_data_get_fstep (); } /* check which mouse button */ switch (event->scroll.direction) { /* WHEEL UP: inrease frequency */ case GDK_SCROLL_UP: newfreq = lcd.freq1 + deltaf; /* check whether we are within current frequency range; if so, apply new frequency */ if (newfreq <= rig_data_get_fmax ()) { rig_data_set_freq (1, newfreq); rig_gui_lcd_set_freq_digits (newfreq); } break; /* WHEEL DOWN: decrease frequency */ case GDK_SCROLL_DOWN: newfreq = lcd.freq1 - deltaf; /* check whether we are within current frequency range; if so, apply new frequency */ if (newfreq >= rig_data_get_fmin ()) { rig_data_set_freq (1, newfreq); rig_gui_lcd_set_freq_digits (newfreq); } break; default: break; } } return TRUE; break; default: return FALSE; break; } return FALSE; } /** \brief Find event object. * \param event The occurred GdkEvent. * \return The ID of the object on which the event occurred. * * This function scans through the coordinates of the existing * digits(objects) and return the corresponding event object ID. * If no object matches the event coordinates EVENT_OBJECT_NONE * is returned. * * \bug \b CRITICAL: the commas are caughht as valid objects and are * reported back with negative object ID. Not anymore? */ static event_object_t rig_gui_lcd_get_event_object (GdkEvent *event) { guint x,y; /* coordinates */ gint i; x = (guint) ((GdkEventButton*)event)->x; y = (guint) ((GdkEventButton*)event)->y; /* check vertical range */ if ((y < lcd.digits[0].y) || (y > lcd.digits[0].y+lcd.dlh)) { return EVENT_OBJECT_NONE; } /* check x */ if ((x < lcd.digits[0].x) || (x > lcd.digits[12].x+lcd.dsw) || ((x > lcd.digits[9].x+lcd.dsw) && (x < lcd.digits[10].x)) || ((x > lcd.digits[10].x+lcd.dsw) && (x < lcd.digits[11].x))) { return EVENT_OBJECT_NONE; } else { /* loop over all digits until we find one; we loop from the end, because small frequencies are changed more often. */ /* small digits */ for (i=12; i>6; i--) { if ((x > lcd.digits[i].x) && (x < lcd.digits[i].x+lcd.dsw)) { return i; } } /* then try large digits */ for (i=6; i>=0; i--) { if ((x > lcd.digits[i].x) && (x < lcd.digits[i].x+lcd.dlw)) { return i; } } return EVENT_OBJECT_NONE; } return EVENT_OBJECT_NONE; } /** \brief Calculate and store frequently used sizes and positions. * * This function calculates and stores frequently used dimensions and * positions to avoid too much CPU-load during update of therawing area. * The involved parameters are canvas size, digit sizes and position for * each digit, which will be part of the frequency display. The calculated * quantities are stored in predefined fields of the lcd structure. * * \bug A loop could have been used, but it would be messy anyway with several * if's. */ static void rig_gui_lcd_calc_dim () { guint i; /* iterator */ /* store digit sizes to avoid frequent call to gdk_pixbuf_get_width and gdk_pixbuf_get_height */ lcd.dlw = gdk_pixbuf_get_width (digits_normal[0]); lcd.dlh = gdk_pixbuf_get_height (digits_normal[0]); lcd.clw = gdk_pixbuf_get_width (digits_normal[12]); lcd.dsw = gdk_pixbuf_get_width (digits_small[0]); lcd.dsh = gdk_pixbuf_get_height (digits_small[0]); lcd.csw = gdk_pixbuf_get_width (digits_small[12]); /* calculate drawing area dimensions */ lcd.width = 7*lcd.dlw + 3*lcd.clw + 8*lcd.dsw + lcd.csw + 2*LCD_MARGIN; lcd.height = 80; /* calculate screen position for each digit; this will ease the update of the LCD */ /* VFO digits */ lcd.digits[0].x = LCD_MARGIN / 2; lcd.digits[1].x = lcd.digits[0].x + lcd.clw + lcd.dlw; lcd.digits[2].x = lcd.digits[1].x + lcd.dlw; lcd.digits[3].x = lcd.digits[2].x + lcd.dlw; lcd.digits[4].x = lcd.digits[3].x + lcd.clw + lcd.dlw; /**/ lcd.digits[5].x = lcd.digits[4].x + lcd.dlw; lcd.digits[6].x = lcd.digits[5].x + lcd.dlw; lcd.digits[7].x = lcd.digits[6].x + lcd.clw + lcd.dlw; /**/ lcd.digits[8].x = lcd.digits[7].x + lcd.dsw; lcd.digits[9].x = lcd.digits[8].x + lcd.dsw; lcd.digits[10].x = lcd.digits[9].x + 4*lcd.dsw; /**/ lcd.digits[11].x = lcd.digits[10].x + lcd.csw + lcd.dsw; /**/ lcd.digits[12].x = lcd.digits[11].x + lcd.dsw; for (i=0; i<7; i++) lcd.digits[i].y = (lcd.height - lcd.dlh)/2; for (i=7; i<13; i++) lcd.digits[i].y = lcd.digits[1].y + (lcd.dlh-lcd.dsh)-1; lcd.dots[0].x = lcd.digits[6].x + lcd.dlw; lcd.dots[1].x = lcd.digits[10].x + lcd.dsw; lcd.dots[0].y = (lcd.height - lcd.dlh)/2; lcd.dots[1].y = lcd.digits[1].y + (lcd.dlh-lcd.dsh)-1; } /** \brief Set LCD display frequency. * \param freq The frequency. * * This function updates the digits on the LCD display with the new frequency. * The frequency is received in hamlib format (float) and converted to a * string with 9 digits. If the frequency is less than 1 GHz the obtained * resolution will be 1 Hz, while for frequenciesabove 1 GHz the resolution * will be 1 kHz * * \note The function is optimized in the sense that before drawing of each digit * it is checked whether the new digit is different from the one already being * displayed. * * \bug 'default' case should send a critical error message. * * \sa rig_gui_lcd_set_rit_digits */ void rig_gui_lcd_set_freq_digits (freq_t freq) { gchar *str; /* frequency as a string */ guint i; /* iterator */ gboolean changed = FALSE; /* is drawing area ready? */ if (!lcd.exposed || (freq < rig_data_get_fmin ())) return; if (lcd.manual) return; /* saturate frequency */ if (freq >= GHz(10)) freq = MHz(9999.999999); /* store the new frequency for later use */ lcd.freq1 = freq; /* convert frequency to string */ str = g_strdup_printf ("%10.0f", freq); /* for each digit check whether the new digit is different from the one already being displayed; if yes, draw the new digit, otherwise do nothing. */ for (i=0; i<10; i++) { if (str[i] != lcd.freqs1[i]) { changed = TRUE; lcd.freqs1[i] = str[i]; rig_gui_lcd_draw_digit(i, str[i]); } } g_free(str); if (changed) g_signal_emit_by_name(lcd.canvas, "freq-changed"); } static void rig_gui_lcd_draw_digit(gint position, char digit) { gint ipixmap; /* index in pixmap */ switch (digit) { case '0': ipixmap = 0; break; case '1': ipixmap = 1; break; case '2': ipixmap = 2; break; case '3': ipixmap = 3; break; case '4': ipixmap = 4; break; case '5': ipixmap = 5; break; case '6': ipixmap = 6; break; case '7': ipixmap = 7; break; case '8': ipixmap = 8; break; case '9': ipixmap = 9; break; case ' ': ipixmap = 10; break; case '-': ipixmap = 11; break; default: /* critical error */ return; } gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, (position < 7) ? digits_normal[ipixmap] : digits_small[ipixmap], 0, 0, lcd.digits[position].x, lcd.digits[position].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); } void rig_gui_lcd_set_next_digit(char n) { /* is drawing area ready? */ if (!lcd.exposed) return; if (!lcd.manual) return; lcd.freqm += pow(10, 9 - lcd.digit) * (n - '0'); rig_gui_lcd_draw_digit(lcd.digit, n); /* increment for next digit */ lcd.digit++; /* check if this is the last digit and set the freq */ if (lcd.digit == 10) { rig_data_set_freq(1, lcd.freqm); rig_gui_lcd_set_freq_digits(lcd.freqm); lcd.manual = FALSE; } } void rig_gui_lcd_begin_manual_entry (void) { guint i; /* is drawing area ready? */ if (!lcd.exposed) return; /* if we already were in manual eypad mode, * pad the frequency with zeros */ if (lcd.manual) { if (lcd.digit == 0) { /* revert to previous freq if no digit has been entered */ rig_gui_lcd_clear_manual_entry(); return; } for (i = lcd.digit; i < 10; i++) { rig_gui_lcd_set_next_digit('0'); } return; } lcd.manual = TRUE; lcd.digit = 0; lcd.freqm = 0; for (i = 0; i < 10; i++) { gdk_draw_pixbuf (GDK_DRAWABLE(lcd.canvas->window), NULL, (i < 7) ? digits_normal[11] : digits_small[11], 0, 0, lcd.digits[i].x, lcd.digits[i].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); } } void rig_gui_lcd_clear_manual_entry (void) { gint i; /* is drawing area ready? */ if (!lcd.exposed) return; if (!lcd.manual) return; lcd.manual = FALSE; /* force digit update by clearing internal string buffer */ for (i = 0; i < 10; i++) { lcd.freqs1[i] = 'X'; } rig_gui_lcd_set_freq_digits(lcd.freq1); } /** \brief Set LCD display frequency (RIT/XIT). * \param freq The frequency. * * This function updates the RIT/CIT digits on the LCD display with the new frequency. * The frequency is received in hamlib format (signed long) and converted to a * string with 3 digits with 0.01 kHz resolution. * * \note The function is optimized in the sense that before drawing of each digit * it is checked whether the new digit is different from the one already being * displayed. * * \bug 'default' case should send a critical error message. * * \sa rig_gui_lcd_set_freq_digits */ void rig_gui_lcd_set_rit_digits (shortfreq_t freq) { gchar *str; guint i; /* is drawing area ready? */ if (!lcd.exposed) return; if (freq > s_kHz(9.99)) { freq = kHz(9.99); } else if (freq < s_kHz(-9.99)) { freq = s_kHz(-9.99); } /* store RIT/XIT frequency for later use */ lcd.rit = freq; /* convert frequency to string */ str = g_strdup ("-0000"); ritval_to_bytearr (str, freq); /* 0th element is the sign; must be handled separately because ' ' means clear and not 0 */ if (str[0] != lcd.rits[0]) { lcd.rits[0] = str[0]; switch (str[0]) { case ' ': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[10], 0, 0, lcd.digits[10].x - lcd.dsw, lcd.digits[10].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '-': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[11], 0, 0, lcd.digits[10].x - lcd.dsw, lcd.digits[10].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; default: /* critical internal error */ break; } } /* for each digit check whether the new digit is different from the one already being displayed; if yes, draw the new digit, otherwise do nothing. */ for (i=1; i<4; i++) { if (str[i] != lcd.rits[i]) { lcd.rits[i] = str[i]; switch (str[i]) { case '0': case ' ': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[0], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '1': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[1], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '2': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[2], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '3': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[3], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '4': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[4], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '5': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[5], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '6': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[6], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '7': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[7], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '8': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[8], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; case '9': gdk_draw_pixbuf (GDK_DRAWABLE (lcd.canvas->window), NULL, digits_small[9], 0, 0, lcd.digits[i+9].x, lcd.digits[i+9].y, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); break; default: /* critical internal error */ break; } /* case */ } /* if */ } /* for */ g_free (str); } /** \brief Execute timeout function. * \param data User data; currently NULL. * \return Always TRUE to keep the timer running. * * This function is in charge for updating the signal strength meter. It acquires * the signal strength from the rig-data object, converts it to needle endpoint * coordinates and repaints the s-meter. * * The function is called peridically by the Gtk+ scheduler. * * \bug DDD copied from smeter (ie. wrong) * * \bug Add XIT support */ static gint rig_gui_lcd_timeout_exec (gpointer data) { static guint vfoupd; /* update frequency if applicable */ if (rig_data_has_get_freq1 ()) { lcd.freq1 = rig_data_get_freq (1); rig_gui_lcd_set_freq_digits (lcd.freq1); } /* update RIT/XIT if applicable */ if (rig_data_has_get_rit () || rig_data_has_set_rit ()) { lcd.rit = rig_data_get_rit (); rig_gui_lcd_set_rit_digits (lcd.rit); } /* VFO updated every second cycle */ if (vfoupd) { rig_gui_lcd_update_vfo (); vfoupd = 0; } else { vfoupd += 1; } return TRUE; } /** \brief Stop timeout function. * \param timer The ID of the timer to stop. * \return Always TRUE. * * This function is used to stop the readback timer just before the * program is quit. It should be called automatically by Gtk+ when * the gtk_main_loop is exited. * * \bug DDD is wrong; copied from smeter. */ static gint rig_gui_lcd_timeout_stop (gpointer timer) { g_source_remove (GPOINTER_TO_UINT (timer)); return TRUE; } /** \brief Draw miscellaneous text. * * This function is in charge of drawing miscellaneous text on the display, * like RIT, kHz and such. */ static void rig_gui_lcd_draw_text () { PangoContext *context; PangoLayout *layout; gint w,h; /* get the PangoContext of the widget */ context = gtk_widget_get_pango_context (lcd.canvas); /* create a new PangoLayout */ layout = pango_layout_new (context); /* set text: kHz */ pango_layout_set_text (layout, _("kHz"), -1); /* calculate coordinates; PanoLayoutSize is in 1000th of pixel? */ pango_layout_get_size (layout, &w, &h); w /= 1000; h /= 1000; /* draw text; frequency */ gdk_draw_layout (lcd.canvas->window, lcd.gc1, lcd.digits[9].x + lcd.dsw + 5, lcd.digits[9].y + lcd.dsh - h, layout); /* draw text; rit */ gdk_draw_layout (lcd.canvas->window, lcd.gc1, lcd.digits[12].x + lcd.dsw + 5, lcd.digits[12].y + lcd.dsh - h, layout); rig_gui_lcd_update_vfo (); /* set text: RIT */ pango_layout_set_text (layout, _("RIT"), -1); /* calculate coordinates; PanoLayoutSize is in 1000th of pixel? */ pango_layout_get_size (layout, &w, &h); w /= 1000; h /= 1000; /* draw text; RIT */ gdk_draw_layout (lcd.canvas->window, lcd.gc1, lcd.digits[11].x, lcd.digits[0].y - h, layout); /* free PangoLayout */ g_object_unref (G_OBJECT (layout)); } static void rig_gui_lcd_update_vfo () { PangoContext *context; PangoLayout *layout; gint w,h; vfo_t vfo; /* is drawing area ready? */ if (!lcd.exposed) return; /* if the VFO is the same as the displayed one, don't do anything */ vfo = rig_data_get_vfo (); if (vfo == lcd.vfo) return; lcd.vfo = vfo; /* set text: VFO */ /* get the PangoContext of the widget */ context = gtk_widget_get_pango_context (lcd.canvas); /* create a new PangoLayout */ layout = pango_layout_new (context); switch (vfo) { case RIG_VFO_A: pango_layout_set_text (layout, _("VFO A"), -1); break; case RIG_VFO_B: pango_layout_set_text (layout, _("VFO B"), -1); break; case RIG_VFO_C: pango_layout_set_text (layout, _("VFO C"), -1); break; case RIG_VFO_MAIN: pango_layout_set_text (layout, _("MAIN VFO"), -1); break; case RIG_VFO_SUB: pango_layout_set_text (layout, _("SUB VFO"), -1); break; case RIG_VFO_MEM: pango_layout_set_text (layout, _("MEM"), -1); break; default: pango_layout_set_text (layout, _("VFO ?"), -1); break; } /* calculate coordinates; PanoLayoutSize is in 1000th of pixel? */ pango_layout_get_size (layout, &w, &h); w /= 1000; h /= 1000; /* clear the area */ gdk_draw_rectangle (GDK_DRAWABLE (lcd.canvas->window), lcd.gc2, TRUE, lcd.digits[5].x, lcd.digits[0].y - h, 2*w, h); /* draw text */ gdk_draw_layout (lcd.canvas->window, lcd.gc1, lcd.digits[5].x, lcd.digits[0].y - h, layout); /* free PangoLayout */ g_object_unref (G_OBJECT (layout)); } /** \brief Convert RIT value to byte array. * \param array The array to store the result in. * \param freq The frequency to convert. * * This function converts an integer value in the range [-9999;+9999] to a byte array. * The byte array has to be allocated by the caller and have a length of 5 bytes not * including the trailing \0. * * \bug This is a hack! Consider implementing it in a cleaner way. */ static void ritval_to_bytearr (gchar *array, shortfreq_t freq) { gint i; shortfreq_t delta; if (freq < 0) array[0] = '-'; else array[0] = ' '; freq = abs (freq); for (i = 3; i >= 0; i--) { delta = pow (10, i); if (freq >= delta) { array[4-i] = freq / delta + '0'; freq %= delta; } else { array[4-i] = '0'; } } } grig-GRIG-0_9_0/src/rig-gui-lcd.h000066400000000000000000000107611435534312400164140ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui-lcd.h * \ingroup lcd * \brief LCD display (interface). * * \bug The defaults defined in this file shall be moved to a centralized object. */ #ifndef RIG_GUI_LCD_H #define RIG_GUI_LCD_H 1 #include /* default LCD color components. We kep them public so that the config module can access them. */ /** \brief Red component of the default background (104 in 8bit). */ #define LCD_BG_DEFAULT_RED 26749 /** \brief Green component of the default background (189 in 8 bit). */ #define LCD_BG_DEFAULT_GREEN 48544 /** \brief Blue component of the default background (226 in 8 bit). */ #define LCD_BG_DEFAULT_BLUE 57996 /** \brief Red component of thedefult foreground(40 in 8 bit). */ #define LCD_FG_DEFAULT_RED 10280 /** \brief Green component of the default foreground (85 in 8 bit). */ #define LCD_FG_DEFAULT_GREEN 21845 /** \brief Blue component of the default foreground (129 in 8 bit). */ #define LCD_FG_DEFAULT_BLUE 33153 #define RIG_GUI_LCD_DEF_TVAL 400 /** \brief Coordinate structure for digits. */ typedef struct { guint x; /*!< X coordinate. */ guint y; /*!< Y coordinate. */ } lcd_coor_t; /** \brief LCD data structure. * * Other elements: * * 0 first dot * 1 second dot * 2 third (small) dot. * 3 RIT sign * 4 RIT text */ typedef struct { GtkWidget *canvas; /*!< The main canvas. */ GdkGC *gc1; /*!< Graphics context (normal). */ GdkGC *gc2; /*!< Graphics context (inverted). */ guint width; /*!< Canvas width. */ guint height; /*!< Canvas height. */ lcd_coor_t digits[13]; /*!< Starting points for all digits. */ lcd_coor_t dots[2]; /*!< Starting points for dots. */ guint dlw; /*!< Width of large digits. */ guint dlh; /*!< Height of large digits. */ guint clw; /*!< Width of large separator. */ guint dsw; /*!< Width of small digits. */ guint dsh; /*!< Height of small digits. */ guint csw; /*!< Width of small separator. */ GdkColor bg; /*!< Background color. */ GdkColor fg; /*!< Foreground color. */ gboolean exposed; /*!< Exposed flag. */ gboolean manual; /*!< Manual freq entry flag. */ gint digit; /*!< Current digit when in manual entry. */ vfo_t vfo; /*!< Current VFO. */ gdouble freq1; /*!< Main frequency value. */ gdouble freq2; /*!< Secondary frequency value. */ gdouble freqm; /*!< Manually entered frequency value. */ gchar freqs1[10]; /*!< Frequency array. */ gint rit; /*!< Current RIT value. */ gchar rits[4]; /*!< -9999 Hz but last digit not shown */ gint xit; /*!< Current XIT value. */ gchar xits[4]; /*!< -9999 Hz but last digit not shown */ } lcd_t; GtkWidget *rig_gui_lcd_create (void); void rig_gui_lcd_set_freq_digits (freq_t freq); void rig_gui_lcd_set_rit_digits (shortfreq_t freq); void rig_gui_lcd_begin_manual_entry (void); void rig_gui_lcd_clear_manual_entry (void); void rig_gui_lcd_set_next_digit (char digit); #endif grig-GRIG-0_9_0/src/rig-gui-levels.c000066400000000000000000000032721435534312400171360ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #include #include #include #include "rig-data.h" #include "rig-utils.h" #include "rig-gui-levels.h" /** \brief Create level controls. * \return A container widget containing the controls. * * This function creates and initializes the level controls for grig. * The controls are hidden by default using a GtkExpander widget. */ GtkWidget * rig_gui_levels_create () { GtkWidget *expander; expander = gtk_expander_new (_("Level Controls")); gtk_widget_set_tooltip_text (expander, _("Show/hide level controls")); return expander; } grig-GRIG-0_9_0/src/rig-gui-levels.h000066400000000000000000000023131435534312400171360ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_LEVELS_H #define RIG_GUI_LEVELS_H 1 GtkWidget *rig_gui_levels_create (void); #endif grig-GRIG-0_9_0/src/rig-gui-message-window.c000066400000000000000000000456461435534312400206100ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #include #include #include #include #include #include #include "grig-debug.h" #include "rig-gui-message-window.h" /* define message level type for convenience */ typedef enum rig_debug_level_e level_t; /* columns in the message list */ typedef enum { MSG_LIST_COL_TIME = 0, MSG_LIST_COL_SOURCE, MSG_LIST_COL_LEVEL, MSG_LIST_COL_MSG, MSG_LIST_COL_NUMBER } msg_list_col_t; /* data structure to hold one message */ typedef struct { time_t time; /* time stamp */ level_t level; /* debug level */ gchar *message; /* the message itself */ } message_t; /* Easy access to column titles */ const gchar *MSG_LIST_COL_TITLE[MSG_LIST_COL_NUMBER] = { N_("Time"), N_("Source"), N_("Level"), N_("Message") }; const gfloat MSG_LIST_COL_TITLE_ALIGN[MSG_LIST_COL_NUMBER] = { 0.5, 0.0, 0.5, 0.0 }; const gchar *DEBUG_STR[6] = { N_("NONE"), N_("BUG"), N_("ERROR"), N_("WARNING"), N_("DEBUG"), N_("TRACE") }; extern GtkWidget *grigapp; static gboolean visible = FALSE; /* Is message window visible? */ static gboolean initialised = FALSE; /* Is module initialised? */ /* counters */ static guint32 bugs = 0; /* Number of bug messages */ static guint32 errors = 0; /* Number of error messages */ static guint32 warnings = 0; /* Number of warning messages */ static guint32 verboses = 0; /* Number of verbose messages */ static guint32 traces = 0; /* Number of trace messages */ static guint32 hamlibs = 0; /* Number of messages from hamlib */ static guint32 grigs = 0; /* Number of messages from grig */ static guint32 others = 0; /* Number of messages from other sources */ /* summary labels; they need to be accessible at runtime */ static GtkWidget *buglabel,*errlabel,*warnlabel,*verblabel,*tracelabel,*sumlabel; static GtkWidget *hamliblabel, *griglabel, *otherlabel; /* The message window itself */ static GtkWidget *window; /* the tree view model */ GtkTreeModel *model; static void message_window_destroy (GtkWidget *, gpointer); static void message_window_response (GtkWidget *, gint, gpointer); /* message list and tree widget functions */ static GtkWidget *create_message_list (void); static GtkTreeModel *create_list_model (void); static GtkWidget *create_message_summary (void); /* load debug file related */ static void load_debug_file (void); static int read_debug_file (const gchar *filename); static void clear_message_list (void); static void add_debug_message (const gchar *datetime, const gchar *source, enum rig_debug_level_e debug_level, const char *message); /* Initialise message window. * * This function creates the message window and allocates all the internal * data structures. The function should be called when the main program * is initialised. */ void rig_gui_message_window_init () { GtkWidget *hbox; if (!initialised) { /* do some init stuff */ hbox = gtk_hbox_new (FALSE, 10); gtk_box_pack_start (GTK_BOX (hbox), create_message_list (), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), create_message_summary (), FALSE, TRUE, 0); /* create dialog window; we use "fake" stock responses to catch user button clicks (save_as and pause) */ window = gtk_dialog_new_with_buttons (_("Grig Message Window"), NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OPEN, GTK_RESPONSE_YES, /* cheating */ GTK_STOCK_CLEAR, GTK_RESPONSE_NO, /* cheating */ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); gtk_window_set_default_size (GTK_WINDOW (window), 700, 300); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(window)->vbox), hbox); /* connect response signal */ g_signal_connect (G_OBJECT (window), "response", G_CALLBACK (message_window_response), NULL); /* connect delete and destroy signals */ g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), NULL); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (message_window_destroy), NULL); initialised = TRUE; } }; /* Clean up message window. * * This function cleans up the message window by freeing the allocated * memory. It should be called when the main program exits. * * Note: It is not strictly necessary to call this function, since it * is also invoked by the 'destroy' callback of the window. * * FIXME: In the above case this function is not necessary at all. */ void rig_gui_message_window_clean () { if (initialised) { if (visible) { rig_gui_message_window_hide (); } /* do some cleaning stuff */ initialised = FALSE; } } void rig_gui_message_window_show () { if (!initialised) rig_gui_message_window_init (); // if (!visible) { // g_print ("Show window\n"); gtk_widget_show_all (window); visible = TRUE; // } } void rig_gui_message_window_hide () { if (visible) { gtk_widget_hide_all (window); visible = FALSE; } } /** \brief Add a message to message list */ static void add_debug_message (const gchar *datetime, const gchar *source, enum rig_debug_level_e debug_level, const char *message) { guint total; /* totalt number of messages */ gchar *str; /* string to show message count */ GtkTreeIter item; /* new item added to the list store */ gtk_list_store_append (GTK_LIST_STORE (model), &item); gtk_list_store_set (GTK_LIST_STORE (model), &item, MSG_LIST_COL_TIME, datetime, MSG_LIST_COL_SOURCE, source, MSG_LIST_COL_LEVEL, _(DEBUG_STR[debug_level]), MSG_LIST_COL_MSG, message, -1); /* increment source counter */ if (!g_ascii_strcasecmp (source, "HAMLIB")) { hamlibs++; str = g_strdup_printf ("%d", hamlibs); gtk_label_set_text (GTK_LABEL (hamliblabel), str); g_free (str); } else if (!g_ascii_strcasecmp (source, "GRIG")) { grigs++; str = g_strdup_printf ("%d", grigs); gtk_label_set_text (GTK_LABEL (griglabel), str); g_free (str); } else { others++; str = g_strdup_printf ("%d", others); gtk_label_set_text (GTK_LABEL (otherlabel), str); g_free (str); } /* increment severity counter */ switch (debug_level) { /* internal bugs */ case RIG_DEBUG_BUG: bugs++; str = g_strdup_printf ("%d", bugs); gtk_label_set_text (GTK_LABEL (buglabel), str); g_free (str); break; /* runtime error */ case RIG_DEBUG_ERR: errors++; str = g_strdup_printf ("%d", errors); gtk_label_set_text (GTK_LABEL (errlabel), str); g_free (str); break; /* warning */ case RIG_DEBUG_WARN: warnings++; str = g_strdup_printf ("%d", warnings); gtk_label_set_text (GTK_LABEL (warnlabel), str); g_free (str); break; /* verbose info */ case RIG_DEBUG_VERBOSE: verboses++; str = g_strdup_printf ("%d", verboses); gtk_label_set_text (GTK_LABEL (verblabel), str); g_free (str); break; /* trace */ case RIG_DEBUG_TRACE: traces++; str = g_strdup_printf ("%d", traces); gtk_label_set_text (GTK_LABEL (tracelabel), str); g_free (str); break; default: break; } /* the sum does not have to be updated for each line */ total = bugs+errors+warnings+verboses+traces; str = g_strdup_printf ("%d", total); gtk_label_set_markup (GTK_LABEL (sumlabel), str); g_free (str); } /* callback function called when the dialog window is destroyed */ static void message_window_destroy (GtkWidget *widget, gpointer data) { /* clean up memory */ /* GSList, ... */ visible = FALSE; initialised = FALSE; } /* callback function called when a dialog button is clicked */ static void message_window_response (GtkWidget *widget, gint response, gpointer data) { switch (response) { /* close button */ case GTK_RESPONSE_CLOSE: gtk_widget_hide_all (widget); visible = FALSE; break; /* OPEN button */ case GTK_RESPONSE_YES: load_debug_file (); break; /* CLEAR button */ case GTK_RESPONSE_NO: clear_message_list (); break; default: break; } } /** \brief Load debug file. * * This function creates the file chooser dialog, which can be used to select * a file containing debug messages. When the dialog returns, the selected * file is checked and, if the file exists, is read line by line. */ static void load_debug_file () { gchar *filename; GtkWidget *dialog; /* create file chooser dialog */ dialog = gtk_file_chooser_dialog_new (_("Open Debug File"), GTK_WINDOW (grigapp), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { clear_message_list (); filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); /* sanity check of filename will be performed in read_debug_file */ read_debug_file (filename); g_free (filename); } gtk_widget_destroy (dialog); } /** \brief Read contents of debug file. */ static int read_debug_file (const gchar *filename) { GIOChannel *logfile = NULL; /* the log file */ GError *error = NULL; /* error structure */ gint errorcode = 0; /* error code returned by function */ gchar *line; /* line read from file */ gsize length; /* length of line read from file */ gchar **buff; /* check file and read contents */ if (g_file_test (filename, G_FILE_TEST_EXISTS)) { /* open file */ logfile = g_io_channel_new_file (filename, "r", &error); if (logfile) { /* read the file line by line */ while (g_io_channel_read_line (logfile, &line, &length, NULL, NULL) != G_IO_STATUS_EOF) { /* trim line and split it */ line = g_strdelimit (line, "\n", '\0'); buff = g_strsplit (line, GRIG_DEBUG_SEPARATOR, MSG_LIST_COL_NUMBER); /* buff[0] = date and time buff[1] = source buff[2] = level buff[3] = message unless it comes from Gtk+/Glib, in which case buff[0] contains the message and it is the only element */ switch (g_strv_length (buff)) { case 1: add_debug_message ("", _("SYS"), RIG_DEBUG_ERR, buff[0]); break; case 4: add_debug_message (buff[0], buff[1], (guint) g_ascii_strtod (buff[2], NULL), buff[3]); break; default: add_debug_message ("", _("GRIG"), RIG_DEBUG_ERR, _("Log file seems corrupt")); break; } /* clean up */ g_free (line); g_strfreev (buff); } errorcode = 0; /* Close IO channel; don't care about status. Shutdown will flush the stream and close the channel as soon as the reference count is dropped. Order matters! */ g_io_channel_shutdown (logfile, TRUE, NULL); g_io_channel_unref (logfile); } else { /* an error occurred */ grig_debug_local (RIG_DEBUG_ERR, _("%s:%d: Error open debug log (%s)"), __FILE__, __LINE__, error->message); g_clear_error (&error); errorcode = 1; } } else { errorcode = 1; } return errorcode; } /** \brief Clear the message list * * Besides clearing the message list, the function also resets * the counters and set the text of the corresponding widgets * to zero. */ static void clear_message_list () { /* clear the meaase list */ gtk_list_store_clear (GTK_LIST_STORE (model)); /* reset the counters and text widgets */ bugs = 0; errors = 0; warnings = 0; verboses = 0; traces = 0; grigs = 0; hamlibs = 0; others = 0; gtk_label_set_text (GTK_LABEL (buglabel), "0"); gtk_label_set_text (GTK_LABEL (errlabel), "0"); gtk_label_set_text (GTK_LABEL (warnlabel), "0"); gtk_label_set_text (GTK_LABEL (verblabel), "0"); gtk_label_set_text (GTK_LABEL (tracelabel), "0"); gtk_label_set_text (GTK_LABEL (hamliblabel), "0"); gtk_label_set_text (GTK_LABEL (griglabel), "0"); gtk_label_set_text (GTK_LABEL (otherlabel), "0"); gtk_label_set_markup (GTK_LABEL (sumlabel), "0"); } /* Create list view */ static GtkWidget * create_message_list () { /* high level treev iew widget */ GtkWidget *treeview; /* scrolled window containing the tree view */ GtkWidget *swin; /* cell renderer used to create a column */ GtkCellRenderer *renderer; /* place holder for a tree view column */ GtkTreeViewColumn *column; guint i; treeview = gtk_tree_view_new (); for (i = 0; i < MSG_LIST_COL_NUMBER; i++) { renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_(MSG_LIST_COL_TITLE[i]), renderer, "text", i, NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (treeview), column, -1); /* only aligns the headers? */ gtk_tree_view_column_set_alignment (column, MSG_LIST_COL_TITLE_ALIGN[i]); } /* create tree view model and finalise tree view */ model = create_list_model (); gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), model); g_object_unref (model); /* treeview is packed into a scroleld window */ swin = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (swin), treeview); return swin; } /* create tree view model; we actually create a GtkListStore because we are only interested in a flat list. A GtkListStore can be cast to a GtkTreeModel without any problems. */ static GtkTreeModel * create_list_model () { GtkListStore *liststore; liststore = gtk_list_store_new (MSG_LIST_COL_NUMBER, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); /*** Fill existing data into the list here ***/ return GTK_TREE_MODEL (liststore); } /* create summary */ static GtkWidget * create_message_summary () { GtkWidget *table; /* table containing everything */ GtkWidget *frame; /* surrounding frame */ GtkWidget *label; /* dummy label */ /* create labels */ hamliblabel = gtk_label_new ("0"); gtk_misc_set_alignment (GTK_MISC (hamliblabel), 1.0, 0.5); griglabel = gtk_label_new ("0"); gtk_misc_set_alignment (GTK_MISC (griglabel), 1.0, 0.5); otherlabel = gtk_label_new ("0"); gtk_misc_set_alignment (GTK_MISC (otherlabel), 1.0, 0.5); buglabel = gtk_label_new ("0"); gtk_misc_set_alignment (GTK_MISC (buglabel), 1.0, 0.5); errlabel = gtk_label_new ("0"); gtk_misc_set_alignment (GTK_MISC (errlabel), 1.0, 0.5); warnlabel = gtk_label_new ("0"); gtk_misc_set_alignment (GTK_MISC (warnlabel), 1.0, 0.5); verblabel = gtk_label_new ("0"); gtk_misc_set_alignment (GTK_MISC (verblabel), 1.0, 0.5); tracelabel = gtk_label_new ("0"); gtk_misc_set_alignment (GTK_MISC (tracelabel), 1.0, 0.5); sumlabel = gtk_label_new (NULL); gtk_label_set_use_markup (GTK_LABEL (sumlabel), TRUE); gtk_label_set_markup (GTK_LABEL (sumlabel), "0"); gtk_misc_set_alignment (GTK_MISC (sumlabel), 1.0, 0.5); /* create table and add widgets */ table = gtk_table_new (10, 2, TRUE); gtk_table_set_col_spacings (GTK_TABLE (table), 5); gtk_container_set_border_width (GTK_CONTAINER (table), 10); label = gtk_label_new (_("Hamlib")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1); label = gtk_label_new (_("Grig")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); label = gtk_label_new (_("Other")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3); gtk_table_attach_defaults (GTK_TABLE (table), gtk_hseparator_new (), 0, 2, 3, 4); label = gtk_label_new (_("Bugs")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 4, 5); label = gtk_label_new (_("Errors")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 5, 6); label = gtk_label_new (_("Warning")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 6, 7); label = gtk_label_new (_("Verbose")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 7, 8); label = gtk_label_new (_("Trace")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 8, 9); gtk_table_attach_defaults (GTK_TABLE (table), gtk_hseparator_new (), 0, 2, 9, 10); label = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_markup (GTK_LABEL (label), _("Total")); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 10, 11); gtk_table_attach_defaults (GTK_TABLE (table), hamliblabel, 1, 2, 0, 1); gtk_table_attach_defaults (GTK_TABLE (table), griglabel, 1, 2, 1, 2); gtk_table_attach_defaults (GTK_TABLE (table), otherlabel, 1, 2, 2, 3); gtk_table_attach_defaults (GTK_TABLE (table), buglabel, 1, 2, 4, 5); gtk_table_attach_defaults (GTK_TABLE (table), errlabel, 1, 2, 5, 6); gtk_table_attach_defaults (GTK_TABLE (table), warnlabel, 1, 2, 6, 7); gtk_table_attach_defaults (GTK_TABLE (table), verblabel, 1, 2, 7, 8); gtk_table_attach_defaults (GTK_TABLE (table), tracelabel, 1, 2, 8, 9); gtk_table_attach_defaults (GTK_TABLE (table), sumlabel, 1, 2, 10, 11); /* frame around the table */ frame = gtk_frame_new (_(" Summary ")); gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5); gtk_container_add (GTK_CONTAINER (frame), table); return frame; } grig-GRIG-0_9_0/src/rig-gui-message-window.h000066400000000000000000000025651435534312400206060ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_MESSAGE_WINDOW_H #define RIG_GUI_MESSAGE_WINDOW_H 1 #include void rig_gui_message_window_init (void); void rig_gui_message_window_clean (void); void rig_gui_message_window_show (void); void rig_gui_message_window_hide (void); #endif grig-GRIG-0_9_0/src/rig-gui-rx.c000066400000000000000000000400461435534312400162750ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \brief RX Level Controls * * This module implements the RX level controls consisting of: * * - RIG_LEVEL_AF * - RIG_LEVEL_RF * - RIG_LEVEL_IF * - RIG_LEVEL_CWPITCH * - RIG_LEVEL_PBT_IN * - RIG_LEVEL_PBT_OUT * - RIG_LEVEL_APF * - RIG_LEVEL_NR * - RIG_LEVEL_NOTCH * - RIG_LEVEL_SQL * - RIG_LEVEL_BALANCE * * Note: In Gtk+ vertical sliders have their minimum on top (nice...) * so all values have to be inverted. */ #include #include #include #include #include "rig-data.h" #include "rig-utils.h" #include "rig-gui-rx.h" #include "grig-debug.h" #include "grig-menubar.h" /* defined in main.c */ extern GtkWidget *grigapp; static gint rx_window_delete (GtkWidget *widget, GdkEvent *event, gpointer data); static void rx_window_destroy (GtkWidget *widget, gpointer data); static void create_controls (GtkBox *box); static void float_level_cb (GtkRange *range, gpointer data); static gchar *float_format_value_cb (GtkScale *scale, gdouble value); static gchar *sfreq_format_value_cb (GtkScale *scale, gdouble value); static gboolean rx_levels_update (gpointer data); static GtkWidget *dialog; static gboolean visible = FALSE; static guint timerid = 0; /* controls */ static GtkWidget *afs,*rfs,*ifs,*cwp,*pbti,*pbto,*apf,*nrs,*not,*sql,*bal; /* handler ids */ static gulong afi,rfi,ifi,cwi,pbii,pboi,api,nri,noi,sqi,bai; /** \brief Create level controls. * \return A container widget containing the controls. * * This function creates and initializes the level controls for grig. * The controls are hidden by default using a GtkExpander widget. */ void rig_gui_rx_create () { GtkWidget *hbox; gchar *title; if (visible) { grig_debug_local (RIG_DEBUG_BUG, _("%s: RX window already visible."), __FUNCTION__); return; } /* create hbox and add sliders */ hbox = gtk_hbox_new (TRUE, 5); create_controls (GTK_BOX (hbox)); /* create dialog window */ title = g_strdup_printf (_("%s (RX Levels)"), gtk_window_get_title (GTK_WINDOW (grigapp))); dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (grigapp), GTK_DIALOG_DESTROY_WITH_PARENT, NULL); g_free (title); gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 150); /* allow interaction with other windows */ gtk_window_set_modal (GTK_WINDOW (dialog), FALSE); g_signal_connect (dialog, "delete_event", G_CALLBACK (rx_window_delete), NULL); g_signal_connect (dialog, "destroy", G_CALLBACK (rx_window_destroy), NULL); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox); visible = TRUE; gtk_widget_show_all (dialog); /* start callback */ timerid = g_timeout_add (1007, rx_levels_update, NULL); } static gint rx_window_delete (GtkWidget *widget, GdkEvent *event, gpointer data) { /* force menu item to unset */ grig_menubar_force_rx_item (FALSE); /* return FALSE so that Gtk+ will emit the destroy signal */ return FALSE; } static void rx_window_destroy (GtkWidget *widget, gpointer data) { /* stop callback */ g_source_remove (timerid); timerid = 0; /* clear rx-active flag in rig-data */ visible = FALSE; } void rig_gui_rx_close () { if (!visible) { grig_debug_local (RIG_DEBUG_BUG, _("%s: RX window is not visible."), __FUNCTION__); return; } gtk_widget_destroy (dialog); } /** \brief Common callback used by float levels * * - actually, int level are managed here, too */ static void float_level_cb (GtkRange *range, gpointer data) { int level = GPOINTER_TO_INT (data); float value = -1.0 * gtk_range_get_value (range); switch (level) { case RIG_LEVEL_AF: rig_data_set_afg (value); break; case RIG_LEVEL_RF: rig_data_set_rfg (value); break; case RIG_LEVEL_IF: rig_data_set_ifs ((int) value); break; case RIG_LEVEL_CWPITCH: rig_data_set_cwpitch ((int) value); break; case RIG_LEVEL_PBT_IN: rig_data_set_pbtin (value); break; case RIG_LEVEL_PBT_OUT: rig_data_set_pbtout (value); break; case RIG_LEVEL_APF: rig_data_set_apf (value); break; case RIG_LEVEL_NR: rig_data_set_nr (value); break; case RIG_LEVEL_NOTCHF: rig_data_set_notch ((int) value); break; case RIG_LEVEL_SQL: rig_data_set_sql (value); break; case RIG_LEVEL_BALANCE: rig_data_set_balance (value); break; default: grig_debug_local (RIG_DEBUG_BUG, _("%s:%d: Invalid level %d"), __FILE__, __LINE__, level); break; } } static gchar * float_format_value_cb (GtkScale *scale, gdouble value) { return g_strdup_printf ("%0.2f", -1.0 * value); } static gchar * sfreq_format_value_cb (GtkScale *scale, gdouble value) { if (fabs (value) <= 999) { return g_strdup_printf ("%0.0fHz", -1.0 * value); } else { value = value / 1000.0; return g_strdup_printf ("%0.2fkHz", -1.0 * value); } } static void create_controls (GtkBox *box) { GtkWidget *label; GtkWidget *vbox; guint count = 0; /* afs */ if (rig_data_has_set_afg ()) { afs = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (afs), -1.0*rig_data_get_afg ()); afi = g_signal_connect (afs, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_AF)); g_signal_connect (afs, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("AF Gain")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), afs, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* rfs */ if (rig_data_has_set_rfg ()) { rfs = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (rfs), -1.0*rig_data_get_rfg ()); rfi = g_signal_connect (rfs, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_RF)); g_signal_connect (rfs, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("RF Gain")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), rfs, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* ifs */ if (rig_data_has_set_ifs ()) { if (rig_data_get_ifsmax () > 0) { ifs = gtk_vscale_new_with_range (-rig_data_get_ifsmax (), rig_data_get_ifsmax (), 10.0); } else { ifs = gtk_vscale_new_with_range (-10000, 10000, 10); } gtk_range_set_value (GTK_RANGE (ifs), -1.0*rig_data_get_ifs ()); ifi = g_signal_connect (ifs, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_IF)); g_signal_connect (ifs, "format-value", G_CALLBACK (sfreq_format_value_cb), NULL); label = gtk_label_new (_("IF Shift")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), ifs, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* cwp */ if (rig_data_has_set_cwpitch ()) { cwp = gtk_vscale_new_with_range (-1000, -500, 10.0); gtk_range_set_value (GTK_RANGE (cwp), -1.0*rig_data_get_cwpitch ()); cwi = g_signal_connect (cwp, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_CWPITCH)); g_signal_connect (cwp, "format-value", G_CALLBACK (sfreq_format_value_cb), NULL); label = gtk_label_new (_("CW Pitch")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), cwp, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* pbti */ if (rig_data_has_set_pbtin ()) { pbti = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (pbti), -1.0*rig_data_get_pbtin ()); pbii = g_signal_connect (pbti, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_PBT_IN)); g_signal_connect (pbti, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("PBT In")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), pbti, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* pbto */ if (rig_data_has_set_pbtout ()) { pbto = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (pbto), -1.0*rig_data_get_pbtout ()); pboi = g_signal_connect (pbto, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_PBT_OUT)); g_signal_connect (pbto, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("PBT Out")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), pbto, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* apf */ if (rig_data_has_set_apf ()) { apf = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (apf), -1.0*rig_data_get_apf ()); api = g_signal_connect (apf, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_APF)); g_signal_connect (apf, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("APF")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), apf, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* nrs */ if (rig_data_has_set_nr ()) { nrs = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (nrs), -1.0*rig_data_get_nr ()); nri = g_signal_connect (nrs, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_NR)); g_signal_connect (nrs, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("N.R.")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), nrs, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* not */ if (rig_data_has_set_notch ()) { not = gtk_vscale_new_with_range (-3000, -500, 10.0); gtk_range_set_value (GTK_RANGE (not), -1.0*rig_data_get_notch ()); noi = g_signal_connect (not, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_NOTCHF)); g_signal_connect (not, "format-value", G_CALLBACK (sfreq_format_value_cb), NULL); label = gtk_label_new (_("NOTCH")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), not, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* sql */ if (rig_data_has_set_sql ()) { sql = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (sql), -1.0*rig_data_get_sql ()); sqi = g_signal_connect (sql, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_SQL)); g_signal_connect (sql, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("Squelch")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), sql, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* bal */ if (rig_data_has_set_balance ()) { bal = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (bal), -1.0*rig_data_get_balance ()); bai = g_signal_connect (bal, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_BALANCE)); g_signal_connect (bal, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("Balance")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), bal, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* if no controls available, create a label telling user why window is empty */ if (count == 0) { gtk_box_pack_start (box, gtk_label_new (_("Rig has no support.")), TRUE, TRUE, 0); } } static gboolean rx_levels_update (gpointer data) { /* afs */ if (rig_data_has_get_afg ()) { g_signal_handler_block (afs, afi); gtk_range_set_value (GTK_RANGE (afs), -1.0*rig_data_get_afg ()); g_signal_handler_unblock (afs, afi); } /* rfs */ if (rig_data_has_get_rfg ()) { g_signal_handler_block (rfs, rfi); gtk_range_set_value (GTK_RANGE (rfs), -1.0*rig_data_get_rfg ()); g_signal_handler_unblock (rfs, rfi); } /* ifs */ if (rig_data_has_get_ifs ()) { g_signal_handler_block (ifs, ifi); gtk_range_set_value (GTK_RANGE (ifs), -1.0*rig_data_get_ifs ()); g_signal_handler_unblock (ifs, ifi); } /* cwp */ if (rig_data_has_get_cwpitch ()) { g_signal_handler_block (cwp, cwi); gtk_range_set_value (GTK_RANGE (cwp), -1.0*rig_data_get_cwpitch ()); g_signal_handler_unblock (cwp, cwi); } /* pbti */ if (rig_data_has_get_pbtin ()) { g_signal_handler_block (pbti, pbii); gtk_range_set_value (GTK_RANGE (pbti), -1.0*rig_data_get_pbtin ()); g_signal_handler_unblock (pbti, pbii); } /* pbto */ if (rig_data_has_get_pbtout ()) { g_signal_handler_block (pbto, pboi); gtk_range_set_value (GTK_RANGE (pbto), -1.0*rig_data_get_pbtout ()); g_signal_handler_unblock (pbto, pboi); } /* apf */ if (rig_data_has_get_apf ()) { g_signal_handler_block (apf, api); gtk_range_set_value (GTK_RANGE (apf), -1.0*rig_data_get_apf ()); g_signal_handler_unblock (apf, api); } /* nrs */ if (rig_data_has_get_nr ()) { g_signal_handler_block (nrs, nri); gtk_range_set_value (GTK_RANGE (nrs), -1.0*rig_data_get_nr ()); g_signal_handler_unblock (nrs, nri); } /* not */ if (rig_data_has_get_notch ()) { g_signal_handler_block (not, noi); gtk_range_set_value (GTK_RANGE (not), -1.0*rig_data_get_notch ()); g_signal_handler_unblock (not, noi); } /* sql */ if (rig_data_has_get_sql ()) { g_signal_handler_block (sql, sqi); gtk_range_set_value (GTK_RANGE (sql), -1.0*rig_data_get_sql ()); g_signal_handler_unblock (sql, sqi); } /* bal */ if (rig_data_has_get_balance ()) { g_signal_handler_block (bal, bai); gtk_range_set_value (GTK_RANGE (bal), -1.0*rig_data_get_balance ()); g_signal_handler_unblock (bal, bai); } return TRUE; } grig-GRIG-0_9_0/src/rig-gui-rx.h000066400000000000000000000023201435534312400162730ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_RX_H #define RIG_GUI_RX_H 1 void rig_gui_rx_create (void); void rig_gui_rx_close (void); #endif grig-GRIG-0_9_0/src/rig-gui-smeter-conv.c000066400000000000000000000203171435534312400201050ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui-smeter-conv.c * \ingroup smeter * \brief Coordinate conversion utilities. * * This file contains functions to convert the signal strength to canvas * coordinates. Basically, we need to do two conversions: From dB to * needle angle and from needle angle to (x,y) coordinates. Although both * of these conversions can be done using one function, it has been * decided to implement them separately in order to allow the clling * function to adjust the needle angle for various corrections (faalback * delay, etc.) * * \bug The conversion functions depend on the physical size of the smeter * pixmap. The corresponding constant must therefore be updated if * the pixmap size changes. */ #include #include #include "rig-gui-smeter-conv.h" /** \brief Coefficient for converting dB to deg (linear). */ #define RIG_DB_TO_DEG_A 1.0966 /** \brief Offset for converting dB to deg (linear). */ #define RIG_DB_TO_DEG_B 100.934 /** \brief 3. order coefficient for converting dB to deg (polynomial). */ #define RIG_DB_TO_DEG_POLY_A -0.000103582 /** \brief 2. order coefficient for converting dB to deg (polynomial). */ #define RIG_DB_TO_DEG_POLY_B -0.00289134 /** \brief 1. order coefficient for converting dB to deg (polynomial). */ #define RIG_DB_TO_DEG_POLY_C 1.2021 /** \brief Offset for converting dB to deg (polynomial). */ #define RIG_DB_TO_DEG_POLY_D 102.033 /** \brief Coefficient for converting [0.0;1.0] to deg (linear). */ #define RIG_VALF_TO_DEG_A 88.7818 /** \brief Offset for converting [0.0;1.0] to deg (linear). */ #define RIG_VALF_TO_DEG_B 44.8182 /** \brief Pixmap width divide by 2. */ #define PIXMAP_HALF_WIDTH 80 /** \brief Pixmap height. */ #define PIXMAP_HEIGHT 80 /** \brief Needle length. */ #define NEEDLE_LENGTH 105 /** \brief Distance from pixmap bottom to fix point of the needle. */ #define NEEDLE_VERTEX 33 #ifndef PI #define PI 3.141592653 #endif /** \brief Convert signal strength in dB to needle angle. * \param db The signalstrength as received from hamlib. * \param mode The mode specifying whether data from linear * or polynomial fit should be used. * \return The needle angle in dgrees. * * This function convertsthe signal strength in dB, as received from hamlib, * to the needle angle. The valid range in -54..30, with -54dB corresponding to * S0 and 30dB corresponding to S9+30. Values outside range will be truncated to * the corresponding limit. * \verbatim S dB deg S0 -54 45.00 S1 -48 48.85 S2 -42 54.64 S3 -36 60.21 S4 -30 65.96 S5 -24 72.03 S6 -18 80.36 S7 -12 86.36 S8 -6 95.00 S9 0 103.95 +10 10 113.71 +20 20 122.31 +30 30 133.48 \endverbatim * The linear fit to this data results in: * \verbatim a = 1.0966 +/- 0.02087 (1.903%) b = 100.934 +/- 0.625 (0.6192%) correlation matrix of the fit parameters: a b a 1.000 b 0.539 1.000 \endverbatim * while 3. order polynomial fit gives: * \verbatim f(x) = a*x**3 + b*x**2 + c*x + d a = -0.000103582 +/- 2.175e-05 (21%) b = -0.00289134 +/- 0.0009361 (32.38%) c = 1.2021 +/- 0.02398 (1.995%) d = 102.033 +/- 0.5287 (0.5181%) correlation matrix of the fit parameters: a b c d a 1.000 b 0.861 1.000 c -0.710 -0.351 1.000 d -0.617 -0.752 0.388 1.000 \endverbatim */ gfloat convert_db_to_angle (gint db, db_to_angle_mode_t mode) { gfloat fdb; /* ensure that input is within range */ if (db < -54) { db = -54; } else if (db > 30) { db = 30; } fdb = (gfloat) db; /* calculate angle according to selected mode */ if (mode == DB_TO_ANGLE_MODE_LINEAR) { return (gfloat) (RIG_DB_TO_DEG_A*fdb + RIG_DB_TO_DEG_B); } else if (mode == DB_TO_ANGLE_MODE_POLY) { return (gfloat) (RIG_DB_TO_DEG_POLY_A*fdb*fdb*fdb + RIG_DB_TO_DEG_POLY_B*fdb*fdb + RIG_DB_TO_DEG_POLY_C*fdb + RIG_DB_TO_DEG_POLY_D); } else { return 0.0; } } /** \brief Convert val.f type [0.0;1.0] to needle angle. * \param valf The floating point value as received from hamlib. * \param mode The mode specifying whether data from linear * or polynomial fit should be used (not used!). * \return The needle angle in dgrees. * * This function converts a floating point number within the range [0.0;1.0], * as received from hamlib, * to the needle angle. Values outside the valid range will be truncated to * the corresponding limit. * \verbatim fp deg 0.0 45.0 0.1 54.0 0.2 62.0 0.3 71.4 0.4 80.3 0.5 89.0 0.6 98.4 0.7 107.0 0.8 115.9 0.9 124.9 1.0 133.4 \endverbatim * The linear fit to this data results in: * \verbatim a = 88.7818 +/- 0.2615 (0.2945%) b = 44.8182 +/- 0.1547 (0.3451%) correlation matrix of the fit parameters: a b a 1.000 b -0.845 1.000 \endverbatim \note Since this scale is linear, it makes no sense to use the 3. order polynomial fit. */ gfloat convert_valf_to_angle (gfloat valf) { /* ensure that input is within range */ if (valf < 0.0) { valf = 0.0; } else if (valf > 1.0) { valf = 1.0; } /* calculate angle according to selected mode */ return (gfloat) (RIG_VALF_TO_DEG_A*valf + RIG_VALF_TO_DEG_B); } /** \brief Convert needle angle to canvas coordinates. * \param angle The needle angle. * \param coor Coordinate structurewhere the result is stored. * * This function converts the needle angle and calculates the two (x,y) * coordinates necessary to draw the needle on the canvas. In order to do * this the size of the canvas and information about the pixmap is needed. * These are given byconstants in this file and must be adjustedin case * of a new pixmap. */ void convert_angle_to_rect (gfloat angle, coordinate_t *coor) { gfloat rad; gfloat s,c; /* numerical protection: 0.0 < angle < 180.0 */ if (!(0.0 < angle) || !(angle < 180.0)) { angle = 90.0; } if (angle <= 90.0) { /* convert angle to radians */ rad = PI * angle / 180.0; /* calculate sin and cos */ s = sin (rad); c = cos (rad); coor->x2 = PIXMAP_HALF_WIDTH - NEEDLE_VERTEX * sqrt (1/(s*s) - 1); coor->y2 = PIXMAP_HEIGHT; coor->x1 = coor->x2 - (NEEDLE_LENGTH - NEEDLE_VERTEX/s) * c; coor->y1 = PIXMAP_HEIGHT + NEEDLE_VERTEX - NEEDLE_LENGTH * s; } else { angle = angle - 90.0; /* convert angle to radians */ rad = PI * angle / 180.0; /* calculate sin and cos */ s = sin (rad); c = cos (rad); coor->x2 = PIXMAP_HALF_WIDTH + NEEDLE_VERTEX * sqrt (1/(c*c) - 1); coor->y2 = PIXMAP_HEIGHT; coor->x1 = coor->x2 + (NEEDLE_LENGTH - NEEDLE_VERTEX/c) * s; coor->y1 = PIXMAP_HEIGHT + NEEDLE_VERTEX - NEEDLE_LENGTH * c; } } grig-GRIG-0_9_0/src/rig-gui-smeter-conv.h000066400000000000000000000043111435534312400201060ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui-smeter-conv.h * \ingroup smeter * \brief Coordinate conversion utilities (interface). */ #ifndef RIG_GUI_SMETER_CONV_H #define RIG_GUI_SMETER_CONV_H 1 /** \brief Structure used to obtained coordinates in one pass. */ typedef struct { gfloat x1; /*!< X1 coordinate; upper left */ gfloat y1; /*!< Y1 coordinate; upper left */ gfloat x2; /*!< X2 coordinate; lower right */ gfloat y2; /*!< Y2 coordinate; lower right */ } coordinate_t; /** \brief Enumeration for specifying the conversion mode (linear or polynomial * fit) when converting from dB to angle. */ typedef enum { DB_TO_ANGLE_MODE_LINEAR = 0, /*!< Use data from linear fit */ DB_TO_ANGLE_MODE_POLY = 1 /*!< Use data from 3. degree polynomial fit */ } db_to_angle_mode_t; /* conversions for signal strength */ gfloat convert_db_to_angle (gint db, db_to_angle_mode_t mode); /* conversion of 0.0 ... 1.0 float to angle */ gfloat convert_valf_to_angle (gfloat valf); /* conversion of angle to rectangular coordinate set */ void convert_angle_to_rect (gfloat angle, coordinate_t *coor); #endif grig-GRIG-0_9_0/src/rig-gui-smeter.c000066400000000000000000000425741435534312400171530ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui-smeter.c * \ingroup smeter * \brief Signal strength meter widget. * * The signal strength meter is implemented using a GtkDrawingArea widget * and using the GDK drawing primitives to draw the background pixmap and * the needle onto the GdkWindow of the drawing area. * * The s-meter widget contains also combo boxes for selection of the meter * scale and meter mode when the rig is in TX mode. * * \bug Only the signal strength meterworks (RX). */ #include #include #include #include #ifdef HAVE_CONFIG_H # include #endif #include "compat.h" #include "rig-data.h" #include "grig-gtk-workarounds.h" #include "rig-gui-smeter-conv.h" #include "rig-gui-smeter.h" /* uncomment to test smeter dynamics */ //#define SMETER_TEST 1 /** \brief The smeter */ static smeter_t smeter; /** \brief Needle coordinates - can be made local */ static coordinate_t coor; /** \brief Off-screen drawable */ static GdkPixmap *buffer; /** \brief TX mode strings used for optionmenu */ static const gchar *TX_MODE_S[] = { N_("None"), N_("Power"), N_("SWR"), N_("ALC") }; /** \brief TX scale strings used for optionmenu */ static const gchar *TX_SCALE_S[] = { N_("0..5"), N_("0..10"), N_("0..50"), N_("0..100"), N_("0..500") }; /** \brief Conversion table to convert combo box index to smeter_tx_mode_t. */ static smeter_tx_mode_t index_to_mode[SMETER_TX_MODE_LAST]; /** \brief Conversion table to convert smeter_scale_t to power level */ static gfloat scale_to_power[SMETER_SCALE_LAST] = { 5.0, 10.0, 50.0, 100.0, 500.0 }; /* private fuunction prototypes */ static void rig_gui_smeter_create_canvas (void); static GtkWidget *rig_gui_mode_selector_create (void); static GtkWidget *rig_gui_scale_selector_create (void); static gint rig_gui_smeter_timeout_exec (gpointer); static gint rig_gui_smeter_timeout_stop (gpointer); static void rig_gui_smeter_mode_cb (GtkWidget *, gpointer); static void rig_gui_smeter_scale_cb (GtkWidget *, gpointer); static gboolean rig_gui_smeter_expose_cb (GtkWidget *, GdkEventExpose *, gpointer); static gboolean rig_gui_smeter_has_tx_mode (guint); /** \brief Create signal strength meter widget. * \return A mega widget containing the signal strength meter. * * This function creates and initializes the signal strength meter * and the other related widgets: the combo box, which is used to * select the functionality of the meter and the combo box used to * select the scale of the meter. */ GtkWidget * rig_gui_smeter_create () { GtkWidget *vbox; GtkWidget *hbox; guint timerid; /* initialize some data */ smeter.value = convert_db_to_angle (-54, DB_TO_ANGLE_MODE_POLY); smeter.lastvalue = smeter.value; smeter.tval = RIG_GUI_SMETER_DEF_TVAL; smeter.falloff = RIG_GUI_SMETER_DEF_FALLOFF; smeter.txmode = SMETER_TX_MODE_NONE; smeter.scale = SMETER_SCALE_100; smeter.exposed = FALSE; /* create horizontal box containing selectors */ hbox = gtk_hbox_new (TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), rig_gui_scale_selector_create (), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), rig_gui_mode_selector_create (), TRUE, TRUE, 0); /* create cnvas */ rig_gui_smeter_create_canvas (); /* create vertical box */ vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), smeter.canvas, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5); /* start readback timer but only if service is available */ if (rig_data_has_get_strength ()) { timerid = g_timeout_add (RIG_GUI_SMETER_DEF_TVAL, rig_gui_smeter_timeout_exec, NULL); /* register timer_stop function at exit */ gtk_quit_add (gtk_main_level (), rig_gui_smeter_timeout_stop, GUINT_TO_POINTER (timerid)); } gtk_widget_show_all (vbox); return vbox; } /** \brief Get current TX mode. * \return The current TX mode. * * This function can be used to acquire what the smeter is displaying * when the rig is in TX mode. This function has been added to let the * rig daemon know which TX mode setting should be polled. */ smeter_tx_mode_t rig_gui_smeter_get_tx_mode () { return smeter.txmode; } /** \brief Create canvas widget. * * This function creates the drawing area widget, loads the background pixmap and * creates the needle. The background pixmap is stored in * the global smeter structure as a GdkPixbuf to allow redrawing of the meter * when needed. * * \bug drawing area is created with hard-coded size. * */ static void rig_gui_smeter_create_canvas () { gchar *fname; /* create canvas */ smeter.canvas = gtk_drawing_area_new (); gtk_widget_set_size_request (smeter.canvas, 160, 80); /* connect expose handler which will take care of adding contents. */ g_signal_connect (G_OBJECT (smeter.canvas), "expose_event", G_CALLBACK (rig_gui_smeter_expose_cb), NULL); /* create background pixmap and add it to canvas */ //fname = g_strconcat (PACKAGE_PIXMAPS_DIR, G_DIR_SEPARATOR_S, // "smeter.png", NULL); fname = pixmap_file_name ("smeter.png"); smeter.pixbuf = gdk_pixbuf_new_from_file (fname, NULL); g_free (fname); /* get initial coordinates */ convert_angle_to_rect (smeter.value, &coor); } /** \brief Execute timeout function. * \param data User data; currently NULL. * \return Always TRUE to keep the timer running. * * This function is in charge for updating the signal strength meter. It acquires * the signal strength from the rig-data object, converts it to needle endpoint * coordinates and repaints the s-meter. * * The function is called peridically by the Gtk+ scheduler. * * \note Optimize? */ static gint rig_gui_smeter_timeout_exec (gpointer data) { gfloat rdang; /* angle obtained from rig-data */ gint db = -54; /* signal strength from hamlib */ gfloat valf = 0.0; /* RF power, SWR or ALC from hamlib */ gfloat maxdelta; gfloat delta; /* are we in RX or TX mode? */ if (rig_data_get_ptt () == RIG_PTT_OFF) { #if SMETER_TEST /* test s-meter with random numbers */ db = (gint) g_random_int_range (-100, 100); #else /* get current value from rig-data */ db = rig_data_get_strength (); #endif rdang = convert_db_to_angle (db, DB_TO_ANGLE_MODE_POLY); delta = fabs (rdang - smeter.value); } else { /* get TX reading according to selected meter mode (power/swr/alc) */ switch (smeter.txmode) { /* TX power */ case SMETER_TX_MODE_POWER: #if SMETER_TEST /* test s-meter with random numbers */ valf = (gfloat) g_random_double_range (0.8, 1.5); #else valf = rig_data_get_power (); /* now, valf corresponds to the scale of the rig, that is, 1.0 = PMAX(rig). We need to scale this value according to the current scale, ie valf *= PMAX(rig) / PMAX(scale) FIXME: we should use power2mW */ valf *= rig_data_get_max_rfpwr () / scale_to_power[smeter.scale]; #endif break; /* SWR */ case SMETER_TX_MODE_SWR: #if SMETER_TEST /* test s-meter with random numbers */ valf = (gfloat) g_random_double_range (0.1, 0.15); #else valf = rig_data_get_swr (); #endif break; /* ALC */ case SMETER_TX_MODE_ALC: #if SMETER_TEST /* test s-meter with random numbers */ valf = (gfloat) g_random_double_range (-0.5, 0.3); #else valf = rig_data_get_alc (); #endif break; default: valf = 0.0; break; } /* scale value, if necessary; 1.0 corresponds to 100 on the meter */ rdang = convert_valf_to_angle (valf); delta = fabs (rdang - smeter.value); } /* is there a significant change? */ if (delta > 0.1) { /* calculate max delta = deg/sec * sec */ maxdelta = smeter.falloff * (smeter.tval * 0.001); smeter.lastvalue = smeter.value; /* check whether the delta is less than what the falloff allows */ if (delta < maxdelta) { smeter.value = rdang; } /* otherwise use maxdelta */ else { if (rdang > smeter.value) { smeter.value += maxdelta; } else { smeter.value -= maxdelta; } } /* update widget */ convert_angle_to_rect (smeter.value, &coor); /* checkwhether s-meter is visible */ if (smeter.exposed) { /* raw background pixmap */ gdk_draw_pixbuf (GDK_DRAWABLE (buffer), NULL, smeter.pixbuf, 0, 0, 0, 0, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); /* draw needle */ gdk_draw_line (GDK_DRAWABLE (buffer), smeter.gc, coor.x1, coor.y1, coor.x2, coor.y2); /* draw border around the meter */ gdk_draw_rectangle (GDK_DRAWABLE (buffer), smeter.gc, FALSE, 0, 0, 160, 80); /* copy offscreen buffer to visible widget */ gdk_draw_drawable (GDK_DRAWABLE (smeter.canvas->window), smeter.gc, GDK_DRAWABLE (buffer), 0, 0, 0, 0, -1, -1); } } return TRUE; } /** \brief Stop timeout function. * \param timer The ID of the timer to stop. * \return Always TRUE. * * This function is used to stop the readback timer just before the * program is quit. It should be called automatically by Gtk+ when * the gtk_main_loop is exited. */ static gint rig_gui_smeter_timeout_stop (gpointer timer) { g_source_remove (GPOINTER_TO_UINT (timer)); return TRUE; } /** \brief Create TX display mode selector widget. * \return The mode selctor widget. * * This function creates the combo box which is used to select the function of the s-meter * in TX mode (Power, SWR, ALC, ...). */ static GtkWidget * rig_gui_mode_selector_create () { GtkWidget *combo; guint i; guint modes = 0; combo = gtk_combo_box_new_text (); /* Add entries to combo box; but only if rig supports it Also fill index_to_mode conversion table. */ for (i = SMETER_TX_MODE_NONE; i < SMETER_TX_MODE_LAST; i++) { if (rig_gui_smeter_has_tx_mode (i)) { gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _(TX_MODE_S[i])); index_to_mode[modes] = i; modes++; } } /* if the conversion array is not filled we must add a last element containing -1 */ if (modes < SMETER_TX_MODE_LAST) { index_to_mode[modes] = -1; } gtk_combo_box_set_active (GTK_COMBO_BOX (combo), SMETER_TX_MODE_NONE); gtk_widget_set_tooltip_text (combo, _("Select TX mode for the meter")); /* connect changed signal */ g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (rig_gui_smeter_mode_cb), NULL); return combo; } /** \brief Create scale selector widget. * \return The scale selector widget. * * This function is used to create the combo box which can be used to select the * scale/range of the s-meter in TX mode. */ static GtkWidget * rig_gui_scale_selector_create () { GtkWidget *combo; guint i; combo = gtk_combo_box_new_text (); /* Add entries to combo box */ for (i = SMETER_SCALE_5; i < SMETER_SCALE_LAST; i++) { gtk_combo_box_append_text (GTK_COMBO_BOX (combo), TX_SCALE_S[i]); } /* connect changed signal */ g_signal_connect (G_OBJECT (combo), "changed", G_CALLBACK (rig_gui_smeter_scale_cb), NULL); /* set default scale */ if (rig_data_get_max_rfpwr () <= 5.0) { gtk_combo_box_set_active (GTK_COMBO_BOX (combo), SMETER_SCALE_5); } else if (rig_data_get_max_rfpwr () <= 10.0) { gtk_combo_box_set_active (GTK_COMBO_BOX (combo), SMETER_SCALE_10); } else if (rig_data_get_max_rfpwr () <= 100.0) { gtk_combo_box_set_active (GTK_COMBO_BOX (combo), SMETER_SCALE_100); } else { gtk_combo_box_set_active (GTK_COMBO_BOX (combo), SMETER_SCALE_500); } gtk_widget_set_tooltip_text (combo, _("Select TX meter scale")); return combo; } /** \brief Select s-meter mode. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user selects a new mode for the s-meter. * It acquires the selected menu item, and stores the corresponding display * mode in the s-meter structure. */ static void rig_gui_smeter_mode_cb (GtkWidget *widget, gpointer data) { gint index; /* get selected item */ index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); /* store the mode if value is self-consistent */ if ((index > -1) && (index < SMETER_TX_MODE_LAST)) { smeter.txmode = index; } } /** \brief Select s-meter range. * \param widget The widget which received the signal. * \param data User data, always NULL. * * This function is called when the user selects a new range for the s-meter. * It acquires the selected menu item, and stores the corresponding display * mode in the s-meter structure. */ static void rig_gui_smeter_scale_cb (GtkWidget *widget, gpointer data) { gint index; /* get selected item */ index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); /* store the mode if value is self-consistent */ if ((index > -1) && (index < SMETER_SCALE_LAST)) { smeter.scale = index; } } /** \brief Handle expose events for the drawing area. * \param widget The drawing area widget. * \param event The event. * \param data User data; always NULL. * * This function is called when the rawing area widget is finalized * and exposed. Itis used to finish the initialization of those * parameters, which need attributes rom visible widgets. */ static gboolean rig_gui_smeter_expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) { GdkColor color; /* draw background pixmap */ gdk_draw_pixbuf (GDK_DRAWABLE (widget->window), NULL, smeter.pixbuf, 0, 0, 0, 0, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); /* 0x3b3428 scaled to 3x16 bits */ color.red = 257*0x5B; color.green = 257*0x54; color.blue = 257*0x48; /* finalize the graphics context */ smeter.gc = gdk_gc_new (GDK_DRAWABLE (widget->window)); gdk_gc_set_rgb_fg_color (smeter.gc, &color); gdk_gc_set_rgb_bg_color (smeter.gc, &color); gdk_gc_set_line_attributes (smeter.gc, 2, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); /* draw needle */ gdk_draw_line (GDK_DRAWABLE (widget->window), smeter.gc, coor.x1, coor.y1, coor.x2, coor.y2); /* draw border around the meter */ gdk_draw_rectangle (GDK_DRAWABLE (widget->window), smeter.gc, FALSE, 0, 0, 160, 80); /* initialize offscreen buffer */ buffer = gdk_pixmap_new (GDK_DRAWABLE (smeter.canvas->window), 160, 80, -1); /* indicate that widget is ready to be used */ smeter.exposed = TRUE; return TRUE; } /** \brief Check whether a specific TX mode is available. * \param The TX mode; should be one of smeter_tx_mode_t. * \return A boolean indicating whether the TX mode is available or not. * */ static gboolean rig_gui_smeter_has_tx_mode (guint mode) { switch (mode) { /* NONE is always enabled */ case SMETER_TX_MODE_NONE: return TRUE; break; /* RF power */ case SMETER_TX_MODE_POWER: return rig_data_has_get_power (); break; /* SWR */ case SMETER_TX_MODE_SWR: return rig_data_has_get_swr (); break; /* ALC */ case SMETER_TX_MODE_ALC: return rig_data_has_get_alc (); break; default: return FALSE; break; } return FALSE; } grig-GRIG-0_9_0/src/rig-gui-smeter.h000066400000000000000000000105411435534312400171450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui-smeter.h * \ingroup smeter * \brief Signal strength meter widget (interface). * * \bug The defaults and ranges defined in this files shall be moved * to a centralized object. */ #ifndef RIG_GUI_SMETER_H #define RIG_GUI_SMETER_H 1 /* These constants are kept public to allow their usage in e.g. adjustment ranges */ /** \brief Minimum delay in msec between s-meter updates (50 fps) */ #define RIG_GUI_SMETER_MIN_TVAL 20 /** \brief Default delay in msec between s-meter updates (25 fps). */ #define RIG_GUI_SMETER_DEF_TVAL 40 /** \brief Maximum delay in msec between s-meter updates (5 fps). */ #define RIG_GUI_SMETER_MAX_TVAL 500 /** \brief Minimum falloff speed in deg/sec */ #define RIG_GUI_SMETER_MIN_FALLOFF 10.0 /** \brief Default falloff speed in deg/sec */ #define RIG_GUI_SMETER_DEF_FALLOFF 200.0 /** \brief Maximum falloff speed in deg/sec */ #define RIG_GUI_SMETER_MAX_FALLOFF 500.0 /** \brief Scale setting for s-meter. * * The s-meter has 3 scales: The upper scale which is used to show the * received signal strength and two lower scales which can be used to * show transmitter parameters (power, alc, etc.). One of the lower * scales has range 0..5 while the other has range 0..10. This enumeration * is used to select one of these two ranges. */ typedef enum { SMETER_SCALE_5 = 0, /*!< Use scale 0..5 */ SMETER_SCALE_10, /*!< Use scale 0..10 */ SMETER_SCALE_50, /*!< Use scale 0..50 */ SMETER_SCALE_100, /*!< Use scale 0..100 */ SMETER_SCALE_500, /*!< Use scale 0..500 */ SMETER_SCALE_LAST /*!< Dummy... */ } smeter_scale_t; /** \brief TX mode setting. * * These values are used to select the meter display mode when the rig is * in TX mode. */ typedef enum { SMETER_TX_MODE_NONE = 0, /*!< No display in TX mode. */ SMETER_TX_MODE_POWER, /*!< Show TX power. */ SMETER_TX_MODE_SWR, /*!< Show SWR. */ SMETER_TX_MODE_ALC, /*!< Show ALC level. */ SMETER_TX_MODE_LAST /*!< Dummy... */ } smeter_tx_mode_t; /** \brief Data type for signal strength meter. * * This structure is used to store the data for the signal strength * meter. The signal strength meter is a GnomeCanvas having a background * pixmap and a needle. The data structure also hols some numerical values * needed to calculate the dynamic behaviour of the needle. */ typedef struct { GtkWidget *canvas; /*!< The drawing area widget. */ GdkPixbuf *pixbuf; /*!< The background pixmap. */ GdkGC *gc; /*!< Graphics context for drawing. */ gboolean exposed; /*!< Flag to indicate whether canvas is ready. */ gfloat value; /*!< Current value (angle). */ gfloat lastvalue; /*!< Previous value (angle). */ guint tval; /*!< Current update delay. */ gfloat falloff; /*!< Current falloff delay. */ smeter_scale_t scale; /*!< Current scale. */ smeter_tx_mode_t txmode; /*!< Display mode in TX. */ } smeter_t; GtkWidget *rig_gui_smeter_create (void); smeter_tx_mode_t rig_gui_smeter_get_tx_mode (void); #endif grig-GRIG-0_9_0/src/rig-gui-tx.c000066400000000000000000000332701435534312400163000ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \brief TX level controls * * This module implements the TX level controls consisting of: * * - RIG_LEVEL_RFPOWER W * - RIG_LEVEL_MICGAIN RW * - RIG_LEVEL_KEYSPD RW * - RIG_LEVEL_COMP W * - RIG_LEVEL_ALC W * - RIG_LEVEL_BKINDL RW * - RIG_LEVEL_VOXGAIN RW * - RIG_LEVEL_VOXDELAY RW * - RIG_LEVEL_ANTIVOX RW * * * Note: In Gtk+ vertical sliders have their minimum on top (nice...) * so all values have to be inverted. */ #include #include #include #include #include "rig-data.h" #include "rig-utils.h" #include "rig-gui-tx.h" #include "grig-debug.h" #include "grig-menubar.h" /* defined in main.c */ extern GtkWidget *grigapp; static gint tx_window_delete (GtkWidget *widget, GdkEvent *event, gpointer data); static void tx_window_destroy (GtkWidget *widget, gpointer data); static void create_controls (GtkBox *box); static void float_level_cb (GtkRange *range, gpointer data); static gchar *float_format_value_cb (GtkScale *scale, gdouble value); static gchar *wpm_format_value_cb (GtkScale *scale, gdouble value); static gchar *delay_format_value_cb (GtkScale *scale, gdouble value); static gboolean tx_levels_update (gpointer data); static GtkWidget *dialog; static gboolean visible = FALSE; static guint timerid = 0; /* controls */ static GtkWidget *kss,*bks,*rfs,*als,*mgs,*cps,*vgs,*vds,*avs; /* handler ids */ static gulong ksi,bki,mgi,vgi,vdi,avi; /** \brief Create level controls. * \return A container widget containing the controls. * * This function creates and initializes the level controls for grig. * The controls are hidden by default using a GtkExpander widget. */ void rig_gui_tx_create () { GtkWidget *hbox; gchar *title; if (visible) { grig_debug_local (RIG_DEBUG_BUG, _("%s: TX window already visible."), __FUNCTION__); return; } /* create hbox and add sliders */ hbox = gtk_hbox_new (TRUE, 5); create_controls (GTK_BOX (hbox)); /* create dialog window */ title = g_strdup_printf (_("%s (TX Levels)"), gtk_window_get_title (GTK_WINDOW (grigapp))); /* create dialog window */ dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (grigapp), GTK_DIALOG_DESTROY_WITH_PARENT, NULL); g_free (title); gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 150); /* allow interaction with other windows */ gtk_window_set_modal (GTK_WINDOW (dialog), FALSE); g_signal_connect (dialog, "delete_event", G_CALLBACK (tx_window_delete), NULL); g_signal_connect (dialog, "destroy", G_CALLBACK (tx_window_destroy), NULL); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox); visible = TRUE; gtk_widget_show_all (dialog); /* start callback */ timerid = g_timeout_add (1073, tx_levels_update, NULL); } static gint tx_window_delete (GtkWidget *widget, GdkEvent *event, gpointer data) { /* force menu item to unset */ grig_menubar_force_tx_item (FALSE); /* return FALSE so that Gtk+ will emit the destroy signal */ return FALSE; } static void tx_window_destroy (GtkWidget *widget, gpointer data) { /* stop callback */ g_source_remove (timerid); timerid = 0; /* clear tx-active flag in rig-data */ visible = FALSE; } void rig_gui_tx_close () { if (!visible) { grig_debug_local (RIG_DEBUG_BUG, _("%s: TX window is not visible."), __FUNCTION__); return; } gtk_widget_destroy (dialog); } /** \brief Common callback used by float levels * * - actually, int level are managed here, too */ static void float_level_cb (GtkRange *range, gpointer data) { int level = GPOINTER_TO_INT (data); float value = -1.0 * gtk_range_get_value (range); switch (level) { /* FIXME */ case RIG_LEVEL_RFPOWER: rig_data_set_power (value); break; case RIG_LEVEL_MICGAIN: rig_data_set_micg (value); break; case RIG_LEVEL_KEYSPD: rig_data_set_keyspd ((int) value); break; case RIG_LEVEL_COMP: rig_data_set_comp ( value); break; case RIG_LEVEL_ALC: rig_data_set_alc (value); break; case RIG_LEVEL_BKINDL: rig_data_set_bkindel ((int) value); break; case RIG_LEVEL_VOXGAIN: rig_data_set_voxg (value); break; case RIG_LEVEL_VOXDELAY: rig_data_set_voxdel ((int) value); break; case RIG_LEVEL_ANTIVOX: rig_data_set_antivox (value); break; default: grig_debug_local (RIG_DEBUG_BUG, _("%s:%d: Invalid level %d"), __FILE__, __LINE__, level); break; } } static gchar * float_format_value_cb (GtkScale *scale, gdouble value) { return g_strdup_printf ("%0.2f", -1.0 * value); } static gchar * wpm_format_value_cb (GtkScale *scale, gdouble value) { return g_strdup_printf ("%0.0f WPM", -1.0 * value); } static gchar * delay_format_value_cb (GtkScale *scale, gdouble value) { if (fabs (value) < 1000) { return g_strdup_printf ("%0.0f ms", -1.0 * value); } else { value = value / 1000.0; return g_strdup_printf ("%0.2f s", -1.0 * value); } } static void create_controls (GtkBox *box) { GtkWidget *label; GtkWidget *vbox; guint count = 0; /* kss */ if (rig_data_has_set_keyspd ()) { kss = gtk_vscale_new_with_range (-50.0, -1.0, 1.0); gtk_range_set_value (GTK_RANGE (kss), -1.0*rig_data_get_keyspd ()); ksi = g_signal_connect (kss, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_KEYSPD)); g_signal_connect (kss, "format-value", G_CALLBACK (wpm_format_value_cb), NULL); label = gtk_label_new (_("CW SPD")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), kss, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* bks */ if (rig_data_has_set_bkindel ()) { bks = gtk_vscale_new_with_range (-10000.0, 0.0, 10.0); gtk_range_set_value (GTK_RANGE (bks), -1.0*rig_data_get_bkindel ()); bki = g_signal_connect (bks, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_BKINDL)); g_signal_connect (bks, "format-value", G_CALLBACK (delay_format_value_cb), NULL); label = gtk_label_new (_("BKIN DEL")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), bks, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* rfs */ if (rig_data_has_set_power ()) { rfs = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (rfs), -1.0*rig_data_get_power ()); g_signal_connect (rfs, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_RFPOWER)); g_signal_connect (rfs, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("POWER")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), rfs, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* als */ if (rig_data_has_set_alc ()) { als = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (als), -1.0*rig_data_get_alc ()); g_signal_connect (als, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_ALC)); g_signal_connect (als, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("ALC")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), als, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* mgs */ if (rig_data_has_set_micg ()) { mgs = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (mgs), -1.0*rig_data_get_micg ()); mgi = g_signal_connect (mgs, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_MICGAIN)); g_signal_connect (mgs, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("MIC GAIN")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), mgs, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* cps */ if (rig_data_has_set_comp ()) { cps = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (cps), -1.0*rig_data_get_comp ()); g_signal_connect (cps, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_COMP)); g_signal_connect (cps, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("COMPR")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), cps, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* vgs */ if (rig_data_has_set_voxg ()) { vgs = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (cps), -1.0*rig_data_get_voxg ()); vgi = g_signal_connect (vgs, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_VOXGAIN)); g_signal_connect (vgs, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("VOX GAIN")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), vgs, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* vds */ if (rig_data_has_set_voxdel ()) { vds = gtk_vscale_new_with_range (-10000.0, 0.0, 10.0); gtk_range_set_value (GTK_RANGE (bks), -1.0*rig_data_get_voxdel ()); vdi = g_signal_connect (vds, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_VOXDELAY)); g_signal_connect (vds, "format-value", G_CALLBACK (delay_format_value_cb), NULL); label = gtk_label_new (_("VOX DEL")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), vds, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* avs */ if (rig_data_has_set_antivox ()) { avs = gtk_vscale_new_with_range (-1.0, 0.0, 0.01); gtk_range_set_value (GTK_RANGE (avs), -1.0*rig_data_get_antivox ()); avi = g_signal_connect (avs, "value-changed", G_CALLBACK (float_level_cb), GINT_TO_POINTER (RIG_LEVEL_ANTIVOX)); g_signal_connect (avs, "format-value", G_CALLBACK (float_format_value_cb), NULL); label = gtk_label_new (_("ANTI VOX")); gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), avs, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (box, vbox, TRUE, TRUE, 0); count++; } /* if no controls available, create a label telling user why window is empty */ if (count == 0) { gtk_box_pack_start (box, gtk_label_new (_("Rig has no support.")), TRUE, TRUE, 0); } } static gboolean tx_levels_update (gpointer data) { /* kss */ if (rig_data_has_get_keyspd ()) { g_signal_handler_block (kss, ksi); gtk_range_set_value (GTK_RANGE (kss), -1.0*rig_data_get_keyspd ()); g_signal_handler_unblock (kss, ksi); } /* bks */ if (rig_data_has_get_bkindel ()) { g_signal_handler_block (bks, bki); gtk_range_set_value (GTK_RANGE (bks), -1.0*rig_data_get_bkindel ()); g_signal_handler_unblock (bks, bki); } /* mgs */ if (rig_data_has_get_micg ()) { g_signal_handler_block (mgs, mgi); gtk_range_set_value (GTK_RANGE (mgs), -1.0*rig_data_get_micg ()); g_signal_handler_unblock (mgs, mgi); } /* vgs */ if (rig_data_has_get_voxg ()) { g_signal_handler_block (vgs, vgi); gtk_range_set_value (GTK_RANGE (vgs), -1.0*rig_data_get_voxg ()); g_signal_handler_unblock (vgs, vgi); } /* vds */ if (rig_data_has_get_voxdel ()) { g_signal_handler_block (vds, vdi); gtk_range_set_value (GTK_RANGE (vds), -1.0*rig_data_get_voxdel ()); g_signal_handler_unblock (vds, vdi); } /* avs */ if (rig_data_has_get_antivox ()) { g_signal_handler_block (avs, avi); gtk_range_set_value (GTK_RANGE (avs), -1.0*rig_data_get_antivox ()); g_signal_handler_unblock (avs, avi); } return TRUE; } grig-GRIG-0_9_0/src/rig-gui-tx.h000066400000000000000000000023201435534312400162750ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_TX_H #define RIG_GUI_TX_H 1 void rig_gui_tx_create (void); void rig_gui_tx_close (void); #endif grig-GRIG-0_9_0/src/rig-gui-vfo.c000066400000000000000000000275301435534312400164410ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #include #include #include #include "rig-data.h" #include "rig-utils.h" #include "grig-gtk-workarounds.h" #include "grig-debug.h" #include "rig-gui-vfo.h" /* private function prototypes */ /* VFO frame */ static GtkWidget *rig_gui_vfo_create_toggle (void); static GtkWidget *rig_gui_vfo_create_eq_button (void); static GtkWidget *rig_gui_vfo_create_xchg_button (void); static GtkWidget *rig_gui_vfo_create_split_button (void); static GtkWidget *rig_gui_vfo_create_mem_button (void); static void rig_gui_vfo_toggle_cb (GtkWidget *, gpointer); static void rig_gui_vfo_eq_cb (GtkWidget *, gpointer); static void rig_gui_vfo_xchg_cb (GtkWidget *, gpointer); static void rig_gui_vfo_split_cb (GtkWidget *, gpointer); static void rig_gui_vfo_memory_cb (GtkWidget *, gpointer); /* MEM Frame */ /* Band frame */ /** \brief Create VFO operation controls. * \return a composite widget containing the controls. * */ GtkWidget * rig_gui_vfo_create () { /* GtkWidget *hbox; GtkWidget *vfobox; GtkWidget *bandbox; */ GtkWidget *grid; /* VFO Frame */ /* vfobox = gtk_vbutton_box_new (); gtk_button_box_set_layout (GTK_BUTTON_BOX (vfobox), GTK_BUTTONBOX_START); gtk_container_add (GTK_CONTAINER (vfobox), rig_gui_vfo_create_toggle ()); gtk_container_add (GTK_CONTAINER (vfobox), rig_gui_vfo_create_split_button ()); gtk_container_add (GTK_CONTAINER (vfobox), rig_gui_vfo_create_eq_button ()); gtk_container_add (GTK_CONTAINER (vfobox), rig_gui_vfo_create_xchg_button ());*/ grid = gtk_table_new (4, 3, TRUE); gtk_table_attach_defaults (GTK_TABLE (grid), rig_gui_vfo_create_toggle (), 0, 1, 0, 1); gtk_table_attach_defaults (GTK_TABLE (grid), rig_gui_vfo_create_split_button (), 1, 2, 0, 1); gtk_table_attach_defaults (GTK_TABLE (grid), rig_gui_vfo_create_eq_button (), 0, 1, 1, 2); gtk_table_attach_defaults (GTK_TABLE (grid), rig_gui_vfo_create_xchg_button (), 1, 2, 1, 2); gtk_table_attach_defaults (GTK_TABLE (grid), rig_gui_vfo_create_mem_button (), 0, 1, 2, 3); /* BAND UP/DOWN */ /* XXX not yet implemented */ /* bandbox = gtk_hbutton_box_new (); gtk_button_box_set_layout (GTK_BUTTON_BOX (bandbox), GTK_BUTTONBOX_END); */ return grid; } /**** A/B button ****/ static GtkWidget * rig_gui_vfo_create_toggle () { GtkWidget *button; gint vfos; /* Create button widget. The label will be "A/B" if the rig has VFO_A and VFO_B or Main/Sub if the rig has those two. */ vfos = rig_data_get_vfos (); if (vfos & RIG_VFO_MAIN) { button = gtk_button_new_with_label (_("Main / Sub")); gtk_widget_set_tooltip_text (button, _("Toggle active VFO")); } else { button = gtk_button_new_with_label (_("A / B")); gtk_widget_set_tooltip_text (button, _("Toggle between available VFOs")); } /* Disable control if the rig has no capability of either setting a specific VFO or to toggle */ if (!(rig_data_has_vfo_op_toggle () || (rig_data_has_set_vfo () && rig_data_has_get_vfo ())) ){ gtk_widget_set_sensitive (button, FALSE); } /* connect "toggle" signal */ g_signal_connect (G_OBJECT (button), "pressed", G_CALLBACK (rig_gui_vfo_toggle_cb), NULL); return button; } static void rig_gui_vfo_toggle_cb (GtkWidget *widget, gpointer data) { if (rig_data_has_vfo_op_toggle ()) { rig_data_vfo_op_toggle (); } else if (rig_data_has_set_vfo () && rig_data_has_get_vfo ()) { /* do not toggle in memory mode */ /* XXX disable other VFO buttons? */ if (rig_data_get_vfo() == RIG_VFO_MEM) return; /* do we have VFO A and B? */ if (rig_data_get_vfos() & (RIG_VFO_A | RIG_VFO_B)) { if (rig_data_get_vfo () == RIG_VFO_A) { rig_data_set_vfo (RIG_VFO_B); } else { rig_data_set_vfo (RIG_VFO_A); } } /* else try MAIN/SUB */ else if (rig_data_get_vfos () & (RIG_VFO_MAIN | RIG_VFO_SUB)) { if (rig_data_get_vfo () == RIG_VFO_MAIN) { rig_data_set_vfo (RIG_VFO_SUB); } else { rig_data_set_vfo (RIG_VFO_MAIN); } } /* it's a bug, because button should be disabled */ else { grig_debug_local (RIG_DEBUG_BUG, "%s: VFO_TOGGLE button should have been disabled "\ "(neither A/B nor MAIN/SUB)\n", __FUNCTION__); } } /* it's a bug, because button should be disabled */ else { grig_debug_local (RIG_DEBUG_BUG, "%s: VFO_TOGGLE button should have been disabled "\ "(no way to toggle)\n", __FUNCTION__); } } static void rig_gui_vfo_memory_cb(GtkWidget *widget, gpointer data) { if (rig_data_has_set_vfo() && rig_data_has_get_vfo()) { if (rig_data_get_vfo() != RIG_VFO_MEM) { g_object_set_data(G_OBJECT(widget), "vfo", (gpointer)(uintptr_t) rig_data_get_vfo()); rig_data_set_vfo(RIG_VFO_MEM); } else { rig_data_set_vfo((vfo_t)(uintptr_t) g_object_get_data(G_OBJECT(widget), "vfo")); } } } /**** A=B button ****/ static GtkWidget * rig_gui_vfo_create_eq_button () { GtkWidget *button; gint vfos; /* Create button widget. The label will be "A=B" if the rig has VFO_A and VFO_B or Main=Sub if the rig has those two. */ vfos = rig_data_get_vfos (); if (vfos & RIG_VFO_MAIN) { button = gtk_button_new_with_label (_("Main = Sub")); gtk_widget_set_tooltip_text (button,_("Set Main VFO = Sub VFO")); } else { button = gtk_button_new_with_label (_("A = B")); gtk_widget_set_tooltip_text (button, _("Set VFO B = VFO A")); } /* Disable control if the rig has no capability of either setting a specific VFO or to toggle */ if (!(rig_data_has_vfo_op_toggle () || (rig_data_has_set_vfo () && rig_data_has_get_vfo ())) ){ gtk_widget_set_sensitive (button, FALSE); } /* connect "toggle" signal */ g_signal_connect (G_OBJECT (button), "pressed", G_CALLBACK (rig_gui_vfo_eq_cb), NULL); return button; } static void rig_gui_vfo_eq_cb (GtkWidget *widget, gpointer data) { if (rig_data_has_vfo_op_copy ()) { rig_data_vfo_op_copy (); } else if (rig_data_has_set_vfo () && rig_data_has_get_vfo ()) { grig_debug_local (RIG_DEBUG_BUG, "%s: VFO COPY without RIG_OP_COPY not implemented\n", __FUNCTION__); } /* it's a bug, because button should be disabled */ else { grig_debug_local (RIG_DEBUG_BUG, "%s: VFO_EQ button should have been disabled "\ "(no way to equalise)\n", __FUNCTION__); } } /**** A<->B button ****/ static GtkWidget * rig_gui_vfo_create_xchg_button () { GtkWidget *button; gint vfos; /* Create button widget. The label will be "A<->B" if the rig has VFO_A and VFO_B or Main<->Sub if the rig has those two. */ vfos = rig_data_get_vfos (); if (vfos & RIG_VFO_MAIN) { button = gtk_button_new_with_label (_("Main\302\253\302\273Sub")); gtk_widget_set_tooltip_text (button, _("Exchange Main and sub VFOs")); } else { button = gtk_button_new_with_label (_("A\302\253\302\273B")); gtk_widget_set_tooltip_text (button, _("Exchange VFO A and B")); } /* Disable control if the rig has no capability of either setting a specific VFO or to toggle */ if (!(rig_data_has_vfo_op_xchg () || (rig_data_has_set_vfo () && rig_data_has_get_vfo ())) ){ gtk_widget_set_sensitive (button, FALSE); } /* connect "toggle" signal */ g_signal_connect (G_OBJECT (button), "pressed", G_CALLBACK (rig_gui_vfo_xchg_cb), NULL); return button; } static void rig_gui_vfo_xchg_cb (GtkWidget *widget, gpointer data) { if (rig_data_has_vfo_op_xchg ()) { rig_data_vfo_op_xchg (); } else if (rig_data_has_set_vfo () && rig_data_has_get_vfo ()) { grig_debug_local (RIG_DEBUG_BUG, "%s: VFO XCHG without RIG_OP_XCHG not implemented\n", __FUNCTION__); } /* it's a bug, because button should be disabled */ else { grig_debug_local (RIG_DEBUG_BUG, "%s: VFO_XCHG button should have been disabled "\ "(no way to exchange)\n", __FUNCTION__); } } /**** SPLIT button ****/ /** FIXME: need readback from RIG **/ static GtkWidget * rig_gui_vfo_create_split_button () { GtkWidget *button; button = gtk_toggle_button_new_with_label (_("Split")); gtk_widget_set_tooltip_text (button, _("Toggle split mode operation")); /* set button status before we do anything else */ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), rig_data_get_split ()); /* Disable control if the rig has no capability of either setting a specific VFO or to toggle */ if (!(rig_data_has_set_split ())) { gtk_widget_set_sensitive (button, FALSE); } /* connect "toggle" signal */ g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (rig_gui_vfo_split_cb), NULL); return button; } static GtkWidget * rig_gui_vfo_create_mem_button() { GtkWidget *button; button = gtk_button_new_with_label(_("M / V")); gtk_widget_set_tooltip_text (button, _("Toggle between memory and VFO")); /* Disable control if the rig has no memory vfo */ if (!(rig_data_get_vfos() & RIG_VFO_MEM)) { gtk_widget_set_sensitive(button, FALSE); } g_object_set_data(G_OBJECT(button), "vfo", (gpointer) RIG_VFO_VFO); g_signal_connect(G_OBJECT (button), "pressed", G_CALLBACK (rig_gui_vfo_memory_cb), NULL); return button; } static void rig_gui_vfo_split_cb (GtkWidget *widget, gpointer data) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { rig_data_set_split (TRUE); } else { rig_data_set_split (FALSE); } } grig-GRIG-0_9_0/src/rig-gui-vfo.h000066400000000000000000000027421435534312400164440ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_VFO_H #define RIG_GUI_VFO_H 1 /** \brief Minimum delay in msec between widget updates. */ #define RIG_GUI_VFO_MIN_TVAL 1150 /** \brief Default delay in msec between widget updates. */ #define RIG_GUI_VFO_DEF_TVAL 2157 /** \brief Maximum delay in msec between widget updates. */ #define RIG_GUI_VFO_MAX_TVAL 10000 GtkWidget *rig_gui_vfo_create (void); #endif grig-GRIG-0_9_0/src/rig-gui.c000066400000000000000000000112511435534312400156420ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-gui.c * \ingroup gui * \brief Master GUI object. * * This file encapsulates the various GUI parts into one big composite widget. */ #include #include "rig-gui.h" #include "rig-gui-buttons.h" #include "rig-gui-ctrl2.h" #include "rig-gui-smeter.h" #include "rig-gui-lcd.h" #include "rig-gui-keypad.h" #include "rig-gui-levels.h" #include "rig-gui-vfo.h" #include "grig-menubar.h" /* we keep this global so that we can enable and disable it at runtime */ static GtkWidget *keypadbox = NULL; static void rig_gui_freq_changed_cb(GtkWidget *widget, gpointer data) { grig_keypad_disable(data); } static void rig_gui_keypad_enter_cb(GtkWidget * widget, gpointer data) { rig_gui_lcd_begin_manual_entry(); } static void rig_gui_keypad_clear_cb(GtkWidget * widget, gpointer data) { rig_gui_lcd_clear_manual_entry(); } static void rig_gui_keypad_num_cb(GtkWidget * widget, guint num) { rig_gui_lcd_set_next_digit('0' + num); } void rig_gui_show_keypad (gboolean *show) { if (keypadbox != NULL) { if (show) { gtk_widget_show_all (keypadbox); } else { gtk_widget_hide_all (keypadbox); } } } /** \brief Create rig control widgets. * \return A mega-widget containing the rig controls. * * This function creates the rig control mega-widget by calling the create * function of each sub-object and packing the into a main container. * */ GtkWidget * rig_gui_create () { GtkWidget *hbox; /* the main container */ GtkWidget *vbox; GtkWidget *lcdbox; GtkWidget *lcd; GtkWidget *keypad; lcd = rig_gui_lcd_create(); keypad = grig_keypad_new(); /* horizontal box with keypad and vfo */ keypadbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start (GTK_BOX (keypadbox), keypad, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (keypadbox), rig_gui_vfo_create (), FALSE, FALSE, 0); gtk_widget_show (keypadbox); /* vertical box with lcd and keypad + vfo */ lcdbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (lcdbox), lcd, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (lcdbox), keypadbox, FALSE, FALSE, 5); gtk_widget_show (lcdbox); /* create the main container */ /* from left to right: buttons, smeter, (lcd + keypad), ctrl2 */ hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (hbox), rig_gui_buttons_create (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), rig_gui_smeter_create (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), lcdbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), rig_gui_ctrl2_create (), FALSE, FALSE, 0); gtk_widget_show (hbox); /* create main vertical box */ vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), grig_menubar_create (), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0); /* gtk_box_pack_start (GTK_BOX (vbox), rig_gui_levels_create (), */ /* FALSE, FALSE, 5); */ /* keypad callbacks */ g_signal_connect(G_OBJECT(keypad), "grig-keypad-enter-pressed", G_CALLBACK(rig_gui_keypad_enter_cb), NULL); g_signal_connect(G_OBJECT(keypad), "grig-keypad-clear-pressed", G_CALLBACK(rig_gui_keypad_clear_cb), NULL); g_signal_connect(G_OBJECT(keypad), "grig-keypad-num-pressed", G_CALLBACK(rig_gui_keypad_num_cb), NULL); /* disable the keypad when the frequency has been set */ g_signal_connect (G_OBJECT (lcd), "freq-changed", G_CALLBACK (rig_gui_freq_changed_cb), keypad); gtk_widget_show_all (vbox); return vbox; } grig-GRIG-0_9_0/src/rig-gui.h000066400000000000000000000023411435534312400156470ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_GUI_H #define RIG_GUI_H 1 GtkWidget *rig_gui_create (void); void rig_gui_show_keypad (gboolean *show); #endif grig-GRIG-0_9_0/src/rig-selector.c000066400000000000000000000520461435534312400167050ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \brief Rig selection window used at startup. * */ #include #include #include #include #include "compat.h" #include "grig-debug.h" #include "radio-conf.h" #include "rig-selector.h" /* private function declarations */ static gint rig_selector_delete (GtkWidget *, GdkEvent *, gpointer); static void rig_selector_destroy (GtkWidget *, gpointer); static void add (GtkWidget *, gpointer); static void delete (GtkWidget *, gpointer); static void edit (GtkWidget *, gpointer); static void cancel (GtkWidget *, gpointer); static void connect (GtkWidget *, gpointer); static void selection_changed (GtkTreeSelection *sel, gpointer data); static void render_civ (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer column); static void render_dtr_rts (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer column); static void create_rig_list (void); static GtkTreeModel *create_model (void); static gchar *selected = NULL; static GtkWidget *riglist; /** \brief Execute radio selector. * \return The config file name of the selected radio or NULL if * selection has been aborted. * * This function creates a window containing a list with the currently * configured radios, allowing the user to select which radio to * connect to. * * Additionally, the window contains buttons to delete, edit, and add * new radios to the list. * * The dummy rig is always listed on the top of the list. * * The radio configurations are stored in $HOME/.grig/xyz.grc files and the * functions in radio-conf.c can be used for reading and saving them. */ gchar * rig_selector_execute () { GtkWidget *window; /* the main rig-selector window */ gchar *icon; /* window icon file name */ GtkWidget *vbox; /* the main vertical box in the window */ GtkWidget *butbox1; /* The button box with New, edit, and delete buttons */ GtkWidget *butbox2; /* the button box in the bottom of the window */ GtkWidget *conbut; /* Connect button */ GtkWidget *cancbut; /* Cancel button */ GtkWidget *newbut; /* New button */ GtkWidget *editbut; /* Edit button */ GtkWidget *delbut; /* delete button */ GtkWidget *swin; GtkTreeSelection *sel; /* radio list */ create_rig_list (); swin = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (swin), riglist); gtk_widget_show_all (swin); sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (riglist)); gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE); /* connect button */ conbut = gtk_button_new_from_stock (GTK_STOCK_CONNECT); gtk_widget_set_sensitive (conbut, FALSE); gtk_widget_set_tooltip_text (conbut, _("Connect to the selected radio." "Grig will attempt to establish connection to the " "selected radio using the specified settings. If " "the connection is successful, the main application " "window will be loaded.")); /* cancel button */ cancbut = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_widget_set_tooltip_text (cancbut, _("Cancel radio selection. This will end grig.")); /* add button */ newbut = gtk_button_new_from_stock (GTK_STOCK_ADD); gtk_widget_set_tooltip_text (newbut, _("Add a new radio to the list." "A new configuration window will be shown allowing " "you to select a radio and specify the connection " "settings.")); /* delete button */ delbut = gtk_button_new_from_stock (GTK_STOCK_DELETE); gtk_widget_set_sensitive (delbut, FALSE); gtk_widget_set_tooltip_text (delbut, _("Delete the currently selected radio.")); /* edit button */ editbut = gtk_button_new_from_stock (GTK_STOCK_EDIT); gtk_widget_set_sensitive (editbut, FALSE); gtk_widget_set_tooltip_text (editbut, _("Edit the settings for the currently selected radio.")); /* button box*/ butbox1 = gtk_hbutton_box_new (); gtk_button_box_set_layout (GTK_BUTTON_BOX (butbox1), GTK_BUTTONBOX_START); butbox2 = gtk_hbutton_box_new (); gtk_button_box_set_layout (GTK_BUTTON_BOX (butbox2), GTK_BUTTONBOX_END); gtk_box_set_spacing (GTK_BOX (butbox2), 10); gtk_container_add (GTK_CONTAINER (butbox1), newbut); gtk_container_add (GTK_CONTAINER (butbox1), editbut); gtk_container_add (GTK_CONTAINER (butbox1), delbut); gtk_container_add (GTK_CONTAINER (butbox2), cancbut); gtk_container_add (GTK_CONTAINER (butbox2), conbut); /* vertical box */ vbox = gtk_vbox_new (FALSE, 10); gtk_box_pack_start (GTK_BOX (vbox), swin, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), butbox1, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (vbox), butbox2, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0); /* create window */ window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), _("Select a Radio")); icon = pixmap_file_name ("ic910.png"); gtk_window_set_icon_from_file (GTK_WINDOW (window), icon, NULL); g_free (icon); gtk_container_set_border_width (GTK_CONTAINER (window), 10); gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); gtk_container_add (GTK_CONTAINER (window), vbox); /* connect delete and destroy signals */ g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (rig_selector_delete), NULL); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (rig_selector_destroy), window); g_object_set_data (G_OBJECT(window), "conbut", conbut); g_object_set_data (G_OBJECT(window), "delbut", delbut); g_object_set_data (G_OBJECT(window), "editbut", editbut); g_object_set_data (G_OBJECT(window), "list", riglist); /* connect signals */ g_signal_connect (G_OBJECT (cancbut), "clicked", G_CALLBACK (cancel), window); g_signal_connect (G_OBJECT (conbut), "clicked", G_CALLBACK (connect), window); g_signal_connect (G_OBJECT (delbut), "clicked", G_CALLBACK (delete), NULL); g_signal_connect (G_OBJECT (newbut), "clicked", G_CALLBACK (add), NULL); g_signal_connect (G_OBJECT (editbut), "clicked", G_CALLBACK (edit), NULL); g_signal_connect (sel, "changed", G_CALLBACK(selection_changed), window); /* show window */ gtk_widget_show_all (window); /* enter main loop that will only be quit when window is destroyed */ gtk_main (); return selected; } static void create_rig_list (void) { GtkTreeModel *model; GtkCellRenderer *renderer; GtkTreeViewColumn *column; riglist = gtk_tree_view_new (); model = create_model (); gtk_tree_view_set_model (GTK_TREE_VIEW (riglist), model); g_object_unref (model); //gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (riglist), TRUE); /* Company:1 */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Company"), renderer, "text", 1, NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (riglist), column, -1); /* model:2 */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Model"), renderer, "text", 2, NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (riglist), column, -1); /* port:4 */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Port"), renderer, "text", 4, NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (riglist), column, -1); /* speed:5 */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Speed"), renderer, "text", 5, NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (riglist), column, -1); /* CI-V:6 */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("CI-V"), renderer, "text", 6, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, render_civ, GUINT_TO_POINTER(6), NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (riglist), column, -1); /* DTR:7 */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("DTR"), renderer, "text", 7, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, render_dtr_rts, GUINT_TO_POINTER(7), NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (riglist), column, -1); /* RTS:8 */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("RTS"), renderer, "text", 8, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, render_dtr_rts, GUINT_TO_POINTER(8), NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (riglist), column, -1); } static GtkTreeModel *create_model () { GtkListStore *store; GtkTreeIter iter; GDir *dir = NULL; /* directory handle */ gchar *dirname; /* directory name */ const gchar *filename; /* file name */ gchar **vbuf; radio_conf_t conf; /* Note that we create a column for each field but will hide some field in the treeview */ store = gtk_list_store_new (9, G_TYPE_STRING, /* Name */ G_TYPE_STRING, /* Company */ G_TYPE_STRING, /* Model */ G_TYPE_INT, /* ID */ G_TYPE_STRING, /* Port */ G_TYPE_INT, /* Speed */ G_TYPE_INT, /* CI-V */ G_TYPE_INT, /* DTR */ G_TYPE_INT /* RTS */ ); /* Dummy rig is always number 1 */ gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "dummy", 1, "Hamlib", 2, "DEMO", 3, 1, 4, "/dev/null", -1); /* now add the configured radios */ dirname = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S, ".grig", NULL); dir = g_dir_open (dirname, 0, NULL); if (dir) { while ((filename = g_dir_read_name (dir))) { if (g_strrstr (filename, ".grc")) { /*buff = g_strconcat (dirname, G_DIR_SEPARATOR_S, filename, NULL); */ vbuf = g_strsplit (filename, ".grc", 2); conf.name = g_strdup (vbuf[0]); g_strfreev(vbuf); if (radio_conf_read (&conf)) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, conf.name, 1, conf.company, 2, conf.model, 3, conf.id, 4, conf.port, 5, conf.speed, 6, conf.civ, 7, conf.dtr, 8, conf.rts, -1); } /* clean up memory */ //g_free (buff); if (conf.name) g_free (conf.name); if (conf.company) g_free (conf.company); if (conf.model) g_free (conf.model); if (conf.port) g_free (conf.port); } } } g_free (dirname); g_dir_close (dir); return GTK_TREE_MODEL (store); } /** \brief Handle delete events. * \param widget The widget which received the delete event signal. * \param event Data structure describing the event. * \param data User data (NULL). * \param return Always FALSE to indicate that the app should be destroyed. * * This function handles the delete event received by the rig selector * window (eg. when the window is closed by the WM). This function simply * returns FALSE indicating that the main application window should be * destroyed by emitting the destroy signal. * */ static gint rig_selector_delete (GtkWidget *widget, GdkEvent *event, gpointer data) { /* return FALSE so that Gtk+ will emit the destroy signal */ return FALSE; } /** \brief Handle destroy signals. * \param widget The widget which received the signal. * \param data User data (NULL). * * This function is called when the rig selector window receives the * destroy signal, ie. it is destroyed. This function signals all daemons * and other threads to stop and exits the Gtk+ main loop. * */ static void rig_selector_destroy (GtkWidget *widget, gpointer data) { /* exit Gtk+ */ gtk_main_quit (); } /** \brief Handle Cancel button signals. * \param button The Cancel button * \param window Pointer to the rig selector window. * * This function is called when the user clicks on the Cancel button. * It simply destroys the rig selector window and returns control * to the main() function. */ static void cancel (GtkWidget *button, gpointer window) { if (selected != NULL) { g_free (selected); selected = NULL; } gtk_widget_destroy (GTK_WIDGET (window)); } /** \brief Handle Connect button signals. * \param button The Connect button * \param window Pointer to the rig selector window. * * This function is called when the user clicks on the Connect button. * It storest the name of the currently selected radio configuration and * simply destroys the rig selector window and whereby control is returned * to the main() function. */ static void connect (GtkWidget *button, gpointer window) { gtk_widget_destroy (GTK_WIDGET (window)); } /** \brief Handle delete button signals */ static void delete (GtkWidget *button, gpointer data) { GtkTreeSelection *sel; GtkTreeModel *model; GtkTreeIter iter; gboolean havesel = FALSE; gchar *name,*fname; model = gtk_tree_view_get_model (GTK_TREE_VIEW (riglist)); sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (riglist)); havesel = gtk_tree_selection_get_selected (sel, NULL, &iter); if (havesel) { gtk_tree_model_get (model, &iter, 0, &name, -1); fname = g_strconcat (g_get_home_dir(), G_DIR_SEPARATOR_S, ".grig", G_DIR_SEPARATOR_S, name, ".grc", NULL); g_free (name); // gtk_list_store_remove crashes no matter what... // the same code works in gpredict //gtk_list_store_remove (GTK_LIST_STORE (model), &iter); gtk_list_store_clear (GTK_LIST_STORE (model)); /* delete .grc file and remove entry from riglist */ if (g_remove (fname)) { grig_debug_local (RIG_DEBUG_ERR, _("%s:%s: Failed to delete %s"), __FILE__, __FUNCTION__, fname); } else { grig_debug_local (RIG_DEBUG_VERBOSE, _("%s:%s: Removed %s"), __FILE__, __FUNCTION__, fname); } g_free (fname); } } static void add (GtkWidget *button, gpointer data) { g_print ("TO BE IMPLEMENTED\n"); } static void edit (GtkWidget *button, gpointer data) { g_print ("TO BE IMPLEMENTED\n"); } static void selection_changed (GtkTreeSelection *sel, gpointer data) { GtkWidget *window = GTK_WIDGET(data); GtkWidget *conbut,*editbut,*delbut; GtkTreeModel *model; GtkTreeIter iter; guint id; gboolean havesel = FALSE; /* get tree view & co */ gtk_tree_selection_get_tree_view (sel); havesel = gtk_tree_selection_get_selected (sel, &model, &iter); gtk_tree_model_get (model, &iter, 3, &id, -1); /* set selection */ if (selected) { g_free (selected); selected = NULL; } if (havesel) { gtk_tree_model_get (model, &iter, 0, &selected, -1); g_print ("SEELCTED: %s\n", selected); } /* get buttons */ delbut = GTK_WIDGET (g_object_get_data (G_OBJECT(window), "delbut")); editbut = GTK_WIDGET (g_object_get_data (G_OBJECT(window), "editbut")); conbut = GTK_WIDGET (g_object_get_data (G_OBJECT(window), "conbut")); /* Dummy can't be deleted or edited */ if (id == 1) { /* disable delete and edit buttons */ gtk_widget_set_sensitive (delbut, FALSE); gtk_widget_set_sensitive (editbut, FALSE); /* enable connect button */ gtk_widget_set_sensitive (conbut, TRUE); } else if (havesel) { /* enable all three buttons */ gtk_widget_set_sensitive (conbut, TRUE); gtk_widget_set_sensitive (delbut, TRUE); gtk_widget_set_sensitive (editbut, TRUE); } else { /* disable all three buttons */ gtk_widget_set_sensitive (conbut, FALSE); gtk_widget_set_sensitive (delbut, FALSE); gtk_widget_set_sensitive (editbut, FALSE); } } /** \brief Render CIV address. */ static void render_civ (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer column) { guint number; gchar *buff; guint coli = GPOINTER_TO_UINT (column); gtk_tree_model_get (model, iter, coli, &number, -1); if (number > 0) buff = g_strdup_printf ("0x%X", number); else buff = g_strdup_printf (" "); g_object_set (renderer, "text", buff, NULL); g_free (buff); } /** \brief Render DTR or RTS columns address. */ static void render_dtr_rts (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer column) { guint number; guint coli = GPOINTER_TO_UINT (column); gtk_tree_model_get (model, iter, coli, &number, -1); switch (number) { case LINE_ON: g_object_set (renderer, "text", "ON", NULL); break; case LINE_PTT: g_object_set (renderer, "text", "PTT", NULL); break; case LINE_CW: g_object_set (renderer, "text", "CW", NULL); break; default: g_object_set (renderer, "text", "OFF", NULL); break; } } grig-GRIG-0_9_0/src/rig-selector.h000066400000000000000000000023241435534312400167040ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_SELECTOR_H #define RIG_SELECTOR_H 1 #include gchar *rig_selector_execute (void); #endif grig-GRIG-0_9_0/src/rig-state.c000066400000000000000000000613101435534312400161770ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ /** \file rig-state.c * \brief Load and save rig state * * The rig state is a snapshot of the current settings in the rig-data * object. The rig state is saved to a file using the glib key/value * infrastructure. * */ #include #include #include #ifdef HAVE_CONFIG_H # include #endif #include "rig-utils.h" #include "grig-debug.h" #include "rig-daemon.h" #include "rig-data.h" #include "rig-state.h" extern GtkWidget *grigapp; #define GEN_GRP "GENERAL" #define DEV_GRP "DEVICE" #define FREQ_GRP "FREQUENCY" #define LEVEL_GRP "LEVELS" #define MODE_GRP "MODE" static gint rig_state_write_data (GKeyFile *cfgdata, const gchar *file); static gboolean ask_cfm (gint state_id, gint rig_id); static gboolean read_and_check_level (GKeyFile *cfgdata, const gchar *group, const gchar *key, gfloat *param, gboolean *newflag); static gboolean read_and_check_double (GKeyFile *cfgdata, const gchar *group, const gchar *key, gdouble *param, gboolean *newflag); static gboolean read_and_check_int (GKeyFile *cfgdata, const gchar *group, const gchar *key, gint *param, gboolean *newflag); static gboolean read_and_check_bool (GKeyFile *cfgdata, const gchar *group, const gchar *key, gboolean *param, gboolean *newflag); /** \brief Get connection info about radio * * This fiunction will return connection details found in the * specified rig state file. This can be used to re-establish * the link to a radio when the rig state file is loaded via * the command line. When the rig state is read via the menu * bar, grig is already running a connection and this can not * be changed. In those cases this function has no use. */ /* gint */ /* rig_state_get_link_info (const gchar *file, */ /* rig_model_t *model, */ /* gchar *model, */ /* gchar *mfg, */ /* gchar *port, */ /* int *ser_rate) */ /* { */ /* } */ /** \brief Load the rig state * * This function first asks the user for a file name via the * GtkFileChooser dialog, whereafter it calls rig_state_load * with the specified file name. * An error message is generated if the file does not exist or * the contents could not be read. */ void rig_state_load_cb (GtkWidget *widget, gpointer data) { GtkWidget *dialog; /* file chooser dialog */ GtkFileFilter *filter1; /* *.rig filter used in the dialog */ GtkFileFilter *filter2; /* filter used in the dialog for all files */ gchar *filename; /* file name selected by user */ GtkWidget *msgdiag; /* message dialog */ gint status; /* error status */ /* create file chooser dialog */ dialog = gtk_file_chooser_dialog_new (_("Load Rig State"), GTK_WINDOW (grigapp), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); /* Add filters for .rig files and all files */ filter1 = gtk_file_filter_new (); gtk_file_filter_set_name (filter1, _("Rig state files (*.rig)")); gtk_file_filter_add_pattern (filter1, "*.rig"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter1); filter2 = gtk_file_filter_new (); gtk_file_filter_set_name (filter2, _("All files")); gtk_file_filter_add_pattern (filter2, "*"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter2); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); /* check that file exists and it is a regular file */ if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) { status = rig_state_load (filename); if (status) { msgdiag = gtk_message_dialog_new (GTK_WINDOW (grigapp), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("There was an error reading "\ "the settings from:\n\n "\ "%s\n\n "\ "Examine the log messages "\ "for further info."), filename); gtk_dialog_run (GTK_DIALOG (msgdiag)); gtk_widget_destroy (msgdiag); } } else { /* tell user to select an existing file */ msgdiag = gtk_message_dialog_new (GTK_WINDOW (grigapp), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("The selected file:\n "\ "%s\n "\ "does not exist or is not "\ "a regular file."), filename); gtk_dialog_run (GTK_DIALOG (msgdiag)); gtk_widget_destroy (msgdiag); } g_free (filename); } gtk_file_chooser_remove_filter (GTK_FILE_CHOOSER (dialog), filter1); gtk_file_chooser_remove_filter (GTK_FILE_CHOOSER (dialog), filter2); gtk_widget_destroy (dialog); } /** \brief Save the rig state * * This function first asks the user for a file name via the * GtkFileChooser dialog, whereafter it calls rig_state_save * with the specified file name. * If the file already exists it will ask the user whether to * replace the contents or not. If not, the code returns to the * file chooser. * * The complete algorithm: * * while (!done) { * if (run_file_chooser == YES) { * get_filename * if (file_exists) { * create_cfm_dialog * if (do_overwrite) { * save_file * if (error) * show_error_message * done = TRUE * } else { * done = FALSE * } * destroy_cfm_dialog * } else { * save_file * if (error) * show_error_message * done = TRUE * } * } else { * done = TRUE * } * } */ void rig_state_save_cb (GtkWidget *widget, gpointer data) { GtkWidget *dialog; /* file chooser dialog */ GtkFileFilter *filter1; /* *.rig filter used in the dialog */ GtkFileFilter *filter2; /* filter used in the dialog for all files */ gchar *filename; /* file name selected by user */ GtkWidget *msgdiag; /* message dialog */ gint status; /* error status */ gboolean done = FALSE; /* flag to indicate whether we are done or not */ GtkWidget *cfmdiag; /* configrmation dialog */ /* create file chooser dialog */ dialog = gtk_file_chooser_dialog_new (_("Save Rig State"), GTK_WINDOW (grigapp), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); /* Add filters for .rig files and all files */ filter1 = gtk_file_filter_new (); gtk_file_filter_set_name (filter1, _("Rig state files (*.rig)")); gtk_file_filter_add_pattern (filter1, "*.rig"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter1); filter2 = gtk_file_filter_new (); gtk_file_filter_set_name (filter2, _("All files")); gtk_file_filter_add_pattern (filter2, "*"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter2); /* loop until we save the settings or the user selects cancel in the file chooser dialog */ while (!done) { if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { /* user selected OK */ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); rig_utils_chk_ext (&filename, ".rig"); grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: User selected new file:\n%s"), __FUNCTION__, filename); /* if file exists warn user and ask for confirmation */ if (g_file_test (filename, G_FILE_TEST_EXISTS)) { /* create warning/confirmation dialog */ cfmdiag = gtk_message_dialog_new (GTK_WINDOW (dialog), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Selected file already exists.\n"\ "Overwrite file?")); /* if user says YES, save file and bail out */ if (gtk_dialog_run (GTK_DIALOG (cfmdiag)) == GTK_RESPONSE_YES) { status = rig_state_save (filename); if (status) { /* save function returned non-zero value => show error dialog */ msgdiag = gtk_message_dialog_new (GTK_WINDOW (grigapp), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("There was an error saving "\ "the settings to:\n\n "\ "%s\n\n "\ "Examine the log messages "\ "for further info."), filename); gtk_dialog_run (GTK_DIALOG (msgdiag)); gtk_widget_destroy (msgdiag); } done = TRUE; } else { /* else bail out and re-run file chooser */ done = FALSE; } gtk_widget_destroy (cfmdiag); } else { /* otherwise just save the file and we are done */ status = rig_state_save (filename); if (status) { /* save function returned non-zero value => show error dialog */ msgdiag = gtk_message_dialog_new (GTK_WINDOW (grigapp), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("There was an error saving "\ "the settings to:\n\n "\ "%s\n\n "\ "Examine the log messages "\ "for further info."), filename); gtk_dialog_run (GTK_DIALOG (msgdiag)); gtk_widget_destroy (msgdiag); } /* set flag so that process can terminate */ done = TRUE; } g_free (filename); } else { /* user pressed CANCEL; terminate process */ done = TRUE; } } gtk_file_chooser_remove_filter (GTK_FILE_CHOOSER (dialog), filter1); gtk_file_chooser_remove_filter (GTK_FILE_CHOOSER (dialog), filter2); gtk_widget_destroy (dialog); } /** \brief Load rig state from file * \param file The file to read the rig state from * * The file parameter may not be NULL. If you need to open * the file selector use the callback functions instead. */ gint rig_state_load (const gchar *file) { GKeyFile *cfgdata; /* the data */ GError *error = NULL; /* error buffer */ grig_settings_t *state; /* pointer to current rig state */ grig_cmd_avail_t *newval; /* pointer to new flag struct */ gint vali; gboolean valb; gboolean errorflag = 0; gboolean loadstate = 1; /* flag to indicate whether to load state */ cfgdata = g_key_file_new (); g_key_file_load_from_file (cfgdata, file, G_KEY_FILE_NONE, &error); if (error != NULL) { /* send an error message */ grig_debug_local (RIG_DEBUG_ERR, _("%s: Error loading rig file (%s)"), __FUNCTION__, error->message); g_clear_error (&error); errorflag |= 1; } else { /* get and check rig id */ vali = g_key_file_get_integer (cfgdata, DEV_GRP, "ID", &error); if (error != NULL) { vali = 1; grig_debug_local (RIG_DEBUG_ERR, _("%s: Error reading rig id (%s)"), __FUNCTION__, error->message); g_clear_error (&error); errorflag |= 1; loadstate = FALSE; } else { /* check rig id */ if (vali != rig_daemon_get_rig_id ()) { grig_debug_local (RIG_DEBUG_WARN, _("%s: ID mismatch detected: state id is %d\n"\ "while current rig id is %d"), __FUNCTION__, vali, rig_daemon_get_rig_id ()); /* ask user whether to apply settings */ loadstate = ask_cfm (vali, rig_daemon_get_rig_id ()); } else { loadstate = TRUE; } } if (loadstate) { grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Applying settings (model=%d)"), __FUNCTION__, vali); /* disable daemon */ rig_daemon_set_suspend (TRUE); /* link state to rig-data.set */ state = rig_data_get_set_addr (); /* link newval to rig-data.new */ newval = rig_data_get_new_addr (); /* read frequencies, vfo, rit, xit, split and lock */ errorflag |= read_and_check_double (cfgdata, FREQ_GRP, "FREQ1", &(state->freq1), &(newval->freq1)); errorflag |= read_and_check_double (cfgdata, FREQ_GRP, "FREQ2", &(state->freq2), &(newval->freq2)); /* RIT and XIT need to be converted */ errorflag |= read_and_check_int (cfgdata, FREQ_GRP, "RIT", &vali, &(newval->rit)); state->rit = (shortfreq_t) vali; errorflag |= read_and_check_int (cfgdata, FREQ_GRP, "XIT", &vali, &(newval->xit)); state->xit = (shortfreq_t) vali; errorflag |= read_and_check_int (cfgdata, FREQ_GRP, "VFO", (int *)&(state->vfo), &(newval->vfo)); errorflag |= read_and_check_bool (cfgdata, FREQ_GRP, "SPLIT", &valb, &(newval->split)); state->split = (split_t) valb; errorflag |= read_and_check_bool (cfgdata, FREQ_GRP, "LOCK", &(state->lock), &(newval->lock)); /* mode and filter */ errorflag |= read_and_check_int (cfgdata, MODE_GRP, "MODE", &vali, &(newval->mode)); state->mode = (rmode_t) vali; errorflag |= read_and_check_int (cfgdata, MODE_GRP, "FILTER", &vali, &(newval->pbw)); state->pbw = (rig_data_pbw_t) vali; /* ATT/PREAMP/AGC */ errorflag |= read_and_check_int (cfgdata, LEVEL_GRP, "ATT", &(state->att), &(newval->att)); errorflag |= read_and_check_int (cfgdata, LEVEL_GRP, "PREAMP", &(state->preamp), &(newval->preamp)); errorflag |= read_and_check_int (cfgdata, LEVEL_GRP, "AGC", &(state->agc), &(newval->agc)); /* TX levels */ errorflag |= read_and_check_level (cfgdata, LEVEL_GRP, "POWER", &(state->power), &(newval->power)); /* enable daemon */ rig_daemon_set_suspend (FALSE); } } if (cfgdata != NULL) { g_key_file_free (cfgdata); } return errorflag; } /** \brief Save rig state to file * \param file The file to save the rig state to * * The file parameter may not be NULL. If you need to open * the file selector use the callback functions instead. * existing file will be replaced without any warning! */ gint rig_state_save (const gchar *file) { GKeyFile *cfgdata; /* the data */ grig_settings_t *state; /* pointer to current rig state */ gboolean errorflag = 0; gint vali; gchar *buff; /* disable daemon */ rig_daemon_set_suspend (TRUE); /* link state to rig-data.get */ state = rig_data_get_get_addr (); /* create data */ cfgdata = g_key_file_new (); /* save grig version */ g_key_file_set_string (cfgdata, GEN_GRP, "VERSION", VERSION); /* save rigid */ vali = rig_daemon_get_rig_id (); if (vali < 1) { /* got to be a bug */ grig_debug_local (RIG_DEBUG_BUG, _("%s: RIG ID is invalid (%d)"), __FUNCTION__, vali); /* try recovery by using dummy id */ vali = 1; } g_key_file_set_integer (cfgdata, DEV_GRP, "ID", vali); /* save port */ /* if serial, save serial speed, too */ /* conf parameters */ /* frequencies, incl. vfo, rit, xit, split and lock */ buff = g_strdup_printf ("%.0f", state->freq1); g_key_file_set_string (cfgdata, FREQ_GRP, "FREQ1", buff); g_free (buff); buff = g_strdup_printf ("%.0f", state->freq2); g_key_file_set_string (cfgdata, FREQ_GRP, "FREQ2", buff); g_free (buff); g_key_file_set_integer (cfgdata, FREQ_GRP, "RIT", state->rit); g_key_file_set_integer (cfgdata, FREQ_GRP, "XIT", state->xit); g_key_file_set_integer (cfgdata, FREQ_GRP, "VFO", state->vfo); g_key_file_set_boolean (cfgdata, FREQ_GRP, "SPLIT", state->split); g_key_file_set_boolean (cfgdata, FREQ_GRP, "LOCK", state->lock); /* Mode and filter */ g_key_file_set_integer (cfgdata, MODE_GRP, "MODE", state->mode); g_key_file_set_integer (cfgdata, MODE_GRP, "FILTER", state->pbw); /* ATT/PREAMP/AGC */ g_key_file_set_integer (cfgdata, LEVEL_GRP, "ATT", state->att); g_key_file_set_integer (cfgdata, LEVEL_GRP, "PREAMP", state->preamp); g_key_file_set_integer (cfgdata, LEVEL_GRP, "AGC", state->agc); /* TX levels */ g_key_file_set_integer (cfgdata, LEVEL_GRP, "POWER", (gint)(state->power*100)); /* write data to file */ errorflag |= rig_state_write_data (cfgdata, file); g_key_file_free (cfgdata); /* enable daemon */ rig_daemon_set_suspend (FALSE); return errorflag; } /** \brief Write rig state to file. * * This function takes the rig state in the form of a GKeyFile * and writes it to the specified file. */ static gint rig_state_write_data (GKeyFile *cfgdata, const gchar *file) { GError *error = NULL; /* error buffer */ gchar *cfgstr; /* data in string form */ GIOChannel *cfgfile; /* data file */ gsize length; /* length of cfg data */ gsize written; /* bytes written to file */ gboolean errorflag = 0; /* save the data */ cfgstr = g_key_file_to_data (cfgdata, &length, &error); if (error != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Error building state data (%s)"), __FUNCTION__, error->message); g_clear_error (&error); errorflag |= 1; } else { cfgfile = g_io_channel_new_file (file, "w", &error); if (error != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Could not create data file (%s)\n%s"), __FUNCTION__, error->message, file); g_clear_error (&error); errorflag |= 1; } else { g_io_channel_write_chars (cfgfile, cfgstr, length, &written, &error); g_io_channel_shutdown (cfgfile, TRUE, NULL); g_io_channel_unref (cfgfile); if (error != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Error writing config data (%s)"), __FUNCTION__, error->message); g_clear_error (&error); errorflag |= 1; } else if (length != written) { grig_debug_local (RIG_DEBUG_ERR, _("%s: Wrote only %d instead of %d chars"), __FUNCTION__, written, length); errorflag |= 1; } else { grig_debug_local (RIG_DEBUG_VERBOSE, _("%s: Rig state saved successfully to\n%s."), __FUNCTION__, file); errorflag |= 0; } } g_free (cfgstr); } return errorflag; } /** \brief Ask user whether to apply state if current rig * id is different from rig id in rig file. * \return TRUE if the user says YES, FALSE otherwise. */ static gboolean ask_cfm (gint state_id, gint rig_id) { GtkWidget *dialog; gint response; dialog = gtk_message_dialog_new (GTK_WINDOW (grigapp), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Selected rig state has been saved for model %d,\n"\ "while the current rig model is %d.\n"\ "Do you want to try to apply settings?"), state_id, rig_id); response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (response == GTK_RESPONSE_YES) return TRUE; return FALSE; } /** \brief Read and check parameter of type gfloat. * \param cfgdata The GKeyFile data structure to read from. * \param group The name of the configuration group. * \param key The name of the configuiration key. * \param param Pointer to the parameter where the value should be stored. * \param newflag Pointer to the new flag of the parameter. * \return TRUE if an error has occurred during read, FALSE otherwise. * * \note Float type values are usually levels and constrained to [0.0;1.0] * freq_t is double :P */ static gboolean read_and_check_level (GKeyFile *cfgdata, const gchar *group, const gchar *key, gfloat *param, gboolean *newflag) { GError *error = NULL; gint lev; gboolean errflag = FALSE; lev = g_key_file_get_integer (cfgdata, group, key, &error); /* IO error */ if (error != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s:%d: Could nor read param %s::%s\n(%s)"), __FILE__, __LINE__, group, key, error->message); g_clear_error (&error); errflag = TRUE; *newflag = FALSE; } else { *param = ((gfloat) lev) / 100.0; if ((*param >= 0.0) && (*param <= 1.0)) { *newflag = TRUE; } else { /* possible range check error */ grig_debug_local (RIG_DEBUG_ERR, _("%s:%d:\nFLOAT value out of range: %.2f\n"\ "Floats expected to be between 0.0 and 1.0"), __FILE__, __LINE__, *param); errflag = TRUE; } } return errflag; } /** \brief Read and check parameter of type gdouble. * \param cfgdata The GKeyFile data structure to read from. * \param group The name of the configuration group. * \param key The name of the configuiration key. * \param param Pointer to the parameter where the value should be stored. * \param newflag Pointer to the new flag of the parameter. * \return TRUE if an error has occurred during read, FALSE otherwise. */ static gboolean read_and_check_double (GKeyFile *cfgdata, const gchar *group, const gchar *key, gdouble *param, gboolean *newflag) { GError *error = NULL; gchar *buff; gboolean errflag = FALSE; buff = g_key_file_get_string (cfgdata, group, key, &error); if (error != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s:%d: Could nor read param %s::%s\n(%s)"), __FILE__, __LINE__, group, key, error->message); g_clear_error (&error); errflag = TRUE; *newflag = FALSE; } else { *param = g_ascii_strtod (buff, NULL); *newflag = TRUE; g_free (buff); } return errflag; } /** \brief Read and check parameter of type integer. * \param cfgdata The GKeyFile data structure to read from. * \param group The name of the configuration group. * \param key The name of the configuiration key. * \param param Pointer to the parameter where the value should be stored. * \param newflag Pointer to the new flag of the parameter. * \return TRUE if an error has occurred during read, FALSE otherwise. */ static gboolean read_and_check_int (GKeyFile *cfgdata, const gchar *group, const gchar *key, gint *param, gboolean *newflag) { GError *error = NULL; gboolean errflag = FALSE; gint val; val = g_key_file_get_integer (cfgdata, group, key, &error); if (error != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s:%d: Could nor read param %s::%s\n(%s)"), __FILE__, __LINE__, group, key, error->message); g_clear_error (&error); errflag = TRUE; *newflag = FALSE; } else { *param = val; *newflag = TRUE; } return errflag; } /** \brief Read and check parameter of type boolean. * \param cfgdata The GKeyFile data structure to read from. * \param group The name of the configuration group. * \param key The name of the configuiration key. * \param param Pointer to the parameter where the value should be stored. * \param newflag Pointer to the new flag of the parameter. * \return TRUE if an error has occurred during read, FALSE otherwise. */ static gboolean read_and_check_bool (GKeyFile *cfgdata, const gchar *group, const gchar *key, gboolean *param, gboolean *newflag) { GError *error = NULL; gboolean errflag = FALSE; gboolean val; val = g_key_file_get_boolean (cfgdata, group, key, &error); if (error != NULL) { grig_debug_local (RIG_DEBUG_ERR, _("%s:%d: Could nor read param %s::%s\n(%s)"), __FILE__, __LINE__, group, key, error->message); g_clear_error (&error); errflag = TRUE; *newflag = FALSE; } else { *param = val; *newflag = TRUE; } return errflag; } grig-GRIG-0_9_0/src/rig-state.h000066400000000000000000000032111435534312400162000ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_STATE_H #define RIG_STATE_H 1 #include /* general load and save */ gint rig_state_load (const gchar *file); gint rig_state_save (const gchar *file); /* gint rig_state_get_link_info (const gchar *file, */ /* rig_model_t *model, */ /* gchar *model, */ /* gchar *mfg, */ /* gchar *port, */ /* int *ser_rate); */ /* callback to be used from menubar */ void rig_state_load_cb (GtkWidget *widget, gpointer data); void rig_state_save_cb (GtkWidget *widget, gpointer data); #endif grig-GRIG-0_9_0/src/rig-utils.c000066400000000000000000000065511435534312400162250ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #include #include "rig-utils.h" /** \brief Convert hamlib mode to index. * \param mode The hamlib mode (1,2,4,8,..) * \return The converted index value. * * This function converts the hamlib mode (1,2,4,8,...) to an array * index (0,1,2,3,...). It is done using the formula * * index = rint[log(mode)/log(2)] * * \note Hamlib uses 0 for RIG_MODE_NONE which clearly has to be treated as * illegal input. In case of zero input, however, this function will * simply return 0 as if the input was 1. The same protection is done * for negative input values. * * \bug It would probably be much better if we used rmode_t for input param type. */ guint rig_utils_mode_to_index (gint mode) { guint index; /* if input is numerically sane, compute the index */ if (mode > 0) { // index = (log (mode) / LOG2); index = 0; // g_print ("%d", mode); while (mode > 1) { mode = mode >> 1; index++; } // g_print (" => %d\n", index); } /* otherwise just return 0 */ else { index = 0; } return index; } /** \brief Convert array index to hamlib mode. * \param index An integer to convert. * \return The hamlib mode. * * This function converts an array index (0,1,2,3,...) to hamlib mode type * (1,2,4,8,...). The conversion is done using the formula: * * mode = 1 << index * * and index has to be in the range [0..12] * * \bug 12 is the last mode (RIG_MODE_PKTFM) in hamlib 1.2; this may have to be * updated if the hamlib API changes! * * \bug It would probably be better if we returned rmode_t type instead of guint. */ guint rig_utils_index_to_mode (gint index) { guint mode; /* check numerical sanity of input */ if ((index >= 0) && (index <= 15)) { mode = 1 << index; } else { mode = 1; } return mode; } /** \brief Check filename for extension. * \param filename The file name to check * \param ext The extension to check for * * This function check filename to see, whether it has extension ext. * If not, it appends ext to filename. */ void rig_utils_chk_ext (gchar **filename, const gchar *ext) { gchar *buff; if (!g_str_has_suffix (*filename, ext)) { buff = g_strconcat (*filename, ext, NULL); g_free (*filename); *filename = g_strdup (buff); g_free (buff); } } grig-GRIG-0_9_0/src/rig-utils.h000066400000000000000000000025461435534312400162320ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Grig: Gtk+ user interface for the Hamradio Control Libraries. Copyright (C) 2001-2007 Alexandru Csete. Authors: Alexandru Csete Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/groundstation/ More details can be found at the project home page: http://groundstation.sourceforge.net/ 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, visit http://www.fsf.org/ */ #ifndef RIG_UTILS_H #define RIG_UTILS_H 1 /** \brief Logarithm of 2 */ #define LOG2 0.301029996 guint rig_utils_mode_to_index (gint mode); guint rig_utils_index_to_mode (gint index); void rig_utils_chk_ext (gchar **filename, const gchar *ext); #endif grig-GRIG-0_9_0/stamp-h.in000066400000000000000000000000121435534312400152360ustar00rootroot00000000000000timestamp grig-GRIG-0_9_0/win32/000077500000000000000000000000001435534312400143065ustar00rootroot00000000000000grig-GRIG-0_9_0/win32/Makefile000066400000000000000000000040371435534312400157520ustar00rootroot00000000000000# Makefile for cross-compiling grig for win32 on Linux, # using mingw compiler include config.mk # directories topsrc = .. grigdir = $(topsrc)/src # tools CC = $(MGW_PREFIX)gcc -Wall -O2 -mms-bitfields -DWIN32 AS = $(MGW_PREFIX)as DLLWRAP = $(MGW_PREFIX)dllwrap DLLWRAP_FLAGS = --as=$(AS) --export-all --driver-name $(CC) -s RC = $(MGW_PREFIX)windres RCFLAGS = --define __WIN32__ --define __WIN95__ --define MSRC \ --define __GNUWIN32__ # libraries GTKLIBS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs gtk+-win32-2.0) GLIBLIB := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs glib-2.0 gthread-2.0) GUI_LIBS = $(GTKLIBS) $(GLIBLIB) LIBS = -lm # flags/defines CFLAGS = -DVERSION=\"0.8.0\" -DHAVE_GETOPT_H -I. -I$(grigdir) -I$(CROSSDIR)/include GTK_CFLAGS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags gtk+-win32-2.0) #GTK_CFLAGS := `pkg-config --cflags gtk+-win32-2.0` # source paths vpath %.c $(grigdir) vpath %.rc $(topsrc)/win32 #### End of sys conf section GRIGSRC = \ compat.c \ grig-about.c \ grig-config.c \ grig-debug.c \ grig-gtk-workarounds.c \ grig-menubar.c \ key-press-handler.c \ main.c \ rig-anomaly.c \ rig-daemon.c \ rig-daemon-check.c \ rig-data.c \ rig-gui-buttons.c \ rig-gui.c \ rig-gui-ctrl2.c \ rig-gui-info.c \ rig-gui-lcd.c \ rig-gui-levels.c \ rig-gui-message-window.c \ rig-gui-rx.c \ rig-gui-smeter.c \ rig-gui-smeter-conv.c \ rig-gui-tx.c \ rig-gui-vfo.c \ rig-selector.c \ rig-state.c \ rig-utils.c GRIGOBJ = $(GRIGSRC:.c=.o) OBJS = $(GRIGOBJ) %.o: %.c $(CC) -c $(CFLAGS) $(GTK_CFLAGS) $< $(CC) -MM $(CFLAGS) $(GTK_CFLAGS) $< > $*.d # targets begin all: grig.exe grig.exe: $(GRIGOBJ) grig_res.o $(CROSSDIR)/lib/libhamlib-2.lib $(CC) -mconsole -o $@ $^ $(GUI_LIBS) $(LIBS) -lmingwex -s grig_res.o: grig.rc $(RC) $(RCFLAGS) $< $@ clean: rm -f *.o *.d *.def *.exe grig-GRIG-0_9_0/win32/config.mk000066400000000000000000000007241435534312400161070ustar00rootroot00000000000000# Configuration variables governing the build of grig for win32 # directory containing the cross tools CROSSDIR = /grga/mingw32/buildenv # prefix for mingw tools (e.g. i586-mingw32msvc-gcc) MGW_PREFIX = i586-mingw32msvc- # mingw include dir MGW_INC = $(CROSSDIR)/include # libxml2 includes: adjust to match your system XML2_INC = $(MGW_INC)/libxml2 # msgfmt command for producing win32 messages file # pkgconfig path PKG_CONFIG_PATH = $(CROSSDIR)/lib/pkgconfig grig-GRIG-0_9_0/win32/grig.rc000066400000000000000000000001261435534312400155630ustar00rootroot00000000000000#include /* icon for the program itself */ icon_0 ICON "icons/grig.ico" grig-GRIG-0_9_0/win32/icons/000077500000000000000000000000001435534312400154215ustar00rootroot00000000000000grig-GRIG-0_9_0/win32/icons/grig.ico000066400000000000000000000042761435534312400170560ustar00rootroot00000000000000 ( @(% ?:3RLC\VMe`Qe^Wpb^mg_etbvpjQ[^_~washʄ