├── aetherx6100ctrl ├── include │ ├── aether_x6100 │ │ ├── CMakeLists.txt │ │ └── control │ │ │ ├── CMakeLists.txt │ │ │ ├── gpio.h │ │ │ ├── flow.h │ │ │ └── control.h │ └── CMakeLists.txt ├── src │ ├── CMakeLists.txt │ ├── gpio.c │ ├── flow.c │ └── control.c └── CMakeLists.txt ├── .clangd ├── server ├── CMakeLists.txt ├── set_vfo.sh ├── x6100_server.h ├── x6100_server_rpc.cpp └── x6100_server.cpp ├── test ├── CMakeLists.txt ├── test_ptt.c ├── test_flow.c ├── test_vfo.c └── test_atu.c ├── cmake ├── default_visibility.cmake ├── compiler_flags │ ├── cxx_standard.cmake │ ├── ipo_support.cmake │ ├── fast_math.cmake │ └── cxx_iso_flags.cmake ├── install_structure.cmake ├── dependencies │ └── openmp.cmake ├── output_structure.cmake └── developer_mode.cmake ├── .vscode └── settings.json ├── .cmake-format.json ├── README.md ├── .clang-tidy ├── CMakeLists.txt ├── .clang-format ├── LICENSE └── .gitignore /aetherx6100ctrl/include/aether_x6100/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(control) 2 | -------------------------------------------------------------------------------- /.clangd: -------------------------------------------------------------------------------- 1 | InlayHints: 2 | Enabled: No 3 | ParameterNames: No 4 | DeducedTypes: No 5 | -------------------------------------------------------------------------------- /aetherx6100ctrl/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(aetherx6100ctrl PRIVATE control.c flow.c gpio.c) 2 | -------------------------------------------------------------------------------- /server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(NOT AETHERX6100CTRL_BUILD_SERVER) 2 | return() 3 | endif() 4 | 5 | # Not used yet 6 | -------------------------------------------------------------------------------- /test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(NOT AETHERX6100CTRL_BUILD_TEST) 2 | return() 3 | endif() 4 | 5 | # Not used yet 6 | -------------------------------------------------------------------------------- /aetherx6100ctrl/include/aether_x6100/control/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_sources(aetherx6100ctrl PRIVATE control.h flow.h gpio.h) 2 | -------------------------------------------------------------------------------- /aetherx6100ctrl/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | target_include_directories(aetherx6100ctrl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | add_subdirectory(aether_x6100) 4 | -------------------------------------------------------------------------------- /cmake/default_visibility.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | set(CMAKE_C_VISIBILITY_PRESET "hidden") 4 | set(CMAKE_CXX_VISIBILITY_PRESET "hidden") 5 | set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) 6 | -------------------------------------------------------------------------------- /server/set_vfo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cmd="admin -R default --proto raw,msgpack" 4 | 5 | $cmd -c set_vfo --arglist '[ 1 ]' --argdict '{ "freq" : 7074000, "mode" : 3 }' 192.168.1.214 55555 6 | $cmd -c set_rxvol --arglist '[ 10 ]' 192.168.1.214 55555 7 | -------------------------------------------------------------------------------- /cmake/compiler_flags/cxx_standard.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | if(NOT AETHERX6100CTRL_SET_CXX_STANDARD) 4 | return() 5 | endif() 6 | 7 | set(CMAKE_CXX_STANDARD 17) 8 | set(CMAKE_CXX_STANDARD_REQUIRED TRUE) 9 | set(CMAKE_CXX_EXTENSIONS OFF) 10 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "CMakeLists.txt": "cmake", 4 | "*.cmake": "cmake", 5 | "*.cmake.in": "cmake", 6 | ".clangd": "yaml", 7 | ".clang-tidy": "yaml", 8 | ".clazy": "yaml" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /cmake/install_structure.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | if(NOT WIN32 AND PROJECT_IS_TOP_LEVEL) 4 | set(CMAKE_INSTALL_PREFIX "/opt/com.aether-radio/${PROJECT_NAME}") 5 | set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) 6 | endif() 7 | 8 | set(AETHERX6100CTRL_INSTALL_PLUGINDIR ${CMAKE_INSTALL_BINDIR}/plugins) 9 | -------------------------------------------------------------------------------- /cmake/compiler_flags/ipo_support.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | if(NOT AETHERX6100CTRL_USE_LTO) 4 | return() 5 | endif() 6 | 7 | check_ipo_supported(RESULT IPO_SUPPORTED OUTPUT LTO_ERROR) 8 | if(IPO_SUPPORTED) 9 | message(STATUS "IPO / LTO enabled") 10 | set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) 11 | else() 12 | message(STATUS "IPO / LTO not supported: ${LTO_ERROR}") 13 | endif() 14 | -------------------------------------------------------------------------------- /cmake/compiler_flags/fast_math.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | if(NOT AETHERX6100CTRL_USE_FAST_MATH) 4 | return() 5 | endif() 6 | 7 | if(MSVC) 8 | set(FASTMATH_FLAG "/fp:fast") 9 | else() 10 | set(FASTMATH_FLAG "-ffast-math") 11 | endif() 12 | 13 | check_cxx_compiler_flag(${FASTMATH_FLAG} AETHERX6100CTRL_HAS_FAST_MATH) 14 | 15 | if(AETHERX6100CTRL_HAS_FAST_MATH) 16 | add_compile_options(${FASTMATH_FLAG}) 17 | endif() 18 | -------------------------------------------------------------------------------- /cmake/compiler_flags/cxx_iso_flags.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | if(NOT AETHERX6100CTRL_USE_ISO_FLAGS) 4 | return() 5 | endif() 6 | 7 | set(ISO_FLAGS "/EHsc" "/volatile:iso" "/Zc:preprocessor" "/Zc:throwingNew" "/Zc:externConstexpr") 8 | 9 | foreach(ISO_FLAG ${ISO_FLAGS}) 10 | check_cxx_compiler_flag(${ISO_FLAG} HAS_CXX_${ISO_FLAG}) 11 | if(HAS_CXX_${ISO_FLAG}) 12 | add_compile_options($<$:${ISO_FLAG}>) 13 | endif() 14 | endforeach() 15 | -------------------------------------------------------------------------------- /.cmake-format.json: -------------------------------------------------------------------------------- 1 | { 2 | "_help_format": "Options affecting formatting.", 3 | "format": { 4 | "_help_line_width": ["How wide to allow formatted cmake files"], 5 | "line_width": 100, 6 | "_help_tab_size": ["How many spaces to tab for indent"], 7 | "tab_size": 2 8 | }, 9 | "_help_markup": "Options affecting comment reflow and formatting.", 10 | "markup": { 11 | "_help_enable_markup": ["enable comment markup parsing and reflow"], 12 | "enable_markup": false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/test_ptt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg a.k.a. R1CBU 7 | * Copyright (c) 2022 Rui Oliveira a.k.a. CT7ALW 8 | */ 9 | 10 | #include 11 | 12 | #include "x6100_control.h" 13 | 14 | int main() { 15 | if (!x6100_control_init()) 16 | return 1; 17 | 18 | x6100_control_cmd(x6100_sple_atue_trx, x6100_iptt); 19 | sleep(1); 20 | x6100_control_cmd(x6100_sple_atue_trx, 0); 21 | } 22 | -------------------------------------------------------------------------------- /cmake/dependencies/openmp.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | set(OPENMP_MSVC_EXPERIMENTAL_FLAG "/openmp:experimental") 4 | if(MSVC) 5 | check_cxx_compiler_flag(${OPENMP_MSVC_EXPERIMENTAL_FLAG} HAS_OPENMP_EXPERIMENTAL) 6 | if(HAS_OPENMP_EXPERIMENTAL) 7 | set(OpenMP_CXX_FLAGS 8 | ${OPENMP_MSVC_EXPERIMENTAL_FLAG} 9 | CACHE STRING "OpenMP CXX flags" FORCE) 10 | set(OpenMP_CXX_LIB_NAMES 11 | "" 12 | CACHE STRING "OpenMP Lib names" FORCE) 13 | endif() 14 | endif() 15 | 16 | find_package(OpenMP) 17 | -------------------------------------------------------------------------------- /aetherx6100ctrl/include/aether_x6100/control/gpio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg aka R1CBU 7 | * Copyright (c) 2022 Rui Oliveira aka CT7ALW 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "aether_x6100/control/api.h" 13 | 14 | #include 15 | #include 16 | 17 | extern int x6100_pin_wifi; 18 | extern int x6100_pin_rf; 19 | extern int x6100_pin_light; 20 | 21 | AETHERX6100CTR_API bool x6100_gpio_init(); 22 | AETHERX6100CTR_API void x6100_gpio_set(int pin, int value); 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Aether X6100 Control 2 | 3 | A project to make an interface library between the radio's STM32 base controller 4 | and user-space applications. 5 | 6 | Now part of the [Aether X6100 project](https://github.com/ruilvo/AetherX6100). 7 | 8 | ## Credits 9 | 10 | The original project belongs to [Oleg Belousov](https://github.com/strijar). 11 | 12 | Most of the information present reverse was obtained from reverse-engineering 13 | the Xiegu X6100's front end app, called `x6100_ui_v100`. Credits go to Jet Yee, 14 | the original software developer, and the only software developer at Xiegu from 15 | what we know. 16 | -------------------------------------------------------------------------------- /cmake/output_structure.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | # Set an output structure 4 | # The `$<1:>"` are a hack. Why? Because in: 5 | # https://cmake.org/cmake/help/latest/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html 6 | # it says that "Multi-configuration generators (Visual Studio, Xcode, Ninja Multi-Config) 7 | # append a per-configuration subdirectory to the specified directory unless a generator 8 | # expression is used." and I don't want that. 9 | 10 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib$<1:>) 11 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib$<1:>) 12 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin$<1:>) 13 | 14 | set(AETHERX6100CTRL_PLUGINS_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/plugins$<1:>) 15 | -------------------------------------------------------------------------------- /test/test_flow.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg a.k.a. R1CBU 7 | * Copyright (c) 2022 Rui Oliveira a.k.a. CT7ALW 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | #include "x6100_flow.h" 14 | 15 | int main() { 16 | if (!x6100_flow_init()) 17 | return 1; 18 | 19 | while (true) { 20 | x6100_flow_t *pack = x6100_flow_read(); 21 | 22 | if (pack) 23 | { 24 | printf("tx=%d " 25 | "txpwr=%.1f swr=%.1f alc=%.1f vext=%.1f vbat=%.1f bat=%d CRC=%08X\n", 26 | pack->flag.tx, pack->tx_power * 0.1, pack->vswr * 0.1f, pack->alc_level * 0.1, 27 | pack->vext * 0.1f, pack->vbat * 0.1f, pack->batcap, pack->crc); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/test_vfo.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg a.k.a. R1CBU 7 | * Copyright (c) 2022 Rui Oliveira a.k.a. CT7ALW 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | #include "x6100_control.h" 14 | #include "x6100_gpio.h" 15 | 16 | int main() { 17 | if (!x6100_control_init()) 18 | return 1; 19 | 20 | if (!x6100_gpio_init()) 21 | return 1; 22 | 23 | x6100_control_cmd(x6100_rxvol, 20); 24 | x6100_control_cmd(x6100_vfoa_mode, x6100_mode_usb_dig); 25 | 26 | while (true) { 27 | printf("Freq 7.074 MHz\n"); 28 | x6100_control_cmd(x6100_vfoa_freq, 7074000); 29 | sleep(5); 30 | 31 | printf("Freq 10.100 MHz\n"); 32 | x6100_control_cmd(x6100_vfoa_freq, 10100000); 33 | sleep(5); 34 | 35 | printf("Freq 14.074 MHz\n"); 36 | x6100_control_cmd(x6100_vfoa_freq, 14074000); 37 | sleep(5); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /aetherx6100ctrl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(NOT UNIX) 2 | message(FATAL_ERROR "${PROJECT_NAME} is not compatible with non-UNIX systems.") 3 | endif() 4 | 5 | add_library(aetherx6100ctrl) 6 | 7 | set_target_properties(aetherx6100ctrl PROPERTIES OUTPUT_NAME "aetherx6100ctrl" # - 8 | DEFINE_SYMBOL "AETHERX6100CTR_EXPORTING") 9 | 10 | set(AETHERX6100CTR_EXPORT_HEADER_FILE "include/aether_x6100/control/api.h") 11 | 12 | generate_export_header( 13 | aetherx6100ctrl 14 | BASE_NAME 15 | "AETHERX6100CTR" 16 | EXPORT_MACRO_NAME 17 | "AETHERX6100CTR_API" 18 | EXPORT_FILE_NAME 19 | ${AETHERX6100CTR_EXPORT_HEADER_FILE}) 20 | 21 | target_include_directories(aetherx6100ctrl PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include) 22 | target_sources(aetherx6100ctrl 23 | PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${AETHERX6100CTR_EXPORT_HEADER_FILE}) 24 | 25 | add_subdirectory(include) 26 | add_subdirectory(src) 27 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | --- 2 | Checks: > 3 | *, 4 | -modernize-use-trailing-return-type, 5 | -llvmlibc-*, 6 | -altera-struct-pack-align, 7 | -altera-id-dependent-backward-branch, 8 | -altera-unroll-loops, 9 | -fuchsia-overloaded-operator, 10 | -fuchsia-default-arguments-declarations, 11 | -fuchsia-default-arguments-calls, 12 | -google-runtime-int 13 | FormatStyle: file 14 | CheckOptions: 15 | - key: readability-identifier-naming.MacroDefinitionCase 16 | value: UPPER_CASE 17 | - key: readability-identifier-naming.ClassCase 18 | value: CamelCase 19 | - key: readability-identifier-naming.FunctionCase 20 | value: camelBack 21 | - key: readability-identifier-naming.VariableCase 22 | value: lower_case 23 | - key: readability-identifier-naming.MemberCase 24 | value: lower_case 25 | - key: readability-identifier-naming.NamespaceCase 26 | value: lower_case 27 | - key: readability-identifier-naming.MemberSuffix 28 | value: "_" 29 | -------------------------------------------------------------------------------- /server/x6100_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg aka R1CBU 7 | * Copyright (c) 2022 Rui Oliveira aka CT7ALW 8 | */ 9 | 10 | #pragma once 11 | #include "wampcc/wampcc.h" 12 | 13 | extern "C" { 14 | #include "x6100_control.h" 15 | #include "x6100_gpio.h" 16 | #include "x6100_flow.h" 17 | } 18 | 19 | class x6100_server { 20 | public: 21 | x6100_server(); 22 | ~x6100_server(); 23 | 24 | std::future& shutdown() { return shutdown_future; } 25 | void flow_pack(const x6100_flow_t *pack); 26 | 27 | private: 28 | std::string realm; 29 | 30 | std::unique_ptr kernel; 31 | std::shared_ptr dealer; 32 | std::promise shutdown_pomise; 33 | std::future shutdown_future; 34 | 35 | void rpc_set_vfo(wampcc::wamp_session& caller, wampcc::call_info info); 36 | void rpc_set_rxvol(wampcc::wamp_session& caller, wampcc::call_info& info); 37 | }; 38 | -------------------------------------------------------------------------------- /aetherx6100ctrl/include/aether_x6100/control/flow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg aka R1CBU 7 | * Copyright (c) 2022 Rui Oliveira aka CT7ALW 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "aether_x6100/control/api.h" 13 | 14 | #include 15 | #include 16 | 17 | typedef struct 18 | { 19 | bool resync : 1; 20 | bool tx : 1; 21 | bool chg : 1; 22 | bool vext : 1; 23 | uint32_t : 28; 24 | } x6100_flow_flags_t; 25 | 26 | typedef struct __attribute__((__packed__)) 27 | { 28 | uint32_t magic; 29 | float samples[1024]; 30 | 31 | x6100_flow_flags_t flag; 32 | uint8_t reserved_1; 33 | uint8_t tx_power; 34 | uint8_t vswr; 35 | uint8_t alc_level; 36 | uint8_t vext; 37 | uint8_t vbat; 38 | uint8_t batcap; 39 | uint8_t reserved_2; 40 | uint32_t atu_params; 41 | uint32_t reserved_3[4]; 42 | 43 | uint32_t crc; 44 | } x6100_flow_t; 45 | 46 | /* Functions */ 47 | 48 | AETHERX6100CTR_API bool x6100_flow_init(); 49 | AETHERX6100CTR_API x6100_flow_t *x6100_flow_read(); 50 | -------------------------------------------------------------------------------- /cmake/developer_mode.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | if(NOT AETHERX6100CTRL_DEVELOPER_MODE) 4 | return() 5 | endif() 6 | 7 | if(NOT PROJECT_IS_TOP_LEVEL) 8 | message(AUTHOR_WARNING "Developer mode is intended for developers of ${PROJECT_NAME}. Ignoring.") 9 | return() 10 | endif() 11 | 12 | # Developer mode define 13 | add_compile_definitions(AETHERX6100CTRL_DEVELOPER_MODE) 14 | 15 | # Diagnostic flags 16 | if(MSVC) 17 | set(DIAGNOSTIC_FLAGS "/W4") 18 | else() 19 | set(DIAGNOSTIC_FLAGS "-Wall" "-Wextra" "-pedantic" "-Wconversion" "-Wsign-conversion") 20 | endif() 21 | 22 | foreach(DIAGNOSTIC_FLAG ${DIAGNOSTIC_FLAGS}) 23 | check_c_compiler_flag(${DIAGNOSTIC_FLAG} AETHERX6100CTRL_HAS_C_${DIAGNOSTIC_FLAG}) 24 | if(AETHERX6100CTRL_HAS_C_${DIAGNOSTIC_FLAG}) 25 | add_compile_options($<$:${DIAGNOSTIC_FLAG}>) 26 | endif() 27 | check_cxx_compiler_flag(${DIAGNOSTIC_FLAG} AETHERX6100CTRL_HAS_CXX_${DIAGNOSTIC_FLAG}) 28 | if(AETHERX6100CTRL_HAS_CXX_${DIAGNOSTIC_FLAG}) 29 | add_compile_options($<$:${DIAGNOSTIC_FLAG}>) 30 | endif() 31 | endforeach() 32 | 33 | # Export compile_commands.json 34 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON) 35 | 36 | # Copy the compilation database to the project folder to help with clangd 37 | # Only Make and Ninja (non-multi) are supported to export a compilation 38 | # database. 39 | if((${CMAKE_GENERATOR} MATCHES "Make") OR (${CMAKE_GENERATOR} MATCHES "Ninja$")) 40 | add_custom_target( 41 | "aetherx6100ctrl-ccc" ALL 42 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/compile_commands.json 43 | ${CMAKE_SOURCE_DIR} 44 | DEPENDS ${CMAKE_BINARY_DIR}/compile_commands.json 45 | VERBATIM) 46 | endif() 47 | 48 | # Testing 49 | include(CTest) 50 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.23) 2 | 3 | project( 4 | AetherX6100Control 5 | VERSION 0.1 6 | LANGUAGES C CXX) 7 | 8 | # Options ------------------------------------------------------------------------------------------ 9 | 10 | option(BUILD_SHARED_LIBS "Build libraries as shared libraries." ON) # CMake option name 11 | 12 | option(AETHERX6100CTRL_DEVELOPER_MODE "Enable developer helpers." OFF) 13 | 14 | option(AETHERX6100CTRL_BUILD_TEST "Build the test application." ON) 15 | option(AETHERX6100CTRL_BUILD_SERVER "Build the WAMP server application." OFF) 16 | 17 | option(AETHERX6100CTRL_SET_CXX_STANDARD "Set the C++ standard directly." ON) 18 | option(AETHERX6100CTRL_USE_LTO "Enable link-time optimization when possible." ON) 19 | option(AETHERX6100CTRL_USE_FAST_MATH "Use fast math when possible (-ffast-math or /fp:fast)." OFF) 20 | option(AETHERX6100CTRL_USE_CXX_ISO_FLAGS 21 | "Add extra compiler flags to make C++ compilers more compliant." ON) 22 | 23 | # -------------------------------------------------------------------------------------------------- 24 | 25 | include(GenerateExportHeader) 26 | include(CheckCXXCompilerFlag) 27 | include(CheckIPOSupported) 28 | include(GNUInstallDirs) 29 | 30 | # Local modules 31 | include(cmake/output_structure.cmake) 32 | include(cmake/install_structure.cmake) 33 | include(cmake/default_visibility.cmake) 34 | 35 | include(cmake/compiler_flags/cxx_standard.cmake) 36 | include(cmake/compiler_flags/fast_math.cmake) 37 | include(cmake/compiler_flags/ipo_support.cmake) 38 | include(cmake/compiler_flags/cxx_iso_flags.cmake) 39 | 40 | include(cmake/dependencies/openmp.cmake) 41 | 42 | include(cmake/developer_mode.cmake) 43 | 44 | # Projects 45 | add_subdirectory(aetherx6100ctrl) 46 | add_subdirectory(test) 47 | add_subdirectory(server) 48 | -------------------------------------------------------------------------------- /test/test_atu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg a.k.a. R1CBU 7 | * Copyright (c) 2022 Rui Oliveira a.k.a. CT7ALW 8 | */ 9 | 10 | #include 11 | 12 | #include "x6100_control.h" 13 | #include "x6100_flow.h" 14 | #include "x6100_gpio.h" 15 | 16 | typedef enum { 17 | ATU_IDLE = 0, 18 | ATU_START, 19 | ATU_RUN, 20 | ATU_DONE 21 | } atu_status_t; 22 | 23 | int main() { 24 | atu_status_t atu = ATU_IDLE; 25 | 26 | if (!x6100_control_init()) 27 | return 1; 28 | 29 | if (!x6100_flow_init()) 30 | return 1; 31 | 32 | if (!x6100_gpio_init()) 33 | return 1; 34 | 35 | x6100_control_cmd(x6100_vfoa_freq, 7135000); 36 | 37 | while (atu != ATU_DONE) { 38 | x6100_flow_t *pack = x6100_flow_read(); 39 | 40 | if (pack) 41 | { 42 | printf("tx=%d " 43 | "txpwr=%.1f swr=%.1f alc=%.1f vext=%.1f vbat=%.1f bat=%d atu_params=%08X\n", 44 | pack->flag.tx, pack->tx_power * 0.1, pack->vswr * 0.1f, pack->alc_level * 0.1, 45 | pack->vext * 0.1f, pack->vbat * 0.1f, pack->batcap, pack->atu_params); 46 | 47 | switch (atu) 48 | { 49 | case ATU_IDLE: 50 | x6100_control_cmd(x6100_sple_atue_trx, x6100_atu_tune); 51 | x6100_gpio_set(x6100_pin_light, 1); 52 | atu = ATU_START; 53 | break; 54 | 55 | case ATU_START: 56 | if (pack->flag.tx) 57 | { 58 | atu = ATU_RUN; 59 | } 60 | break; 61 | 62 | case ATU_RUN: 63 | if (!pack->flag.tx) 64 | { 65 | x6100_control_cmd(x6100_sple_atue_trx, 0); 66 | x6100_gpio_set(x6100_pin_light, 0); 67 | atu = ATU_DONE; 68 | } 69 | break; 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /server/x6100_server_rpc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg a.k.a. R1CBU 7 | * Copyright (c) 2022 Rui Oliveira a.k.a. CT7ALW 8 | */ 9 | 10 | #include "x6100_server.h" 11 | #include 12 | 13 | void x6100_server::rpc_set_vfo(wampcc::wamp_session& caller, wampcc::call_info info) { 14 | const wampcc::json_array& list = info.args.args_list; 15 | const wampcc::json_object& dict = info.args.args_dict; 16 | 17 | if (list.size() > 0) { 18 | auto item = list[0]; 19 | 20 | if (item.is_uint8()) 21 | { 22 | uint8_t vfo = item.as_uint(); 23 | 24 | if (vfo == 1 || vfo == 2) 25 | { 26 | for (auto item = dict.begin(); item != dict.end(); item++) { 27 | uint32_t x = item->second.as_uint(); 28 | 29 | if (item->first.compare("freq") == 0) { 30 | x6100_control_cmd(vfo == 1 ? x6100_vfoa_freq : x6100_vfob_freq, x); 31 | } else if (item->first.compare("mode") == 0) { 32 | if (x >= x6100_mode_lsb && x <= x6100_mode_nfm) { 33 | x6100_control_cmd(vfo == 1 ? x6100_vfoa_mode : x6100_vfob_mode, x); 34 | } 35 | } 36 | } 37 | 38 | dealer->publish(realm, "set_vfo", {}, info.args); 39 | caller.result(info.request_id); 40 | return; 41 | } 42 | } 43 | } 44 | 45 | caller.call_error(info.request_id, "Invalid param"); 46 | } 47 | 48 | void x6100_server::rpc_set_rxvol(wampcc::wamp_session& caller, wampcc::call_info& info) { 49 | const wampcc::json_array& list = info.args.args_list; 50 | 51 | if (list.size() > 0) 52 | { 53 | auto item = list[0]; 54 | 55 | if (item.is_uint()) 56 | { 57 | uint32_t x = item.as_uint(); 58 | 59 | if (x < 55) 60 | { 61 | x6100_control_cmd(x6100_rxvol, x); 62 | dealer->publish(realm, "set_rxvol", {}, info.args); 63 | caller.result(info.request_id); 64 | return; 65 | } 66 | } 67 | } 68 | 69 | caller.call_error(info.request_id, "Invalid param"); 70 | } 71 | -------------------------------------------------------------------------------- /aetherx6100ctrl/src/gpio.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg aka R1CBU 7 | * Copyright (c) 2022 Rui Oliveira aka CT7ALW 8 | */ 9 | 10 | #include "aether_x6100/control/gpio.h" 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | int x6100_pin_wifi; 19 | int x6100_pin_rf; 20 | int x6100_pin_light; 21 | 22 | static int gpio_open_value(uint16_t pin) 23 | { 24 | char str[64]; 25 | int fd, len; 26 | 27 | snprintf(str, sizeof(str), "/sys/class/gpio/gpio%i/value", pin); 28 | 29 | return open(str, O_RDWR); 30 | } 31 | 32 | static bool gpio_create(uint16_t pin) 33 | { 34 | char str[64]; 35 | int fd, len; 36 | 37 | len = snprintf(str, sizeof(str), "%i\n", pin); 38 | fd = open("/sys/class/gpio/export", O_WRONLY); 39 | 40 | if (fd < 0) 41 | return false; 42 | 43 | if (write(fd, str, len) < 0) 44 | { 45 | close(fd); 46 | return false; 47 | } 48 | 49 | close(fd); 50 | 51 | snprintf(str, sizeof(str), "/sys/class/gpio/gpio%i/direction", pin); 52 | fd = open(str, O_WRONLY); 53 | 54 | if (fd < 0) 55 | return false; 56 | 57 | if (write(fd, "out\n", 4) < 0) 58 | { 59 | close(fd); 60 | return false; 61 | } 62 | 63 | close(fd); 64 | return true; 65 | } 66 | 67 | static int gpio_open(uint16_t pin) 68 | { 69 | int fd = gpio_open_value(pin); 70 | 71 | if (fd < 0) 72 | { 73 | if (gpio_create(pin)) 74 | { 75 | fd = gpio_open_value(pin); 76 | } 77 | else 78 | { 79 | fd = -1; 80 | } 81 | } 82 | 83 | return fd; 84 | } 85 | 86 | bool x6100_gpio_init() 87 | { 88 | x6100_pin_wifi = gpio_open(357); 89 | x6100_pin_rf = gpio_open(138); 90 | x6100_pin_light = gpio_open(143); 91 | 92 | return (x6100_pin_wifi > 0) && (x6100_pin_rf > 0) && (x6100_pin_light > 0); 93 | } 94 | 95 | void x6100_gpio_set(int pin, int value) 96 | { 97 | char str[8]; 98 | 99 | int len = snprintf(str, sizeof(str), "%i\n", value); 100 | write(pin, str, len); 101 | } 102 | -------------------------------------------------------------------------------- /aetherx6100ctrl/src/flow.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg aka R1CBU 7 | * Copyright (c) 2022 Rui Oliveira aka CT7ALW 8 | */ 9 | 10 | #include "aether_x6100/control/flow.h" 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #define BUF_SIZE (sizeof(x6100_flow_t) * 3) 20 | 21 | static int flow_fd; 22 | 23 | static uint8_t *buf = NULL; 24 | static uint8_t *buf_read = NULL; 25 | static uint16_t buf_size = 0; 26 | 27 | static const uint32_t magic = 0xAA5555AA; 28 | 29 | bool x6100_flow_init() 30 | { 31 | flow_fd = open("/dev/ttyS1", O_RDWR); 32 | 33 | if (flow_fd < 0) 34 | return false; 35 | 36 | struct termios attr; 37 | 38 | tcgetattr(flow_fd, &attr); 39 | 40 | cfsetispeed(&attr, B1152000); 41 | cfsetospeed(&attr, B1152000); 42 | 43 | #if 1 44 | cfmakeraw(&attr); 45 | #else 46 | attr.c_cflag = attr.c_cflag & 0xfffffe8f | 0x30; 47 | attr.c_iflag = attr.c_iflag & 0xfffffa14; 48 | attr.c_oflag = attr.c_oflag & 0xfffffffa; 49 | attr.c_lflag = attr.c_lflag & 0xffff7fb4; 50 | #endif 51 | 52 | if (tcsetattr(flow_fd, 0, &attr) < 0) 53 | { 54 | close(flow_fd); 55 | return false; 56 | } 57 | 58 | buf = malloc(BUF_SIZE); 59 | buf_read = buf; 60 | buf_size = 0; 61 | 62 | return true; 63 | } 64 | 65 | static x6100_flow_t *flow_check() 66 | { 67 | uint8_t *begin = memmem(buf, buf_size, &magic, sizeof(magic)); 68 | 69 | if (begin) 70 | { 71 | uint32_t len = buf + buf_size - begin; 72 | 73 | if (len >= sizeof(x6100_flow_t)) 74 | { 75 | uint8_t *tail_ptr = begin + sizeof(x6100_flow_t); 76 | uint16_t tail_len = len - sizeof(x6100_flow_t); 77 | x6100_flow_t *pack = begin; 78 | 79 | // TODO: check crc32 80 | 81 | memmove(buf, tail_ptr, tail_len); 82 | 83 | buf_read = buf + tail_len; 84 | buf_size = tail_len; 85 | 86 | return pack; 87 | } 88 | } 89 | 90 | return NULL; 91 | } 92 | 93 | x6100_flow_t *x6100_flow_read() 94 | { 95 | if (buf_size >= BUF_SIZE) 96 | { 97 | buf_size = 0; 98 | buf_read = buf; 99 | } 100 | 101 | int res = read(flow_fd, buf_read, BUF_SIZE - buf_size); 102 | 103 | if (res > 0) 104 | { 105 | buf_size += res; 106 | buf_read += res; 107 | 108 | if (buf_size > sizeof(x6100_flow_t)) 109 | { 110 | return flow_check(); 111 | } 112 | } 113 | 114 | return NULL; 115 | } 116 | -------------------------------------------------------------------------------- /server/x6100_server.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg aka R1CBU 7 | * Copyright (c) 2022 Rui Oliveira aka CT7ALW 8 | */ 9 | 10 | #include "x6100_server.h" 11 | #include 12 | 13 | x6100_server::x6100_server() 14 | : realm("default"), 15 | kernel(new wampcc::kernel({}, wampcc::logger::console())), 16 | dealer(new wampcc::wamp_router(kernel.get(), nullptr)), 17 | shutdown_future(shutdown_pomise.get_future()) 18 | { 19 | dealer->callable(realm, "set_vfo", [this](wampcc::wamp_router&, wampcc::wamp_session& ws, wampcc::call_info info) { rpc_set_vfo(ws, info); }); 20 | dealer->callable(realm, "set_rxvol", [this](wampcc::wamp_router&, wampcc::wamp_session& ws, wampcc::call_info info) { rpc_set_rxvol(ws, info); }); 21 | 22 | auto fut = dealer->listen(wampcc::auth_provider::no_auth_required(), 55555); 23 | 24 | if (fut.wait_for(std::chrono::milliseconds(250)) != std::future_status::ready) 25 | throw std::runtime_error("timeout during router listen"); 26 | 27 | if (auto ec = fut.get()) 28 | throw std::runtime_error("listen failed: err " + std::to_string(ec.os_value()) + ", " + ec.message()); 29 | 30 | } 31 | 32 | x6100_server::~x6100_server() { 33 | dealer.reset(); 34 | kernel.reset(); 35 | } 36 | 37 | void x6100_server::flow_pack(const x6100_flow_t *pack) { 38 | wampcc::wamp_args tx_args; 39 | 40 | tx_args.args_dict["flag"] = pack->flag.tx; 41 | tx_args.args_dict["power"] = pack->tx_power * 0.1f; 42 | tx_args.args_dict["vswr"] = pack->vswr * 0.1f; 43 | tx_args.args_dict["alc"] = pack->alc_level * 0.1f; 44 | 45 | dealer->publish(realm, "tx", {}, tx_args); 46 | 47 | wampcc::wamp_args power_args; 48 | 49 | power_args.args_dict["ext"] = pack->vext * 0.1f; 50 | power_args.args_dict["bat"] = pack->vbat * 0.1f; 51 | power_args.args_dict["capacity"] = pack->batcap; 52 | 53 | dealer->publish(realm, "power", {}, power_args); 54 | 55 | wampcc::wamp_args samples_args; 56 | wampcc::json_array samples_array; 57 | 58 | samples_array.reserve(1024); 59 | 60 | for (int i = 0; i < 1024; i++) 61 | samples_array.push_back(pack->samples[i]); 62 | 63 | samples_args.args_list = samples_array; 64 | 65 | dealer->publish(realm, "samples", {}, samples_args); 66 | } 67 | 68 | /// 69 | 70 | int main() { 71 | if (!x6100_control_init()) 72 | return 1; 73 | 74 | if (!x6100_gpio_init()) 75 | return 1; 76 | 77 | if (!x6100_flow_init()) 78 | return 1; 79 | 80 | try { 81 | x6100_server server; 82 | 83 | while (true) { 84 | x6100_flow_t *pack = x6100_flow_read(); 85 | 86 | if (pack) { 87 | server.flow_pack(pack); 88 | } 89 | } 90 | 91 | return 0; 92 | } catch (std::exception& e) { 93 | std::cerr << e.what() << std::endl; 94 | return 1; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /aetherx6100ctrl/include/aether_x6100/control/control.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg a.k.a. R1CBU 7 | * Copyright (c) 2022 Rui Oliveira a.k.a. CT7ALW 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "aether_x6100/control/api.h" 13 | 14 | #include 15 | #include 16 | 17 | typedef enum 18 | { 19 | x6100_vfoa_ham_band = 0, 20 | x6100_vfoa_freq, 21 | x6100_vfoa_att, 22 | x6100_vfoa_pre, 23 | x6100_vfoa_mode, 24 | x6100_vfoa_agc, 25 | 26 | x6100_vfob_ham_band = 6, 27 | x6100_vfob_freq, 28 | x6100_vfob_att, 29 | x6100_vfob_pre, 30 | x6100_vfob_mode, 31 | x6100_vfob_agc, 32 | 33 | x6100_sple_atue_trx = 12, 34 | x6100_vi_vm, 35 | x6100_rxvol, 36 | x6100_rfg_txpwr, 37 | 38 | x6100_atu_network = 17, 39 | 40 | x6100_ling_loutg_imicg_hmicg = 20, 41 | x6100_micsel_pttmode_chge_spmode_auxiqgen_sqlthr, 42 | x6100_voxg_voxag_voxdly_voxe, 43 | x6100_nrthr_nbw_nbthr_nre_nbe, 44 | x6100_dnfcnt_dnfwidth_dnfe, 45 | x6100_cmplevel_cmpe, 46 | 47 | x6100_agcknee_agcslope_agchang = 27, 48 | x6100_mode, 49 | x6100_monilevel, 50 | 51 | x6100_ks_km_kimb_cwtone_cwvol_cwtrain = 33, 52 | x6100_qsktime_kr, 53 | 54 | x6100_biasdrive_biasfinal = 41, 55 | x6100_rit, 56 | x6100_xit, 57 | x6100_filter1_low, 58 | x6100_filter1_high, 59 | x6100_filter2_low, 60 | x6100_filter2_high, 61 | 62 | x6100_rphscmp = 48, 63 | x6100_rmagcmp, 64 | x6100_txiofs, 65 | x6100_txqofs, 66 | 67 | x6100_pwrsync = 53, 68 | x6100_last = 55 69 | } x6100_cmd_enum_t; 70 | 71 | /* Regs x6100_vfoa... x6100_vfob... */ 72 | 73 | enum 74 | { 75 | x6100_agc_off = 0, 76 | x6100_agc_slow = 1, 77 | x6100_agc_fast = 2, 78 | x6100_agc_auto = 3 79 | }; 80 | 81 | enum 82 | { 83 | x6100_att_off = 0, 84 | x6100_att_on = 1 85 | }; 86 | 87 | enum 88 | { 89 | x6100_mode_lsb = 0, 90 | x6100_mode_lsb_dig = 1, 91 | x6100_mode_usb = 2, 92 | x6100_mode_usb_dig = 3, 93 | x6100_mode_cw = 4, 94 | x6100_mode_cwr = 5, 95 | x6100_mode_am = 6, 96 | x6100_mode_nfm = 7 97 | }; 98 | 99 | enum 100 | { 101 | x6100_pre_off = 0, 102 | x6100_pre_on = 1 103 | }; 104 | 105 | /* Reg x6100_sple_atue_trx */ 106 | 107 | enum 108 | { 109 | x6100_sple = 0x00002, 110 | x6100_voice_rec = 0x00008, 111 | x6100_swrscan_trx = 0x00010, 112 | x6100_atue = 0x01000, 113 | x6100_atu_tune = 0x02000, 114 | x6100_trx = 0x04000, 115 | x6100_calibration_trx = 0x08000, 116 | x6100_power_off = 0x10000, 117 | x6100_iptt = 0x40000 118 | }; 119 | 120 | /* Functions */ 121 | 122 | AETHERX6100CTR_API bool x6100_control_init(); 123 | AETHERX6100CTR_API bool x6100_control_cmd(x6100_cmd_enum_t cmd, uint32_t arg); 124 | AETHERX6100CTR_API void x6100_control_idle(); 125 | AETHERX6100CTR_API void x6100_control_set_band(uint32_t freq); 126 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Microsoft 3 | ColumnLimit: 100 4 | AlignEscapedNewlines: Left 5 | AlignTrailingComments: false 6 | AllowShortBlocksOnASingleLine: Empty 7 | PackConstructorInitializers: CurrentLine # requires llvm >= 14 8 | IndentPPDirectives: BeforeHash 9 | ForEachMacros: 10 | - forever 11 | - foreach 12 | - Q_FOREACH 13 | - BOOST_FOREACH 14 | StatementMacros: 15 | - Q_UNUSED 16 | - QT_REQUIRE_VERSION 17 | - emit 18 | SortIncludes: true 19 | IncludeBlocks: Regroup 20 | IncludeCategories: 21 | # Aether libraries (uses "aether_*") 22 | - Regex: '^"aether.*' 23 | Priority: 1 24 | # Boost (uses always ) 25 | - Regex: "^" 26 | Priority: 3 27 | # Qt (uses always ) 28 | - Regex: "^" 29 | Priority: 4 30 | # POSIX 31 | - Regex: "\ 32 | ^<(\ 33 | aio\ 34 | |arpa/inet\ 35 | |assert\ 36 | |complex\ 37 | |cpio\ 38 | |ctype\ 39 | |dirent\ 40 | |dlfcn\ 41 | |errno\ 42 | |fcntl\ 43 | |fenv\ 44 | |float\ 45 | |fmtmsg\ 46 | |fnmatch\ 47 | |ftw\ 48 | |glob\ 49 | |grp\ 50 | |iconv\ 51 | |inttypes\ 52 | |iso646\ 53 | |langinfo\ 54 | |libgen\ 55 | |limits\ 56 | |locale\ 57 | |math\ 58 | |monetary\ 59 | |mqueue\ 60 | |ndbm\ 61 | |net/if\ 62 | |netdb\ 63 | |netinet/in\ 64 | |netinet/tcp\ 65 | |nl_types\ 66 | |poll\ 67 | |pthread\ 68 | |pwd\ 69 | |regex\ 70 | |sched\ 71 | |search\ 72 | |semaphore\ 73 | |setjmp\ 74 | |signal\ 75 | |spawn\ 76 | |stdarg\ 77 | |stdbool\ 78 | |stddef\ 79 | |stdint\ 80 | |stdio\ 81 | |stdlib\ 82 | |string\ 83 | |strings\ 84 | |stropts\ 85 | |sys/ipc\ 86 | |sys/mman\ 87 | |sys/msg\ 88 | |sys/resource\ 89 | |sys/select\ 90 | |sys/sem\ 91 | |sys/shm\ 92 | |sys/socket\ 93 | |sys/stat\ 94 | |sys/statvfs\ 95 | |sys/time\ 96 | |sys/times\ 97 | |sys/types\ 98 | |sys/uio\ 99 | |sys/un\ 100 | |sys/utsname\ 101 | |sys/wait\ 102 | |syslog\ 103 | |tar\ 104 | |termios\ 105 | |tgmath\ 106 | |time\ 107 | |trace\ 108 | |ulimit\ 109 | |unistd 110 | |utime\ 111 | |utmpx\ 112 | |wchar\ 113 | |wctype\ 114 | |wordexp\ 115 | )\\.h>" 116 | Priority: 5 117 | # Windows 118 | - Regex: "\ 119 | ^<(\ 120 | windows 121 | |excpt\ 122 | |stdarg\ 123 | |windef\ 124 | |winnt\ 125 | |basetsd\ 126 | |guiddef\ 127 | |ctype\ 128 | |string\ 129 | |winbase\ 130 | |winerror\ 131 | |wingdi\ 132 | |winuser\ 133 | |winnls\ 134 | |wincon\ 135 | |winver\ 136 | |winreg\ 137 | |winnetwk\ 138 | |winsvc\ 139 | |cderr\ 140 | |commdlg\ 141 | |dde\ 142 | |ddeml\ 143 | |dlgs\ 144 | |lzexpand\ 145 | |mmsystem\ 146 | |nb30\ 147 | |rpc\ 148 | |shellapi\ 149 | |wincrypt\ 150 | |winperf\ 151 | |winresrc\ 152 | |winsock\ 153 | |winspool\ 154 | |winbgim\ 155 | |ole2\ 156 | |objbase\ 157 | |oleauto\ 158 | |olectlid\ 159 | )\\.h>" 160 | Priority: 6 161 | - Regex: '^' 162 | Priority: 6 163 | # C stdlib from std:: (always ) 164 | - Regex: '^' 165 | Priority: 8 166 | # C stdlib (always <*.h> ) 167 | - Regex: '^<.*\.h>' 168 | Priority: 9 169 | # std:: (always <*> ) 170 | - Regex: "^<.*>" 171 | Priority: 7 172 | # Everything else goes before boost, but clang-format matches in order 173 | - Regex: '^".*"' 174 | Priority: 2 175 | -------------------------------------------------------------------------------- /aetherx6100ctrl/src/control.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-License-Identifier: LGPL-2.1-or-later 3 | * 4 | * Aether Xiegu X6100 Control 5 | * 6 | * Copyright (c) 2022 Belousov Oleg aka R1CBU 7 | * Copyright (c) 2022 Rui Oliveira aka CT7ALW 8 | */ 9 | 10 | #include "aether_x6100/control/control.h" 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | typedef struct __attribute__((__packed__)) 20 | { 21 | uint16_t addr; 22 | uint32_t arg; 23 | } cmd_struct_t; 24 | 25 | typedef struct __attribute__((__packed__)) 26 | { 27 | uint16_t addr; 28 | uint32_t arg[x6100_last + 1]; 29 | } all_cmd_struct_t; 30 | 31 | static int i2c_fd = 0; 32 | static int i2c_addr = 0x72; 33 | static all_cmd_struct_t all_cmd; 34 | static uint8_t cur_band = 0; 35 | 36 | /* * */ 37 | 38 | static bool send_regs(void *regs, size_t size) 39 | { 40 | struct i2c_msg message = {i2c_addr, 0, size, regs}; 41 | struct i2c_rdwr_ioctl_data ioctl_data = {&message, 1}; 42 | 43 | int res = ioctl(i2c_fd, I2C_RDWR, &ioctl_data); 44 | 45 | return (res > 0); 46 | } 47 | 48 | bool x6100_control_init() 49 | { 50 | i2c_fd = open("/dev/i2c-0", O_RDWR); 51 | 52 | if (i2c_fd < 0) 53 | return false; 54 | 55 | memset(&all_cmd, 0, sizeof(all_cmd)); 56 | 57 | all_cmd.arg[x6100_vfoa_ham_band] = 1; 58 | all_cmd.arg[x6100_vfoa_freq] = 14074000; 59 | all_cmd.arg[x6100_vfoa_mode] = x6100_mode_usb; 60 | all_cmd.arg[x6100_vfoa_agc] = x6100_agc_auto; 61 | 62 | all_cmd.arg[x6100_vfob_ham_band] = 1; 63 | all_cmd.arg[x6100_vfob_freq] = 14074000; 64 | all_cmd.arg[x6100_vfob_mode] = x6100_mode_usb; 65 | all_cmd.arg[x6100_vfob_agc] = x6100_agc_auto; 66 | 67 | all_cmd.arg[x6100_rxvol] = 0; 68 | all_cmd.arg[x6100_rfg_txpwr] = (10 << 8) | 64; 69 | 70 | all_cmd.arg[x6100_mode] = 500; 71 | all_cmd.arg[x6100_filter1_low] = (uint32_t) 50.0f; 72 | all_cmd.arg[x6100_filter1_high] = (uint32_t) 2950.0; 73 | all_cmd.arg[x6100_filter2_low] = (uint32_t) 50.0f; 74 | all_cmd.arg[x6100_filter2_high] = (uint32_t) 2950.0f; 75 | 76 | all_cmd.arg[x6100_pwrsync] = 2000000; 77 | all_cmd.arg[x6100_last] = 0x100001; 78 | 79 | return send_regs(&all_cmd, sizeof(all_cmd)); 80 | } 81 | 82 | bool x6100_control_cmd(x6100_cmd_enum_t cmd, uint32_t arg) 83 | { 84 | cmd_struct_t command; 85 | uint16_t addr = cmd * 4; 86 | 87 | command.addr = (addr & 0xFF) << 8 | (addr >> 8); 88 | command.arg = arg; 89 | 90 | int res = send_regs(&command, sizeof(command)); 91 | 92 | if (res > 0) 93 | { 94 | all_cmd.arg[cmd] = arg; 95 | return true; 96 | } 97 | 98 | return false; 99 | } 100 | 101 | void x6100_control_idle() 102 | { 103 | send_regs(&all_cmd, sizeof(all_cmd)); 104 | } 105 | 106 | // TODO: This is a reversed code. Need to translate from Chinese to normal 107 | 108 | static uint8_t band_index(int freq) 109 | { 110 | if (freq < 1800000) { 111 | return 0; 112 | } else if (freq <= 2000000) { 113 | return 1; 114 | } else if (freq < 3500000) { 115 | return 2; 116 | } else if (freq <= 4000000) { 117 | return 3; 118 | } else if (freq < 5330500) { 119 | return 4; 120 | } else if (freq <= 5405000) { 121 | return 5; 122 | } else if (freq < 7000000) { 123 | return 6; 124 | } else if (freq <= 7300000) { 125 | return 7; 126 | } else if (freq < 10100000) { 127 | return 8; 128 | } else if (freq <= 10150000) { 129 | return 9; 130 | } else if (freq < 14000000) { 131 | return 10; 132 | } else if (freq <= 14350000) { 133 | return 11; 134 | } else if (freq < 18068000) { 135 | return 12; 136 | } else if (freq <= 18168000) { 137 | return 13; 138 | } else if (freq < 21000000) { 139 | return 14; 140 | } else if (21450000 < freq) { 141 | if (freq < 24890000) { 142 | return 16; 143 | } else if (freq <= 24990000) { 144 | return 17; 145 | } else if (freq < 28000000) { 146 | return 18; 147 | } else if (freq > 29700000) { 148 | if (freq > 50000000) { 149 | if (freq > 54000000) { 150 | return 22; 151 | } 152 | return 21; 153 | } 154 | return 20; 155 | } 156 | return 19; 157 | } 158 | 159 | return 15; 160 | } 161 | 162 | void x6100_control_set_band(uint32_t freq) 163 | { 164 | uint8_t band = band_index(freq); 165 | 166 | if (band != cur_band) 167 | { 168 | cur_band = band; 169 | 170 | x6100_control_cmd(x6100_vi_vm, cur_band << 8); 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | 474 | Copyright (C) 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 489 | USA 490 | 491 | Also add information on how to contact you by electronic and paper mail. 492 | 493 | You should also get your employer (if you work as a programmer) or your 494 | school, if any, to sign a "copyright disclaimer" for the library, if 495 | necessary. Here is a sample; alter the names: 496 | 497 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 498 | library `Frob' (a library for tweaking knobs) written by James Random 499 | Hacker. 500 | 501 | , 1 April 1990 502 | Ty Coon, President of Vice 503 | 504 | That's all there is to it! 505 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### C ### 2 | # Prerequisites 3 | *.d 4 | 5 | # Object files 6 | *.o 7 | *.ko 8 | *.obj 9 | *.elf 10 | 11 | # Linker output 12 | *.ilk 13 | *.map 14 | *.exp 15 | 16 | # Precompiled Headers 17 | *.gch 18 | *.pch 19 | 20 | # Libraries 21 | *.lib 22 | *.a 23 | *.la 24 | *.lo 25 | 26 | # Shared objects (inc. Windows DLLs) 27 | *.dll 28 | *.so 29 | *.so.* 30 | *.dylib 31 | 32 | # Executables 33 | *.exe 34 | *.out 35 | *.app 36 | *.i*86 37 | *.x86_64 38 | *.hex 39 | 40 | # Debug files 41 | *.dSYM/ 42 | *.su 43 | *.idb 44 | *.pdb 45 | 46 | # Kernel Module Compile Results 47 | *.mod* 48 | *.cmd 49 | .tmp_versions/ 50 | modules.order 51 | Module.symvers 52 | Mkfile.old 53 | dkms.conf 54 | 55 | ### C++ ### 56 | # Prerequisites 57 | 58 | # Compiled Object files 59 | *.slo 60 | 61 | # Precompiled Headers 62 | 63 | # Compiled Dynamic libraries 64 | 65 | # Fortran module files 66 | *.mod 67 | *.smod 68 | 69 | # Compiled Static libraries 70 | *.lai 71 | 72 | # Executables 73 | 74 | ### CLion ### 75 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 76 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 77 | 78 | # User-specific stuff 79 | .idea/**/workspace.xml 80 | .idea/**/tasks.xml 81 | .idea/**/usage.statistics.xml 82 | .idea/**/dictionaries 83 | .idea/**/shelf 84 | 85 | # AWS User-specific 86 | .idea/**/aws.xml 87 | 88 | # Generated files 89 | .idea/**/contentModel.xml 90 | 91 | # Sensitive or high-churn files 92 | .idea/**/dataSources/ 93 | .idea/**/dataSources.ids 94 | .idea/**/dataSources.local.xml 95 | .idea/**/sqlDataSources.xml 96 | .idea/**/dynamic.xml 97 | .idea/**/uiDesigner.xml 98 | .idea/**/dbnavigator.xml 99 | 100 | # Gradle 101 | .idea/**/gradle.xml 102 | .idea/**/libraries 103 | 104 | # Gradle and Maven with auto-import 105 | # When using Gradle or Maven with auto-import, you should exclude module files, 106 | # since they will be recreated, and may cause churn. Uncomment if using 107 | # auto-import. 108 | # .idea/artifacts 109 | # .idea/compiler.xml 110 | # .idea/jarRepositories.xml 111 | # .idea/modules.xml 112 | # .idea/*.iml 113 | # .idea/modules 114 | # *.iml 115 | # *.ipr 116 | 117 | # CMake 118 | cmake-build-*/ 119 | 120 | # Mongo Explorer plugin 121 | .idea/**/mongoSettings.xml 122 | 123 | # File-based project format 124 | *.iws 125 | 126 | # IntelliJ 127 | out/ 128 | 129 | # mpeltonen/sbt-idea plugin 130 | .idea_modules/ 131 | 132 | # JIRA plugin 133 | atlassian-ide-plugin.xml 134 | 135 | # Cursive Clojure plugin 136 | .idea/replstate.xml 137 | 138 | # SonarLint plugin 139 | .idea/sonarlint/ 140 | 141 | # Crashlytics plugin (for Android Studio and IntelliJ) 142 | com_crashlytics_export_strings.xml 143 | crashlytics.properties 144 | crashlytics-build.properties 145 | fabric.properties 146 | 147 | # Editor-based Rest Client 148 | .idea/httpRequests 149 | 150 | # Android studio 3.1+ serialized cache file 151 | .idea/caches/build_file_checksums.ser 152 | 153 | ### CLion Patch ### 154 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 155 | 156 | # *.iml 157 | # modules.xml 158 | # .idea/misc.xml 159 | # *.ipr 160 | 161 | # Sonarlint plugin 162 | # https://plugins.jetbrains.com/plugin/7973-sonarlint 163 | .idea/**/sonarlint/ 164 | 165 | # SonarQube Plugin 166 | # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin 167 | .idea/**/sonarIssues.xml 168 | 169 | # Markdown Navigator plugin 170 | # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced 171 | .idea/**/markdown-navigator.xml 172 | .idea/**/markdown-navigator-enh.xml 173 | .idea/**/markdown-navigator/ 174 | 175 | # Cache file creation bug 176 | # See https://youtrack.jetbrains.com/issue/JBR-2257 177 | .idea/$CACHE_FILE$ 178 | 179 | # CodeStream plugin 180 | # https://plugins.jetbrains.com/plugin/12206-codestream 181 | .idea/codestream.xml 182 | 183 | ### CLion+all ### 184 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 185 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 186 | 187 | # User-specific stuff 188 | 189 | # AWS User-specific 190 | 191 | # Generated files 192 | 193 | # Sensitive or high-churn files 194 | 195 | # Gradle 196 | 197 | # Gradle and Maven with auto-import 198 | # When using Gradle or Maven with auto-import, you should exclude module files, 199 | # since they will be recreated, and may cause churn. Uncomment if using 200 | # auto-import. 201 | # .idea/artifacts 202 | # .idea/compiler.xml 203 | # .idea/jarRepositories.xml 204 | # .idea/modules.xml 205 | # .idea/*.iml 206 | # .idea/modules 207 | # *.iml 208 | # *.ipr 209 | 210 | # CMake 211 | 212 | # Mongo Explorer plugin 213 | 214 | # File-based project format 215 | 216 | # IntelliJ 217 | 218 | # mpeltonen/sbt-idea plugin 219 | 220 | # JIRA plugin 221 | 222 | # Cursive Clojure plugin 223 | 224 | # SonarLint plugin 225 | 226 | # Crashlytics plugin (for Android Studio and IntelliJ) 227 | 228 | # Editor-based Rest Client 229 | 230 | # Android studio 3.1+ serialized cache file 231 | 232 | ### CLion+all Patch ### 233 | # Ignores the whole .idea folder and all .iml files 234 | # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 235 | 236 | .idea/* 237 | 238 | # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 239 | 240 | *.iml 241 | modules.xml 242 | .idea/misc.xml 243 | *.ipr 244 | 245 | # Sonarlint plugin 246 | .idea/sonarlint 247 | 248 | ### CLion+iml ### 249 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 250 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 251 | 252 | # User-specific stuff 253 | 254 | # AWS User-specific 255 | 256 | # Generated files 257 | 258 | # Sensitive or high-churn files 259 | 260 | # Gradle 261 | 262 | # Gradle and Maven with auto-import 263 | # When using Gradle or Maven with auto-import, you should exclude module files, 264 | # since they will be recreated, and may cause churn. Uncomment if using 265 | # auto-import. 266 | # .idea/artifacts 267 | # .idea/compiler.xml 268 | # .idea/jarRepositories.xml 269 | # .idea/modules.xml 270 | # .idea/*.iml 271 | # .idea/modules 272 | # *.iml 273 | # *.ipr 274 | 275 | # CMake 276 | 277 | # Mongo Explorer plugin 278 | 279 | # File-based project format 280 | 281 | # IntelliJ 282 | 283 | # mpeltonen/sbt-idea plugin 284 | 285 | # JIRA plugin 286 | 287 | # Cursive Clojure plugin 288 | 289 | # SonarLint plugin 290 | 291 | # Crashlytics plugin (for Android Studio and IntelliJ) 292 | 293 | # Editor-based Rest Client 294 | 295 | # Android studio 3.1+ serialized cache file 296 | 297 | ### CLion+iml Patch ### 298 | # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 299 | 300 | 301 | ### CMake ### 302 | CMakeLists.txt.user 303 | CMakeCache.txt 304 | CMakeFiles 305 | CMakeScripts 306 | Testing 307 | Makefile 308 | cmake_install.cmake 309 | install_manifest.txt 310 | compile_commands.json 311 | CTestTestfile.cmake 312 | _deps 313 | 314 | ### CMake Patch ### 315 | # External projects 316 | *-prefix/ 317 | 318 | ### Conan ### 319 | # Conan build information 320 | conan.lock 321 | conanbuildinfo.* 322 | conaninfo.txt 323 | graph_info.json 324 | 325 | ## Various built-in generators 326 | # cmake_find_package generator https://docs.conan.io/en/latest/reference/generators/cmake_find_package.html 327 | Find*.cmake 328 | 329 | # cmake_paths generator https://docs.conan.io/en/1.4/integrations/cmake/cmake_paths_generator.html 330 | conan_paths.* 331 | 332 | # Environment activation scripts produced by https://docs.conan.io/en/latest/mastering/virtualenv.html#virtualenv-generator 333 | activate_run.ps1 334 | activate_run.sh 335 | deactivate_run.ps1 336 | deactivate_run.sh 337 | environment_run.ps1.env 338 | environment_run.sh.env 339 | 340 | ### Eclipse ### 341 | .metadata 342 | bin/ 343 | tmp/ 344 | *.tmp 345 | *.bak 346 | *.swp 347 | *~.nib 348 | local.properties 349 | .settings/ 350 | .loadpath 351 | .recommenders 352 | 353 | # External tool builders 354 | .externalToolBuilders/ 355 | 356 | # Locally stored "Eclipse launch configurations" 357 | *.launch 358 | 359 | # PyDev specific (Python IDE for Eclipse) 360 | *.pydevproject 361 | 362 | # CDT-specific (C/C++ Development Tooling) 363 | .cproject 364 | 365 | # CDT- autotools 366 | .autotools 367 | 368 | # Java annotation processor (APT) 369 | .factorypath 370 | 371 | # PDT-specific (PHP Development Tools) 372 | .buildpath 373 | 374 | # sbteclipse plugin 375 | .target 376 | 377 | # Tern plugin 378 | .tern-project 379 | 380 | # TeXlipse plugin 381 | .texlipse 382 | 383 | # STS (Spring Tool Suite) 384 | .springBeans 385 | 386 | # Code Recommenders 387 | .recommenders/ 388 | 389 | # Annotation Processing 390 | .apt_generated/ 391 | .apt_generated_test/ 392 | 393 | # Scala IDE specific (Scala & Java development for Eclipse) 394 | .cache-main 395 | .scala_dependencies 396 | .worksheet 397 | 398 | # Uncomment this line if you wish to ignore the project description file. 399 | # Typically, this file would be tracked if it contains build/dependency configurations: 400 | #.project 401 | 402 | ### Eclipse Patch ### 403 | # Spring Boot Tooling 404 | .sts4-cache/ 405 | 406 | ### Emacs ### 407 | # -*- mode: gitignore; -*- 408 | *~ 409 | \#*\# 410 | /.emacs.desktop 411 | /.emacs.desktop.lock 412 | *.elc 413 | auto-save-list 414 | tramp 415 | .\#* 416 | 417 | # Org-mode 418 | .org-id-locations 419 | *_archive 420 | 421 | # flymake-mode 422 | *_flymake.* 423 | 424 | # eshell files 425 | /eshell/history 426 | /eshell/lastdir 427 | 428 | # elpa packages 429 | /elpa/ 430 | 431 | # reftex files 432 | *.rel 433 | 434 | # AUCTeX auto folder 435 | /auto/ 436 | 437 | # cask packages 438 | .cask/ 439 | dist/ 440 | 441 | # Flycheck 442 | flycheck_*.el 443 | 444 | # server auth directory 445 | /server/ 446 | 447 | # projectiles files 448 | .projectile 449 | 450 | # directory configuration 451 | .dir-locals.el 452 | 453 | # network security 454 | /network-security.data 455 | 456 | 457 | ### Git ### 458 | # Created by git for backups. To disable backups in Git: 459 | # $ git config --global mergetool.keepBackup false 460 | *.orig 461 | 462 | # Created by git when using merge tools for conflicts 463 | *.BACKUP.* 464 | *.BASE.* 465 | *.LOCAL.* 466 | *.REMOTE.* 467 | *_BACKUP_*.txt 468 | *_BASE_*.txt 469 | *_LOCAL_*.txt 470 | *_REMOTE_*.txt 471 | 472 | ### Python ### 473 | # Byte-compiled / optimized / DLL files 474 | __pycache__/ 475 | *.py[cod] 476 | *$py.class 477 | 478 | # C extensions 479 | 480 | # Distribution / packaging 481 | .Python 482 | build/ 483 | develop-eggs/ 484 | downloads/ 485 | eggs/ 486 | .eggs/ 487 | lib/ 488 | lib64/ 489 | parts/ 490 | sdist/ 491 | var/ 492 | wheels/ 493 | share/python-wheels/ 494 | *.egg-info/ 495 | .installed.cfg 496 | *.egg 497 | MANIFEST 498 | 499 | # PyInstaller 500 | # Usually these files are written by a python script from a template 501 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 502 | *.manifest 503 | *.spec 504 | 505 | # Installer logs 506 | pip-log.txt 507 | pip-delete-this-directory.txt 508 | 509 | # Unit test / coverage reports 510 | htmlcov/ 511 | .tox/ 512 | .nox/ 513 | .coverage 514 | .coverage.* 515 | .cache 516 | nosetests.xml 517 | coverage.xml 518 | *.cover 519 | *.py,cover 520 | .hypothesis/ 521 | .pytest_cache/ 522 | cover/ 523 | 524 | # Translations 525 | *.mo 526 | *.pot 527 | 528 | # Django stuff: 529 | *.log 530 | local_settings.py 531 | db.sqlite3 532 | db.sqlite3-journal 533 | 534 | # Flask stuff: 535 | instance/ 536 | .webassets-cache 537 | 538 | # Scrapy stuff: 539 | .scrapy 540 | 541 | # Sphinx documentation 542 | docs/_build/ 543 | 544 | # PyBuilder 545 | .pybuilder/ 546 | target/ 547 | 548 | # Jupyter Notebook 549 | .ipynb_checkpoints 550 | 551 | # IPython 552 | profile_default/ 553 | ipython_config.py 554 | 555 | # pyenv 556 | # For a library or package, you might want to ignore these files since the code is 557 | # intended to run in multiple environments; otherwise, check them in: 558 | # .python-version 559 | 560 | # pipenv 561 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 562 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 563 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 564 | # install all needed dependencies. 565 | #Pipfile.lock 566 | 567 | # poetry 568 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 569 | # This is especially recommended for binary packages to ensure reproducibility, and is more 570 | # commonly ignored for libraries. 571 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 572 | #poetry.lock 573 | 574 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 575 | __pypackages__/ 576 | 577 | # Celery stuff 578 | celerybeat-schedule 579 | celerybeat.pid 580 | 581 | # SageMath parsed files 582 | *.sage.py 583 | 584 | # Environments 585 | .env 586 | .venv 587 | env/ 588 | venv/ 589 | ENV/ 590 | env.bak/ 591 | venv.bak/ 592 | 593 | # Spyder project settings 594 | .spyderproject 595 | .spyproject 596 | 597 | # Rope project settings 598 | .ropeproject 599 | 600 | # mkdocs documentation 601 | /site 602 | 603 | # mypy 604 | .mypy_cache/ 605 | .dmypy.json 606 | dmypy.json 607 | 608 | # Pyre type checker 609 | .pyre/ 610 | 611 | # pytype static type analyzer 612 | .pytype/ 613 | 614 | # Cython debug symbols 615 | cython_debug/ 616 | 617 | # PyCharm 618 | # JetBrains specific template is maintainted in a separate JetBrains.gitignore that can 619 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 620 | # and can be added to the global gitignore or merged into this file. For a more nuclear 621 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 622 | #.idea/ 623 | 624 | ### QML ### 625 | # Cached binary representations of QML and JS files 626 | *.qmlc 627 | *.jsc 628 | 629 | ### Qt ### 630 | # C++ objects and libs 631 | 632 | # Qt-es 633 | object_script.*.Release 634 | object_script.*.Debug 635 | *_plugin_import.cpp 636 | /.qmake.cache 637 | /.qmake.stash 638 | *.pro.user 639 | *.pro.user.* 640 | *.qbs.user 641 | *.qbs.user.* 642 | *.moc 643 | moc_*.cpp 644 | moc_*.h 645 | qrc_*.cpp 646 | ui_*.h 647 | Makefile* 648 | *build-* 649 | *.qm 650 | *.prl 651 | 652 | # Qt unit tests 653 | target_wrapper.* 654 | 655 | # QtCreator 656 | *.autosave 657 | 658 | # QtCreator Qml 659 | *.qmlproject.user 660 | *.qmlproject.user.* 661 | 662 | # QtCreator CMake 663 | CMakeLists.txt.user* 664 | 665 | # QtCreator 4.8< compilation database 666 | 667 | # QtCreator local machine specific files for imported projects 668 | *creator.user* 669 | 670 | *_qmlcache.qrc 671 | 672 | ### QtCreator ### 673 | # gitignore for Qt Creator like IDE for pure C/C++ project without Qt 674 | # 675 | # Reference: http://doc.qt.io/qtcreator/creator-project-generic.html 676 | 677 | 678 | 679 | # Qt Creator autogenerated files 680 | 681 | 682 | # A listing of all the files included in the project 683 | *.files 684 | 685 | # Include directories 686 | *.includes 687 | 688 | # Project configuration settings like predefined Macros 689 | *.config 690 | 691 | # Qt Creator settings 692 | *.creator 693 | 694 | # User project settings 695 | *.creator.user* 696 | 697 | # Qt Creator backups 698 | 699 | # Flags for Clang Code Model 700 | *.cxxflags 701 | *.cflags 702 | 703 | 704 | ### Vim ### 705 | # Swap 706 | [._]*.s[a-v][a-z] 707 | !*.svg # comment out if you don't need vector files 708 | [._]*.sw[a-p] 709 | [._]s[a-rt-v][a-z] 710 | [._]ss[a-gi-z] 711 | [._]sw[a-p] 712 | 713 | # Session 714 | Session.vim 715 | Sessionx.vim 716 | 717 | # Temporary 718 | .netrwhist 719 | # Auto-generated tag files 720 | tags 721 | # Persistent undo 722 | [._]*.un~ 723 | 724 | ### VisualStudioCode ### 725 | .vscode/* 726 | !.vscode/settings.json 727 | !.vscode/tasks.json 728 | !.vscode/launch.json 729 | !.vscode/extensions.json 730 | !.vscode/*.code-snippets 731 | 732 | # Local History for Visual Studio Code 733 | .history/ 734 | 735 | # Built Visual Studio Code Extensions 736 | *.vsix 737 | 738 | ### VisualStudioCode Patch ### 739 | # Ignore all local history of files 740 | .history 741 | .ionide 742 | 743 | # Support for Project snippet scope 744 | 745 | ### vs ### 746 | ## Ignore Visual Studio temporary files, build results, and 747 | ## files generated by popular Visual Studio add-ons. 748 | ## 749 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 750 | 751 | # User-specific files 752 | *.rsuser 753 | *.suo 754 | *.user 755 | *.userosscache 756 | *.sln.docstates 757 | 758 | # User-specific files (MonoDevelop/Xamarin Studio) 759 | *.userprefs 760 | 761 | # Mono auto generated files 762 | mono_crash.* 763 | 764 | # Build results 765 | [Dd]ebug/ 766 | [Dd]ebugPublic/ 767 | [Rr]elease/ 768 | [Rr]eleases/ 769 | x64/ 770 | x86/ 771 | [Aa][Rr][Mm]/ 772 | [Aa][Rr][Mm]64/ 773 | bld/ 774 | [Bb]in/ 775 | [Oo]bj/ 776 | [Ll]og/ 777 | [Ll]ogs/ 778 | 779 | # Visual Studio 2015/2017 cache/options directory 780 | .vs/ 781 | # Uncomment if you have tasks that create the project's static files in wwwroot 782 | #wwwroot/ 783 | 784 | # Visual Studio 2017 auto generated files 785 | Generated\ Files/ 786 | 787 | # MSTest test Results 788 | [Tt]est[Rr]esult*/ 789 | [Bb]uild[Ll]og.* 790 | 791 | # NUnit 792 | *.VisualState.xml 793 | TestResult.xml 794 | nunit-*.xml 795 | 796 | # Build Results of an ATL Project 797 | [Dd]ebugPS/ 798 | [Rr]eleasePS/ 799 | dlldata.c 800 | 801 | # Benchmark Results 802 | BenchmarkDotNet.Artifacts/ 803 | 804 | # .NET Core 805 | project.lock.json 806 | project.fragment.lock.json 807 | artifacts/ 808 | 809 | # StyleCop 810 | StyleCopReport.xml 811 | 812 | # Files built by Visual Studio 813 | *_i.c 814 | *_p.c 815 | *_h.h 816 | *.meta 817 | *.iobj 818 | *.ipdb 819 | *.pgc 820 | *.pgd 821 | *.rsp 822 | *.sbr 823 | *.tlb 824 | *.tli 825 | *.tlh 826 | *.tmp_proj 827 | *_wpftmp.csproj 828 | *.vspscc 829 | *.vssscc 830 | .builds 831 | *.pidb 832 | *.svclog 833 | *.scc 834 | 835 | # Chutzpah Test files 836 | _Chutzpah* 837 | 838 | # Visual C++ cache files 839 | ipch/ 840 | *.aps 841 | *.ncb 842 | *.opendb 843 | *.opensdf 844 | *.sdf 845 | *.cachefile 846 | *.VC.db 847 | *.VC.VC.opendb 848 | 849 | # Visual Studio profiler 850 | *.psess 851 | *.vsp 852 | *.vspx 853 | *.sap 854 | 855 | # Visual Studio Trace Files 856 | *.e2e 857 | 858 | # TFS 2012 Local Workspace 859 | $tf/ 860 | 861 | # Guidance Automation Toolkit 862 | *.gpState 863 | 864 | # ReSharper is a .NET coding add-in 865 | _ReSharper*/ 866 | *.[Rr]e[Ss]harper 867 | *.DotSettings.user 868 | 869 | # TeamCity is a build add-in 870 | _TeamCity* 871 | 872 | # DotCover is a Code Coverage Tool 873 | *.dotCover 874 | 875 | # AxoCover is a Code Coverage Tool 876 | .axoCover/* 877 | !.axoCover/settings.json 878 | 879 | # Coverlet is a free, cross platform Code Coverage Tool 880 | coverage*[.json, .xml, .info] 881 | 882 | # Visual Studio code coverage results 883 | *.coverage 884 | *.coveragexml 885 | 886 | # NCrunch 887 | _NCrunch_* 888 | .*crunch*.local.xml 889 | nCrunchTemp_* 890 | 891 | # MightyMoose 892 | *.mm.* 893 | AutoTest.Net/ 894 | 895 | # Web workbench (sass) 896 | .sass-cache/ 897 | 898 | # Installshield output folder 899 | [Ee]xpress/ 900 | 901 | # DocProject is a documentation generator add-in 902 | DocProject/buildhelp/ 903 | DocProject/Help/*.HxT 904 | DocProject/Help/*.HxC 905 | DocProject/Help/*.hhc 906 | DocProject/Help/*.hhk 907 | DocProject/Help/*.hhp 908 | DocProject/Help/Html2 909 | DocProject/Help/html 910 | 911 | # Click-Once directory 912 | publish/ 913 | 914 | # Publish Web Output 915 | *.[Pp]ublish.xml 916 | *.azurePubxml 917 | # Note: Comment the next line if you want to checkin your web deploy settings, 918 | # but database connection strings (with potential passwords) will be unencrypted 919 | *.pubxml 920 | *.publishproj 921 | 922 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 923 | # checkin your Azure Web App publish settings, but sensitive information contained 924 | # in these scripts will be unencrypted 925 | PublishScripts/ 926 | 927 | # NuGet Packages 928 | *.nupkg 929 | # NuGet Symbol Packages 930 | *.snupkg 931 | # The packages folder can be ignored because of Package Restore 932 | **/[Pp]ackages/* 933 | # except build/, which is used as an MSBuild target. 934 | !**/[Pp]ackages/build/ 935 | # Uncomment if necessary however generally it will be regenerated when needed 936 | #!**/[Pp]ackages/repositories.config 937 | # NuGet v3's project.json files produces more ignorable files 938 | *.nuget.props 939 | *.nuget.targets 940 | 941 | # Microsoft Azure Build Output 942 | csx/ 943 | *.build.csdef 944 | 945 | # Microsoft Azure Emulator 946 | ecf/ 947 | rcf/ 948 | 949 | # Windows Store app package directories and files 950 | AppPackages/ 951 | BundleArtifacts/ 952 | Package.StoreAssociation.xml 953 | _pkginfo.txt 954 | *.appx 955 | *.appxbundle 956 | *.appxupload 957 | 958 | # Visual Studio cache files 959 | # files ending in .cache can be ignored 960 | *.[Cc]ache 961 | # but keep track of directories ending in .cache 962 | !?*.[Cc]ache/ 963 | 964 | # Others 965 | ClientBin/ 966 | ~$* 967 | *.dbmdl 968 | *.dbproj.schemaview 969 | *.jfm 970 | *.pfx 971 | *.publishsettings 972 | orleans.codegen.cs 973 | 974 | # Including strong name files can present a security risk 975 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 976 | #*.snk 977 | 978 | # Since there are multiple workflows, uncomment next line to ignore bower_components 979 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 980 | #bower_components/ 981 | 982 | # RIA/Silverlight projects 983 | Generated_Code/ 984 | 985 | # Backup & report files from converting an old project file 986 | # to a newer Visual Studio version. Backup files are not needed, 987 | # because we have git ;-) 988 | _UpgradeReport_Files/ 989 | Backup*/ 990 | UpgradeLog*.XML 991 | UpgradeLog*.htm 992 | ServiceFabricBackup/ 993 | *.rptproj.bak 994 | 995 | # SQL Server files 996 | *.mdf 997 | *.ldf 998 | *.ndf 999 | 1000 | # Business Intelligence projects 1001 | *.rdl.data 1002 | *.bim.layout 1003 | *.bim_*.settings 1004 | *.rptproj.rsuser 1005 | *- [Bb]ackup.rdl 1006 | *- [Bb]ackup ([0-9]).rdl 1007 | *- [Bb]ackup ([0-9][0-9]).rdl 1008 | 1009 | # Microsoft Fakes 1010 | FakesAssemblies/ 1011 | 1012 | # GhostDoc plugin setting file 1013 | *.GhostDoc.xml 1014 | 1015 | # Node.js Tools for Visual Studio 1016 | .ntvs_analysis.dat 1017 | node_modules/ 1018 | 1019 | # Visual Studio 6 build log 1020 | *.plg 1021 | 1022 | # Visual Studio 6 workspace options file 1023 | *.opt 1024 | 1025 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 1026 | *.vbw 1027 | 1028 | # Visual Studio LightSwitch build output 1029 | **/*.HTMLClient/GeneratedArtifacts 1030 | **/*.DesktopClient/GeneratedArtifacts 1031 | **/*.DesktopClient/ModelManifest.xml 1032 | **/*.Server/GeneratedArtifacts 1033 | **/*.Server/ModelManifest.xml 1034 | _Pvt_Extensions 1035 | 1036 | # Paket dependency manager 1037 | .paket/paket.exe 1038 | paket-files/ 1039 | 1040 | # FAKE - F# Make 1041 | .fake/ 1042 | 1043 | # CodeRush personal settings 1044 | .cr/personal 1045 | 1046 | # Python Tools for Visual Studio (PTVS) 1047 | *.pyc 1048 | 1049 | # Cake - Uncomment if you are using it 1050 | # tools/** 1051 | # !tools/packages.config 1052 | 1053 | # Tabs Studio 1054 | *.tss 1055 | 1056 | # Telerik's JustMock configuration file 1057 | *.jmconfig 1058 | 1059 | # BizTalk build output 1060 | *.btp.cs 1061 | *.btm.cs 1062 | *.odx.cs 1063 | *.xsd.cs 1064 | 1065 | # OpenCover UI analysis results 1066 | OpenCover/ 1067 | 1068 | # Azure Stream Analytics local run output 1069 | ASALocalRun/ 1070 | 1071 | # MSBuild Binary and Structured Log 1072 | *.binlog 1073 | 1074 | # NVidia Nsight GPU debugger configuration file 1075 | *.nvuser 1076 | 1077 | # MFractors (Xamarin productivity tool) working folder 1078 | .mfractor/ 1079 | 1080 | # Local History for Visual Studio 1081 | .localhistory/ 1082 | 1083 | # BeatPulse healthcheck temp database 1084 | healthchecksdb 1085 | 1086 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 1087 | MigrationBackup/ 1088 | 1089 | # Ionide (cross platform F# VS Code tools) working folder 1090 | .ionide/ 1091 | 1092 | ### VisualStudio ### 1093 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 1094 | 1095 | # User-specific files 1096 | 1097 | # User-specific files (MonoDevelop/Xamarin Studio) 1098 | 1099 | # Mono auto generated files 1100 | 1101 | # Build results 1102 | [Ww][Ii][Nn]32/ 1103 | 1104 | # Visual Studio 2015/2017 cache/options directory 1105 | # Uncomment if you have tasks that create the project's static files in wwwroot 1106 | 1107 | # Visual Studio 2017 auto generated files 1108 | 1109 | # MSTest test Results 1110 | 1111 | # NUnit 1112 | 1113 | # Build Results of an ATL Project 1114 | 1115 | # Benchmark Results 1116 | 1117 | # .NET Core 1118 | 1119 | # ASP.NET Scaffolding 1120 | ScaffoldingReadMe.txt 1121 | 1122 | # StyleCop 1123 | 1124 | # Files built by Visual Studio 1125 | *.tlog 1126 | 1127 | # Chutzpah Test files 1128 | 1129 | # Visual C++ cache files 1130 | 1131 | # Visual Studio profiler 1132 | 1133 | # Visual Studio Trace Files 1134 | 1135 | # TFS 2012 Local Workspace 1136 | 1137 | # Guidance Automation Toolkit 1138 | 1139 | # ReSharper is a .NET coding add-in 1140 | 1141 | # TeamCity is a build add-in 1142 | 1143 | # DotCover is a Code Coverage Tool 1144 | 1145 | # AxoCover is a Code Coverage Tool 1146 | 1147 | # Coverlet is a free, cross platform Code Coverage Tool 1148 | coverage*.json 1149 | coverage*.xml 1150 | coverage*.info 1151 | 1152 | # Visual Studio code coverage results 1153 | 1154 | # NCrunch 1155 | 1156 | # MightyMoose 1157 | 1158 | # Web workbench (sass) 1159 | 1160 | # Installshield output folder 1161 | 1162 | # DocProject is a documentation generator add-in 1163 | 1164 | # Click-Once directory 1165 | 1166 | # Publish Web Output 1167 | # Note: Comment the next line if you want to checkin your web deploy settings, 1168 | # but database connection strings (with potential passwords) will be unencrypted 1169 | 1170 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 1171 | # checkin your Azure Web App publish settings, but sensitive information contained 1172 | # in these scripts will be unencrypted 1173 | 1174 | # NuGet Packages 1175 | # NuGet Symbol Packages 1176 | # The packages folder can be ignored because of Package Restore 1177 | # except build/, which is used as an MSBuild target. 1178 | # Uncomment if necessary however generally it will be regenerated when needed 1179 | # NuGet v3's project.json files produces more ignorable files 1180 | 1181 | # Microsoft Azure Build Output 1182 | 1183 | # Microsoft Azure Emulator 1184 | 1185 | # Windows Store app package directories and files 1186 | 1187 | # Visual Studio cache files 1188 | # files ending in .cache can be ignored 1189 | # but keep track of directories ending in .cache 1190 | 1191 | # Others 1192 | 1193 | # Including strong name files can present a security risk 1194 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 1195 | 1196 | # Since there are multiple workflows, uncomment next line to ignore bower_components 1197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 1198 | 1199 | # RIA/Silverlight projects 1200 | 1201 | # Backup & report files from converting an old project file 1202 | # to a newer Visual Studio version. Backup files are not needed, 1203 | # because we have git ;-) 1204 | 1205 | # SQL Server files 1206 | 1207 | # Business Intelligence projects 1208 | 1209 | # Microsoft Fakes 1210 | 1211 | # GhostDoc plugin setting file 1212 | 1213 | # Node.js Tools for Visual Studio 1214 | 1215 | # Visual Studio 6 build log 1216 | 1217 | # Visual Studio 6 workspace options file 1218 | 1219 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 1220 | 1221 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 1222 | *.vbp 1223 | 1224 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 1225 | *.dsw 1226 | *.dsp 1227 | 1228 | # Visual Studio 6 technical files 1229 | 1230 | # Visual Studio LightSwitch build output 1231 | 1232 | # Paket dependency manager 1233 | 1234 | # FAKE - F# Make 1235 | 1236 | # CodeRush personal settings 1237 | 1238 | # Python Tools for Visual Studio (PTVS) 1239 | 1240 | # Cake - Uncomment if you are using it 1241 | # tools/** 1242 | # !tools/packages.config 1243 | 1244 | # Tabs Studio 1245 | 1246 | # Telerik's JustMock configuration file 1247 | 1248 | # BizTalk build output 1249 | 1250 | # OpenCover UI analysis results 1251 | 1252 | # Azure Stream Analytics local run output 1253 | 1254 | # MSBuild Binary and Structured Log 1255 | 1256 | # NVidia Nsight GPU debugger configuration file 1257 | 1258 | # MFractors (Xamarin productivity tool) working folder 1259 | 1260 | # Local History for Visual Studio 1261 | 1262 | # Visual Studio History (VSHistory) files 1263 | .vshistory/ 1264 | 1265 | # BeatPulse healthcheck temp database 1266 | 1267 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 1268 | 1269 | # Ionide (cross platform F# VS Code tools) working folder 1270 | 1271 | # Fody - auto-generated XML schema 1272 | FodyWeavers.xsd 1273 | 1274 | # VS Code files for those working on multiple tools 1275 | *.code-workspace 1276 | 1277 | # Local History for Visual Studio Code 1278 | 1279 | # Windows Installer files from build outputs 1280 | *.cab 1281 | *.msi 1282 | *.msix 1283 | *.msm 1284 | *.msp 1285 | 1286 | # JetBrains Rider 1287 | *.sln.iml 1288 | 1289 | ### VisualStudio Patch ### 1290 | # Additional files built by Visual Studio 1291 | 1292 | ### Project-specific ignores ### 1293 | .clangd/ 1294 | .cache/ 1295 | .VSCodeCounter/ 1296 | .scrap/ 1297 | --------------------------------------------------------------------------------