From d9d10f27436a268303e4cade6f437e7beb7795bc Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 21 Nov 2021 11:36:38 +0100 Subject: [PATCH] Fix X12S --- radio/src/targets/horus/CMakeLists.txt | 2 +- radio/src/targets/simu/CMakeLists.txt | 1 + radio/src/targets/simu/gps_driver.cpp | 23 +++++++++++++++++++++++ radio/src/tests/CMakeLists.txt | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 radio/src/targets/simu/gps_driver.cpp diff --git a/radio/src/targets/horus/CMakeLists.txt b/radio/src/targets/horus/CMakeLists.txt index 90748d414..7ccc99c67 100644 --- a/radio/src/targets/horus/CMakeLists.txt +++ b/radio/src/targets/horus/CMakeLists.txt @@ -220,7 +220,7 @@ endif() if(INTERNAL_GPS) set(SRC ${SRC} gps.cpp) - set(TARGET_SRC ${TARGET_SRC} gps_driver.cpp) + set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} gps_driver.cpp) add_definitions(-DINTERNAL_GPS) message("Horus: Internal GPS enabled") endif() diff --git a/radio/src/targets/simu/CMakeLists.txt b/radio/src/targets/simu/CMakeLists.txt index cfcd16dd9..0fcdcbf30 100644 --- a/radio/src/targets/simu/CMakeLists.txt +++ b/radio/src/targets/simu/CMakeLists.txt @@ -21,6 +21,7 @@ set(SIMU_SRC backlight_driver.cpp gyro_driver.cpp bt_driver.cpp + gps_driver.cpp ) if(SIMU_DISKIO) diff --git a/radio/src/targets/simu/gps_driver.cpp b/radio/src/targets/simu/gps_driver.cpp new file mode 100644 index 000000000..d142f55d7 --- /dev/null +++ b/radio/src/targets/simu/gps_driver.cpp @@ -0,0 +1,23 @@ +/* + * Copyright (C) EdgeTX + * + * Based on code named + * opentx - https://github.com/opentx/opentx + * th9x - http://code.google.com/p/th9x + * er9x - http://code.google.com/p/er9x + * gruvin9x - http://code.google.com/p/gruvin9x + * + * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +void gpsGetByte(unsigned char*) {} +void gpsSendByte(unsigned char) {} diff --git a/radio/src/tests/CMakeLists.txt b/radio/src/tests/CMakeLists.txt index cd13421a4..cb3ef2321 100644 --- a/radio/src/tests/CMakeLists.txt +++ b/radio/src/tests/CMakeLists.txt @@ -66,6 +66,7 @@ if(GTEST_INCDIR AND GTEST_SRCDIR AND Qt5Widgets_FOUND) ../targets/simu/backlight_driver.cpp ../targets/simu/gyro_driver.cpp ../targets/simu/bt_driver.cpp + ../targets/simu/gps_driver.cpp ) add_dependencies(gtests-radio ${RADIO_DEPENDENCIES} ${FIRMWARE_DEPENDENCIES} gtests-radio-lib) if(PCB STREQUAL X12S OR PCB STREQUAL X10)