diff --git a/.appveyor.yml b/.appveyor.yml
index a096bf9a6f7fb06af87d48a2fd50eb5a5b57f6cd..a506d864576ac06371f8754cf3e277b4b4e7a402 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -14,17 +14,9 @@ environment:
install:
- git submodule update --init --recursive
- - call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
- - set PATH=C:\Qt\Tools\QtCreator\bin;C:\Qt\5.5\msvc2013\bin;%PATH%
+ - call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
+ - set PATH=C:\Qt\Tools\QtCreator\bin;C:\Qt\5.8\msvc2015\bin;%PATH%
- mkdir %LOCALAPPDATA%\QtProject && copy test\qtlogging.ini %LOCALAPPDATA%\QtProject\
- - ps: |
- Write-Host "Installing NSIS..." -ForegroundColor Cyan
- $exePath = "$($env:USERPROFILE)\nsis-3.0rc1-setup.exe"
- Write-Host "Downloading..."
- (New-Object Net.WebClient).DownloadFile('https://storage.googleapis.com/appveyor-download-cache/nsis/nsis-3.0rc1-setup.exe', $exePath)
- Write-Host "Installing..."
- cmd /c start /wait $exePath /S
- Write-Host "Installed" -ForegroundColor Green
- ps: |
Write-Host "Installing GStreamer..." -ForegroundColor Cyan
$msiPath = "$($env:USERPROFILE)\gstreamer-1.0-x86-1.5.2.msi"
@@ -43,7 +35,7 @@ install:
Write-Host "Installed" -ForegroundColor Green
build_script:
- - mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && C:\Qt\5.5\msvc2013\bin\qmake -r CONFIG-=debug_and_release CONFIG+=%CONFIG% CONFIG+=WarningsAsErrorsOn %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro
+ - mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && C:\Qt\5.8\msvc2015\bin\qmake -r CONFIG-=debug_and_release CONFIG+=%CONFIG% CONFIG+=WarningsAsErrorsOn %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro
- cd %SHADOW_BUILD_DIR% && jom
- if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\release\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe )
# Generate the source server information to embed in the PDB
diff --git a/.travis.yml b/.travis.yml
index 75f8b0e181c2a65052b0e8837f7bc2873bec58b2..bbb2485ea7c884a5d49063e88e30a78fb0921a95 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,18 +27,19 @@ matrix:
language: android
env: SPEC=android-g++ CONFIG=installer
sudo: false
- - os: osx
- osx_image: xcode8
- env: SPEC=macx-clang CONFIG=debug
- sudo: required
- os: osx
osx_image: xcode8
env: SPEC=macx-clang CONFIG=installer
sudo: required
- - os: osx
- osx_image: xcode8
- env: SPEC=macx-ios-clang CONFIG=release
- sudo: false
+# OSX builds pared back to installer only since travis sucks so bad we can't afford more than one'
+# - os: osx
+# osx_image: xcode8
+# env: SPEC=macx-clang CONFIG=debug
+# sudo: required
+# - os: osx
+# osx_image: xcode8
+# env: SPEC=macx-ios-clang CONFIG=release
+# sudo: false
android:
components:
@@ -88,9 +89,9 @@ before_install:
install:
# linux dependencies: qt
- if [ "${SPEC}" = "linux-g++-64" ]; then
- wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-linux-min.tar.bz2 &&
- tar jxf Qt5.5.1-linux-min.tar.bz2 -C /tmp &&
- export PATH=/tmp/Qt/5.5/gcc_64/bin:$PATH &&
+ wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-linux-min.tar.bz2 &&
+ tar jxf Qt5.8.0-linux-min.tar.bz2 -C /tmp &&
+ export PATH=/tmp/Qt5.8-linux/5.8/gcc_64/bin:$PATH &&
export DISPLAY=:99.0 &&
sh -e /etc/init.d/xvfb start
;
@@ -98,8 +99,8 @@ install:
# android dependencies: qt, gstreamer, android-ndk
- if [ "${SPEC}" = "android-g++" ]; then
- wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-linux-min.tar.bz2 &&
- tar jxf Qt5.5.1-linux-min.tar.bz2 -C /tmp &&
+ wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-android-min.tar.bz2 &&
+ tar jxf Qt5.8.0-android-min.tar.bz2 -C /tmp &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-android-armv7-1.5.2.tar.bz2 &&
mkdir -p ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.5.2 &&
tar jxf gstreamer-1.0-android-armv7-1.5.2.tar.bz2 -C ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.5.2 &&
@@ -108,35 +109,34 @@ install:
./android-ndk-r10e-linux-x86_64.bin > /dev/null &&
export ANDROID_NDK_ROOT=`pwd`/android-ndk-r10e &&
export ANDROID_SDK_ROOT=/usr/local/android-sdk &&
- export PATH=/tmp/Qt/5.5/android_armv7/bin:`pwd`/android-ndk-r10e:$PATH
+ export PATH=/tmp/Qt5.8-android/5.8/android_armv7/bin:`pwd`/android-ndk-r10e:$PATH && echo $PATH
;
fi
# osx dependencies: qt, gstreamer, gstreamer-devel
- if [ "${SPEC}" = "macx-clang" ]; then
- wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-mac-clang-min.tar.bz2 &&
- tar jxf Qt5.5.1-mac-clang-min.tar.bz2 -C /tmp &&
+ wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-mac-clang-min.tar.bz2 &&
+ tar jxf Qt5.8.0-mac-clang-min.tar.bz2 -C /tmp &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-1.5.2-x86_64.pkg &&
sudo installer -verboseR -pkg gstreamer-1.0-1.5.2-x86_64.pkg -target / &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-devel-1.5.2-x86_64.pkg &&
sudo installer -verboseR -pkg gstreamer-1.0-devel-1.5.2-x86_64.pkg -target / &&
wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/osx-gstreamer.tar.bz2 &&
sudo tar jxf osx-gstreamer.tar.bz2 -C /Library/Frameworks &&
- export QT_DIR=Qt5.5-mac-clang/5.5/clang_64 &&
+ export QT_DIR=Qt5.8-mac-clang/5.8/clang_64 &&
export QT_QPA_PLATFORM_PLUGIN_PATH=/tmp/$QT_DIR/plugins &&
export QML2_IMPORT_PATH=/tmp/$QT_DIR/qml &&
- export PATH=/tmp/$QT_DIR/bin:$PATH &&
- tools/patch_qt_for_xcode8.sh
+ export PATH=/tmp/$QT_DIR/bin:$PATH
;
fi
# ios dependencies: qt, TODO: add gstreamer
- if [ "${SPEC}" = "macx-ios-clang" ]; then
- wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.5.1-ios-min.tar.bz2 &&
- tar jxf Qt5.5.1-ios-min.tar.bz2 -C /tmp &&
+ wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-ios-min.tar.bz2 &&
+ tar jxf Qt5.8.0-ios-min.tar.bz2 -C /tmp &&
export IOS_CCACHE_CC=`/usr/bin/xcrun -sdk iphoneos -find clang` &&
export IOS_CCACHE_CXX=`/usr/bin/xcrun -sdk iphoneos -find clang++` &&
- export PATH=/tmp/ios/bin:$PATH &&
+ export PATH=/tmp/Qt5.8-ios/5.8/ios/bin:$PATH &&
tools/patch_qt_for_xcode8.sh
;
fi
@@ -174,12 +174,14 @@ script:
#- ccache -s
# unit tests linux/osx
- - if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "debug" ]]; then
- mkdir -p ~/.config/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/ &&
- ./debug/QGroundControl --unittest;
- elif [[ "${SPEC}" = "macx-clang" && "${CONFIG}" = "debug" ]]; then
- mkdir -p ~/Library/Preferences/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/Library/Preferences/QtProject/ &&
- ./debug/qgroundcontrol.app/Contents/MacOS/QGroundControl --unittest;
+ - if [ "${TRAVIS_BRANCH}" != "master" ]; then
+ if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "debug" ]]; then
+ mkdir -p ~/.config/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/ &&
+ ./debug/QGroundControl --unittest;
+ elif [[ "${SPEC}" = "macx-clang" && "${CONFIG}" = "debug" ]]; then
+ mkdir -p ~/Library/Preferences/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/Library/Preferences/QtProject/ &&
+ ./debug/qgroundcontrol.app/Contents/MacOS/QGroundControl --unittest;
+ fi
fi
after_success:
diff --git a/QGCCommon.pri b/QGCCommon.pri
index e10d5ea8551ec9c0be169f22ea3fcac577adfde1..732b99a00a9855b0421b42dcc63693616c55b2f2 100644
--- a/QGCCommon.pri
+++ b/QGCCommon.pri
@@ -38,7 +38,6 @@ linux {
equals(ANDROID_TARGET_ARCH, x86) {
CONFIG += Androidx86Build
DEFINES += __androidx86__
- DEFINES += QGC_DISABLE_UVC
message("Android x86 build")
} else {
message("Android Arm build")
@@ -47,7 +46,7 @@ linux {
error("Unsuported Linux toolchain, only GCC 32- or 64-bit is supported")
}
} else : win32 {
- win32-msvc2010 | win32-msvc2012 | win32-msvc2013 {
+ win32-msvc2010 | win32-msvc2012 | win32-msvc2013 | win32-msvc2015 {
message("Windows build")
CONFIG += WindowsBuild
DEFINES += __STDC_LIMIT_MACROS
@@ -77,9 +76,11 @@ linux {
error("Unsupported Qt version, 5.5.x or greater is required for iOS")
}
message("iOS build")
- CONFIG += iOSBuild MobileBuild app_bundle
+ CONFIG += iOSBuild MobileBuild app_bundle NoSerialBuild
+ CONFIG -= bitcode
DEFINES += __ios__
DEFINES += QGC_NO_GOOGLE_MAPS
+ DEFINES += NO_SERIAL_LINK
QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2 # Universal
QMAKE_LFLAGS += -Wl,-no_pie
@@ -202,8 +203,13 @@ MacBuild | LinuxBuild {
}
WindowsBuild {
+ win32-msvc2015 {
+ QMAKE_CFLAGS -= -Zc:strictStrings
+ QMAKE_CXXFLAGS -= -Zc:strictStrings
+ }
QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
+
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
QMAKE_CXXFLAGS_WARN_ON += /W3 \
@@ -221,7 +227,7 @@ WindowsBuild {
#
ReleaseBuild {
- DEFINES += QT_NO_DEBUG
+ DEFINES += QT_NO_DEBUG QT_MESSAGELOGCONTEXT
CONFIG += force_debug_info # Enable debugging symbols on release builds
!iOSBuild {
CONFIG += ltcg # Turn on link time code generation
@@ -239,11 +245,3 @@ ReleaseBuild {
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += /OPT:ICF
}
}
-
-#
-# Unit Test specific configuration goes here
-#
-
-DebugBuild {
- DEFINES += UNITTEST_BUILD
-}
diff --git a/QGCExternalLibs.pri b/QGCExternalLibs.pri
index 0f31a6e155a649fb1adedcbc450a936fa1ad9821..52e5de7fb69d0848634ad8006199e48311da3e98 100644
--- a/QGCExternalLibs.pri
+++ b/QGCExternalLibs.pri
@@ -65,103 +65,6 @@ DEPENDPATH += libs/qwt
INCLUDEPATH += libs/qwt
}
-#
-# [OPTIONAL] XBee wireless support. This is not necessary for basic serial/UART communications.
-# It's only required for speaking directly to the Xbee using their proprietary API.
-# Unsupported on Mac.
-# Installation on Windows is unnecessary, as we just link to our included .dlls directly.
-# Installing on Linux involves running `make;sudo make install` in `libs/thirdParty/libxbee`
-# Uninstalling from Linux can be done with `sudo make uninstall`.
-#
-XBEE_DEPENDENT_HEADERS += \
- src/comm/XbeeLinkInterface.h \
- src/comm/XbeeLink.h \
- src/comm/HexSpinBox.h \
- src/ui/XbeeConfigurationWindow.h \
- src/comm/CallConv.h
-XBEE_DEPENDENT_SOURCES += \
- src/comm/XbeeLink.cpp \
- src/comm/HexSpinBox.cpp \
- src/ui/XbeeConfigurationWindow.cpp
-XBEE_DEFINES = QGC_XBEE_ENABLED
-
-contains(DEFINES, DISABLE_XBEE) {
- message("Skipping support for native XBee API (manual override from command line)")
- DEFINES -= DISABLE_XBEE
-# Otherwise the user can still disable this feature in the user_config.pri file.
-} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_XBEE) {
- message("Skipping support for native XBee API (manual override from user_config.pri)")
-} else:LinuxBuild {
- linux-g++-64 {
- message("Skipping support for XBee API (64-bit Linux builds not supported)")
- } else:exists(/usr/include/xbee.h) {
- message("Including support for XBee API")
-
- HEADERS += $$XBEE_DEPENDENT_HEADERS
- SOURCES += $$XBEE_DEPENDENT_SOURCES
- DEFINES += $$XBEE_DEFINES
- LIBS += -L/usr/lib -lxbee
- } else {
- warning("Skipping support for XBee API (missing libraries, see README)")
- }
-} else:WindowsBuild {
- message("Including support for XBee API")
- HEADERS += $$XBEE_DEPENDENT_HEADERS
- SOURCES += $$XBEE_DEPENDENT_SOURCES
- DEFINES += $$XBEE_DEFINES
- INCLUDEPATH += libs/thirdParty/libxbee
- LIBS += -l$$BASEDIR/libs/thirdParty/libxbee/lib/libxbee
-} else {
- message("Skipping support for XBee API (unsupported platform)")
-}
-
-#
-# [OPTIONAL] Opal RT-LAB Library. Provides integration with Opal-RT's RT-LAB simulator.
-#
-contains(DEFINES, DISABLE_RTLAB) {
- message("Skipping support for RT-LAB (manual override from command line)")
- DEFINES -= DISABLE_RTLAB
-# Otherwise the user can still disable this feature in the user_config.pri file.
-} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_RTLAB) {
- message("Skipping support for RT-LAB (manual override from user_config.pri)")
-} else:WindowsBuild {
- exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
- message("Including support for RT-LAB")
-
- DEFINES += QGC_RTLAB_ENABLED
-
- INCLUDEPATH +=
- src/lib/opalrt
- libs/lib/opal/include \
-
- FORMS += src/ui/OpalLinkSettings.ui
-
- HEADERS += \
- src/comm/OpalRT.h \
- src/comm/OpalLink.h \
- src/comm/Parameter.h \
- src/comm/QGCParamID.h \
- src/comm/ParameterList.h \
- src/ui/OpalLinkConfigurationWindow.h
-
- SOURCES += \
- src/comm/OpalRT.cc \
- src/comm/OpalLink.cc \
- src/comm/Parameter.cc \
- src/comm/QGCParamID.cc \
- src/comm/ParameterList.cc \
- src/ui/OpalLinkConfigurationWindow.cc
-
- LIBS += \
- -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \
- -lOpalApi
- } else {
- warning("Skipping support for RT-LAB (missing libraries, see README)")
- }
-} else {
- message("Skipping support for RT-LAB (unsupported platform)")
-}
-
#
# [REQUIRED] SDL dependency. Provides joystick/gamepad support.
# The SDL is packaged with QGC for the Mac and Windows. Linux support requires installing the SDL
diff --git a/QGCInstaller.pri b/QGCInstaller.pri
index cce214a04f7878e4b56723650b7c0b622fd0ceb7..e47938565df9f38c653a93c30eec9b3f930fb853 100644
--- a/QGCInstaller.pri
+++ b/QGCInstaller.pri
@@ -29,7 +29,7 @@ installer {
QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt QGroundControl.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/src
QMAKE_POST_LINK += && cd $${OUT_PWD}
- QMAKE_POST_LINK += && hdiutil create -verbose -stretch 2g -layout SPUD -srcfolder $${DESTDIR}/QGroundControl.app -volname QGroundControl $${DESTDIR}/package/QGroundControl.dmg
+ QMAKE_POST_LINK += && hdiutil create -verbose -stretch 3g -layout SPUD -srcfolder $${DESTDIR}/QGroundControl.app -volname QGroundControl $${DESTDIR}/package/QGroundControl.dmg
}
WindowsBuild {
# The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much
diff --git a/QGCSetup.pri b/QGCSetup.pri
index 3cbfb74015b9a243b2f3c48c25379d55a8f26e62..fa0b3e5f678853bd92e5e2dfed4a5997e8e29d5b 100644
--- a/QGCSetup.pri
+++ b/QGCSetup.pri
@@ -63,7 +63,6 @@ WindowsBuild {
ReleaseBuild: DLL_QT_DEBUGCHAR = ""
COPY_FILE_LIST = \
$$BASEDIR\\libs\\lib\\sdl2\\msvc\\lib\\x86\\SDL2.dll \
- $$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
$$BASEDIR\\deploy\\libeay32.dll
for(COPY_FILE, COPY_FILE_LIST) {
@@ -85,6 +84,10 @@ WindowsBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp120.dll\" \"$$DESTDIR_WIN\"
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcr120.dll\" \"$$DESTDIR_WIN\"
}
+ else:win32-msvc2015 {
+ QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\msvcp140.dll\" \"$$DESTDIR_WIN\"
+ QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"C:\\Windows\\System32\\vcruntime140.dll\" \"$$DESTDIR_WIN\"
+ }
else {
error("Visual studio version not supported, installation cannot be completed.")
}
@@ -123,9 +126,9 @@ LinuxBuild {
!contains(DEFINES, __rasp_pi2__) {
QT_LIB_LIST += \
- libicudata.so.54 \
- libicui18n.so.54 \
- libicuuc.so.54
+ libicudata.so.56 \
+ libicui18n.so.56 \
+ libicuuc.so.56
}
for(QT_LIB, QT_LIB_LIST) {
diff --git a/README.md b/README.md
index 8fb9e497c0d86f3c72a8d74743c334ade013cfb8..cd0d25dd731a5334252a99515b5aed23c2507cb0 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ https://donlakeflyer.gitbooks.io/qgroundcontrol-user-guide/content/
#### Native Builds
QGroundControl builds are supported for OSX, Linux, Windows, iOS and Android. QGroundControl uses [Qt](http://www.qt.io) as its cross-platform support library and uses [QtCreator](http://doc.qt.io/qtcreator/index.html) as its default build environment.
-* OSX: OSX 10.7 or higher, 64 bit, clang compiler (IMPORTANT: XCode 8 not supported due to Qt bug. Currently only workaround is to use XCode 7.3.1)
+* OSX: OSX 10.7 or higher, 64 bit, clang compiler (IMPORTANT: XCode 8 requires a workaround described below)
* Ubuntu: 64 bit, gcc compiler
* Windows: Vista or higher, 32 bit, [Visual Studio 2013 compiler](http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop)
* iOS: 8.0 and higher
@@ -43,7 +43,8 @@ QGroundControl builds are supported for OSX, Linux, Windows, iOS and Android. QG
###### Install QT
You need to install Qt as described below instead of using pre-built packages from say, a Linux distribution because QGroundControl needs access to private Qt headers.
* Download the [Qt installer](http://www.qt.io/download-open-source)
- * Make sure to install Qt version **5.5.1** NOT 5.4.x, 5.6.x, 5.7.x, etc.
+ * Make sure to install Qt version **5.5.1** NOT 5.4.x, 5.6.x, 5.7.x, etc.
+ * If you don't install the full Qt 5.5 make sure you install Qt Location and Qt Quick Controls.
* Ubuntu: Set the downloaded file to executable using:`chmod +x`. Install to default location for use with ./qgroundcontrol-start.sh. If you install Qt to a non-default location you will need to modify qgroundcontrol-start.sh in order to run downloaded builds.
* Windows: Default installer not quite correct, use [this](http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-msvc2013-5.5.1.exe) instead
diff --git a/Vagrantfile b/Vagrantfile
index f58cd8766fafa3231264556b5ed7f451e92d81b9..41756cd1510bee7da1b89e1f77e83b51b04f8e03 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -25,7 +25,7 @@ Vagrant.configure(2) do |config|
sudo apt-get update -y
sudo apt-get dist-upgrade -y
sudo apt-get install -y git build-essential
- sudo apt-get install -y espeak libespeak-dev libudev-dev libsdl1.2-dev
+ sudo apt-get install -y espeak libespeak-dev libudev-dev libsdl2-dev
sudo apt-get install -y doxygen
sudo apt-get install -y gstreamer1.0* libgstreamer1.0*
diff --git a/android.pri b/android.pri
new file mode 100644
index 0000000000000000000000000000000000000000..eef0ae3f9cae5ca6fcdcf434a98dba2cdb1b0a0d
--- /dev/null
+++ b/android.pri
@@ -0,0 +1,26 @@
+include($$PWD/libs/qtandroidserialport/src/qtandroidserialport.pri)
+message("Adding Serial Java Classes")
+QT += androidextras
+ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
+OTHER_FILES += \
+ $$PWD/android/AndroidManifest.xml \
+ $$PWD/android/res/xml/device_filter.xml \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/CommonUsbSerialDriver.java \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/UsbId.java \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialDriver.java \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialProber.java \
+ $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \
+ $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java \
+ $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbIoManager.java
+
+DISTFILES += \
+ $$PWD/android/gradle/wrapper/gradle-wrapper.jar \
+ $$PWD/android/gradlew \
+ $$PWD/android/res/values/libs.xml \
+ $$PWD/android/build.gradle \
+ $$PWD/android/gradle/wrapper/gradle-wrapper.properties \
+ $$PWD/android/gradlew.bat
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 24bdd8a1b77f94ef20ecd9c9d2137a99dcbd7f22..f5009b3f46569bf64cbf6223c53cd6a546269da4 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -48,7 +48,7 @@
-
+
diff --git a/android/libs/d2xx.jar b/android/libs/d2xx.jar
new file mode 100755
index 0000000000000000000000000000000000000000..6610490d14a9a033ec212e5bb7febdd820756146
Binary files /dev/null and b/android/libs/d2xx.jar differ
diff --git a/android/res/xml/device_filter.xml b/android/res/xml/device_filter.xml
index a149a80b508d8f8978a9fdd66bfedd4b78ca4046..782fae8dd7e17709718b824ace9fa92e9479b52b 100644
--- a/android/res/xml/device_filter.xml
+++ b/android/res/xml/device_filter.xml
@@ -1,40 +1,6 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/android/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java b/android/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java
index ad3627ff38a75a50b71167ddf50f50b4ee5b1b51..5ca03607460a0c38844ebe777bebda38cd0a1f8e 100644
--- a/android/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java
+++ b/android/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java
@@ -18,6 +18,10 @@
* Project home page: http://code.google.com/p/usb-serial-for-android/
*/
+// IMPORTANT NOTE:
+// This code has been modified from the original source. It now uses the FTDI driver provided by
+// ftdichip.com to communicate with an FTDI device. The previous code did not work with all FTDI
+// devices.
package com.hoho.android.usbserial.driver;
import android.hardware.usb.UsbConstants;
@@ -27,12 +31,16 @@ import android.hardware.usb.UsbEndpoint;
import android.hardware.usb.UsbRequest;
import android.util.Log;
+import com.ftdi.j2xx.D2xxManager;
+import com.ftdi.j2xx.FT_Device;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.LinkedHashMap;
import java.util.Map;
+import org.qgroundcontrol.qgchelper.UsbDeviceJNI;
+
/**
* A {@link CommonUsbSerialDriver} implementation for a variety of FTDI devices
*
@@ -167,6 +175,8 @@ public class FtdiSerialDriver extends CommonUsbSerialDriver {
*/
private static final boolean ENABLE_ASYNC_READS = false;
+ FT_Device m_ftDev;
+
/**
* Filter FTDI status bytes from buffer
* @param src The source buffer (which contains status bytes)
@@ -219,261 +229,140 @@ public class FtdiSerialDriver extends CommonUsbSerialDriver {
@Override
public void open() throws IOException {
- boolean opened = false;
+ D2xxManager ftD2xx = null;
try {
- for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
- if (mConnection.claimInterface(mDevice.getInterface(i), true)) {
- Log.d(TAG, "claimInterface " + i + " SUCCESS");
- } else {
- throw new IOException("Error claiming interface " + i);
- }
- }
- reset();
- opened = true;
+ ftD2xx = D2xxManager.getInstance(UsbDeviceJNI.m_context);
+ } catch (D2xxManager.D2xxException ex) {
+ UsbDeviceJNI.qgcLogDebug("D2xxManager.getInstance threw exception: " + ex.getMessage());
+ }
+
+ if (ftD2xx == null) {
+ String errMsg = "Unable to retrieve D2xxManager instance.";
+ UsbDeviceJNI.qgcLogWarning(errMsg);
+ throw new IOException(errMsg);
+ }
+ UsbDeviceJNI.qgcLogDebug("Opened D2xxManager");
+
+ int DevCount = ftD2xx.createDeviceInfoList(UsbDeviceJNI.m_context);
+ UsbDeviceJNI.qgcLogDebug("Found " + DevCount + " ftdi devices.");
+ if (DevCount < 1) {
+ throw new IOException("No FTDI Devices found");
+ }
+
+ m_ftDev = null;
+ try {
+ m_ftDev = ftD2xx.openByIndex(UsbDeviceJNI.m_context, 0);
+ } catch (NullPointerException e) {
+ UsbDeviceJNI.qgcLogDebug("ftD2xx.openByIndex exception: " + e.getMessage());
} finally {
- if (!opened) {
- close();
+ if (m_ftDev == null) {
+ throw new IOException("No FTDI Devices found");
}
}
+ UsbDeviceJNI.qgcLogDebug("Opened FTDI device.");
}
@Override
public void close() {
- mConnection.close();
+ if (m_ftDev != null) {
+ try {
+ m_ftDev.close();
+ } catch (Exception e) {
+ UsbDeviceJNI.qgcLogWarning("close exception: " + e.getMessage());
+ }
+ m_ftDev = null;
+ }
}
@Override
public int read(byte[] dest, int timeoutMillis) throws IOException {
- final UsbEndpoint endpoint = mDevice.getInterface(0).getEndpoint(0);
-
- if (ENABLE_ASYNC_READS) {
- final int readAmt;
- synchronized (mReadBufferLock) {
- // mReadBuffer is only used for maximum read size.
- readAmt = Math.min(dest.length, mReadBuffer.length);
- }
-
- final UsbRequest request = new UsbRequest();
- request.initialize(mConnection, endpoint);
-
- final ByteBuffer buf = ByteBuffer.wrap(dest);
- if (!request.queue(buf, readAmt)) {
- throw new IOException("Error queueing request.");
- }
-
- final UsbRequest response = mConnection.requestWait();
- if (response == null) {
- throw new IOException("Null response");
- }
-
- final int payloadBytesRead = buf.position() - MODEM_STATUS_HEADER_LENGTH;
- if (payloadBytesRead > 0) {
- return payloadBytesRead;
- } else {
- return 0;
- }
- } else {
- final int totalBytesRead;
-
- synchronized (mReadBufferLock) {
- final int readAmt = Math.min(dest.length, mReadBuffer.length);
- totalBytesRead = mConnection.bulkTransfer(endpoint, mReadBuffer,
- readAmt, timeoutMillis);
-
- if (totalBytesRead < MODEM_STATUS_HEADER_LENGTH) {
- throw new IOException("Expected at least " + MODEM_STATUS_HEADER_LENGTH + " bytes");
- }
-
- return filterStatusBytes(mReadBuffer, dest, totalBytesRead, endpoint.getMaxPacketSize());
+ int totalBytesRead = 0;
+ int bytesAvailable = m_ftDev.getQueueStatus();
+
+ if (bytesAvailable > 0) {
+ bytesAvailable = Math.min(4096, bytesAvailable);
+ try {
+ totalBytesRead = m_ftDev.read(dest, bytesAvailable, timeoutMillis);
+ } catch (NullPointerException e) {
+ final String errorMsg = "Error reading: " + e.getMessage();
+ UsbDeviceJNI.qgcLogWarning(errorMsg);
+ throw new IOException(errorMsg, e);
}
}
+
+ return totalBytesRead;
}
@Override
public int write(byte[] src, int timeoutMillis) throws IOException {
- final UsbEndpoint endpoint = mDevice.getInterface(0).getEndpoint(1);
- int offset = 0;
-
- while (offset < src.length) {
- final int writeLength;
- final int amtWritten;
-
- synchronized (mWriteBufferLock) {
- final byte[] writeBuffer;
-
- writeLength = Math.min(src.length - offset, mWriteBuffer.length);
- if (offset == 0) {
- writeBuffer = src;
- } else {
- // bulkTransfer does not support offsets, make a copy.
- System.arraycopy(src, offset, mWriteBuffer, 0, writeLength);
- writeBuffer = mWriteBuffer;
- }
-
- amtWritten = mConnection.bulkTransfer(endpoint, writeBuffer, writeLength,
- timeoutMillis);
- }
-
- if (amtWritten <= 0) {
- throw new IOException("Error writing " + writeLength
- + " bytes at offset " + offset + " length=" + src.length);
- }
-
- //Log.d(TAG, "Wrote amtWritten=" + amtWritten + " attempted=" + writeLength);
- offset += amtWritten;
+ try {
+ m_ftDev.write(src);
+ return src.length;
+ } catch (Exception e) {
+ UsbDeviceJNI.qgcLogWarning("Error writing: " + e.getMessage());
}
- return offset;
+ return 0;
}
private int setBaudRate(int baudRate) throws IOException {
- long[] vals = convertBaudrate(baudRate);
- long actualBaudrate = vals[0];
- long index = vals[1];
- long value = vals[2];
- int result = mConnection.controlTransfer(FTDI_DEVICE_OUT_REQTYPE,
- SIO_SET_BAUD_RATE_REQUEST, (int) value, (int) index,
- null, 0, USB_WRITE_TIMEOUT_MILLIS);
- if (result != 0) {
- throw new IOException("Setting baudrate failed: result=" + result);
+ try {
+ m_ftDev.setBaudRate(baudRate);
+ return baudRate;
+ } catch (Exception e) {
+ UsbDeviceJNI.qgcLogWarning("Error setting baud rate: " + e.getMessage());
}
- return (int) actualBaudrate;
+ return 0;
}
@Override
- public void setParameters(int baudRate, int dataBits, int stopBits, int parity)
- throws IOException {
+ public void setParameters(int baudRate, int dataBits, int stopBits, int parity) throws IOException {
setBaudRate(baudRate);
- int config = dataBits;
-
- switch (parity) {
- case PARITY_NONE:
- config |= (0x00 << 8);
- break;
- case PARITY_ODD:
- config |= (0x01 << 8);
- break;
- case PARITY_EVEN:
- config |= (0x02 << 8);
- break;
- case PARITY_MARK:
- config |= (0x03 << 8);
- break;
- case PARITY_SPACE:
- config |= (0x04 << 8);
- break;
- default:
- throw new IllegalArgumentException("Unknown parity value: " + parity);
+ switch (dataBits) {
+ case 7:
+ dataBits = D2xxManager.FT_DATA_BITS_7;
+ break;
+ case 8:
+ default:
+ dataBits = D2xxManager.FT_DATA_BITS_8;
+ break;
}
switch (stopBits) {
- case STOPBITS_1:
- config |= (0x00 << 11);
- break;
- case STOPBITS_1_5:
- config |= (0x01 << 11);
- break;
- case STOPBITS_2:
- config |= (0x02 << 11);
- break;
- default:
- throw new IllegalArgumentException("Unknown stopBits value: " + stopBits);
- }
-
- int result = mConnection.controlTransfer(FTDI_DEVICE_OUT_REQTYPE,
- SIO_SET_DATA_REQUEST, config, 0 /* index */,
- null, 0, USB_WRITE_TIMEOUT_MILLIS);
- if (result != 0) {
- throw new IOException("Setting parameters failed: result=" + result);
+ default:
+ case 0:
+ stopBits = D2xxManager.FT_STOP_BITS_1;
+ break;
+ case 1:
+ stopBits = D2xxManager.FT_STOP_BITS_2;
+ break;
}
- }
- private long[] convertBaudrate(int baudrate) {
- // TODO(mikey): Braindead transcription of libfti method. Clean up,
- // using more idiomatic Java where possible.
- int divisor = 24000000 / baudrate;
- int bestDivisor = 0;
- int bestBaud = 0;
- int bestBaudDiff = 0;
- int fracCode[] = {
- 0, 3, 2, 4, 1, 5, 6, 7
- };
-
- for (int i = 0; i < 2; i++) {
- int tryDivisor = divisor + i;
- int baudEstimate;
- int baudDiff;
-
- if (tryDivisor <= 8) {
- // Round up to minimum supported divisor
- tryDivisor = 8;
- } else if (mType != DeviceType.TYPE_AM && tryDivisor < 12) {
- // BM doesn't support divisors 9 through 11 inclusive
- tryDivisor = 12;
- } else if (divisor < 16) {
- // AM doesn't support divisors 9 through 15 inclusive
- tryDivisor = 16;
- } else {
- if (mType == DeviceType.TYPE_AM) {
- // TODO
- } else {
- if (tryDivisor > 0x1FFFF) {
- // Round down to maximum supported divisor value (for
- // BM)
- tryDivisor = 0x1FFFF;
- }
- }
- }
-
- // Get estimated baud rate (to nearest integer)
- baudEstimate = (24000000 + (tryDivisor / 2)) / tryDivisor;
-
- // Get absolute difference from requested baud rate
- if (baudEstimate < baudrate) {
- baudDiff = baudrate - baudEstimate;
- } else {
- baudDiff = baudEstimate - baudrate;
- }
-
- if (i == 0 || baudDiff < bestBaudDiff) {
- // Closest to requested baud rate so far
- bestDivisor = tryDivisor;
- bestBaud = baudEstimate;
- bestBaudDiff = baudDiff;
- if (baudDiff == 0) {
- // Spot on! No point trying
- break;
- }
- }
- }
-
- // Encode the best divisor value
- long encodedDivisor = (bestDivisor >> 3) | (fracCode[bestDivisor & 7] << 14);
- // Deal with special cases for encoded value
- if (encodedDivisor == 1) {
- encodedDivisor = 0; // 3000000 baud
- } else if (encodedDivisor == 0x4001) {
- encodedDivisor = 1; // 2000000 baud (BM only)
+ switch (parity) {
+ default:
+ case 0:
+ parity = D2xxManager.FT_PARITY_NONE;
+ break;
+ case 1:
+ parity = D2xxManager.FT_PARITY_ODD;
+ break;
+ case 2:
+ parity = D2xxManager.FT_PARITY_EVEN;
+ break;
+ case 3:
+ parity = D2xxManager.FT_PARITY_MARK;
+ break;
+ case 4:
+ parity = D2xxManager.FT_PARITY_SPACE;
+ break;
}
- // Split into "value" and "index" values
- long value = encodedDivisor & 0xFFFF;
- long index;
- if (mType == DeviceType.TYPE_2232C || mType == DeviceType.TYPE_2232H
- || mType == DeviceType.TYPE_4232H) {
- index = (encodedDivisor >> 8) & 0xffff;
- index &= 0xFF00;
- index |= 0 /* TODO mIndex */;
- } else {
- index = (encodedDivisor >> 16) & 0xffff;
+ try {
+ m_ftDev.setDataCharacteristics((byte)dataBits, (byte)stopBits, (byte)parity);
+ } catch (Exception e) {
+ UsbDeviceJNI.qgcLogWarning("Error setDataCharacteristics: " + e.getMessage());
}
-
- // Return the nearest baud rate
- return new long[] {
- bestBaud, index, value
- };
}
-
@Override
public boolean getCD() throws IOException {
return false;
@@ -515,18 +404,22 @@ public class FtdiSerialDriver extends CommonUsbSerialDriver {
@Override
public boolean purgeHwBuffers(boolean purgeReadBuffers, boolean purgeWriteBuffers) throws IOException {
if (purgeReadBuffers) {
- int result = mConnection.controlTransfer(FTDI_DEVICE_OUT_REQTYPE, SIO_RESET_REQUEST,
- SIO_RESET_PURGE_RX, 0 /* index */, null, 0, USB_WRITE_TIMEOUT_MILLIS);
- if (result != 0) {
- throw new IOException("Flushing RX failed: result=" + result);
+ try {
+ m_ftDev.purge(D2xxManager.FT_PURGE_RX);
+ } catch (Exception e) {
+ String errMsg = "Error purgeHwBuffers(RX): "+ e.getMessage();
+ UsbDeviceJNI.qgcLogWarning(errMsg);
+ throw new IOException(errMsg);
}
}
if (purgeWriteBuffers) {
- int result = mConnection.controlTransfer(FTDI_DEVICE_OUT_REQTYPE, SIO_RESET_REQUEST,
- SIO_RESET_PURGE_TX, 0 /* index */, null, 0, USB_WRITE_TIMEOUT_MILLIS);
- if (result != 0) {
- throw new IOException("Flushing RX failed: result=" + result);
+ try {
+ m_ftDev.purge(D2xxManager.FT_PURGE_TX);
+ } catch (Exception e) {
+ String errMsg = "Error purgeHwBuffers(TX): " + e.getMessage();
+ UsbDeviceJNI.qgcLogWarning(errMsg);
+ throw new IOException(errMsg);
}
}
diff --git a/android/src/com/hoho/android/usbserial/driver/UsbSerialProber.java b/android/src/com/hoho/android/usbserial/driver/UsbSerialProber.java
index 2e25a761e9c27488479ce383a7ee48bb6227413a..b689ccc7c28e1b47c05c41a016bfe9567ffcdd5a 100644
--- a/android/src/com/hoho/android/usbserial/driver/UsbSerialProber.java
+++ b/android/src/com/hoho/android/usbserial/driver/UsbSerialProber.java
@@ -18,6 +18,10 @@
* Project home page: http://code.google.com/p/usb-serial-for-android/
*/
+// IMPORTANT NOTE:
+// This source has been modified from the original such that testIfSupported only tests for a vendor id
+// match. If that matches it allows all product ids through. This provides for better match on unknown boards.
+
package com.hoho.android.usbserial.driver;
import android.hardware.usb.UsbDevice;
@@ -230,21 +234,7 @@ public enum UsbSerialProber {
* @param supportedDevices map of vendor IDs to product ID(s)
* @return {@code true} if supported
*/
- private static boolean testIfSupported(final UsbDevice usbDevice,
- final Map supportedDevices) {
- final int[] supportedProducts = supportedDevices.get(
- Integer.valueOf(usbDevice.getVendorId()));
- if (supportedProducts == null) {
- return false;
- }
-
- final int productId = usbDevice.getProductId();
- for (int supportedProductId : supportedProducts) {
- if (productId == supportedProductId) {
- return true;
- }
- }
- return false;
+ private static boolean testIfSupported(final UsbDevice usbDevice, final Map supportedDevices) {
+ return supportedDevices.containsKey(usbDevice.getVendorId());
}
-
}
diff --git a/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java b/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java
index 6520ebb6b9258722fa168a19aa9743b9e7820ff8..183d5c25786fa78a4feb9a0fedb255207373c442 100644
--- a/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java
+++ b/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java
@@ -68,6 +68,8 @@ public class UsbDeviceJNI extends QtActivity implements TextToSpeech.OnInitListe
private static TextToSpeech m_tts;
private static PowerManager.WakeLock m_wl;
+ public static Context m_context;
+
private final static UsbIoManager.Listener m_Listener =
new UsbIoManager.Listener()
{
@@ -90,6 +92,10 @@ public class UsbDeviceJNI extends QtActivity implements TextToSpeech.OnInitListe
private static native void nativeDeviceException(int userDataA, String messageA);
private static native void nativeDeviceNewData(int userDataA, byte[] dataA);
+ // Native C++ functions called to log output
+ public static native void qgcLogDebug(String message);
+ public static native void qgcLogWarning(String message);
+
////////////////////////////////////////////////////////////////////////////////////////////////
//
// Constructor. Only used once to create the initial instance for the static functions.
@@ -252,7 +258,7 @@ public class UsbDeviceJNI extends QtActivity implements TextToSpeech.OnInitListe
tempL = tempL + Integer.toString(deviceL.getVendorId()) + ":";
listL[countL] = tempL;
countL++;
- //Log.i(TAG, "Found " + tempL);
+ qgcLogDebug("Found " + tempL);
}
}
@@ -273,11 +279,13 @@ public class UsbDeviceJNI extends QtActivity implements TextToSpeech.OnInitListe
// calls like close(), read(), and write().
//
/////////////////////////////////////////////////////////////////////////////////////////////////
- public static int open(String nameA, int userDataA)
+ public static int open(Context parentContext, String nameA, int userDataA)
{
int idL = BAD_PORT;
- Log.i(TAG, "Getting device list");
+ m_context = parentContext;
+
+ //qgcLogDebug("Getting device list");
if (!getCurrentDevices())
return BAD_PORT;
@@ -366,7 +374,7 @@ public class UsbDeviceJNI extends QtActivity implements TextToSpeech.OnInitListe
m_ioManager.remove(idL);
}
- Log.e(TAG, "Port open exception");
+ qgcLogWarning("Port open exception: " + exA.getMessage());
return BAD_PORT;
}
}
diff --git a/deploy/create_linux_appimage.sh b/deploy/create_linux_appimage.sh
index 5ebb9bd80c9842cb454a3fe225757a9b0aed0bed..57ecb2dd7b3e4b211edc56c6dd31e20d43f24f15 100755
--- a/deploy/create_linux_appimage.sh
+++ b/deploy/create_linux_appimage.sh
@@ -35,7 +35,8 @@ mkdir -p ${APPDIR}
cd ${TMPDIR}
wget -c --quiet http://ftp.us.debian.org/debian/pool/main/u/udev/udev_175-7.2_amd64.deb
wget -c --quiet http://ftp.us.debian.org/debian/pool/main/e/espeak/espeak_1.46.02-2_amd64.deb
-wget -c --quiet http://ftp.us.debian.org/debian/pool/main/libs/libsdl1.2/libsdl1.2debian_1.2.15-5_amd64.deb
+wget -c --quiet http://ftp.us.debian.org/debian/pool/main/libs/libsdl2/libsdl2-2.0-0_2.0.2%2bdfsg1-6_amd64.deb
+
cd ${APPDIR}
find ../ -name *.deb -exec dpkg -x {} . \;
diff --git a/deploy/qgroundcontrol_installer.nsi b/deploy/qgroundcontrol_installer.nsi
index 36833d1fe70d0c74abcb9b283eb7af164bd5b8ed..2fee9698a7009ba17675f71ed6f5406a1834e239 100644
--- a/deploy/qgroundcontrol_installer.nsi
+++ b/deploy/qgroundcontrol_installer.nsi
@@ -41,6 +41,8 @@ Var StartMenuFolder
InstallDir $PROGRAMFILES\qgroundcontrol
+SetCompressor /SOLID /FINAL lzma
+
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "installheader.bmp";
diff --git a/ios/iOS-Info.plist b/ios/iOS-Info.plist
index 1343e18ee0c8f1224bdf0985a8cde51f8aaf7674..a7bde7a2ae5a6ef0e02debe7660e0fcd142bf562 100644
--- a/ios/iOS-Info.plist
+++ b/ios/iOS-Info.plist
@@ -2,85 +2,87 @@
- CFBundleDisplayName
- QGroundControl
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- NSHumanReadableCopyright
- Open Source Flight Systems GmbH - Internal Build
- CFBundleIconFile
-
- CFBundleIdentifier
- org.QGroundControl.qgc
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 0.0.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- QGCLaunchScreen
- UIRequiresFullScreen
-
- CFBundleInfoDictionaryVersion
- 6.0
- ForAppStore
- No
- NSLocationUsageDescription
- Ground Station Location
- NSLocationWhenInUseUsageDescription
- Ground Station Location
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- CFBundleIcons
-
- CFBundlePrimaryIcon
-
- CFBundleIconFiles
-
- AppIcon29x29.png
- AppIcon29x29@2x.png
- AppIcon40x40@2x.png
- AppIcon57x57.png
- AppIcon57x57@2x.png
- AppIcon60x60@2x.png
-
-
-
- CFBundleIcons~ipad
-
- CFBundlePrimaryIcon
-
- CFBundleIconFiles
-
- AppIcon29x29.png
- AppIcon29x29@2x.png
- AppIcon40x40@2x.png
- AppIcon57x57.png
- AppIcon57x57@2x.png
- AppIcon60x60@2x.png
- AppIcon29x29~ipad.png
- AppIcon29x29@2x~ipad.png
- AppIcon40x40~ipad.png
- AppIcon40x40@2x~ipad.png
- AppIcon50x50~ipad.png
- AppIcon50x50@2x~ipad.png
- AppIcon72x72~ipad.png
- AppIcon72x72@2x~ipad.png
- AppIcon76x76~ipad.png
- AppIcon76x76@2x~ipad.png
- AppIcon83.5x83.5@2x~ipad.png
-
-
-
+ NSCameraUsageDescription
+ QGC uses UVC devices for video streaming.
+ CFBundleDisplayName
+ QGroundControl
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ NSHumanReadableCopyright
+ Open Source Flight Systems GmbH - Internal Build
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ org.QGroundControl.qgc
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 0.0.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ QGCLaunchScreen
+ UIRequiresFullScreen
+
+ CFBundleInfoDictionaryVersion
+ 6.0
+ ForAppStore
+ No
+ NSLocationUsageDescription
+ Ground Station Location
+ NSLocationWhenInUseUsageDescription
+ Ground Station Location
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CFBundleIcons
+
+ CFBundlePrimaryIcon
+
+ CFBundleIconFiles
+
+ AppIcon29x29.png
+ AppIcon29x29@2x.png
+ AppIcon40x40@2x.png
+ AppIcon57x57.png
+ AppIcon57x57@2x.png
+ AppIcon60x60@2x.png
+
+
+
+ CFBundleIcons~ipad
+
+ CFBundlePrimaryIcon
+
+ CFBundleIconFiles
+
+ AppIcon29x29.png
+ AppIcon29x29@2x.png
+ AppIcon40x40@2x.png
+ AppIcon57x57.png
+ AppIcon57x57@2x.png
+ AppIcon60x60@2x.png
+ AppIcon29x29~ipad.png
+ AppIcon29x29@2x~ipad.png
+ AppIcon40x40~ipad.png
+ AppIcon40x40@2x~ipad.png
+ AppIcon50x50~ipad.png
+ AppIcon50x50@2x~ipad.png
+ AppIcon72x72~ipad.png
+ AppIcon72x72@2x~ipad.png
+ AppIcon76x76~ipad.png
+ AppIcon76x76@2x~ipad.png
+ AppIcon83.5x83.5@2x~ipad.png
+
+
+
diff --git a/libs/lib/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist b/libs/lib/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist
new file mode 100644
index 0000000000000000000000000000000000000000..835d005fe6999f6089fe0a08b7d86455d783ab6b
--- /dev/null
+++ b/libs/lib/Frameworks/SDL2.framework/Versions/A/Resources/Info.plist
@@ -0,0 +1,46 @@
+
+
+
+
+ BuildMachineOSBuild
+ 15C50
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ SDL2
+ CFBundleGetInfoString
+ http://www.libsdl.org
+ CFBundleIdentifier
+ org.libsdl.SDL2
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ Simple DirectMedia Layer
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 2.0.4
+ CFBundleSignature
+ SDLX
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+ CFBundleVersion
+ 2.0.4
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+ 7C68
+ DTPlatformVersion
+ GM
+ DTSDKBuild
+ 15C43
+ DTSDKName
+ macosx10.11
+ DTXcode
+ 0720
+ DTXcodeBuild
+ 7C68
+
+
diff --git a/libs/lib/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources b/libs/lib/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources
deleted file mode 100644
index 0bc8c6308d3d213e6358949cb920d841c36de2af..0000000000000000000000000000000000000000
--- a/libs/lib/Frameworks/SDL2.framework/Versions/A/_CodeSignature/CodeResources
+++ /dev/null
@@ -1,351 +0,0 @@
-
-
-
-
- files
-
- Resources/Info.plist
-
- p+Cz4Y64VH6pZL+sceQcjAJniME=
-
-
- files2
-
- Headers/SDL.h
-
- 7nrs8rqLHJbbjdCsBibxA6rEHdE=
-
- Headers/SDL_assert.h
-
- WAfvaSHAUBsbTpD1OW6bLIO3TDo=
-
- Headers/SDL_atomic.h
-
- 6ZfydfmWn0sHmKXyYj1gCJC9EdQ=
-
- Headers/SDL_audio.h
-
- QlFi0vrVOdDgVyOeeux8WYNfJtY=
-
- Headers/SDL_bits.h
-
- bBKWsjJQnPdjedRePFr25fPkhrM=
-
- Headers/SDL_blendmode.h
-
- Qbv4ZV4rYaGKgwLfmRqpUXcfrzo=
-
- Headers/SDL_clipboard.h
-
- E2B/Gj1/db5PjecKc2tjGLGnnEU=
-
- Headers/SDL_config.h
-
- SICWRZVShJxQcjoldrByc8tKyiE=
-
- Headers/SDL_config_macosx.h
-
- AXT1YfhBssV2mdMI7radyWtrnV4=
-
- Headers/SDL_copying.h
-
- ksKqAB2l2GpnBa96oo8FhwfrjZs=
-
- Headers/SDL_cpuinfo.h
-
- L1bug7VmDQNJDS/a2qhveSB41wg=
-
- Headers/SDL_endian.h
-
- yIPSROTHpa65o98kvhVPa5vJd20=
-
- Headers/SDL_error.h
-
- EKMXAYytkozTsnGEetwJSWxDdXs=
-
- Headers/SDL_events.h
-
- ADO6YH92cpZr0xch44chc5jDoBk=
-
- Headers/SDL_filesystem.h
-
- z0ipNXSs0G+cMSE5xJ/1OLb0iww=
-
- Headers/SDL_gamecontroller.h
-
- +fEy8fr9o1eNqVcgZxdAGSB+fdg=
-
- Headers/SDL_gesture.h
-
- gL8Pe0KmmUmvy06MPiwcXLy1RPc=
-
- Headers/SDL_haptic.h
-
- mZKe1lBgPwES+wjXj+NqIqG4D7g=
-
- Headers/SDL_hints.h
-
- 8ccADZ7c1T6VURxXmnucUptCjFE=
-
- Headers/SDL_joystick.h
-
- GQ1apgzllUcFXq08Wp6GXfaItxk=
-
- Headers/SDL_keyboard.h
-
- wqXTQaRIpfh2YsZOyej8AymHDh4=
-
- Headers/SDL_keycode.h
-
- 6bL7lbeGExj/h8aqaSdhpq23rJY=
-
- Headers/SDL_loadso.h
-
- NpMytx6UwU3pTsWYm9KbfrSeyBM=
-
- Headers/SDL_log.h
-
- rghDDMt7l/53fcvzIf2ueASgru0=
-
- Headers/SDL_main.h
-
- S4r/E0n7XChUx09exG9MmT+wVC4=
-
- Headers/SDL_messagebox.h
-
- AofMdqXibVh1eLBrQBaSJtT2TBA=
-
- Headers/SDL_mouse.h
-
- I0gCdZwctoT8UsPkCyQcev84wic=
-
- Headers/SDL_mutex.h
-
- V9Eo8zGubHioHOR/zDh7vxX7Ot0=
-
- Headers/SDL_name.h
-
- mEOy6xwQy0aKcghbHD2Gk8AiE2Y=
-
- Headers/SDL_opengl.h
-
- uLy76O02VpeHP49lGqfyOJZVN98=
-
- Headers/SDL_opengl_glext.h
-
- nqPX1ObCVYyVzW3VbD3C/1vaTRE=
-
- Headers/SDL_opengles.h
-
- Qe8Wo6WE/eFYjQpZNSkjrEdPH3k=
-
- Headers/SDL_opengles2.h
-
- j2409OmIX5ZzPeAohEUZ9fTY0dA=
-
- Headers/SDL_opengles2_gl2.h
-
- g4y04zPFy1H/qujSNGRd0vB7ClQ=
-
- Headers/SDL_opengles2_gl2ext.h
-
- bTlnL+42kbi+n/gH//X2p0pqeuM=
-
- Headers/SDL_opengles2_gl2platform.h
-
- ByFMXJFtjcRglS/e0+DujyjC3dM=
-
- Headers/SDL_opengles2_khrplatform.h
-
- NLpJq9uBqjOpWhXISOQHPnTp/XQ=
-
- Headers/SDL_pixels.h
-
- SYKqjrlfx4WBrF/7RJJcebj022I=
-
- Headers/SDL_platform.h
-
- yEP4Wx6FLQvho00DCxY4qMLDnV0=
-
- Headers/SDL_power.h
-
- Hht8UlX2Q+ZZYP4+TOUjRtFj+Ww=
-
- Headers/SDL_quit.h
-
- 4gv2IjG2mCPLKUXLEgxBp+zQLuM=
-
- Headers/SDL_rect.h
-
- ArluDPEgeo4k7O85ALBoryFpGyk=
-
- Headers/SDL_render.h
-
- geL0fIDmDRM/s1nP1HdMh7Bn+KY=
-
- Headers/SDL_revision.h
-
- U25Cfa7DqslNn/mqxEnMfgLnA9I=
-
- Headers/SDL_rwops.h
-
- NLcf6LWtFIqQT/OcVl+KUtvGVIY=
-
- Headers/SDL_scancode.h
-
- cFbtc//t5wQjDoEFox2sb72ixzM=
-
- Headers/SDL_shape.h
-
- uI7SsJKg+9VUi3Ol3HSjbrfJiuw=
-
- Headers/SDL_stdinc.h
-
- EqWdk11X5VFG5/gIaFSC2tThVN0=
-
- Headers/SDL_surface.h
-
- WoUDHhIvivPiGkT/PjIt7/Wag0k=
-
- Headers/SDL_system.h
-
- mTKo4PBIinn03uXfN1DJ/He9e9k=
-
- Headers/SDL_syswm.h
-
- ZpNuqGdez02XRnDbUCnPQlvrpQg=
-
- Headers/SDL_thread.h
-
- 7j7DqnFpoS63qhuVR2Q0gSa/4ds=
-
- Headers/SDL_timer.h
-
- wTTvR/s4oORZCAHQrwGvEitdftg=
-
- Headers/SDL_touch.h
-
- iTKBLV0gnsn1y4RjFyKjss42FAw=
-
- Headers/SDL_types.h
-
- sxzg0bkqO1atJAHHIFE6TMMWt+w=
-
- Headers/SDL_version.h
-
- H5m85H3BgpanqxVVrr8x27umKn0=
-
- Headers/SDL_video.h
-
- vdRhnMIZssjdCJ72fNj04OTX3u0=
-
- Headers/begin_code.h
-
- WnMoGL8utnke7xWxpDeTFp+/QIA=
-
- Headers/close_code.h
-
- nnSi+1tlfaAkwmjGng6tRmzXcnw=
-
- Resources/Info.plist
-
- p+Cz4Y64VH6pZL+sceQcjAJniME=
-
-
- rules
-
- ^Resources/
-
- ^Resources/.*\.lproj/
-
- optional
-
- weight
- 1000
-
- ^Resources/.*\.lproj/locversion.plist$
-
- omit
-
- weight
- 1100
-
- ^version.plist$
-
-
- rules2
-
- .*\.dSYM($|/)
-
- weight
- 11
-
- ^(.*/)?\.DS_Store$
-
- omit
-
- weight
- 2000
-
- ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
-
- nested
-
- weight
- 10
-
- ^.*
-
- ^Info\.plist$
-
- omit
-
- weight
- 20
-
- ^PkgInfo$
-
- omit
-
- weight
- 20
-
- ^Resources/
-
- weight
- 20
-
- ^Resources/.*\.lproj/
-
- optional
-
- weight
- 1000
-
- ^Resources/.*\.lproj/locversion.plist$
-
- omit
-
- weight
- 1100
-
- ^[^/]+$
-
- nested
-
- weight
- 10
-
- ^embedded\.provisionprofile$
-
- weight
- 20
-
- ^version\.plist$
-
- weight
- 20
-
-
-
-
diff --git a/libs/mavlink/include/mavlink/v1.0 b/libs/mavlink/include/mavlink/v1.0
index e93ac62981a338a7c823364e7c4ff1077e3f8fc1..13a478092fc9c2faa90c553c362e799ba3bad4e8 160000
--- a/libs/mavlink/include/mavlink/v1.0
+++ b/libs/mavlink/include/mavlink/v1.0
@@ -1 +1 @@
-Subproject commit e93ac62981a338a7c823364e7c4ff1077e3f8fc1
+Subproject commit 13a478092fc9c2faa90c553c362e799ba3bad4e8
diff --git a/libs/mavlink/include/mavlink/v2.0 b/libs/mavlink/include/mavlink/v2.0
index 36f37bde1df2dd36661fbcbd6ed5aaf0424c8269..b5aaac46c4819bab0f80d4d071ae9a8fec439676 160000
--- a/libs/mavlink/include/mavlink/v2.0
+++ b/libs/mavlink/include/mavlink/v2.0
@@ -1 +1 @@
-Subproject commit 36f37bde1df2dd36661fbcbd6ed5aaf0424c8269
+Subproject commit b5aaac46c4819bab0f80d4d071ae9a8fec439676
diff --git a/libs/qtandroidserialport/src/qserialport_android.cpp b/libs/qtandroidserialport/src/qserialport_android.cpp
index 675805a459572798b2cd078cc728e82d17918a57..9e8060c03dae3d8dd006564d78bb0ed3628c2a2f 100644
--- a/libs/qtandroidserialport/src/qserialport_android.cpp
+++ b/libs/qtandroidserialport/src/qserialport_android.cpp
@@ -46,10 +46,10 @@
#include
#include
-#include
-
#include "qserialport_android_p.h"
+QGC_LOGGING_CATEGORY(AndroidSerialPortLog, "AndroidSerialPortLog")
+
QT_BEGIN_NAMESPACE
#define BAD_PORT 0
@@ -91,6 +91,30 @@ static void jniDeviceException(JNIEnv *envA, jobject thizA, jint userDataA, jstr
}
}
+static void jniLogDebug(JNIEnv *envA, jobject thizA, jstring messageA)
+{
+ Q_UNUSED(thizA);
+
+ const char *stringL = envA->GetStringUTFChars(messageA, NULL);
+ QString logMessage = QString::fromUtf8(stringL);
+ envA->ReleaseStringUTFChars(messageA, stringL);
+ if (envA->ExceptionCheck())
+ envA->ExceptionClear();
+ qCDebug(AndroidSerialPortLog) << logMessage;
+}
+
+static void jniLogWarning(JNIEnv *envA, jobject thizA, jstring messageA)
+{
+ Q_UNUSED(thizA);
+
+ const char *stringL = envA->GetStringUTFChars(messageA, NULL);
+ QString logMessage = QString::fromUtf8(stringL);
+ envA->ReleaseStringUTFChars(messageA, stringL);
+ if (envA->ExceptionCheck())
+ envA->ExceptionClear();
+ qWarning() << logMessage;
+}
+
void cleanJavaException()
{
QAndroidJniEnvironment env;
@@ -116,13 +140,15 @@ QSerialPortPrivate::QSerialPortPrivate(QSerialPort *q)
void QSerialPortPrivate::setNativeMethods(void)
{
- __android_log_print(ANDROID_LOG_INFO, kJTag, "Registering Native Functions");
+ qCDebug(AndroidSerialPortLog) << "Registering Native Functions";
// REGISTER THE C++ FUNCTION WITH JNI
JNINativeMethod javaMethods[] {
- {"nativeDeviceHasDisconnected", "(I)V", reinterpret_cast(jniDeviceHasDisconnected)},
- {"nativeDeviceNewData", "(I[B)V", reinterpret_cast(jniDeviceNewData)},
- {"nativeDeviceException", "(ILjava/lang/String;)V", reinterpret_cast(jniDeviceException)}
+ {"nativeDeviceHasDisconnected", "(I)V", reinterpret_cast(jniDeviceHasDisconnected)},
+ {"nativeDeviceNewData", "(I[B)V", reinterpret_cast(jniDeviceNewData)},
+ {"nativeDeviceException", "(ILjava/lang/String;)V", reinterpret_cast(jniDeviceException)},
+ {"qgcLogDebug", "(Ljava/lang/String;)V", reinterpret_cast(jniLogDebug)},
+ {"qgcLogWarning", "(Ljava/lang/String;)V", reinterpret_cast(jniLogWarning)}
};
QAndroidJniEnvironment jniEnv;
@@ -133,36 +159,36 @@ void QSerialPortPrivate::setNativeMethods(void)
jclass objectClass = jniEnv->FindClass(kJniClassName);
if(!objectClass) {
- __android_log_print(ANDROID_LOG_ERROR, kJTag, "Couldn't find class: %s", kJniClassName);
+ qWarning() << "Couldn't find class:" << kJniClassName;
return;
}
jint val = jniEnv->RegisterNatives(objectClass, javaMethods, sizeof(javaMethods) / sizeof(javaMethods[0]));
- __android_log_print(ANDROID_LOG_INFO, kJTag, "Native Functions Registered");
+ if (val < 0) {
+ qWarning() << "Error registering methods: " << val;
+ } else {
+ qCDebug(AndroidSerialPortLog) << "Native Functions Registered";
+ }
if (jniEnv->ExceptionCheck()) {
jniEnv->ExceptionDescribe();
jniEnv->ExceptionClear();
}
-
- if (val < 0) {
- __android_log_print(ANDROID_LOG_ERROR, kJTag, "Error registering methods");
- }
}
bool QSerialPortPrivate::open(QIODevice::OpenMode mode)
{
rwMode = mode;
- __android_log_print(ANDROID_LOG_INFO, kJTag, "Opening %s", systemLocation.toLatin1().data());
+ qCDebug(AndroidSerialPortLog) << "Opening" << systemLocation.toLatin1().data();
- __android_log_print(ANDROID_LOG_INFO, kJTag, "Calling Java Open");
QAndroidJniObject jnameL = QAndroidJniObject::fromString(systemLocation);
cleanJavaException();
deviceId = QAndroidJniObject::callStaticMethod(
kJniClassName,
"open",
- "(Ljava/lang/String;I)I",
+ "(Landroid/content/Context;Ljava/lang/String;I)I",
+ QtAndroid::androidActivity().object(),
jnameL.object(),
(jint)this);
cleanJavaException();
@@ -171,20 +197,11 @@ bool QSerialPortPrivate::open(QIODevice::OpenMode mode)
if (deviceId == BAD_PORT)
{
- __android_log_print(ANDROID_LOG_ERROR, kJTag, "Error opening %s", systemLocation.toLatin1().data());
+ qWarning() << "Error opening %s" << systemLocation.toLatin1().data();
q_ptr->setError(QSerialPort::DeviceNotFoundError);
return false;
}
- __android_log_print(ANDROID_LOG_INFO, kJTag, "Calling Java getDeviceHandle");
- cleanJavaException();
- descriptor = QAndroidJniObject::callStaticMethod(
- kJniClassName,
- "getDeviceHandle",
- "(I)I",
- deviceId);
- cleanJavaException();
-
if (rwMode == QIODevice::WriteOnly)
stopReadThread();
@@ -196,7 +213,7 @@ void QSerialPortPrivate::close()
if (deviceId == BAD_PORT)
return;
- __android_log_print(ANDROID_LOG_INFO, kJTag, "Closing %s", systemLocation.toLatin1().data());
+ qCDebug(AndroidSerialPortLog) << "Closing" << systemLocation.toLatin1().data();
cleanJavaException();
jboolean resultL = QAndroidJniObject::callStaticMethod(
kJniClassName,
diff --git a/libs/qtandroidserialport/src/qserialport_android_p.h b/libs/qtandroidserialport/src/qserialport_android_p.h
index c10c41cc4a29cd61b0d9b6213a9abca9821fd695..4778774d29689ad99550cd414a87c816eaa81ff6 100644
--- a/libs/qtandroidserialport/src/qserialport_android_p.h
+++ b/libs/qtandroidserialport/src/qserialport_android_p.h
@@ -49,6 +49,9 @@
#include
#include
+#include "QGCLoggingCategory.h"
+
+Q_DECLARE_LOGGING_CATEGORY(AndroidSerialPortLog)
QT_BEGIN_NAMESPACE
diff --git a/libs/qwt/qwt_plot_canvas.cpp b/libs/qwt/qwt_plot_canvas.cpp
index 0271713a8b50c44478dfcc6335d513e49c37e818..e558a44ee0afdc67ec3d036d6b9b70fad0d3ba07 100644
--- a/libs/qwt/qwt_plot_canvas.cpp
+++ b/libs/qwt/qwt_plot_canvas.cpp
@@ -937,7 +937,14 @@ void QwtPlotCanvas::drawBorder( QPainter *painter )
else
{
#if QT_VERSION >= 0x040500
+#if !defined(_MSC_VER)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
QStyleOptionFrameV3 opt;
+#if !defined(_MSC_VER)
+#pragma GCC diagnostic pop
+#endif
opt.init(this);
int frameShape = frameStyle() & QFrame::Shape_Mask;
diff --git a/libs/thirdParty/libxbee/LICENSE b/libs/thirdParty/libxbee/LICENSE
deleted file mode 100644
index 94a9ed024d3859793618152ea559a168bbcbb5e2..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
- .
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/libs/thirdParty/libxbee/README b/libs/thirdParty/libxbee/README
deleted file mode 100644
index a5dbbfe0f3bd6fc9a433c4532221a140e283b4d4..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/README
+++ /dev/null
@@ -1,39 +0,0 @@
-Welcome to libxbee!
-
-I have proveded sample code in the ./sample directory. Hopefully this will help
-get you up and running with libxbee. If you would like samples showing a different
-aspect of libxbee, then please do not hesitate to file an 'issue' on the project
-site, and I will get to it ASAP:
- http://code.google.com/p/libxbee/issues/list
-
-
-Documentation is avaliable via the man page system once you have installed the
-library, or as HTML in the 'doc' directory.
- $ man libxbee
-
-
-Please note that this project is still in development, so should not be used for
-any purpose other than learning/playing/testing etc... Basically don't use it to
-make money, and then hold me responsible if it breaks!
-
-Feel free to contact me directly with any queries:
- attie@attie.co.uk
-
-
-For those of you that are planning to use this on an embedded board, I have
-included a small makefile (umakefile) that has only the information needed to
-compile the library. I suggest you use this instead!
-
-=== Installation ===
-To install simply type:
- $ make install
-
-For more information, or if you can't install it, please see the wiki:
- http://code.google.com/p/libxbee/wiki/install_libxbee
-
-
-=== Usage ===
-If you are compiling the object file directly into your executable instead
-of making use of the shared library, you must include the following link
-flags:
- -lpthread -lrt
diff --git a/libs/thirdParty/libxbee/api.c b/libs/thirdParty/libxbee/api.c
deleted file mode 100644
index ef5923b56848f5c345c2712c7430919c40d676ba..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/api.c
+++ /dev/null
@@ -1,2433 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-const char *SVN_REV = "$Id: api.c 508 2011-06-12 23:22:34Z attie@attie.co.uk $";
-char svn_rev[128] = "\0";
-
-#include "api.h"
-
-const char *xbee_svn_version(void) {
- if (svn_rev[0] == '\0') {
- char *t;
- sprintf(svn_rev,"r%s",&SVN_REV[11]);
- t = strrchr(svn_rev,' ');
- if (t) {
- t[0] = '\0';
- }
- }
- return svn_rev;
-}
-
-const char *xbee_build_info(void) {
- return "Built on " __DATE__ " @ " __TIME__ " for " HOST_OS;
-}
-
-/* ################################################################# */
-/* ### Memory Handling ############################################# */
-/* ################################################################# */
-
-/* malloc wrapper function */
-static void *Xmalloc2(xbee_hnd xbee, size_t size) {
- void *t;
- t = malloc(size);
- if (!t) {
- /* uhoh... thats pretty bad... */
- xbee_perror("libxbee:malloc()");
- exit(1);
- }
- return t;
-}
-
-/* calloc wrapper function */
-static void *Xcalloc2(xbee_hnd xbee, size_t size) {
- void *t;
- t = calloc(1, size);
- if (!t) {
- /* uhoh... thats pretty bad... */
- xbee_perror("libxbee:calloc()");
- exit(1);
- }
- return t;
-}
-
-/* realloc wrapper function */
-static void *Xrealloc2(xbee_hnd xbee, void *ptr, size_t size) {
- void *t;
- t = realloc(ptr,size);
- if (!t) {
- /* uhoh... thats pretty bad... */
- fprintf(stderr,"libxbee:realloc(): Returned NULL\n");
- exit(1);
- }
- return t;
-}
-
-/* free wrapper function (uses the Xfree macro and sets the pointer to NULL after freeing it) */
-static void Xfree2(void **ptr) {
- if (!*ptr) return;
- free(*ptr);
- *ptr = NULL;
-}
-
-/* ################################################################# */
-/* ### Helper Functions ############################################ */
-/* ################################################################# */
-
-/* #################################################################
- returns 1 if the packet has data for the digital input else 0 */
-int xbee_hasdigital(xbee_pkt *pkt, int sample, int input) {
- int mask = 0x0001;
- if (input < 0 || input > 7) return 0;
- if (sample >= pkt->samples) return 0;
-
- mask <<= input;
- return !!(pkt->IOdata[sample].IOmask & mask);
-}
-
-/* #################################################################
- returns 1 if the digital input is high else 0 (or 0 if no digital data present) */
-int xbee_getdigital(xbee_pkt *pkt, int sample, int input) {
- int mask = 0x0001;
- if (!xbee_hasdigital(pkt,sample,input)) return 0;
-
- mask <<= input;
- return !!(pkt->IOdata[sample].IOdigital & mask);
-}
-
-/* #################################################################
- returns 1 if the packet has data for the analog input else 0 */
-int xbee_hasanalog(xbee_pkt *pkt, int sample, int input) {
- int mask = 0x0200;
- if (input < 0 || input > 5) return 0;
- if (sample >= pkt->samples) return 0;
-
- mask <<= input;
- return !!(pkt->IOdata[sample].IOmask & mask);
-}
-
-/* #################################################################
- returns analog input as a voltage if vRef is non-zero, else raw value (or 0 if no analog data present) */
-double xbee_getanalog(xbee_pkt *pkt, int sample, int input, double Vref) {
- if (!xbee_hasanalog(pkt,sample,input)) return 0;
-
- if (Vref) return (Vref / 1023) * pkt->IOdata[sample].IOanalog[input];
- return pkt->IOdata[sample].IOanalog[input];
-}
-
-/* ################################################################# */
-/* ### XBee Functions ############################################## */
-/* ################################################################# */
-
-static void xbee_logf(xbee_hnd xbee, const char *logformat, const char *file,
- const int line, const char *function, char *format, ...) {
- char buf[128];
- va_list ap;
- if (!xbee) return;
- if (!xbee->log) return;
- va_start(ap,format);
- vsnprintf(buf,127,format,ap);
- va_end(ap);
- fprintf(xbee->log,logformat,file,line,function,buf);
-}
-void xbee_logitf(char *format, ...) {
- char buf[128];
- va_list ap;
- va_start(ap,format);
- vsnprintf(buf,127,format,ap);
- va_end(ap);
- xbee_logit(buf);
-}
-void _xbee_logitf(xbee_hnd xbee, char *format, ...) {
- char buf[128];
- va_list ap;
- va_start(ap,format);
- vsnprintf(buf,127,format,ap);
- va_end(ap);
- _xbee_logit(xbee, buf);
-}
-void xbee_logit(char *str) {
- _xbee_logit(default_xbee, str);
-}
-void _xbee_logit(xbee_hnd xbee, char *str) {
- if (!xbee) return;
- if (!xbee->log) return;
- xbee_mutex_lock(xbee->logmutex);
- fprintf(xbee->log,LOG_FORMAT"\n",__FILE__,__LINE__,__FUNCTION__,str);
- xbee_mutex_unlock(xbee->logmutex);
-}
-
-/* #################################################################
- xbee_sendAT - INTERNAL
- allows for an at command to be send, and the reply to be captured */
-static int xbee_sendAT(xbee_hnd xbee, char *command, char *retBuf, int retBuflen) {
- return xbee_sendATdelay(xbee, 0, command, retBuf, retBuflen);
-}
-static int xbee_sendATdelay(xbee_hnd xbee, int guardTime, char *command, char *retBuf, int retBuflen) {
- struct timeval to;
-
- int ret;
- int bufi = 0;
-
- /* if there is a guardTime given, then use it and a bit more */
- if (guardTime) usleep(guardTime * 1200);
-
- /* get rid of any pre-command sludge... */
- memset(&to, 0, sizeof(to));
- ret = xbee_select(xbee,&to);
- if (ret > 0) {
- char t[128];
- while (xbee_read(xbee,t,127));
- }
-
- /* send the requested command */
- xbee_log("sendATdelay: Sending '%s'", command);
- xbee_write(xbee,command, strlen(command));
-
- /* if there is a guardTime, then use it */
- if (guardTime) {
- usleep(guardTime * 900);
-
- /* get rid of any post-command sludge... */
- memset(&to, 0, sizeof(to));
- ret = xbee_select(xbee,&to);
- if (ret > 0) {
- char t[128];
- while (xbee_read(xbee,t,127));
- }
- }
-
- /* retrieve the data */
- memset(retBuf, 0, retBuflen);
- memset(&to, 0, sizeof(to));
- if (guardTime) {
- /* select on the xbee fd... wait at most 0.2 the guardTime for the response */
- to.tv_usec = guardTime * 200;
- } else {
- /* or 250ms */
- to.tv_usec = 250000;
- }
- if ((ret = xbee_select(xbee,&to)) == -1) {
- xbee_perror("libxbee:xbee_sendATdelay()");
- exit(1);
- }
-
- if (!ret) {
- /* timed out, and there is nothing to be read */
- xbee_log("sendATdelay: No Data to read - Timeout...");
- return 1;
- }
-
- /* check for any dribble... */
- do {
- /* if there is actually no space in the retBuf then break out */
- if (bufi >= retBuflen - 1) {
- break;
- }
-
- /* read as much data as is possible into retBuf */
- if ((ret = xbee_read(xbee,&retBuf[bufi], retBuflen - bufi - 1)) == 0) {
- break;
- }
-
- /* advance the 'end of string' pointer */
- bufi += ret;
-
- /* wait at most 150ms for any more data */
- memset(&to, 0, sizeof(to));
- to.tv_usec = 150000;
- if ((ret = xbee_select(xbee,&to)) == -1) {
- xbee_perror("libxbee:xbee_sendATdelay()");
- exit(1);
- }
-
- /* loop while data was read */
- } while (ret);
-
- if (!bufi) {
- xbee_log("sendATdelay: No response...");
- return 1;
- }
-
- /* terminate the string */
- retBuf[bufi] = '\0';
-
- xbee_log("sendATdelay: Recieved '%s'",retBuf);
- return 0;
-}
-
-
-/* #################################################################
- xbee_start
- sets up the correct API mode for the xbee
- cmdSeq = CC
- cmdTime = GT */
-static int xbee_startAPI(xbee_hnd xbee) {
- char buf[256];
-
- if (xbee->cmdSeq == 0 || xbee->cmdTime == 0) return 1;
-
- /* setup the command sequence string */
- memset(buf,xbee->cmdSeq,3);
- buf[3] = '\0';
-
- /* try the command sequence */
- if (xbee_sendATdelay(xbee, xbee->cmdTime, buf, buf, sizeof(buf))) {
- /* if it failed... try just entering 'AT' which should return OK */
- if (xbee_sendAT(xbee, "AT\r", buf, 4) || strncmp(buf,"OK\r",3)) return 1;
- } else if (strncmp(&buf[strlen(buf)-3],"OK\r",3)) {
- /* if data was returned, but it wasn't OK... then something went wrong! */
- return 1;
- }
-
- /* get the current API mode */
- if (xbee_sendAT(xbee, "ATAP\r", buf, 3)) return 1;
- buf[1] = '\0';
- xbee->oldAPI = atoi(buf);
-
- if (xbee->oldAPI != 2) {
- /* if it wasnt set to mode 2 already, then set it to mode 2 */
- if (xbee_sendAT(xbee, "ATAP2\r", buf, 4) || strncmp(buf,"OK\r",3)) return 1;
- }
-
- /* quit from command mode, ready for some packets! :) */
- if (xbee_sendAT(xbee, "ATCN\r", buf, 4) || strncmp(buf,"OK\r",3)) return 1;
-
- return 0;
-}
-
-/* #################################################################
- xbee_end
- resets the API mode to the saved value - you must have called xbee_setup[log]API */
-int xbee_end(void) {
- return _xbee_end(default_xbee);
-}
-int _xbee_end(xbee_hnd xbee) {
- int ret = 1;
- xbee_con *con, *ncon;
- xbee_pkt *pkt, *npkt;
- xbee_hnd xbeet;
-
- ISREADYR(0);
- xbee_log("Stopping libxbee instance...");
-
- /* unlink the instance from list... */
- xbee_log("Unlinking instance from list...");
- xbee_mutex_lock(xbee_hnd_mutex);
- if (xbee == default_xbee) {
- default_xbee = default_xbee->next;
- if (!default_xbee) {
- xbee_mutex_destroy(xbee_hnd_mutex);
- }
- } else {
- xbeet = default_xbee;
- while (xbeet) {
- if (xbeet->next == xbee) {
- xbeet->next = xbee->next;
- break;
- }
- xbeet = xbeet->next;
- }
- }
- if (default_xbee) xbee_mutex_unlock(xbee_hnd_mutex);
-
- /* if the api mode was not 2 to begin with then put it back */
- if (xbee->oldAPI == 2) {
- xbee_log("XBee was already in API mode 2, no need to reset");
- ret = 0;
- } else {
- int to = 5;
-
- con = _xbee_newcon(xbee,'I',xbee_localAT);
- con->callback = NULL;
- con->waitforACK = 1;
- _xbee_senddata(xbee,con,"AP%c",xbee->oldAPI);
-
- pkt = NULL;
-
- while (!pkt && to--) {
- pkt = _xbee_getpacketwait(xbee,con);
- }
- if (pkt) {
- ret = pkt->status;
- Xfree(pkt);
- }
- _xbee_endcon(xbee,con);
- }
-
- /* xbee_* functions may no longer run... */
- xbee->xbee_ready = 0;
-
- /* nullify everything */
-
- /* stop listening for data... either after timeout or next char read which ever is first */
- xbee->run = 0;
-
- xbee_thread_cancel(xbee->listent,0);
- xbee_thread_join(xbee->listent);
-
- xbee_thread_cancel(xbee->threadt,0);
- xbee_thread_join(xbee->threadt);
-
- /* free all connections */
- con = xbee->conlist;
- xbee->conlist = NULL;
- while (con) {
- ncon = con->next;
- Xfree(con);
- con = ncon;
- }
-
- /* free all packets */
- xbee->pktlast = NULL;
- pkt = xbee->pktlist;
- xbee->pktlist = NULL;
- while (pkt) {
- npkt = pkt->next;
- Xfree(pkt);
- pkt = npkt;
- }
-
- /* destroy mutexes */
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
-
- /* close the serial port */
- Xfree(xbee->path);
- if (xbee->tty) xbee_close(xbee->tty);
-
- /* close log and tty */
- if (xbee->log) {
- fflush(xbee->log);
- xbee_close(xbee->log);
- }
- xbee_mutex_destroy(xbee->logmutex);
-
- Xfree(xbee);
-
- return ret;
-}
-
-/* #################################################################
- xbee_setup
- opens xbee serial port & creates xbee listen thread
- the xbee must be configured for API mode 2
- THIS MUST BE CALLED BEFORE ANY OTHER XBEE FUNCTION */
-int xbee_setup(char *path, int baudrate) {
- return xbee_setuplogAPI(path,baudrate,0,0,0);
-}
-xbee_hnd _xbee_setup(char *path, int baudrate) {
- return _xbee_setuplogAPI(path,baudrate,0,0,0);
-}
-int xbee_setuplog(char *path, int baudrate, int logfd) {
- return xbee_setuplogAPI(path,baudrate,logfd,0,0);
-}
-xbee_hnd _xbee_setuplog(char *path, int baudrate, int logfd) {
- return _xbee_setuplogAPI(path,baudrate,logfd,0,0);
-}
-int xbee_setupAPI(char *path, int baudrate, char cmdSeq, int cmdTime) {
- return xbee_setuplogAPI(path,baudrate,0,cmdSeq,cmdTime);
-}
-xbee_hnd _xbee_setupAPI(char *path, int baudrate, char cmdSeq, int cmdTime) {
- return _xbee_setuplogAPI(path,baudrate,0,cmdSeq,cmdTime);
-}
-int xbee_setuplogAPI(char *path, int baudrate, int logfd, char cmdSeq, int cmdTime) {
- if (default_xbee) return 0;
- default_xbee = _xbee_setuplogAPI(path,baudrate,logfd,cmdSeq,cmdTime);
- return (default_xbee?0:-1);
-}
-xbee_hnd _xbee_setuplogAPI(char *path, int baudrate, int logfd, char cmdSeq, int cmdTime) {
- int ret;
- xbee_hnd xbee = NULL;
-
- /* create a new instance */
- xbee = Xcalloc(sizeof(struct xbee_hnd));
- xbee->next = NULL;
-
- xbee_mutex_init(xbee->logmutex);
-#ifdef DEBUG
- if (!logfd) logfd = 2;
-#endif
- if (logfd) {
- xbee->logfd = dup(logfd);
- xbee->log = fdopen(xbee->logfd,"w");
- if (!xbee->log) {
- /* errno == 9 is bad file descriptor (probrably not provided) */
- if (errno != 9) xbee_perror("xbee_setup(): Failed opening logfile");
- xbee->logfd = 0;
- } else {
-#ifdef __GNUC__ /* ---- */
- /* set to line buffer - ensure lines are written to file when complete */
- setvbuf(xbee->log,NULL,_IOLBF,BUFSIZ);
-#else /* -------------- */
- /* Win32 is rubbish... so we have to completely disable buffering... */
- setvbuf(xbee->log,NULL,_IONBF,BUFSIZ);
-#endif /* ------------- */
- }
- }
-
- xbee_logS("---------------------------------------------------------------------");
- xbee_logI("libxbee Starting...");
- xbee_logI("SVN Info: %s",xbee_svn_version());
- xbee_logI("Build Info: %s",xbee_build_info());
- xbee_logE("---------------------------------------------------------------------");
-
- /* setup the connection stuff */
- xbee->conlist = NULL;
-
- /* setup the packet stuff */
- xbee->pktlist = NULL;
- xbee->pktlast = NULL;
- xbee->pktcount = 0;
- xbee->run = 1;
-
- /* setup the mutexes */
- if (xbee_mutex_init(xbee->conmutex)) {
- xbee_perror("xbee_setup():xbee_mutex_init(conmutex)");
- if (xbee->log) xbee_close(xbee->log);
- Xfree(xbee);
- return NULL;
- }
- if (xbee_mutex_init(xbee->pktmutex)) {
- xbee_perror("xbee_setup():xbee_mutex_init(pktmutex)");
- if (xbee->log) xbee_close(xbee->log);
- xbee_mutex_destroy(xbee->conmutex);
- Xfree(xbee);
- return NULL;
- }
- if (xbee_mutex_init(xbee->sendmutex)) {
- xbee_perror("xbee_setup():xbee_mutex_init(sendmutex)");
- if (xbee->log) xbee_close(xbee->log);
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- Xfree(xbee);
- return NULL;
- }
-
- /* take a copy of the XBee device path */
- if ((xbee->path = Xmalloc(sizeof(char) * (strlen(path) + 1))) == NULL) {
- xbee_perror("xbee_setup():Xmalloc(path)");
- if (xbee->log) xbee_close(xbee->log);
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee);
- return NULL;
- }
- strcpy(xbee->path,path);
- if (xbee->log) xbee_log("Opening serial port '%s'...",xbee->path);
-
- /* call the relevant init function */
- if ((ret = init_serial(xbee,baudrate)) != 0) {
- xbee_log("Something failed while opening the serial port...");
- if (xbee->log) xbee_close(xbee->log);
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee->path);
- Xfree(xbee);
- return NULL;
- }
-
- /* when xbee_end() is called, if this is not 2 then ATAP will be set to this value */
- xbee->oldAPI = 2;
- xbee->cmdSeq = cmdSeq;
- xbee->cmdTime = cmdTime;
- if (xbee->cmdSeq && xbee->cmdTime) {
- if (xbee_startAPI(xbee)) {
- if (xbee->log) {
- xbee_log("Couldn't communicate with XBee...");
- xbee_close(xbee->log);
- }
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee->path);
-#ifdef __GNUC__ /* ---- */
- close(xbee->ttyfd);
-#endif /* ------------- */
- xbee_close(xbee->tty);
- Xfree(xbee);
- return NULL;
- }
- }
-
- /* allow the listen thread to start */
- xbee->xbee_ready = -1;
-
- /* can start xbee_listen thread now */
- if (xbee_thread_create(xbee->listent, xbee_listen_wrapper, xbee)) {
- xbee_perror("xbee_setup():xbee_thread_create(listent)");
- if (xbee->log) xbee_close(xbee->log);
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee->path);
-#ifdef __GNUC__ /* ---- */
- close(xbee->ttyfd);
-#endif /* ------------- */
- xbee_close(xbee->tty);
- Xfree(xbee);
- return NULL;
- }
-
- /* can start xbee_thread_watch thread thread now */
- if (xbee_thread_create(xbee->threadt, xbee_thread_watch, xbee)) {
- xbee_perror("xbee_setup():xbee_thread_create(threadt)");
- if (xbee->log) xbee_close(xbee->log);
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee->path);
-#ifdef __GNUC__ /* ---- */
- close(xbee->ttyfd);
-#endif /* ------------- */
- xbee_close(xbee->tty);
- Xfree(xbee);
- return NULL;
- }
-
- usleep(500);
- while (xbee->xbee_ready != -2) {
- usleep(500);
- xbee_log("Waiting for xbee_listen() to be ready...");
- }
-
- /* allow other functions to be used! */
- xbee->xbee_ready = 1;
-
- xbee_log("Linking xbee instance...");
- if (!default_xbee) {
- xbee_mutex_init(xbee_hnd_mutex);
- xbee_mutex_lock(xbee_hnd_mutex);
- default_xbee = xbee;
- xbee_mutex_unlock(xbee_hnd_mutex);
- } else {
- xbee_hnd xbeet;
- xbee_mutex_lock(xbee_hnd_mutex);
- xbeet = default_xbee;
- while (xbeet->next) {
- xbeet = xbeet->next;
- }
- xbeet->next = xbee;
- xbee_mutex_unlock(xbee_hnd_mutex);
- }
-
- xbee_log("libxbee: Started!");
-
- return xbee;
-}
-
-/* #################################################################
- xbee_con
- produces a connection to the specified device and frameID
- if a connection had already been made, then this connection will be returned */
-xbee_con *xbee_newcon(unsigned char frameID, xbee_types type, ...) {
- xbee_con *ret;
- va_list ap;
-
- /* xbee_vnewcon() wants a va_list... */
- va_start(ap, type);
- /* hand it over :) */
- ret = _xbee_vnewcon(default_xbee, frameID, type, ap);
- va_end(ap);
- return ret;
-}
-xbee_con *_xbee_newcon(xbee_hnd xbee, unsigned char frameID, xbee_types type, ...) {
- xbee_con *ret;
- va_list ap;
-
- /* xbee_vnewcon() wants a va_list... */
- va_start(ap, type);
- /* hand it over :) */
- ret = _xbee_vnewcon(xbee, frameID, type, ap);
- va_end(ap);
- return ret;
-}
-xbee_con *_xbee_vnewcon(xbee_hnd xbee, unsigned char frameID, xbee_types type, va_list ap) {
- xbee_con *con, *ocon;
- unsigned char tAddr[8];
- int t;
- int i;
-
- ISREADYR(NULL);
-
- if (!type || type == xbee_unknown) type = xbee_localAT; /* default to local AT */
- else if (type == xbee_remoteAT) type = xbee_64bitRemoteAT; /* if remote AT, default to 64bit */
-
- /* if: 64 bit address expected (2 ints) */
- if ((type == xbee_64bitRemoteAT) ||
- (type == xbee_64bitData) ||
- (type == xbee_64bitIO) ||
- (type == xbee2_data)) {
- t = va_arg(ap, int);
- tAddr[0] = (t >> 24) & 0xFF;
- tAddr[1] = (t >> 16) & 0xFF;
- tAddr[2] = (t >> 8) & 0xFF;
- tAddr[3] = (t ) & 0xFF;
- t = va_arg(ap, int);
- tAddr[4] = (t >> 24) & 0xFF;
- tAddr[5] = (t >> 16) & 0xFF;
- tAddr[6] = (t >> 8) & 0xFF;
- tAddr[7] = (t ) & 0xFF;
-
- /* if: 16 bit address expected (1 int) */
- } else if ((type == xbee_16bitRemoteAT) ||
- (type == xbee_16bitData) ||
- (type == xbee_16bitIO)) {
- t = va_arg(ap, int);
- tAddr[0] = (t >> 8) & 0xFF;
- tAddr[1] = (t ) & 0xFF;
- tAddr[2] = 0;
- tAddr[3] = 0;
- tAddr[4] = 0;
- tAddr[5] = 0;
- tAddr[6] = 0;
- tAddr[7] = 0;
-
- /* otherwise clear the address */
- } else {
- memset(tAddr,0,8);
- }
-
- /* lock the connection mutex */
- xbee_mutex_lock(xbee->conmutex);
-
- /* are there any connections? */
- if (xbee->conlist) {
- con = xbee->conlist;
- while (con) {
- /* if: looking for a modemStatus, and the types match! */
- if ((type == xbee_modemStatus) &&
- (con->type == type)) {
- xbee_mutex_unlock(xbee->conmutex);
- return con;
-
- /* if: looking for a txStatus and frameIDs match! */
- } else if ((type == xbee_txStatus) &&
- (con->type == type) &&
- (frameID == con->frameID)) {
- xbee_mutex_unlock(xbee->conmutex);
- return con;
-
- /* if: looking for a localAT, and the frameIDs match! */
- } else if ((type == xbee_localAT) &&
- (con->type == type) &&
- (frameID == con->frameID)) {
- xbee_mutex_unlock(xbee->conmutex);
- return con;
-
- /* if: connection types match, the frameIDs match, and the addresses match! */
- } else if ((type == con->type) &&
- (frameID == con->frameID) &&
- (!memcmp(tAddr,con->tAddr,8))) {
- xbee_mutex_unlock(xbee->conmutex);
- return con;
- }
-
- /* if there are more, move along, dont want to loose that last item! */
- if (con->next == NULL) break;
- con = con->next;
- }
-
- /* keep hold of the last connection... we will need to link it up later */
- ocon = con;
- }
-
- /* unlock the connection mutex */
- xbee_mutex_unlock(xbee->conmutex);
-
- /* create a new connection and set its attributes */
- con = Xcalloc(sizeof(xbee_con));
- con->type = type;
- /* is it a 64bit connection? */
- if ((type == xbee_64bitRemoteAT) ||
- (type == xbee_64bitData) ||
- (type == xbee_64bitIO) ||
- (type == xbee2_data)) {
- con->tAddr64 = TRUE;
- }
- con->atQueue = 0; /* queue AT commands? */
- con->txDisableACK = 0; /* disable ACKs? */
- con->txBroadcastPAN = 0; /* broadcast? */
- con->frameID = frameID;
- con->waitforACK = 0;
- memcpy(con->tAddr,tAddr,8); /* copy in the remote address */
- xbee_mutex_init(con->callbackmutex);
- xbee_mutex_init(con->callbackListmutex);
- xbee_mutex_init(con->Txmutex);
- xbee_sem_init(con->waitforACKsem);
-
- if (xbee->log) {
- switch(type) {
- case xbee_localAT:
- xbee_log("New local AT connection!");
- break;
- case xbee_16bitRemoteAT:
- case xbee_64bitRemoteAT:
- xbee_logc("New %d-bit remote AT connection! (to: ",(con->tAddr64?64:16));
- for (i=0;i<(con->tAddr64?8:2);i++) {
- fprintf(xbee->log,(i?":%02X":"%02X"),tAddr[i]);
- }
- fprintf(xbee->log,")");
- xbee_logcf();
- break;
- case xbee_16bitData:
- case xbee_64bitData:
- xbee_logc("New %d-bit data connection! (to: ",(con->tAddr64?64:16));
- for (i=0;i<(con->tAddr64?8:2);i++) {
- fprintf(xbee->log,(i?":%02X":"%02X"),tAddr[i]);
- }
- fprintf(xbee->log,")");
- xbee_logcf();
- break;
- case xbee_16bitIO:
- case xbee_64bitIO:
- xbee_logc("New %d-bit IO connection! (to: ",(con->tAddr64?64:16));
- for (i=0;i<(con->tAddr64?8:2);i++) {
- fprintf(xbee->log,(i?":%02X":"%02X"),tAddr[i]);
- }
- fprintf(xbee->log,")");
- xbee_logcf();
- break;
- case xbee2_data:
- xbee_logc("New Series 2 data connection! (to: ");
- for (i=0;i<8;i++) {
- fprintf(xbee->log,(i?":%02X":"%02X"),tAddr[i]);
- }
- fprintf(xbee->log,")");
- xbee_logcf();
- break;
- case xbee_txStatus:
- xbee_log("New Tx status connection!");
- break;
- case xbee_modemStatus:
- xbee_log("New modem status connection!");
- break;
- case xbee_unknown:
- default:
- xbee_log("New unknown connection!");
- }
- }
-
- /* lock the connection mutex */
- xbee_mutex_lock(xbee->conmutex);
-
- /* make it the last in the list */
- con->next = NULL;
- /* add it to the list */
- if (xbee->conlist) {
- ocon->next = con;
- } else {
- xbee->conlist = con;
- }
-
- /* unlock the mutex */
- xbee_mutex_unlock(xbee->conmutex);
- return con;
-}
-
-/* #################################################################
- xbee_conflush
- removes any packets that have been collected for the specified
- connection */
-void xbee_purgecon(xbee_con *con) {
- _xbee_purgecon(default_xbee, con);
-}
-void _xbee_purgecon(xbee_hnd xbee, xbee_con *con) {
- xbee_pkt *r, *p, *n;
-
- ISREADYP();
-
- /* lock the packet mutex */
- xbee_mutex_lock(xbee->pktmutex);
-
- /* if: there are packets */
- if ((p = xbee->pktlist) != NULL) {
- r = NULL;
- /* get all packets for this connection */
- do {
- /* does the packet match the connection? */
- if (xbee_matchpktcon(xbee,p,con)) {
- /* if it was the first packet */
- if (!r) {
- /* move the chain along */
- xbee->pktlist = p->next;
- } else {
- /* otherwise relink the list */
- r->next = p->next;
- }
- xbee->pktcount--;
-
- /* free this packet! */
- n = p->next;
- Xfree(p);
- /* move on */
- p = n;
- } else {
- /* move on */
- r = p;
- p = p->next;
- }
- } while (p);
- xbee->pktlast = r;
- }
-
- /* unlock the packet mutex */
- xbee_mutex_unlock(xbee->pktmutex);
-}
-
-/* #################################################################
- xbee_endcon
- close the unwanted connection
- free wrapper function (uses the Xfree macro and sets the pointer to NULL after freeing it) */
-void xbee_endcon2(xbee_con **con, int alreadyUnlinked) {
- _xbee_endcon2(default_xbee, con, alreadyUnlinked);
-}
-void _xbee_endcon2(xbee_hnd xbee, xbee_con **con, int alreadyUnlinked) {
- xbee_con *t, *u;
-
- ISREADYP();
-
- /* lock the connection mutex */
- xbee_mutex_lock(xbee->conmutex);
-
- u = t = xbee->conlist;
- while (t && t != *con) {
- u = t;
- t = t->next;
- }
- if (!t) {
- /* this could be true if comming from the destroySelf signal... */
- if (!alreadyUnlinked) {
- /* invalid connection given... */
- if (xbee->log) {
- xbee_log("Attempted to close invalid connection...");
- }
- /* unlock the connection mutex */
- xbee_mutex_unlock(xbee->conmutex);
- return;
- }
- } else {
- /* extract this connection from the list */
- if (t == xbee->conlist) {
- xbee->conlist = t->next;
- } else {
- u->next = t->next;
- }
- }
-
- /* unlock the connection mutex */
- xbee_mutex_unlock(xbee->conmutex);
-
- /* check if a callback thread is running... */
- if (t->callback && xbee_mutex_trylock(t->callbackmutex)) {
- /* if it is running... tell it to destroy the connection on completion */
- xbee_log("Attempted to close a connection with active callbacks... "
- "Connection will be destroyed when callbacks have completeted...");
- t->destroySelf = 1;
- return;
- }
-
- /* remove all packets for this connection */
- _xbee_purgecon(xbee,t);
-
- /* destroy the callback mutex */
- xbee_mutex_destroy(t->callbackmutex);
- xbee_mutex_destroy(t->callbackListmutex);
- xbee_mutex_destroy(t->Txmutex);
- xbee_sem_destroy(t->waitforACKsem);
-
- /* free the connection! */
- Xfree(*con);
-}
-
-/* #################################################################
- xbee_senddata
- send the specified data to the provided connection */
-int xbee_senddata(xbee_con *con, char *format, ...) {
- int ret;
- va_list ap;
-
- /* xbee_vsenddata() wants a va_list... */
- va_start(ap, format);
- /* hand it over :) */
- ret = _xbee_vsenddata(default_xbee, con, format, ap);
- va_end(ap);
- return ret;
-}
-int _xbee_senddata(xbee_hnd xbee, xbee_con *con, char *format, ...) {
- int ret;
- va_list ap;
-
- /* xbee_vsenddata() wants a va_list... */
- va_start(ap, format);
- /* hand it over :) */
- ret = _xbee_vsenddata(xbee, con, format, ap);
- va_end(ap);
- return ret;
-}
-
-int xbee_vsenddata(xbee_con *con, char *format, va_list ap) {
- return _xbee_vsenddata(default_xbee, con, format, ap);
-}
-int _xbee_vsenddata(xbee_hnd xbee, xbee_con *con, char *format, va_list ap) {
- unsigned char data[128]; /* max payload is 100 bytes... plus a bit of fluff... */
- int length;
-
- /* make up the data and keep the length, its possible there are nulls in there */
- length = vsnprintf((char *)data, 128, format, ap);
-
- /* hand it over :) */
- return _xbee_nsenddata(xbee, con, (char *)data, length);
-}
-
-/* returns:
- 1 - if NAC was recieved
- 0 - if packet was successfully sent (or just sent if waitforACK is off)
- -1 - if there was an error building the packet
- -2 - if the connection type was unknown */
-int xbee_nsenddata(xbee_con *con, char *data, int length) {
- return _xbee_nsenddata(default_xbee, con, data, length);
-}
-int _xbee_nsenddata(xbee_hnd xbee, xbee_con *con, char *data, int length) {
- t_data *pkt;
- int i;
- unsigned char buf[128]; /* max payload is 100 bytes... plus a bit for the headers etc... */
-
- ISREADYR(-1);
-
- if (!con) return -1;
- if (con->type == xbee_unknown) return -1;
- if (length > 127) return -1;
-
- if (xbee->log) {
- xbee_logS("--== TX Packet ============--");
- xbee_logIc("Connection Type: ");
- switch (con->type) {
- case xbee_unknown: fprintf(xbee->log,"Unknown"); break;
- case xbee_localAT: fprintf(xbee->log,"Local AT"); break;
- case xbee_remoteAT: fprintf(xbee->log,"Remote AT"); break;
- case xbee_16bitRemoteAT: fprintf(xbee->log,"Remote AT (16-bit)"); break;
- case xbee_64bitRemoteAT: fprintf(xbee->log,"Remote AT (64-bit)"); break;
- case xbee_16bitData: fprintf(xbee->log,"Data (16-bit)"); break;
- case xbee_64bitData: fprintf(xbee->log,"Data (64-bit)"); break;
- case xbee_16bitIO: fprintf(xbee->log,"IO (16-bit)"); break;
- case xbee_64bitIO: fprintf(xbee->log,"IO (64-bit)"); break;
- case xbee2_data: fprintf(xbee->log,"Series 2 Data"); break;
- case xbee2_txStatus: fprintf(xbee->log,"Series 2 Tx Status"); break;
- case xbee_txStatus: fprintf(xbee->log,"Tx Status"); break;
- case xbee_modemStatus: fprintf(xbee->log,"Modem Status"); break;
- }
- xbee_logIcf();
- switch (con->type) {
- case xbee_localAT: case xbee_remoteAT: case xbee_txStatus: case xbee_modemStatus:
- break;
- default:
- xbee_logIc("Destination: ");
- for (i=0;i<(con->tAddr64?8:2);i++) {
- fprintf(xbee->log,(i?":%02X":"%02X"),con->tAddr[i]);
- }
- xbee_logIcf();
- }
- xbee_logI("Length: %d",length);
- for (i=0;i 32) && (data[i] < 127)) {
- fprintf(xbee->log,"'%c'",data[i]);
- } else{
- fprintf(xbee->log," _");
- }
- xbee_logIcf();
- }
- xbee_logEf();
- }
-
- /* ########################################## */
- /* if: local AT */
- if (con->type == xbee_localAT) {
- /* AT commands are 2 chars long (plus optional parameter) */
- if (length < 2) return -1;
- if (length > 32) return -1;
-
- /* use the command? */
- buf[0] = ((!con->atQueue)?XBEE_LOCAL_ATREQ:XBEE_LOCAL_ATQUE);
- buf[1] = con->frameID;
-
- /* copy in the data */
- for (i=0;itype == xbee_16bitRemoteAT) ||
- (con->type == xbee_64bitRemoteAT)) {
- if (length < 2) return -1; /* at commands are 2 chars long (plus optional parameter) */
- if (length > 32) return -1;
- buf[0] = XBEE_REMOTE_ATREQ;
- buf[1] = con->frameID;
-
- /* copy in the relevant address */
- if (con->tAddr64) {
- memcpy(&buf[2],con->tAddr,8);
- buf[10] = 0xFF;
- buf[11] = 0xFE;
- } else {
- memset(&buf[2],0,8);
- memcpy(&buf[10],con->tAddr,2);
- }
- /* queue the command? */
- buf[12] = ((!con->atQueue)?0x02:0x00);
-
- /* copy in the data */
- for (i=0;itype == xbee_16bitData) ||
- (con->type == xbee_64bitData)) {
- int offset;
- if (length > 100) return -1;
-
- /* if: 16bit Data */
- if (con->type == xbee_16bitData) {
- buf[0] = XBEE_16BIT_DATATX;
- offset = 5;
- /* copy in the address */
- memcpy(&buf[2],con->tAddr,2);
-
- /* if: 64bit Data */
- } else { /* 64bit Data */
- buf[0] = XBEE_64BIT_DATATX;
- offset = 11;
- /* copy in the address */
- memcpy(&buf[2],con->tAddr,8);
- }
-
- /* copy frameID */
- buf[1] = con->frameID;
-
- /* disable ack? broadcast? */
- buf[offset-1] = ((con->txDisableACK)?0x01:0x00) | ((con->txBroadcastPAN)?0x04:0x00);
-
- /* copy in the data */
- for (i=0;itype == xbee_64bitIO) ||
- (con->type == xbee_16bitIO)) {
- /* not currently implemented... is it even allowed? */
- if (xbee->log) {
- xbee_log("******* TODO ********\n");
- }
-
- /* ########################################## */
- /* if: Series 2 Data */
- } else if (con->type == xbee2_data) {
- if (length > 72) return -1;
-
- buf[0] = XBEE2_DATATX;
- buf[1] = con->frameID;
-
- /* copy in the relevant address */
- memcpy(&buf[2],con->tAddr,8);
- buf[10] = 0xFF;
- buf[11] = 0xFE;
-
- /* Maximum Radius/hops */
- buf[12] = 0x00;
-
- /* Options */
- buf[13] = 0x00;
-
- /* copy in the data */
- for (i=0;ipktmutex);
-
- /* if: there are no packets */
- if ((p = xbee->pktlist) == NULL) {
- xbee_mutex_unlock(xbee->pktmutex);
- /*if (xbee->log) {
- xbee_log("No packets avaliable...");
- }*/
- return NULL;
- }
-
- l = NULL;
- q = NULL;
- /* get the first avaliable packet for this connection */
- do {
- /* does the packet match the connection? */
- if (xbee_matchpktcon(xbee, p, con)) {
- q = p;
- break;
- }
- /* move on */
- l = p;
- p = p->next;
- } while (p);
-
- /* if: no packet was found */
- if (!q) {
- xbee_mutex_unlock(xbee->pktmutex);
- if (xbee->log) {
- struct timeval tv;
- xbee_logS("--== Get Packet ==========--");
- gettimeofday(&tv,NULL);
- xbee_logE("Didn't get a packet @ %ld.%06ld",tv.tv_sec,tv.tv_usec);
- }
- return NULL;
- }
-
- /* if it was the first packet */
- if (l) {
- /* relink the list */
- l->next = p->next;
- if (!l->next) xbee->pktlast = l;
- } else {
- /* move the chain along */
- xbee->pktlist = p->next;
- if (!xbee->pktlist) {
- xbee->pktlast = NULL;
- } else if (!xbee->pktlist->next) {
- xbee->pktlast = xbee->pktlist;
- }
- }
- xbee->pktcount--;
-
- /* unlink this packet from the chain! */
- q->next = NULL;
-
- if (xbee->log) {
- struct timeval tv;
- xbee_logS("--== Get Packet ==========--");
- gettimeofday(&tv,NULL);
- xbee_logI("Got a packet @ %ld.%06ld",tv.tv_sec,tv.tv_usec);
- xbee_logE("Packets left: %d",xbee->pktcount);
- }
-
- /* unlock the packet mutex */
- xbee_mutex_unlock(xbee->pktmutex);
-
- /* and return the packet (must be free'd by caller!) */
- return q;
-}
-
-/* #################################################################
- xbee_matchpktcon - INTERNAL
- checks if the packet matches the connection */
-static int xbee_matchpktcon(xbee_hnd xbee, xbee_pkt *pkt, xbee_con *con) {
- /* if: the connection type matches the packet type OR
- the connection is 16/64bit remote AT, and the packet is a remote AT response */
- if ((pkt->type == con->type) || /* -- */
- ((pkt->type == xbee_remoteAT) && /* -- */
- ((con->type == xbee_16bitRemoteAT) ||
- (con->type == xbee_64bitRemoteAT)))) {
-
-
- /* if: is a modem status (there can only be 1 modem status connection) */
- if (pkt->type == xbee_modemStatus) return 1;
-
- /* if: the packet is a txStatus or localAT and the frameIDs match */
- if ((pkt->type == xbee_txStatus) ||
- (pkt->type == xbee_localAT)) {
- if (pkt->frameID == con->frameID) {
- return 1;
- }
- /* if: the packet was sent as a 16bit remoteAT, and the 16bit addresss match */
- } else if ((pkt->type == xbee_remoteAT) &&
- (con->type == xbee_16bitRemoteAT) &&
- !memcmp(pkt->Addr16,con->tAddr,2)) {
- return 1;
- /* if: the packet was sent as a 64bit remoteAT, and the 64bit addresss match */
- } else if ((pkt->type == xbee_remoteAT) &&
- (con->type == xbee_64bitRemoteAT) &&
- !memcmp(pkt->Addr64,con->tAddr,8)) {
- return 1;
- /* if: the packet is 64bit addressed, and the addresses match */
- } else if (pkt->sAddr64 && !memcmp(pkt->Addr64,con->tAddr,8)) {
- return 1;
- /* if: the packet is 16bit addressed, and the addresses match */
- } else if (!pkt->sAddr64 && !memcmp(pkt->Addr16,con->tAddr,2)) {
- return 1;
- } else if (con->type == pkt->type &&
- (con->type == xbee_16bitData || con->type == xbee_64bitData) &&
- (pkt->isBroadcastADR || pkt->isBroadcastPAN)) {
- unsigned char t[8] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
- if ((con->tAddr64 && !memcmp(con->tAddr,t,8)) ||
- (!con->tAddr64 && !memcmp(con->tAddr,t,2))) {
- return 1;
- }
- }
- }
- return 0;
-}
-
-/* #################################################################
- xbee_parse_io - INTERNAL
- parses the data given into the packet io information */
-static int xbee_parse_io(xbee_hnd xbee, xbee_pkt *p, unsigned char *d,
- int maskOffset, int sampleOffset, int sample) {
- xbee_sample *s = &(p->IOdata[sample]);
-
- /* copy in the I/O data mask */
- s->IOmask = (((d[maskOffset]<<8) | d[maskOffset + 1]) & 0x7FFF);
-
- /* copy in the digital I/O data */
- s->IOdigital = (((d[sampleOffset]<<8) | d[sampleOffset+1]) & 0x01FF);
-
- /* advance over the digital data, if its there */
- sampleOffset += ((s->IOmask & 0x01FF)?2:0);
-
- /* copy in the analog I/O data */
- if (s->IOmask & 0x0200) {
- s->IOanalog[0] = (((d[sampleOffset]<<8) | d[sampleOffset+1]) & 0x03FF);
- sampleOffset+=2;
- }
- if (s->IOmask & 0x0400) {
- s->IOanalog[1] = (((d[sampleOffset]<<8) | d[sampleOffset+1]) & 0x03FF);
- sampleOffset+=2;
- }
- if (s->IOmask & 0x0800) {
- s->IOanalog[2] = (((d[sampleOffset]<<8) | d[sampleOffset+1]) & 0x03FF);
- sampleOffset+=2;
- }
- if (s->IOmask & 0x1000) {
- s->IOanalog[3] = (((d[sampleOffset]<<8) | d[sampleOffset+1]) & 0x03FF);
- sampleOffset+=2;
- }
- if (s->IOmask & 0x2000) {
- s->IOanalog[4] = (((d[sampleOffset]<<8) | d[sampleOffset+1]) & 0x03FF);
- sampleOffset+=2;
- }
- if (s->IOmask & 0x4000) {
- s->IOanalog[5] = (((d[sampleOffset]<<8) | d[sampleOffset+1]) & 0x03FF);
- sampleOffset+=2;
- }
-
- if (xbee->log) {
- if (s->IOmask & 0x0001)
- xbee_logI("Digital 0: %c",((s->IOdigital & 0x0001)?'1':'0'));
- if (s->IOmask & 0x0002)
- xbee_logI("Digital 1: %c",((s->IOdigital & 0x0002)?'1':'0'));
- if (s->IOmask & 0x0004)
- xbee_logI("Digital 2: %c",((s->IOdigital & 0x0004)?'1':'0'));
- if (s->IOmask & 0x0008)
- xbee_logI("Digital 3: %c",((s->IOdigital & 0x0008)?'1':'0'));
- if (s->IOmask & 0x0010)
- xbee_logI("Digital 4: %c",((s->IOdigital & 0x0010)?'1':'0'));
- if (s->IOmask & 0x0020)
- xbee_logI("Digital 5: %c",((s->IOdigital & 0x0020)?'1':'0'));
- if (s->IOmask & 0x0040)
- xbee_logI("Digital 6: %c",((s->IOdigital & 0x0040)?'1':'0'));
- if (s->IOmask & 0x0080)
- xbee_logI("Digital 7: %c",((s->IOdigital & 0x0080)?'1':'0'));
- if (s->IOmask & 0x0100)
- xbee_logI("Digital 8: %c",((s->IOdigital & 0x0100)?'1':'0'));
- if (s->IOmask & 0x0200)
- xbee_logI("Analog 0: %d (~%.2fv)",s->IOanalog[0],(3.3/1023)*s->IOanalog[0]);
- if (s->IOmask & 0x0400)
- xbee_logI("Analog 1: %d (~%.2fv)",s->IOanalog[1],(3.3/1023)*s->IOanalog[1]);
- if (s->IOmask & 0x0800)
- xbee_logI("Analog 2: %d (~%.2fv)",s->IOanalog[2],(3.3/1023)*s->IOanalog[2]);
- if (s->IOmask & 0x1000)
- xbee_logI("Analog 3: %d (~%.2fv)",s->IOanalog[3],(3.3/1023)*s->IOanalog[3]);
- if (s->IOmask & 0x2000)
- xbee_logI("Analog 4: %d (~%.2fv)",s->IOanalog[4],(3.3/1023)*s->IOanalog[4]);
- if (s->IOmask & 0x4000)
- xbee_logI("Analog 5: %d (~%.2fv)",s->IOanalog[5],(3.3/1023)*s->IOanalog[5]);
- }
-
- return sampleOffset;
-}
-
-/* #################################################################
- xbee_listen_stop
- stops the listen thread after the current packet has been processed */
-void xbee_listen_stop(xbee_hnd xbee) {
- ISREADYP();
- xbee->run = 0;
-}
-
-/* #################################################################
- xbee_listen_wrapper - INTERNAL
- the xbee_listen wrapper. Prints an error when xbee_listen ends */
-static void xbee_listen_wrapper(xbee_hnd xbee) {
- int ret;
-
- /* just falls out if the proper 'go-ahead' isn't given */
- if (xbee->xbee_ready != -1) return;
- /* now allow the parent to continue */
- xbee->xbee_ready = -2;
-
-#ifdef _WIN32 /* ---- */
- /* win32 requires this delay... no idea why */
- usleep(1000000);
-#endif /* ----------- */
-
- while (xbee->run) {
- ret = xbee_listen(xbee);
- if (!xbee->run) break;
- xbee_log("xbee_listen() returned [%d]... Restarting in 25ms!",ret);
- usleep(25000);
- }
-}
-
-/* xbee_listen - INTERNAL
- the xbee xbee_listen thread
- reads data from the xbee and puts it into a linked list to keep the xbee buffers free */
-static int xbee_listen(xbee_hnd xbee) {
-#define LISTEN_BUFLEN 1024
- unsigned char c, t, d[LISTEN_BUFLEN];
- unsigned int l, i, chksum, o;
- int j;
- xbee_pkt *p = NULL, *q;
- xbee_con *con;
- int hasCon;
-
- /* do this forever :) */
- while (xbee->run) {
- /* clean up any undesired storage */
- if (p) Xfree(p);
-
- /* wait for a valid start byte */
- if ((c = xbee_getrawbyte(xbee)) != 0x7E) {
- if (xbee->log) xbee_log("***** Unexpected byte (0x%02X)... *****",c);
- continue;
- }
- if (!xbee->run) return 0;
-
- xbee_logSf();
- if (xbee->log) {
- struct timeval tv;
- xbee_logI("--== RX Packet ===========--");
- gettimeofday(&tv,NULL);
- xbee_logI("Got a packet @ %ld.%06ld",tv.tv_sec,tv.tv_usec);
- }
-
- /* get the length */
- l = xbee_getbyte(xbee) << 8;
- l += xbee_getbyte(xbee);
-
- /* check it is a valid length... */
- if (!l) {
- if (xbee->log) {
- xbee_logI("Recived zero length packet!");
- }
- continue;
- }
- if (l > 100) {
- if (xbee->log) {
- xbee_logI("Recived oversized packet! Length: %d",l - 1);
- }
- }
- if (l > LISTEN_BUFLEN) {
- if (xbee->log) {
- xbee_logI("Recived packet larger than buffer! Discarding...");
- }
- continue;
- }
-
- if (xbee->log) {
- xbee_logI("Length: %d",l - 1);
- }
-
- /* get the packet type */
- t = xbee_getbyte(xbee);
-
- /* start the checksum */
- chksum = t;
-
- /* suck in all the data */
- for (i = 0; l > 1 && i < LISTEN_BUFLEN; l--, i++) {
- /* get an unescaped byte */
- c = xbee_getbyte(xbee);
- d[i] = c;
- chksum += c;
- if (xbee->log) {
- xbee_logIc("%3d | 0x%02X | ",i,c);
- if ((c > 32) && (c < 127)) fprintf(xbee->log,"'%c'",c); else fprintf(xbee->log," _ ");
-
- if ((t == XBEE_LOCAL_AT && i == 4) ||
- (t == XBEE_REMOTE_AT && i == 14) ||
- (t == XBEE_64BIT_DATARX && i == 10) ||
- (t == XBEE_16BIT_DATARX && i == 4) ||
- (t == XBEE_64BIT_IO && i == 13) ||
- (t == XBEE_16BIT_IO && i == 7)) {
- /* mark the beginning of the 'data' bytes */
- fprintf(xbee->log," <-- data starts");
- } else if (t == XBEE_64BIT_IO) {
- if (i == 10) fprintf(xbee->log," <-- sample count");
- else if (i == 11) fprintf(xbee->log," <-- mask (msb)");
- else if (i == 12) fprintf(xbee->log," <-- mask (lsb)");
- } else if (t == XBEE_16BIT_IO) {
- if (i == 4) fprintf(xbee->log," <-- sample count");
- else if (i == 5) fprintf(xbee->log," <-- mask (msb)");
- else if (i == 6) fprintf(xbee->log," <-- mask (lsb)");
- }
- xbee_logIcf();
- }
- }
- i--; /* it went up too many times!... */
-
- /* add the checksum */
- chksum += xbee_getbyte(xbee);
-
- /* check if the whole packet was recieved, or something else occured... unlikely... */
- if (l>1) {
- if (xbee->log) {
- xbee_logE("Didn't get whole packet... :(");
- }
- continue;
- }
-
- /* check the checksum */
- if ((chksum & 0xFF) != 0xFF) {
- if (xbee->log) {
- chksum &= 0xFF;
- xbee_logE("Invalid Checksum: 0x%02X",chksum);
- }
- continue;
- }
-
- /* make a new packet */
- p = Xcalloc(sizeof(xbee_pkt));
- q = NULL;
- p->datalen = 0;
-
- /* ########################################## */
- /* if: modem status */
- if (t == XBEE_MODEM_STATUS) {
- if (xbee->log) {
- xbee_logI("Packet type: Modem Status (0x8A)");
- xbee_logIc("Event: ");
- switch (d[0]) {
- case 0x00: fprintf(xbee->log,"Hardware reset"); break;
- case 0x01: fprintf(xbee->log,"Watchdog timer reset"); break;
- case 0x02: fprintf(xbee->log,"Associated"); break;
- case 0x03: fprintf(xbee->log,"Disassociated"); break;
- case 0x04: fprintf(xbee->log,"Synchronization lost"); break;
- case 0x05: fprintf(xbee->log,"Coordinator realignment"); break;
- case 0x06: fprintf(xbee->log,"Coordinator started"); break;
- }
- fprintf(xbee->log,"... (0x%02X)",d[0]);
- xbee_logIcf();
- }
- p->type = xbee_modemStatus;
-
- p->sAddr64 = FALSE;
- p->dataPkt = FALSE;
- p->txStatusPkt = FALSE;
- p->modemStatusPkt = TRUE;
- p->remoteATPkt = FALSE;
- p->IOPkt = FALSE;
-
- /* modem status can only ever give 1 'data' byte */
- p->datalen = 1;
- p->data[0] = d[0];
-
- /* ########################################## */
- /* if: local AT response */
- } else if (t == XBEE_LOCAL_AT) {
- if (xbee->log) {
- xbee_logI("Packet type: Local AT Response (0x88)");
- xbee_logI("FrameID: 0x%02X",d[0]);
- xbee_logI("AT Command: %c%c",d[1],d[2]);
- xbee_logIc("Status: ");
- if (d[3] == 0x00) fprintf(xbee->log,"OK");
- else if (d[3] == 0x01) fprintf(xbee->log,"Error");
- else if (d[3] == 0x02) fprintf(xbee->log,"Invalid Command");
- else if (d[3] == 0x03) fprintf(xbee->log,"Invalid Parameter");
- fprintf(xbee->log," (0x%02X)",d[3]);
- xbee_logIcf();
- }
- p->type = xbee_localAT;
-
- p->sAddr64 = FALSE;
- p->dataPkt = FALSE;
- p->txStatusPkt = FALSE;
- p->modemStatusPkt = FALSE;
- p->remoteATPkt = FALSE;
- p->IOPkt = FALSE;
-
- p->frameID = d[0];
- p->atCmd[0] = d[1];
- p->atCmd[1] = d[2];
-
- p->status = d[3];
-
- /* copy in the data */
- p->datalen = i-3;
- for (;i>3;i--) p->data[i-4] = d[i];
-
- /* ########################################## */
- /* if: remote AT response */
- } else if (t == XBEE_REMOTE_AT) {
- if (xbee->log) {
- xbee_logI("Packet type: Remote AT Response (0x97)");
- xbee_logI("FrameID: 0x%02X",d[0]);
- xbee_logIc("64-bit Address: ");
- for (j=0;j<8;j++) {
- fprintf(xbee->log,(j?":%02X":"%02X"),d[1+j]);
- }
- xbee_logIcf();
- xbee_logIc("16-bit Address: ");
- for (j=0;j<2;j++) {
- fprintf(xbee->log,(j?":%02X":"%02X"),d[9+j]);
- }
- xbee_logIcf();
- xbee_logI("AT Command: %c%c",d[11],d[12]);
- xbee_logIc("Status: ");
- if (d[13] == 0x00) fprintf(xbee->log,"OK");
- else if (d[13] == 0x01) fprintf(xbee->log,"Error");
- else if (d[13] == 0x02) fprintf(xbee->log,"Invalid Command");
- else if (d[13] == 0x03) fprintf(xbee->log,"Invalid Parameter");
- else if (d[13] == 0x04) fprintf(xbee->log,"No Response");
- fprintf(xbee->log," (0x%02X)",d[13]);
- xbee_logIcf();
- }
- p->type = xbee_remoteAT;
-
- p->sAddr64 = FALSE;
- p->dataPkt = FALSE;
- p->txStatusPkt = FALSE;
- p->modemStatusPkt = FALSE;
- p->remoteATPkt = TRUE;
- p->IOPkt = FALSE;
-
- p->frameID = d[0];
-
- p->Addr64[0] = d[1];
- p->Addr64[1] = d[2];
- p->Addr64[2] = d[3];
- p->Addr64[3] = d[4];
- p->Addr64[4] = d[5];
- p->Addr64[5] = d[6];
- p->Addr64[6] = d[7];
- p->Addr64[7] = d[8];
-
- p->Addr16[0] = d[9];
- p->Addr16[1] = d[10];
-
- p->atCmd[0] = d[11];
- p->atCmd[1] = d[12];
-
- p->status = d[13];
-
- p->samples = 1;
-
- if (p->status == 0x00 && p->atCmd[0] == 'I' && p->atCmd[1] == 'S') {
- /* parse the io data */
- xbee_logI("--- Sample -----------------");
- xbee_parse_io(xbee, p, d, 15, 17, 0);
- xbee_logI("----------------------------");
- } else {
- /* copy in the data */
- p->datalen = i-13;
- for (;i>13;i--) p->data[i-14] = d[i];
- }
-
- /* ########################################## */
- /* if: TX status */
- } else if (t == XBEE_TX_STATUS) {
- if (xbee->log) {
- xbee_logI("Packet type: TX Status Report (0x89)");
- xbee_logI("FrameID: 0x%02X",d[0]);
- xbee_logIc("Status: ");
- if (d[1] == 0x00) fprintf(xbee->log,"Success");
- else if (d[1] == 0x01) fprintf(xbee->log,"No ACK");
- else if (d[1] == 0x02) fprintf(xbee->log,"CCA Failure");
- else if (d[1] == 0x03) fprintf(xbee->log,"Purged");
- fprintf(xbee->log," (0x%02X)",d[1]);
- xbee_logIcf();
- }
- p->type = xbee_txStatus;
-
- p->sAddr64 = FALSE;
- p->dataPkt = FALSE;
- p->txStatusPkt = TRUE;
- p->modemStatusPkt = FALSE;
- p->remoteATPkt = FALSE;
- p->IOPkt = FALSE;
-
- p->frameID = d[0];
-
- p->status = d[1];
-
- /* never returns data */
- p->datalen = 0;
-
- /* check for any connections waiting for a status update */
- /* lock the connection mutex */
- xbee_mutex_lock(xbee->conmutex);
- xbee_logI("Looking for a connection that wants a status update...");
- con = xbee->conlist;
- while (con) {
- if ((con->frameID == p->frameID) &&
- (con->ACKstatus == 0xFF)) {
- xbee_logI("Found @ 0x%08X!",con);
- con->ACKstatus = p->status;
- xbee_sem_post(con->waitforACKsem);
- }
- con = con->next;
- }
-
- /* unlock the connection mutex */
- xbee_mutex_unlock(xbee->conmutex);
-
- /* ########################################## */
- /* if: 16 / 64bit data recieve */
- } else if ((t == XBEE_64BIT_DATARX) ||
- (t == XBEE_16BIT_DATARX)) {
- int offset;
- if (t == XBEE_64BIT_DATARX) { /* 64bit */
- offset = 8;
- } else { /* 16bit */
- offset = 2;
- }
- if (xbee->log) {
- xbee_logI("Packet type: %d-bit RX Data (0x%02X)",((t == XBEE_64BIT_DATARX)?64:16),t);
- xbee_logIc("%d-bit Address: ",((t == XBEE_64BIT_DATARX)?64:16));
- for (j=0;jlog,(j?":%02X":"%02X"),d[j]);
- }
- xbee_logIcf();
- xbee_logI("RSSI: -%ddB",d[offset]);
- if (d[offset + 1] & 0x02) xbee_logI("Options: Address Broadcast");
- if (d[offset + 1] & 0x04) xbee_logI("Options: PAN Broadcast");
- }
- p->isBroadcastADR = !!(d[offset+1] & 0x02);
- p->isBroadcastPAN = !!(d[offset+1] & 0x04);
- p->dataPkt = TRUE;
- p->txStatusPkt = FALSE;
- p->modemStatusPkt = FALSE;
- p->remoteATPkt = FALSE;
- p->IOPkt = FALSE;
-
- if (t == XBEE_64BIT_DATARX) { /* 64bit */
- p->type = xbee_64bitData;
-
- p->sAddr64 = TRUE;
-
- p->Addr64[0] = d[0];
- p->Addr64[1] = d[1];
- p->Addr64[2] = d[2];
- p->Addr64[3] = d[3];
- p->Addr64[4] = d[4];
- p->Addr64[5] = d[5];
- p->Addr64[6] = d[6];
- p->Addr64[7] = d[7];
- } else { /* 16bit */
- p->type = xbee_16bitData;
-
- p->sAddr64 = FALSE;
-
- p->Addr16[0] = d[0];
- p->Addr16[1] = d[1];
- }
-
- /* save the RSSI / signal strength
- this can be used with printf as:
- printf("-%ddB\n",p->RSSI); */
- p->RSSI = d[offset];
-
- p->status = d[offset + 1];
-
- /* copy in the data */
- p->datalen = i-(offset + 1);
- for (;i>offset + 1;i--) p->data[i-(offset + 2)] = d[i];
-
- /* ########################################## */
- /* if: 16 / 64bit I/O recieve */
- } else if ((t == XBEE_64BIT_IO) ||
- (t == XBEE_16BIT_IO)) {
- int offset,i2;
- if (t == XBEE_64BIT_IO) { /* 64bit */
- p->type = xbee_64bitIO;
-
- p->sAddr64 = TRUE;
-
- p->Addr64[0] = d[0];
- p->Addr64[1] = d[1];
- p->Addr64[2] = d[2];
- p->Addr64[3] = d[3];
- p->Addr64[4] = d[4];
- p->Addr64[5] = d[5];
- p->Addr64[6] = d[6];
- p->Addr64[7] = d[7];
-
- offset = 8;
- p->samples = d[10];
- } else { /* 16bit */
- p->type = xbee_16bitIO;
-
- p->sAddr64 = FALSE;
-
- p->Addr16[0] = d[0];
- p->Addr16[1] = d[1];
-
- offset = 2;
- p->samples = d[4];
- }
- if (p->samples > 1) {
- p = Xrealloc(p, sizeof(xbee_pkt) + (sizeof(xbee_sample) * (p->samples - 1)));
- }
- if (xbee->log) {
- xbee_logI("Packet type: %d-bit RX I/O Data (0x%02X)",((t == XBEE_64BIT_IO)?64:16),t);
- xbee_logIc("%d-bit Address: ",((t == XBEE_64BIT_IO)?64:16));
- for (j = 0; j < offset; j++) {
- fprintf(xbee->log,(j?":%02X":"%02X"),d[j]);
- }
- xbee_logIcf();
- xbee_logI("RSSI: -%ddB",d[offset]);
- xbee_logI("Samples: %d",d[offset + 2]);
- }
- i2 = offset + 5;
-
- /* never returns data */
- p->datalen = 0;
-
- p->dataPkt = FALSE;
- p->txStatusPkt = FALSE;
- p->modemStatusPkt = FALSE;
- p->remoteATPkt = FALSE;
- p->IOPkt = TRUE;
-
- /* save the RSSI / signal strength
- this can be used with printf as:
- printf("-%ddB\n",p->RSSI); */
- p->RSSI = d[offset];
-
- p->status = d[offset + 1];
-
- /* each sample is split into its own packet here, for simplicity */
- for (o = 0; o < p->samples; o++) {
- if (i2 >= i) {
- xbee_logI("Invalid I/O data! Actually contained %d samples...",o);
- p = Xrealloc(p, sizeof(xbee_pkt) + (sizeof(xbee_sample) * ((o>1)?o:1)));
- p->samples = o;
- break;
- }
- xbee_logI("--- Sample %3d -------------", o);
-
- /* parse the io data */
- i2 = xbee_parse_io(xbee, p, d, offset + 3, i2, o);
- }
- xbee_logI("----------------------------");
-
- /* ########################################## */
- /* if: Series 2 Transmit status */
- } else if (t == XBEE2_TX_STATUS) {
- if (xbee->log) {
- xbee_logI("Packet type: Series 2 Transmit Status (0x%02X)", t);
- xbee_logI("FrameID: 0x%02X",d[0]);
- xbee_logI("16-bit Delivery Address: %02X:%02X",d[1],d[2]);
- xbee_logI("Transmit Retry Count: %02X",d[3]);
- xbee_logIc("Delivery Status: ");
- if (d[4] == 0x00) fprintf(xbee->log,"Success");
- else if (d[4] == 0x02) fprintf(xbee->log,"CCA Failure");
- else if (d[4] == 0x15) fprintf(xbee->log,"Invalid Destination");
- else if (d[4] == 0x21) fprintf(xbee->log,"Network ACK Failure");
- else if (d[4] == 0x22) fprintf(xbee->log,"Not Joined to Network");
- else if (d[4] == 0x23) fprintf(xbee->log,"Self-Addressed");
- else if (d[4] == 0x24) fprintf(xbee->log,"Address Not Found");
- else if (d[4] == 0x25) fprintf(xbee->log,"Route Not Found");
- else if (d[4] == 0x74) fprintf(xbee->log,"Data Payload Too Large"); /* ??? */
- fprintf(xbee->log," (0x%02X)",d[4]);
- xbee_logIcf();
-
- xbee_logIc("Discovery Status: ");
- if (d[5] == 0x00) fprintf(xbee->log,"No Discovery Overhead");
- else if (d[5] == 0x01) fprintf(xbee->log,"Address Discovery");
- else if (d[5] == 0x02) fprintf(xbee->log,"Route Discovery");
- else if (d[5] == 0x03) fprintf(xbee->log,"Address & Route Discovery");
- fprintf(xbee->log," (0x%02X)",d[5]);
- xbee_logIcf();
- }
-
- p->type = xbee2_txStatus;
-
- p->sAddr64 = FALSE;
- p->dataPkt = FALSE;
- p->txStatusPkt = TRUE;
- p->modemStatusPkt = FALSE;
- p->remoteATPkt = FALSE;
- p->IOPkt = FALSE;
-
- p->frameID = d[0];
-
- p->status = d[4];
-
- /* never returns data */
- p->datalen = 0;
-
- /* ########################################## */
- /* if: Series 2 data recieve */
- } else if (t == XBEE2_DATARX) {
- int offset;
- offset = 10;
- if (xbee->log) {
- xbee_logI("Packet type: Series 2 Data Rx (0x%02X)", t);
-
- xbee_logIc("64-bit Address: ");
- for (j=0;j<8;j++) {
- fprintf(xbee->log,(j?":%02X":"%02X"),d[j]);
- }
- xbee_logIcf();
-
- xbee_logIc("16-bit Address: ");
- for (j=0;j<2;j++) {
- fprintf(xbee->log,(j?":%02X":"%02X"),d[j+8]);
- }
- xbee_logIcf();
-
- if (d[offset] & 0x01) xbee_logI("Options: Packet Acknowledged");
- if (d[offset] & 0x02) xbee_logI("Options: Packet was a broadcast packet");
- if (d[offset] & 0x20) xbee_logI("Options: Packet Encrypted"); /* ??? */
- if (d[offset] & 0x40) xbee_logI("Options: Packet from end device"); /* ??? */
- }
- p->dataPkt = TRUE;
- p->txStatusPkt = FALSE;
- p->modemStatusPkt = FALSE;
- p->remoteATPkt = FALSE;
- p->IOPkt = FALSE;
- p->type = xbee2_data;
- p->sAddr64 = TRUE;
-
- p->Addr64[0] = d[0];
- p->Addr64[1] = d[1];
- p->Addr64[2] = d[2];
- p->Addr64[3] = d[3];
- p->Addr64[4] = d[4];
- p->Addr64[5] = d[5];
- p->Addr64[6] = d[6];
- p->Addr64[7] = d[7];
-
- p->Addr16[0] = d[8];
- p->Addr16[1] = d[9];
-
- p->status = d[offset];
-
- /* copy in the data */
- p->datalen = i - (offset + 1);
- for (;i>offset;i--) {
- p->data[i-(offset + 1)] = d[i];
- }
-
- /* ########################################## */
- /* if: Unknown */
- } else {
- xbee_logE("Packet type: Unknown (0x%02X)",t);
- continue;
- }
- p->next = NULL;
-
- /* lock the connection mutex */
- xbee_mutex_lock(xbee->conmutex);
-
- hasCon = 0;
- if (p->isBroadcastADR || p->isBroadcastPAN) {
- unsigned char t[8] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
- /* if the packet was broadcast, search for a broadcast accepting connection */
- con = xbee->conlist;
- while (con) {
- if (con->type == p->type &&
- (con->type == xbee_16bitData || con->type == xbee_64bitData) &&
- ((con->tAddr64 && !memcmp(con->tAddr,t,8)) ||
- (!con->tAddr64 && !memcmp(con->tAddr,t,2)))) {
- hasCon = 1;
- xbee_logI("Found broadcasting connection @ 0x%08X",con);
- break;
- }
- con = con->next;
- }
- }
- if (!hasCon || !con) {
- con = xbee->conlist;
- while (con) {
- if (xbee_matchpktcon(xbee, p, con)) {
- hasCon = 1;
- break;
- }
- con = con->next;
- }
- }
-
- /* unlock the connection mutex */
- xbee_mutex_unlock(xbee->conmutex);
-
- /* if the packet doesn't have a connection, don't add it! */
- if (!hasCon) {
- xbee_logE("Connectionless packet... discarding!");
- continue;
- }
-
- /* if the connection has a callback function then it is passed the packet
- and the packet is not added to the list */
- if (con && con->callback) {
- t_callback_list *l, *q;
-
- xbee_mutex_lock(con->callbackListmutex);
- l = con->callbackList;
- q = NULL;
- while (l) {
- q = l;
- l = l->next;
- }
- l = Xcalloc(sizeof(t_callback_list));
- l->pkt = p;
- if (!con->callbackList || q == NULL) {
- con->callbackList = l;
- } else {
- q->next = l;
- }
- xbee_mutex_unlock(con->callbackListmutex);
-
- xbee_logI("Using callback function!");
- xbee_logI(" info block @ 0x%08X",l);
- xbee_logI(" function @ 0x%08X",con->callback);
- xbee_logI(" connection @ 0x%08X",con);
- xbee_logE(" packet @ 0x%08X",p);
-
- /* if the callback thread not still running, then start a new one! */
- if (!xbee_mutex_trylock(con->callbackmutex)) {
- xbee_thread_t t;
- int ret;
- t_threadList *p, *q;
- t_CBinfo info;
- info.xbee = xbee;
- info.con = con;
- xbee_log("Starting new callback thread!");
- if ((ret = xbee_thread_create(t,xbee_callbackWrapper,&info)) != 0) {
- xbee_mutex_unlock(con->callbackmutex);
- /* this MAY help with future attempts... */
- xbee_sem_post(xbee->threadsem);
- xbee_logS("An error occured while starting thread (%d)... Out of resources?", ret);
- xbee_logE("This packet has been lost!");
- continue;
- }
- xbee_log("Started thread 0x%08X!", t);
- xbee_mutex_lock(xbee->threadmutex);
- p = xbee->threadList;
- q = NULL;
- while (p) {
- q = p;
- p = p->next;
- }
- p = Xcalloc(sizeof(t_threadList));
- if (q == NULL) {
- xbee->threadList = p;
- } else {
- q->next = p;
- }
- p->thread = t;
- p->next = NULL;
- xbee_mutex_unlock(xbee->threadmutex);
- } else {
- xbee_logE("Using existing callback thread... callback has been scheduled.");
- }
- /* prevent the packet from being free'd */
- p = NULL;
- continue;
- }
-
- /* lock the packet mutex, so we can safely add the packet to the list */
- xbee_mutex_lock(xbee->pktmutex);
-
- /* if: the list is empty */
- if (!xbee->pktlist) {
- /* start the list! */
- xbee->pktlist = p;
- } else if (xbee->pktlast) {
- /* add the packet to the end */
- xbee->pktlast->next = p;
- } else {
- /* pktlast wasnt set... look for the end and then set it */
- i = 0;
- q = xbee->pktlist;
- while (q->next) {
- q = q->next;
- i++;
- }
- q->next = p;
- xbee->pktcount = i;
- }
- xbee->pktlast = p;
- xbee->pktcount++;
-
- /* unlock the packet mutex */
- xbee_mutex_unlock(xbee->pktmutex);
-
- xbee_logI("--========================--");
- xbee_logE("Packets: %d",xbee->pktcount);
-
- p = q = NULL;
- }
- return 0;
-}
-
-static void xbee_callbackWrapper(t_CBinfo *info) {
- xbee_hnd xbee;
- xbee_con *con;
- xbee_pkt *pkt;
- t_callback_list *temp;
- xbee = info->xbee;
- con = info->con;
- /* dont forget! the callback mutex is already locked... by the parent thread :) */
- xbee_mutex_lock(con->callbackListmutex);
- while (con->callbackList) {
- /* shift the list along 1 */
- temp = con->callbackList;
- con->callbackList = temp->next;
- xbee_mutex_unlock(con->callbackListmutex);
- /* get the packet */
- pkt = temp->pkt;
-
- xbee_logS("Starting callback function...");
- xbee_logI(" info block @ 0x%08X",temp);
- xbee_logI(" function @ 0x%08X",con->callback);
- xbee_logI(" connection @ 0x%08X",con);
- xbee_logE(" packet @ 0x%08X",pkt);
- Xfree(temp);
- if (con->callback) {
- con->callback(con,pkt);
- xbee_log("Callback complete!");
- if (!con->noFreeAfterCB) Xfree(pkt);
- } else {
- xbee_pkt *q;
- int i;
- xbee_log("Callback function was removed! Appending packet to main list...");
- /* lock the packet mutex, so we can safely add the packet to the list */
- xbee_mutex_lock(xbee->pktmutex);
-
- /* if: the list is empty */
- if (!xbee->pktlist) {
- /* start the list! */
- xbee->pktlist = pkt;
- } else if (xbee->pktlast) {
- /* add the packet to the end */
- xbee->pktlast->next = pkt;
- } else {
- /* pktlast wasnt set... look for the end and then set it */
- i = 0;
- q = xbee->pktlist;
- while (q->next) {
- q = q->next;
- i++;
- }
- q->next = pkt;
- xbee->pktcount = i;
- }
- xbee->pktlast = pkt;
- xbee->pktcount++;
-
- /* unlock the packet mutex */
- xbee_mutex_unlock(xbee->pktmutex);
- }
-
- xbee_mutex_lock(con->callbackListmutex);
- }
- xbee_mutex_unlock(con->callbackListmutex);
-
- xbee_log("Callback thread ending...");
- /* releasing the thread mutex is the last thing we do! */
- xbee_mutex_unlock(con->callbackmutex);
-
- if (con->destroySelf) {
- _xbee_endcon2(xbee,&con,1);
- }
- xbee_sem_post(xbee->threadsem);
-}
-
-/* #################################################################
- xbee_thread_watch - INTERNAL
- watches for dead threads and tidies up */
-static void xbee_thread_watch(xbee_hnd xbee) {
-
-#ifdef _WIN32 /* ---- */
- /* win32 requires this delay... no idea why */
- usleep(1000000);
-#endif /* ----------- */
-
- xbee_mutex_init(xbee->threadmutex);
- xbee_sem_init(xbee->threadsem);
-
- while (xbee->run) {
- t_threadList *p, *q, *t;
- xbee_mutex_lock(xbee->threadmutex);
- p = xbee->threadList;
- q = NULL;
-
- while (p) {
- t = p;
- p = p->next;
- if (!(xbee_thread_tryjoin(t->thread))) {
- xbee_log("Joined with thread 0x%08X...",t->thread);
- if (t == xbee->threadList) {
- xbee->threadList = t->next;
- } else if (q) {
- q->next = t->next;
- }
- free(t);
- } else {
- q = t;
- }
- }
-
- xbee_mutex_unlock(xbee->threadmutex);
- xbee_sem_wait(xbee->threadsem);
- usleep(100000); /* 100ms to allow the thread to end before we try to join */
- }
-
- xbee_mutex_destroy(xbee->threadmutex);
- xbee_sem_destroy(xbee->threadsem);
-}
-
-
-/* #################################################################
- xbee_getbyte - INTERNAL
- waits for an escaped byte of data */
-static unsigned char xbee_getbyte(xbee_hnd xbee) {
- unsigned char c;
-
- /* take a byte */
- c = xbee_getrawbyte(xbee);
- /* if its escaped, take another and un-escape */
- if (c == 0x7D) c = xbee_getrawbyte(xbee) ^ 0x20;
-
- return (c & 0xFF);
-}
-
-/* #################################################################
- xbee_getrawbyte - INTERNAL
- waits for a raw byte of data */
-static unsigned char xbee_getrawbyte(xbee_hnd xbee) {
- int ret;
- unsigned char c = 0x00;
-
- /* the loop is just incase there actually isnt a byte there to be read... */
- do {
- /* wait for a read to be possible */
- if ((ret = xbee_select(xbee,NULL)) == -1) {
- xbee_perror("libxbee:xbee_getrawbyte()");
- exit(1);
- }
- if (!xbee->run) break;
- if (ret == 0) continue;
-
- /* read 1 character */
- if (xbee_read(xbee,&c,1) == 0) {
- /* for some reason no characters were read... */
- if (xbee_ferror(xbee) || xbee_feof(xbee)) {
- xbee_log("Error or EOF detected");
- fprintf(stderr,"libxbee:xbee_read(): Error or EOF detected\n");
- exit(1); /* this should have something nicer... */
- }
- /* no error... try again */
- usleep(10);
- continue;
- }
- } while (0);
-
- return (c & 0xFF);
-}
-
-/* #################################################################
- _xbee_send_pkt - INTERNAL
- sends a complete packet of data */
-static int _xbee_send_pkt(xbee_hnd xbee, t_data *pkt, xbee_con *con) {
- int retval = 0;
-
- /* lock connection mutex */
- xbee_mutex_lock(con->Txmutex);
- /* lock the send mutex */
- xbee_mutex_lock(xbee->sendmutex);
-
- /* write and flush the data */
- xbee_write(xbee,pkt->data,pkt->length);
-
- /* unlock the mutex */
- xbee_mutex_unlock(xbee->sendmutex);
-
- xbee_logSf();
- if (xbee->log) {
- int i,x,y;
- /* prints packet in hex byte-by-byte */
- xbee_logIc("TX Packet:");
- for (i=0,x=0,y=0;ilength;i++,x--) {
- if (x == 0) {
- fprintf(xbee->log,"\n 0x%04X | ",y);
- x = 0x8;
- y += x;
- }
- if (x == 4) {
- fprintf(xbee->log," ");
- }
- fprintf(xbee->log,"0x%02X ",pkt->data[i]);
- }
- xbee_logIcf();
- }
- xbee_logEf();
-
- if (con->waitforACK &&
- ((con->type == xbee_16bitData) ||
- (con->type == xbee_64bitData))) {
- con->ACKstatus = 0xFF; /* waiting */
- xbee_log("Waiting for ACK/NAK response...");
- xbee_sem_wait1sec(con->waitforACKsem);
- switch (con->ACKstatus) {
- case 0: xbee_log("ACK recieved!"); break;
- case 1: xbee_log("NAK recieved..."); break;
- case 2: xbee_log("CCA failure..."); break;
- case 3: xbee_log("Purged..."); break;
- case 255: default: xbee_log("Timeout...");
- }
- if (con->ACKstatus) retval = 1; /* error */
- }
-
- /* unlock connection mutex */
- xbee_mutex_unlock(con->Txmutex);
-
- /* free the packet */
- Xfree(pkt);
-
- return retval;
-}
-
-/* #################################################################
- xbee_make_pkt - INTERNAL
- adds delimiter field
- calculates length and checksum
- escapes bytes */
-static t_data *xbee_make_pkt(xbee_hnd xbee, unsigned char *data, int length) {
- t_data *pkt;
- unsigned int l, i, o, t, x, m;
- char d = 0;
-
- /* check the data given isnt too long
- 100 bytes maximum payload + 12 bytes header information */
- if (length > 100 + 12) return NULL;
-
- /* calculate the length of the whole packet
- start, length (MSB), length (LSB), DATA, checksum */
- l = 3 + length + 1;
-
- /* prepare memory */
- pkt = Xcalloc(sizeof(t_data));
-
- /* put start byte on */
- pkt->data[0] = 0x7E;
-
- /* copy data into packet */
- for (t = 0, i = 0, o = 1, m = 1; i <= length; o++, m++) {
- /* if: its time for the checksum */
- if (i == length) d = M8((0xFF - M8(t)));
- /* if: its time for the high length byte */
- else if (m == 1) d = M8(length >> 8);
- /* if: its time for the low length byte */
- else if (m == 2) d = M8(length);
- /* if: its time for the normal data */
- else if (m > 2) d = data[i];
-
- x = 0;
- /* check for any escapes needed */
- if ((d == 0x11) || /* XON */
- (d == 0x13) || /* XOFF */
- (d == 0x7D) || /* Escape */
- (d == 0x7E)) { /* Frame Delimiter */
- l++;
- pkt->data[o++] = 0x7D;
- x = 1;
- }
-
- /* move data in */
- pkt->data[o] = ((!x)?d:d^0x20);
- if (m > 2) {
- i++;
- t += d;
- }
- }
-
- /* remember the length */
- pkt->length = l;
-
- return pkt;
-}
diff --git a/libs/thirdParty/libxbee/api.h b/libs/thirdParty/libxbee/api.h
deleted file mode 100644
index 692bd7b165cfb9f8ae746af583da2f2c3317fd17..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/api.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-#include
-#include
-
-#include
-
-#include
-#include
-#include
-#include
-
-#ifdef __GNUC__ /* ---- */
-#include
-#include
-#define __USE_GNU
-#include
-#undef __USE_GNU
-#include
-#else /* -------------- */
-#include
-#include
-#include
-#include
-#endif /* ------------- */
-
-#ifdef __UMAKEFILE
- #define HOST_OS "Embedded"
-#elif defined(__GNUC__)
- #define HOST_OS "Linux"
-#elif defined(_WIN32)
- #define HOST_OS "Win32"
-#else
- #define HOST_OS "UNKNOWN"
-#endif
-
-#define TRUE 1
-#define FALSE 0
-
-#define M8(x) (x & 0xFF)
-
-/* various connection types */
-#define XBEE_LOCAL_AT 0x88
-#define XBEE_LOCAL_ATREQ 0x08
-#define XBEE_LOCAL_ATQUE 0x09
-
-#define XBEE_REMOTE_AT 0x97
-#define XBEE_REMOTE_ATREQ 0x17
-
-#define XBEE_MODEM_STATUS 0x8A
-
-/* XBee Series 1 stuff */
-#define XBEE_TX_STATUS 0x89
-#define XBEE_64BIT_DATATX 0x00
-#define XBEE_64BIT_DATARX 0x80
-#define XBEE_16BIT_DATATX 0x01
-#define XBEE_16BIT_DATARX 0x81
-#define XBEE_64BIT_IO 0x82
-#define XBEE_16BIT_IO 0x83
-
-/* XBee Series 2 stuff */
-#define XBEE2_DATATX 0x10
-#define XBEE2_DATARX 0x90
-#define XBEE2_TX_STATUS 0x8B
-
-typedef struct xbee_hnd* xbee_hnd;
-
-#define __LIBXBEE_API_H
-#include "xbee.h"
-
-typedef struct t_threadList t_threadList;
-struct t_threadList {
- xbee_thread_t thread;
- t_threadList *next;
-};
-
-struct xbee_hnd {
- xbee_file_t tty;
-#ifdef __GNUC__ /* ---- */
- int ttyfd;
-#else /* -------------- */
- int ttyr;
- int ttyw;
- int ttyeof;
-
- OVERLAPPED ttyovrw;
- OVERLAPPED ttyovrr;
- OVERLAPPED ttyovrs;
-#endif /* ------------- */
-
- char *path; /* serial port path */
-
- xbee_mutex_t logmutex;
- FILE *log;
- int logfd;
-
- xbee_mutex_t conmutex;
- xbee_con *conlist;
-
- xbee_mutex_t pktmutex;
- xbee_pkt *pktlist;
- xbee_pkt *pktlast;
- int pktcount;
-
- xbee_mutex_t sendmutex;
-
- xbee_thread_t listent;
-
- xbee_thread_t threadt;
- xbee_mutex_t threadmutex;
- xbee_sem_t threadsem;
- t_threadList *threadList;
-
- int run;
-
- int oldAPI;
- char cmdSeq;
- int cmdTime;
-
- /* ready flag.
- needs to be set to -1 so that the listen thread can begin. */
- volatile int xbee_ready;
-
- xbee_hnd next;
-};
-xbee_hnd default_xbee = NULL;
-xbee_mutex_t xbee_hnd_mutex;
-
-typedef struct t_data t_data;
-struct t_data {
- unsigned char data[128];
- unsigned int length;
-};
-
-typedef struct t_LTinfo t_LTinfo;
-struct t_LTinfo {
- int i;
- xbee_hnd xbee;
-};
-
-typedef struct t_CBinfo t_CBinfo;
-struct t_CBinfo {
- xbee_hnd xbee;
- xbee_con *con;
-};
-
-typedef struct t_callback_list t_callback_list;
-struct t_callback_list {
- xbee_pkt *pkt;
- t_callback_list *next;
-};
-
-static void *Xmalloc2(xbee_hnd xbee, size_t size);
-static void *Xcalloc2(xbee_hnd xbee, size_t size);
-static void *Xrealloc2(xbee_hnd xbee, void *ptr, size_t size);
-static void Xfree2(void **ptr);
-#define Xmalloc(x) Xmalloc2(xbee,(x))
-#define Xcalloc(x) Xcalloc2(xbee,(x))
-#define Xrealloc(x,y) Xrealloc2(xbee,(x),(y))
-#define Xfree(x) Xfree2((void **)&x)
-
-/* usage:
- xbee_logSf() lock the log
- xbee_logEf() unlock the log
-
- xbee_log() lock print with \n unlock # to print a single line
- xbee_logc() lock print with no \n # to print a single line with a custom ending
- xbee_logcf() print \n unlock # to end a custom-ended single line
-
- xbee_logS() lock print with \n # to start a continuous block
- xbee_logI() print with \n # to continue a continuous block
- xbee_logIc() print with no \n # to continue a continuous block with a custom ending
- xbee_logIcf() print \n # to continue a continuous block with ended custom-ended line
- xbee_logE() print with \n unlock # to end a continuous block
-*/
-static void xbee_logf(xbee_hnd xbee, const char *logformat, const char *file,
- const int line, const char *function, char *format, ...);
-#define LOG_FORMAT "[%s:%d] %s(): %s"
-
-#define xbee_logSf() if (xbee->log) { xbee_mutex_lock(xbee->logmutex); }
-#define xbee_logEf() if (xbee->log) { xbee_mutex_unlock(xbee->logmutex); }
-
-#define xbee_log(...) if (xbee->log) { xbee_logSf(); xbee_logf(xbee,LOG_FORMAT"\n",__FILE__,__LINE__,__FUNCTION__,__VA_ARGS__); xbee_logEf(); }
-#define xbee_logc(...) if (xbee->log) { xbee_logSf(); xbee_logf(xbee,LOG_FORMAT ,__FILE__,__LINE__,__FUNCTION__,__VA_ARGS__); }
-#define xbee_logcf() if (xbee->log) { fprintf(xbee->log, "\n"); xbee_logEf(); }
-
-#define xbee_logS(...) if (xbee->log) { xbee_logSf(); xbee_logf(xbee,LOG_FORMAT"\n",__FILE__,__LINE__,__FUNCTION__,__VA_ARGS__); }
-#define xbee_logI(...) if (xbee->log) { xbee_logf(xbee,LOG_FORMAT"\n",__FILE__,__LINE__,__FUNCTION__,__VA_ARGS__); }
-#define xbee_logIc(...) if (xbee->log) { xbee_logf(xbee,LOG_FORMAT ,__FILE__,__LINE__,__FUNCTION__,__VA_ARGS__); }
-#define xbee_logIcf() if (xbee->log) { fprintf(xbee->log, "\n"); }
-#define xbee_logE(...) if (xbee->log) { xbee_logf(xbee,LOG_FORMAT"\n",__FILE__,__LINE__,__FUNCTION__,__VA_ARGS__); xbee_logEf(); }
-
-#define xbee_perror(str) \
- if (xbee->log) xbee_logI("%s:%s",str,strerror(errno)); \
- perror(str);
-
-static int xbee_startAPI(xbee_hnd xbee);
-
-static int xbee_sendAT(xbee_hnd xbee, char *command, char *retBuf, int retBuflen);
-static int xbee_sendATdelay(xbee_hnd xbee, int guardTime, char *command, char *retBuf, int retBuflen);
-
-static int xbee_parse_io(xbee_hnd xbee, xbee_pkt *p, unsigned char *d,
- int maskOffset, int sampleOffset, int sample);
-
-static void xbee_thread_watch(xbee_hnd xbee);
-static void xbee_listen_wrapper(xbee_hnd xbee);
-static int xbee_listen(xbee_hnd xbee);
-static unsigned char xbee_getbyte(xbee_hnd xbee);
-static unsigned char xbee_getrawbyte(xbee_hnd xbee);
-static int xbee_matchpktcon(xbee_hnd xbee, xbee_pkt *pkt, xbee_con *con);
-
-static t_data *xbee_make_pkt(xbee_hnd xbee, unsigned char *data, int len);
-static int _xbee_send_pkt(xbee_hnd xbee, t_data *pkt, xbee_con *con);
-static void xbee_callbackWrapper(t_CBinfo *info);
-
-/* these functions can be found in the xsys files */
-static int init_serial(xbee_hnd xbee, int baudrate);
-static int xbee_select(xbee_hnd xbee, struct timeval *timeout);
-
-#ifdef __GNUC__ /* ---- */
-#include "xsys/linux.c"
-#else /* -------------- */
-#include "xsys\win32.c"
-#endif /* ------------- */
-
-#ifndef Win32Message
-#define Win32Message()
-#endif
-
-#define ISREADY(a) if (!xbee || !xbee->xbee_ready) { \
- if (stderr) fprintf(stderr,"libxbee: Run xbee_setup() first!...\n"); \
- Win32Message(); \
- a; \
- }
-#define ISREADYP() ISREADY(return)
-#define ISREADYR(a) ISREADY(return a)
diff --git a/libs/thirdParty/libxbee/doc/man/man3/libxbee.3.html b/libs/thirdParty/libxbee/doc/man/man3/libxbee.3.html
deleted file mode 100644
index 57b7f6a0c5721c77483ac1c30a3cd7c266aa78c3..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/libxbee.3.html
+++ /dev/null
@@ -1,127 +0,0 @@
-Manpage of LIBXBEE
-
-LIBXBEE
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-libxbee
-
-DESCRIPTION
-
-libxbee is a C library to aid the use of Series 1 Digi XBee radios running in API mode (AP=2).
-
-I have tried to keep flexibility to a maximum.
-By allowing connections to individual nodes to be created you don't have to address each packet,
-or filter through incomming packets to get at the one you are after. This is all taken care of
-for you by
-libxbee!
-
-
-libxbee is still in development, so if you find any bugs or have any enhancement requests, please
-feel free to submit an issue on the project page:
-
-
-http://code.google.com/p/libxbee/
-
-
-
-or contact me (Attie) directly:
-
-
-attie@attie.co.uk
-
-
-
-
-MAN PAGES
-
-Documentation is avaliable via the following man pages, or by example in the 'sample' folder in the SVN repository
-
-
-xbee_pkt (3) - libxbee's packet structure
-
-xbee_con (3) - libxbee's connection structure
-
-
-xbee_setup (3) - function to setup libxbee (and its variants)
-
-xbee_end (3) - function to end the libxbee session and close any open handles
-
-
-xbee_logit (3) - function that allows the user to add to the xbee log output
-
-
-xbee_newcon (3) - function to create a new connection
-
-xbee_flushcon (3) - function to flush packets from a connection
-
-xbee_endcon (3) - function to end a connection
-
-
-xbee_senddata (3) - function to send data to a remote XBee (and its variants)
-
-xbee_getpacket (3) - function to get a packet from a connection (and its variants)
-
-
-xbee_hasdigital (3) - function to check if digital sample is in the packet
-
-xbee_getdigital (3) - function to get digital sample from the packet
-
-
-xbee_hasanalog (3) - function to check if analog sample is in the packet
-
-xbee_getanalog (3) - function to get the analog sample from the packet
-
-
-
-
-
SEE ALSO
-
-xbee_pkt (3),
-
-xbee_con (3),
-
-xbee_setup (3),
-
-xbee_end (3),
-
-xbee_logit (3),
-
-xbee_newcon (3),
-
-xbee_flushcon (3),
-
-xbee_endcon (3),
-
-xbee_senddata (3),
-
-xbee_getpacket (3),
-
-xbee_hasdigital (3),
-
-xbee_getdigital (3),
-
-xbee_hasanalog (3),
-
-xbee_getanalog (3)
-
-
-
-
- Index
-
-NAME
- DESCRIPTION
- MAN PAGES
- SEE ALSO
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_con.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_con.3.html
deleted file mode 100644
index 9990d7f2e37d9187140c87fa43d681fce26a4aa7..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_con.3.html
+++ /dev/null
@@ -1,26 +0,0 @@
-Manpage of LIBXBEE
-
-LIBXBEE
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-libxbee
-
-This page has not been written yet...
-
-
-
- Index
-
-NAME
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_end.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_end.3.html
deleted file mode 100644
index 7eaa6c27017f7865a490d9b428ed84d979714c5a..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_end.3.html
+++ /dev/null
@@ -1,27 +0,0 @@
-Manpage of LIBXBEE
-
-LIBXBEE
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-libxbee
-
-This page has not been written yet...
-
-
-
-
- Index
-
-NAME
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_endcon.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_endcon.3.html
deleted file mode 100644
index d7250a3cc42a2399be2d2f7f85d3a820517256e7..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_endcon.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_endcon.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_flushcon.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_flushcon.3.html
deleted file mode 100644
index 1d046d7921238a0569928b2322d5518b29e7a0dd..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_flushcon.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_flushcon.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_getanalog.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_getanalog.3.html
deleted file mode 100644
index 1883c3262e23af1b6162b3d2c44c983d0cf53eb7..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_getanalog.3.html
+++ /dev/null
@@ -1,140 +0,0 @@
-Manpage of XBEE_GETPACKET
-
-XBEE_GETPACKET
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-xbee_hasanalog, xbee_getanalog
-
-SYNOPSIS
-
-#include <xbee.h >
-
-
-int xbee_hasanalog(xbee_pkt * pkt ,int sample , int input );
-
-
-double xbee_getanalog(xbee_pkt * pkt ,int sample , int input , double Vref );
-
-
-
-
DESCRIPTION
-
-The
-xbee_hasanalog ()
-
-function will check the packet for the presence of an analog sample on the specified input.
-
-The
-xbee_getanalog ()
-
-function will read the packet and return the sample value for the specified analog input.
-
-They both take 3 arguments, with the same purposes.
-
-The argument
-pkt
-
-points to a packet that was previously retrieved with
-xbee_getpacket ()
-
-
-The argument
-sample
-
-selects the sample within the packet to use.
-
-The argument
-input
-
-specifies which input you are interested in testing.
-
-xbee_getanalog ()
-
-also takes a fourth argument that allows you to provide a
-Vref
-
-value. This allows the function to convert the raw ADC value into a voltage for you.
-
-
RETURN VALUE
-
-The
-xbee_hasanalog ()
-
-function will return
-1
-
-if the provided packet has sample data for the specified input, otherwise
-0 .
-
-
-The
-xbee_getanalog ()
-
-function will return the raw ADC value (0 - 1023) if the provided packet has sample data for the specified input and Vref was given as zero.
-If Vref was non-zero, then the return value will be the voltage read.
-A
--1
-
-will be returned if the packet does not contain sample data.
-
-
-
EXAMPLE
-
-To read sample data from previously made connection:
-
-
-#include <xbee.h >
-xbee_pkt *pkt;
-double Vref = 3.3;
-if ((pkt = xbee_getpacket(con)) != NULL) {
- if (xbee_hasanalog(pkt,0,0)) {
- printf("A0 read %fv,xbee_getanalog(pkt,0,0,Vref));
- } else {
- printf("No A0 data);
- }
- free(pkt);
-}
-
-
-
-
-AUTHOR
-
-Attie Grande <attie@attie.co.uk >
-
-SEE ALSO
-
-libxbee (3),
-
-xbee_pkt (3),
-
-xbee_getpacket (3),
-
-xbee_hasdigital (3),
-
-xbee_getdigital (3)
-
-
-
-
- Index
-
-NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUE
- EXAMPLE
- AUTHOR
- SEE ALSO
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_getdigital.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_getdigital.3.html
deleted file mode 100644
index 2df9136221c30ff8335915a7d73f6ee5f91111bf..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_getdigital.3.html
+++ /dev/null
@@ -1,134 +0,0 @@
-Manpage of XBEE_GETPACKET
-
-XBEE_GETPACKET
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-xbee_hasdigital, xbee_getdigital
-
-SYNOPSIS
-
-#include <xbee.h >
-
-
-int xbee_hasdigital(xbee_pkt * pkt , int sample , int input );
-
-
-int xbee_getdigital(xbee_pkt * pkt , int sample , int input );
-
-
-
-
DESCRIPTION
-
-The
-xbee_hasdigital ()
-
-function will check the packet for the presence of a given sample on the specified input.
-
-The
-xbee_getdigital ()
-
-function will read the packet and return the sample value for the specified input.
-
-They both take 3 arguments, with the same purposes.
-
-The argument
-pkt
-
-points to a packet that was previously retrieved with
-xbee_getpacket ()
-
-
-The argument
-sample
-
-selects the sample within the packet to use.
-
-The argument
-input
-
-specifies which input you are interested in testing.
-
-
RETURN VALUE
-
-The
-xbee_hasdigital ()
-
-function will return
-1
-
-if the provided packet has sample data for the specified input, otherwise
-0 .
-
-
-The
-xbee_getdigital ()
-
-function will return
-1
-
-if the provided packet has sample data for the specified input and the sample was HIGH.
-A
-0
-
-will be returned if the sample was LOW, or the packet does not contain sample data.
-
-
-
EXAMPLE
-
-To read sample data from previously made connection:
-
-
-#include <xbee.h >
-xbee_pkt *pkt;
-if ((pkt = xbee_getpacket(con)) != NULL) {
- if (xbee_hasdigital(pkt,0,0)) {
- printf("D0 read %d,xbee_getdigital(pkt,0));
- } else {
- printf("No D0 data);
- }
- free(pkt);
-}
-
-
-
-
-AUTHOR
-
-Attie Grande <attie@attie.co.uk >
-
-SEE ALSO
-
-libxbee (3),
-
-xbee_pkt (3),
-
-xbee_getpacket (3),
-
-xbee_hasanalog (3),
-
-xbee_getanalog (3)
-
-
-
-
- Index
-
-NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUE
- EXAMPLE
- AUTHOR
- SEE ALSO
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_getpacket.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_getpacket.3.html
deleted file mode 100644
index 45063f77369f1abf8072bb1d7e39dfcda77574d4..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_getpacket.3.html
+++ /dev/null
@@ -1,130 +0,0 @@
-Manpage of XBEE_GETPACKET
-
-XBEE_GETPACKET
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-xbee_getpacket
-
-SYNOPSIS
-
-#include <xbee.h >
-
-
-xbee_pkt *xbee_getpacket(xbee_con * con );
-
-
-xbee_pkt *xbee_getpacketwait(xbee_con * con );
-
-
-
-
DESCRIPTION
-
-The
-xbee_getpacket ()
-
-function will return the next avaliable packet for the provided connection.
-It takes 1 argument.
-
-The argument
-con
-
-points to a connection made previously with
-xbee_newcon ().
-
-
-The
-xbee_getpacketwait ()
-
-function behaves the same, but will wait for an internally specified time for a packet to arrive (currently around 1 second).
-
-
RETURN VALUE
-
-Upon successful return, this function returns the packet, having unlinked it from the internal list of packets.
-You must keep hold of the packet until you are finished with it, and then you must
-free ()
-
-it to prevent memory leaks.
-
-If a packet was not avaliable for the provided connection, a
-NULL
-
-is returned.
-
-If an error occured a
-NULL
-
-is also returned (though unlikely).
-
-For more information on the structure of the packet, please see
-xbee_pkt (3)
-
-
-For information on using callback functions with connections instead, please see
-xbee_con (3)
-
-
-
EXAMPLE
-
-To recieve a packet from a previously made connection:
-
-
-#include <xbee.h >
-xbee_pkt *pkt;
-if ((pkt = xbee_getpacket(con)) != NULL) {
- /* process packet... */
- free(pkt);
-}
-
-
-
-
-AUTHOR
-
-Attie Grande <attie@attie.co.uk >
-
-SEE ALSO
-
-libxbee (3),
-
-xbee_setup (3),
-
-xbee_newcon (3),
-
-xbee_senddata (3),
-
-xbee_pkt (3),
-
-xbee_con (3),
-
-xbee_hasDigital (3),
-
-xbee_getDigital (3),
-
-xbee_hasAnalog (3),
-
-xbee_getAnalog (3)
-
-
-
-
- Index
-
-NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUE
- EXAMPLE
- AUTHOR
- SEE ALSO
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_hasanalog.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_hasanalog.3.html
deleted file mode 100644
index e2c495c41a0ee5bd289201f4d5cfced40434af68..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_hasanalog.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_hasanalog.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_hasdigital.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_hasdigital.3.html
deleted file mode 100644
index 9774f408171e5530962325df7512425f27aff02c..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_hasdigital.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_hasdigital.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_logit.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_logit.3.html
deleted file mode 100644
index 7eaa6c27017f7865a490d9b428ed84d979714c5a..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_logit.3.html
+++ /dev/null
@@ -1,27 +0,0 @@
-Manpage of LIBXBEE
-
-LIBXBEE
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-libxbee
-
-This page has not been written yet...
-
-
-
-
- Index
-
-NAME
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_newcon.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_newcon.3.html
deleted file mode 100644
index 32f085b2685782320a34654812647c3898b51a46..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_newcon.3.html
+++ /dev/null
@@ -1,201 +0,0 @@
-Manpage of XBEE_NEWCON
-
-XBEE_NEWCON
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-xbee_newcon
-
-SYNOPSIS
-
-#include <xbee.h >
-
-
-xbee_con *xbee_newcon(unsigned char frameID , xbee_types type , ...);
-
-
-void xbee_flushcon(xbee_con * con );
-
-
-void xbee_endcon(xbee_con * con );
-
-
-
-
DESCRIPTION
-
-The
-xbee_newcon ()
-
-function will setup a new connection with the specified settings.
-It takes at least 2 arguments, and possibly up to 4 depending on the
-type.
-
-
-NOTE:
-
-Packets will only be collected when they match an active connection.
-You must setup a connection in order to recieve packets.
-
-The argument
-frameID
-
-allows similar functionality to that of TCP/IP port numbers. This is 1 character (or 8-bit integer) that
-identifies where the data is coming from or going to.
-
-The
-type
-
-specifies the type of connection you would like. The following types are avaliable:
-
-xbee_localAT
-
-
-communicates AT commands with the local XBee
- xbee_txStatus
-
-
-recieves transmit status information from the local XBee
- xbee_modemStatus
-
-
-recieves modem status information from the local XBee
- xbee_16bitRemoteAT
-
-
-communicates AT commands with a remote node (using 16-bit addressing)
- xbee_64bitRemoteAT
-
-
-communicates AT commands with a remote node (using 64-bit addressing)
- xbee_16bitData
-
-
-sends/recieves data through a remote node (using 16-bit addressing)
- xbee_64bitData
-
-
-sends/recieves data through a remote node (using 64-bit addressing)
- xbee_16bitIO
-
-
-sends/recieves I/O data through a remote node (using 16-bit addressing)
- xbee_64bitIO
-
-
-sends/recieves I/O data through a remote node (using 64-bit addressing)
-
-
-
-If you are using
-xbee_localAT , xbee_txStatus or xbee_modemStatus
-
-then only the
-frameID
-
-and
-type
-
-arguments are required.
-
-If you are using any 16-bit connection, you must also specify 1 right aligned integer,
-containing the 16-bit address (e.g. 0x1234).
-
-If you are using any 64-bit connection, you must also specify 2 integers containing the
-64-bit address, first the high 32-bits, then the low 32-bits.
-
-The
-xbee_flushcon ()
-
-function is very basic. It removes any packets that have been collected in the buffer for the specified connection.
-
-The
-xbee_endcon ()
-
-function is used to end a connection. This will stop collecting packets for the given connection, and remove any packets from the buffer.
-
-
RETURN VALUE
-
-A pointer to the connection is returned. A connection can only be made once, using the same
-type
-
-,
-frameID
-
-and address (if needed). The second call using the same parameters will return the same
-connection.
-
-For information on using callback functions for packet handling please see
-xbee_con (3)
-
-
-
EXAMPLE
-
-To create a local AT connection:
-
-
-#include <xbee.h >
-xbee_con *con;
-con = xbee_newcon('A', xbee_localAT);
-
-
-
-
-To create a 16-bit Data connection:
-
-
-#include <xbee.h >
-xbee_con *con;
-con = xbee_newcon('A', xbee_16bitData, 0x1234);
-
-
-
-
-To create a 64-bit Data connection:
-
-
-#include <xbee.h >
-xbee_con *con;
-con = xbee_newcon('A', xbee_64bitData, 0x0013A200, 0x40081826);
-
-
-
-
-AUTHOR
-
-Attie Grande <attie@attie.co.uk >
-
-SEE ALSO
-
-libxbee (3),
-
-xbee_setup (3),
-
-xbee_getpacket (3),
-
-xbee_con (3),
-
-xbee_senddata (3)
-
-
-
-
- Index
-
-NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUE
- EXAMPLE
- AUTHOR
- SEE ALSO
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_nsenddata.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_nsenddata.3.html
deleted file mode 100644
index 3da3c6f217e80896fd86b61a576a2a7285721c2e..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_nsenddata.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_nsenddata.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_pkt.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_pkt.3.html
deleted file mode 100644
index 1859405aa7a94fb1384c2d2ba38b0ca6c4fb89df..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_pkt.3.html
+++ /dev/null
@@ -1,107 +0,0 @@
-Manpage of XBEE_PKT
-
-XBEE_PKT
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-xbee_pkt
-
-SYNOPSIS
-
-#include <xbee.h >
-
-
-
-DESCRIPTION
-
-This is the packet structure. If you want to get more advanced information from connections (such as RSSI) then this is where it lives.
-
-
-
-struct xbee_pkt {
- unsigned char frameID; /* AT Status */
- unsigned char atCmd[2]; /* AT */
- unsigned char status; /* AT Data Status */ /* status / options */
- unsigned char Addr64[8]; /* AT Data */
- unsigned char Addr16[2]; /* AT Data */
- unsigned char data[128]; /* AT Data */
- unsigned char RSSI; /* Data */
- unsigned int datalen;
-
- /* X A5 A4 A3 A2 A1 A0 D8 D7 D6 D5 D4 D3 D2 D1 D0 */
- unsigned short IOmask; /* IO */
-
- /* X X X X X X X D8 D7 D6 D5 D4 D3 D2 D1 D0 */
- unsigned short IOdata; /* IO */
-
- /* X X X X X D D D D D D D D D D D */
- unsigned short IOanalog[6]; /* IO */
-};
-typedef struct xbee_pkt xbee_pkt;
-
-
-
-
-Most of these fields are fairly self explanatory, however some need attention brought to them
-and others need explaining. I will touch on the most important here:
-
-atCmd
-
-
-This is the 2 character identifier for the AT command response you just recieved.
-Of course if you didnt setup an AT connection, you should never see, or try to see data here.
- Addr64 and Addr16
-
-
-These contain the address of the XBee that you recieved the packet from. You should really know this
-because you setup the connection. However remote AT packets will contain both 16 and 64 bit
-addresses.
- data
-
-
-This is the data you just recieved. Either the AT reponse, or the data from the remote XBee node.
- datalen
-
-
-Would you be suprised if I told you this is how much data there is?... Dont try and
-printf ()
-
-the
-data
-
-as it isn't null terminated. Use this for processing instead.
-
-
-
-
-AUTHOR
-
-Attie Grande <attie@attie.co.uk >
-
-SEE ALSO
-
-libxbee (3),
-
-xbee_getpacket (3)
-
-
-
-
- Index
-
-NAME
- SYNOPSIS
- DESCRIPTION
- AUTHOR
- SEE ALSO
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_senddata.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_senddata.3.html
deleted file mode 100644
index 31baf1c73b44dcb38a0471d1cb3fb5495a53b321..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_senddata.3.html
+++ /dev/null
@@ -1,129 +0,0 @@
-Manpage of XBEE_SENDDATA
-
-XBEE_SENDDATA
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-xbee_senddata, xbee_vsenddata
-
-SYNOPSIS
-
-#include <xbee.h >
-
-
-int xbee_senddata(xbee_con * con , char * format , ...);
-
-
-int xbee_nsenddata(xbee_con * con , char * data , int length );
-
-
-#include <stdarg.h >
-
-
-int xbee_vsenddata(xbee_con * con , char * format , va_list ap );
-
-
-
-
DESCRIPTION
-
-The
-xbee_senddata ()
-
-function will send data via a provided connection.
-It takes at least 2 arguments, and possibly more depending on the format string.
-
-The argument
-con
-
-points to a connection made previously with
-xbee_newcon ().
-
-
-The
-format
-
-string and any following parameters are passed to
-sprintf ()
-
-within these functions.
-Please see the
-printf (3)
-
-man page for more information.
-
-If you are using
-xbee_nsenddata ()
-
-you must provide a character array of the data, and the data's length.
-
-If you are using
-xbee_vsenddata ()
-
-you must provide a va_list. See
-stdarg (3).
-
-
-
RETURN VALUE
-
-Upon successful completion, these functions return 0.
-
-If an invalid packet or connection was provided, -1 is returned.
-
-If an unknown error occured, -2 is returned.
-
-If
-con
-
-has
-waitforACK
-
-enabled, then these functions return 1 when an ACK was not recieved within 1 second.
-
-
EXAMPLE
-
-To send the string "Hello World!" through a previously made connection:
-
-
-#include <xbee.h >
-xbee_senddata(con,"Hello World!");
-
-
-
-
-AUTHOR
-
-Attie Grande <attie@attie.co.uk >
-
-SEE ALSO
-
-libxbee (3),
-
-xbee_setup (3),
-
-xbee_newcon (3),
-
-xbee_getpacket (3)
-
-
-
-
- Index
-
-NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUE
- EXAMPLE
- AUTHOR
- SEE ALSO
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_setup.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_setup.3.html
deleted file mode 100644
index 5b69945a51c1bff7c75d9d21909791f5f934c41e..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_setup.3.html
+++ /dev/null
@@ -1,142 +0,0 @@
-Manpage of XBEE_SETUP
-
-XBEE_SETUP
-Section: Linux Programmer's Manual (3) Updated: 2009-11-01Index
-Return to Main Contents
-
-
-NAME
-
-xbee_setup
-
-SYNOPSIS
-
-#include <xbee.h >
-
-
-int xbee_setup(char * path , int baudrate );
-
-
-int xbee_setuplog(char * path , int baudrate , int logfd );
-
-
-int xbee_setupAPI(char * path , char cmdSeq , int cmdTime );
-
-
-int xbee_setuplogAPI(char * path , int baudrate , int logfd , char cmdSeq , int cmdTime );
-
-
-
-
DESCRIPTION
-
-
-A VERSION OF THIS FUNCTION MUST BE CALLED BEFORE ANY OTHER libxbee FUNCTION!
-
-The
-xbee_setup ()
-
-function will setup libxbee so that it can handle an XBee.
-It takes 2 arguments.
-
-The argument
-path
-
-is the path to the serial port that the XBee is connected to (e.g. /dev/ttyUSB0).
-
-The
-baudrate
-
-is the baud rate that the local XBee is configured to run at. The following are avaliable:
-
-
-1200
-2400
-4800
-9600
-19200
-38400
-57600
-115200 - this is potentially unstable (read the XBee manual to find out why...)
-
-
-
-
-Using
-xbee_setuplog ()
-
-is exactly the same, but instead you give an open file descriptor. All log messages will be written to this file (you can use stderr or stdout if you want!).
-
-Using
-xbee_setupAPI ()
-
-is exactly the same, but instead you provide the 'Command Sequence' character and the 'Guard Time' that your local XBee has been configured with.
-libxbee will then place your XBee in API mode 2, and when you call xbee_end() it will return your XBee to its previous API mode.
-
-Using
-xbee_setuplogAPI ()
-
-is simply a combination of
-xbee_setuplog ()
-
-and
-xbee_setupAPI ()
-
-
-
RETURN VALUE
-
-If any error occures,
--1
-
-is returned. Otherwise
-0
-
-is returned.
-
-EXAMPLE
-
-To setup libxbee to use /dev/ttyUSB0 at 57600 baud:
-
-
-#include <xbee.h >
-if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
- printf("Oh no...);
- exit (1);
-}
-
-
-
-
-AUTHOR
-
-Attie Grande <attie@attie.co.uk >
-
-SEE ALSO
-
-libxbee (3),
-
-xbee_newcon (3),
-
-xbee_getpacket (3),
-
-xbee_senddata (3)
-
-
-
-
- Index
-
-NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUE
- EXAMPLE
- AUTHOR
- SEE ALSO
-
-
-This document was created by
-man2html ,
-using the manual pages.
-Time: 00:08:23 GMT, March 30, 2011
-
-
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_setupAPI.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_setupAPI.3.html
deleted file mode 100644
index 158f1857c92583be548fb5d24e1ea8b856284f74..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_setupAPI.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_setupAPI.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_setuplog.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_setuplog.3.html
deleted file mode 100644
index 16accc571339096d89bb449e201a3f56a72e7dc0..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_setuplog.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_setuplog.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_setuplogAPI.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_setuplogAPI.3.html
deleted file mode 100644
index 801cbfaf90d574643d8ed624b7c0838e340df80c..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_setuplogAPI.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_setuplogAPI.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/doc/man/man3/xbee_vsenddata.3.html b/libs/thirdParty/libxbee/doc/man/man3/xbee_vsenddata.3.html
deleted file mode 100644
index 5a9b7d948c5ed228bbc005c20bb87dab963cea2f..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/doc/man/man3/xbee_vsenddata.3.html
+++ /dev/null
@@ -1,4 +0,0 @@
-Invalid Manpage
-
-Invalid Manpage
-The requested file ./man/man3/xbee_vsenddata.3 is not a valid (unformatted) man page.
diff --git a/libs/thirdParty/libxbee/lib/libxbee.dll b/libs/thirdParty/libxbee/lib/libxbee.dll
deleted file mode 100644
index cf1af098e6c3a5fb130ab8d248fe873fe594db94..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/lib/libxbee.dll and /dev/null differ
diff --git a/libs/thirdParty/libxbee/lib/libxbee.exp b/libs/thirdParty/libxbee/lib/libxbee.exp
deleted file mode 100644
index 1ab830676fc609ead5c1aaab15a204bc98345123..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/lib/libxbee.exp and /dev/null differ
diff --git a/libs/thirdParty/libxbee/lib/libxbee.lib b/libs/thirdParty/libxbee/lib/libxbee.lib
deleted file mode 100644
index 7b42cadbaede1530f4c126e5c81306195d19784e..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/lib/libxbee.lib and /dev/null differ
diff --git a/libs/thirdParty/libxbee/lib/libxbee.map b/libs/thirdParty/libxbee/lib/libxbee.map
deleted file mode 100644
index 6adaef145b7bdce3eef1a1b1ea8c52935cd4ec32..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/lib/libxbee.map
+++ /dev/null
@@ -1,897 +0,0 @@
- libxbee
-
- Timestamp is 4e2eb2df (Tue Jul 26 14:28:15 2011)
-
- Preferred load address is 10000000
-
- Start Length Name Class
- 0001:00000000 00019a38H .text CODE
- 0002:00000000 00000188H .idata$5 DATA
- 0002:00000188 00000004H .CRT$XCA DATA
- 0002:0000018c 00000004H .CRT$XCZ DATA
- 0002:00000190 00000004H .CRT$XIA DATA
- 0002:00000194 00000010H .CRT$XIC DATA
- 0002:000001a4 00000004H .CRT$XIZ DATA
- 0002:000001a8 00000004H .CRT$XPA DATA
- 0002:000001ac 00000004H .CRT$XPX DATA
- 0002:000001b0 00000004H .CRT$XPXA DATA
- 0002:000001b4 00000004H .CRT$XPZ DATA
- 0002:000001b8 00000004H .CRT$XTA DATA
- 0002:000001bc 00000004H .CRT$XTZ DATA
- 0002:000001c0 000022c0H .rdata DATA
- 0002:00002480 0000000cH .rdata$sxdata DATA
- 0002:0000248c 00000004H .rtc$IAA DATA
- 0002:00002490 00000000H .rtc$IMZ DATA
- 0002:00002490 00000004H .rtc$IZZ DATA
- 0002:00002494 00000004H .rtc$TAA DATA
- 0002:00002498 00000000H .rtc$TMZ DATA
- 0002:00002498 00000004H .rtc$TZZ DATA
- 0002:000024a0 0000049cH .xdata$x DATA
- 0002:0000293c 0000003cH .idata$2 DATA
- 0002:00002978 00000014H .idata$3 DATA
- 0002:0000298c 00000188H .idata$4 DATA
- 0002:00002b14 000006baH .idata$6 DATA
- 0002:000031d0 000005a5H .edata DATA
- 0003:00000000 000052f0H .data DATA
- 0003:00005300 00001f44H .bss DATA
- 0004:00000000 00000058H .rsrc$01 DATA
- 0004:00000060 00000400H .rsrc$02 DATA
-
- Address Publics by Value Rva+Base Lib:Object
-
- 0000:00000000 __except_list 00000000
- 0000:00000003 ___safe_se_handler_count 00000003
- 0000:00000000 ___ImageBase 10000000
- 0001:00000000 _ver@16 10001000 f api.obj
- 0001:000000b0 _xbee_UNLOADALL@0 100010b0 f api.obj
- 0001:000000e0 _DllMain@12 100010e0 f api.obj
- 0001:00000120 _DllCanUnloadNow@0 10001120 f api.obj
- 0001:00000140 _RegWriteKey@24 10001140 f api.obj
- 0001:00000210 _DllRegisterServer@0 10001210 f api.obj
- 0001:000004b0 _DllUnregisterServer@0 100014b0 f api.obj
- 0001:00000670 _xbee_write@12 10001670 f api.obj
- 0001:00000720 _xbee_read@12 10001720 f api.obj
- 0001:000007d0 _xbee_free@4 100017d0 f api.obj
- 0001:00000800 _gettimeofday@8 10001800 f api.obj
- 0001:000008a0 _xbee_setupDebugAPI@20 100018a0 f api.obj
- 0001:000009b0 _xbee_setupDebug@12 100019b0 f api.obj
- 0001:000009e0 _xbee_newcon_simple@8 100019e0 f api.obj
- 0001:00000a00 _xbee_newcon_16bit@12 10001a00 f api.obj
- 0001:00000a30 _xbee_newcon_64bit@16 10001a30 f api.obj
- 0001:00000a60 _xbee_enableACKwait@4 10001a60 f api.obj
- 0001:00000a80 _xbee_disableACKwait@4 10001a80 f api.obj
- 0001:00000aa0 _xbee_enableDestroySelf@4 10001aa0 f api.obj
- 0001:00000ac0 _xbee_callback@8 10001ac0 f api.obj
- 0001:00000c70 _xbee_runCallback@12 10001c70 f api.obj
- 0001:00000ca0 _xbee_enableCallbacks@8 10001ca0 f api.obj
- 0001:00000df0 _xbee_attachCallback@4 10001df0 f api.obj
- 0001:00000ea0 _xbee_detachCallback@4 10001ea0 f api.obj
- 0001:00000f50 _xbee_svn_version@0 10001f50 f api.obj
- 0001:00000fc0 _xbee_build_info@0 10001fc0 f api.obj
- 0001:00000fd0 _xbee_hasdigital@12 10001fd0 f api.obj
- 0001:00001030 _xbee_getdigital@12 10002030 f api.obj
- 0001:00001090 _xbee_hasanalog@12 10002090 f api.obj
- 0001:000010f0 _xbee_getanalog@20 100020f0 f api.obj
- 0001:00001270 _xbee_logitf 10002270 f api.obj
- 0001:00001320 __xbee_logitf 10002320 f api.obj
- 0001:000013d0 _xbee_logit@4 100023d0 f api.obj
- 0001:000013f0 __xbee_logit@8 100023f0 f api.obj
- 0001:00001470 _xbee_end@0 10002470 f api.obj
- 0001:00001490 __xbee_end@4 10002490 f api.obj
- 0001:00001a30 _xbee_setup@8 10002a30 f api.obj
- 0001:00001a60 __xbee_setup@8 10002a60 f api.obj
- 0001:00001a90 _xbee_setuplog@12 10002a90 f api.obj
- 0001:00001ac0 __xbee_setuplog@12 10002ac0 f api.obj
- 0001:00001af0 _xbee_setupAPI@16 10002af0 f api.obj
- 0001:00001b20 __xbee_setupAPI@16 10002b20 f api.obj
- 0001:00001b50 _xbee_setuplogAPI@20 10002b50 f api.obj
- 0001:00001ba0 __xbee_setuplogAPI@20 10002ba0 f api.obj
- 0001:00003820 _xbee_newcon 10004820 f api.obj
- 0001:00003870 __xbee_newcon 10004870 f api.obj
- 0001:000038c0 __xbee_vnewcon@16 100048c0 f api.obj
- 0001:000043f0 _xbee_purgecon@4 100053f0 f api.obj
- 0001:00004410 __xbee_purgecon@8 10005410 f api.obj
- 0001:00004590 _xbee_endcon2@8 10005590 f api.obj
- 0001:000045c0 __xbee_endcon2@12 100055c0 f api.obj
- 0001:00004880 _xbee_senddata 10005880 f api.obj
- 0001:000048d0 __xbee_senddata 100058d0 f api.obj
- 0001:00004920 _xbee_vsenddata@12 10005920 f api.obj
- 0001:00004950 __xbee_vsenddata@16 10005950 f api.obj
- 0001:00004a00 _xbee_nsenddata@12 10005a00 f api.obj
- 0001:00004a30 __xbee_nsenddata@16 10005a30 f api.obj
- 0001:000053a0 _xbee_getpacketwait@4 100063a0 f api.obj
- 0001:000053c0 __xbee_getpacketwait@8 100063c0 f api.obj
- 0001:00005440 _xbee_getpacket@4 10006440 f api.obj
- 0001:00005460 __xbee_getpacket@8 10006460 f api.obj
- 0001:00005ab0 _xbee_listen_stop@4 10006ab0 f api.obj
- 0001:0000a47f _sprintf 1000b47f f LIBCMT:sprintf.obj
- 0001:0000a503 @__security_check_cookie@4 1000b503 f LIBCMT:secchk.obj
- 0001:0000a512 __RTC_CheckEsp 1000b512 f LIBCMT:_stack_.obj
- 0001:0000a535 @_RTC_CheckStackVars@8 1000b535 f LIBCMT:_stack_.obj
- 0001:0000a591 _free 1000b591 f LIBCMT:free.obj
- 0001:0000a5cb __ftime64_s 1000b5cb f LIBCMT:ftime64.obj
- 0001:0000a73b __ftime64 1000b73b f LIBCMT:ftime64.obj
- 0001:0000a746 __get_errno_from_oserr 1000b746 f LIBCMT:dosmap.obj
- 0001:0000a788 __errno 1000b788 f LIBCMT:dosmap.obj
- 0001:0000a79b ___doserrno 1000b79b f LIBCMT:dosmap.obj
- 0001:0000a7ae __dosmaperr 1000b7ae f LIBCMT:dosmap.obj
- 0001:0000af05 __open 1000bf05 f LIBCMT:open.obj
- 0001:0000afc0 _strrchr 1000bfc0 f LIBCMT:strrchr.obj
- 0001:0000aff0 __cfltcvt_init 1000bff0 f LIBCMT:_fpinit_.obj
- 0001:0000b050 __fpmath 1000c050 f LIBCMT:_fpinit_.obj
- 0001:0000b069 _fprintf 1000c069 f LIBCMT:fprintf.obj
- 0001:0000b175 __flush 1000c175 f LIBCMT:fflush.obj
- 0001:0000b1dd __fflush_nolock 1000c1dd f LIBCMT:fflush.obj
- 0001:0000b2ff _fflush 1000c2ff f LIBCMT:fflush.obj
- 0001:0000b352 __flushall 1000c352 f LIBCMT:fflush.obj
- 0001:0000b35b __fclose_nolock 1000c35b f LIBCMT:fclose.obj
- 0001:0000b3c8 _fclose 1000c3c8 f LIBCMT:fclose.obj
- 0001:0000b43c ___iob_func 1000c43c f LIBCMT:_file.obj
- 0001:0000b442 ___initstdio 1000c442 f LIBCMT:_file.obj
- 0001:0000b4f3 ___endstdio 1000c4f3 f LIBCMT:_file.obj
- 0001:0000b513 __lock_file 1000c513 f LIBCMT:_file.obj
- 0001:0000b554 __lock_file2 1000c554 f LIBCMT:_file.obj
- 0001:0000b586 __unlock_file 1000c586 f LIBCMT:_file.obj
- 0001:0000b5c2 __unlock_file2 1000c5c2 f LIBCMT:_file.obj
- 0001:0000b600 _strcpy 1000c600 f LIBCMT:strcat.obj
- 0001:0000b610 _strcat 1000c610 f LIBCMT:strcat.obj
- 0001:0000b700 _strlen 1000c700 f LIBCMT:strlen.obj
- 0001:0000b78b _setvbuf 1000c78b f LIBCMT:setvbuf.obj
- 0001:0000b881 __get_sys_err_msg 1000c881 f i LIBCMT:perror.obj
- 0001:0000b8a9 _perror 1000c8a9 f LIBCMT:perror.obj
- 0001:0000b937 _strerror 1000c937 f LIBCMT:strerror.obj
- 0001:0000b9a1 ___crtCorExitProcess 1000c9a1 f LIBCMT:crt0dat.obj
- 0001:0000b9cc ___crtExitProcess 1000c9cc f LIBCMT:crt0dat.obj
- 0001:0000b9e4 __lockexit 1000c9e4 f LIBCMT:crt0dat.obj
- 0001:0000b9ed __unlockexit 1000c9ed f LIBCMT:crt0dat.obj
- 0001:0000b9f6 __init_pointers 1000c9f6 f LIBCMT:crt0dat.obj
- 0001:0000ba29 __initterm_e 1000ca29 f LIBCMT:crt0dat.obj
- 0001:0000ba4d __cinit 1000ca4d f LIBCMT:crt0dat.obj
- 0001:0000bc24 _exit 1000cc24 f LIBCMT:crt0dat.obj
- 0001:0000bc3a __exit 1000cc3a f LIBCMT:crt0dat.obj
- 0001:0000bc50 __cexit 1000cc50 f LIBCMT:crt0dat.obj
- 0001:0000bc5f __amsg_exit 1000cc5f f LIBCMT:crt0dat.obj
- 0001:0000bc7d _malloc 1000cc7d f LIBCMT:malloc.obj
- 0001:0000bd11 _calloc 1000cd11 f LIBCMT:calloc.obj
- 0001:0000bd51 _atol 1000cd51 f LIBCMT:atox.obj
- 0001:0000bd67 _atoi 1000cd67 f LIBCMT:atox.obj
- 0001:0000bd72 _strncmp 1000cd72 f LIBCMT:strncmp.obj
- 0001:0000be40 _memset 1000ce40 f LIBCMT:memset.obj
- 0001:0000bec0 _memcpy 1000cec0 f LIBCMT:memcpy.obj
- 0001:0000c221 _memcmp 1000d221 f LIBCMT:memcmp.obj
- 0001:0000d775 _realloc 1000e775 f LIBCMT:realloc.obj
- 0001:0000d822 __CRT_INIT@12 1000e822 f LIBCMT:dllcrt0.obj
- 0001:0000da7c __DllMainCRTStartup@12 1000ea7c f LIBCMT:dllcrt0.obj
- 0001:0000da9f __flsbuf 1000ea9f f LIBCMT:_flsbuf.obj
- 0001:0000dc03 ??0_LocaleUpdate@@QAE@PAUlocaleinfo_struct@@@Z 1000ec03 f i LIBCMT:output.obj
- 0001:0000dd0a __output_l 1000ed0a f LIBCMT:output.obj
- 0001:0000e8b6 __initp_misc_invarg 1000f8b6 f LIBCMT:invarg.obj
- 0001:0000e8c5 __call_reportfault 1000f8c5 f LIBCMT:invarg.obj
- 0001:0000e9ee __invoke_watson 1000f9ee f LIBCMT:invarg.obj
- 0001:0000ea13 __invalid_parameter 1000fa13 f LIBCMT:invarg.obj
- 0001:0000ea40 __invalid_parameter_noinfo 1000fa40 f LIBCMT:invarg.obj
- 0001:0000ea50 ___report_gsfailure 1000fa50 f LIBCMT:gs_report.obj
- 0001:0000ee0e ?_RTC_Failure@@YAXPAXH@Z 1000fe0e f LIBCMT:_error_.obj
- 0001:0000ee49 ?_RTC_StackFailure@@YAXPAXPBD@Z 1000fe49 f LIBCMT:_error_.obj
- 0001:0000ef3c ?_RTC_GetErrorFunc@@YAP6AHHPBDH00ZZPBX@Z 1000ff3c f LIBCMT:_userapi_.obj
- 0001:0000ef42 ?_RTC_GetErrorFuncW@@YAP6AHHPB_WH00ZZPBX@Z 1000ff42 f LIBCMT:_userapi_.obj
- 0001:0000ef48 __heap_init 1000ff48 f LIBCMT:heapinit.obj
- 0001:0000ef66 __heap_term 1000ff66 f LIBCMT:heapinit.obj
- 0001:0000ef7a __get_daylight 1000ff7a f LIBCMT:timeset.obj
- 0001:0000efa7 __get_dstbias 1000ffa7 f LIBCMT:timeset.obj
- 0001:0000efd4 __get_timezone 1000ffd4 f LIBCMT:timeset.obj
- 0001:0000f001 ___daylight 10010001 f LIBCMT:timeset.obj
- 0001:0000f007 ___dstbias 10010007 f LIBCMT:timeset.obj
- 0001:0000f00d ___timezone 1001000d f LIBCMT:timeset.obj
- 0001:0000f013 ___tzname 10010013 f LIBCMT:timeset.obj
- 0001:0000f32c ___tzset 1001032c f LIBCMT:tzset.obj
- 0001:0000f380 __aullrem 10010380 f LIBCMT:ullrem.obj
- 0001:0000f400 __aulldiv 10010400 f LIBCMT:ulldiv.obj
- 0001:0000f468 __encoded_null 10010468 f LIBCMT:tidtable.obj
- 0001:0000f471 ___crtTlsAlloc@4 10010471 f LIBCMT:tidtable.obj
- 0001:0000f47a ___set_flsgetvalue 1001047a f LIBCMT:tidtable.obj
- 0001:0000f4ae __mtterm 100104ae f LIBCMT:tidtable.obj
- 0001:0000f4eb __initptd 100104eb f LIBCMT:tidtable.obj
- 0001:0000f59f __getptd_noexit 1001059f f LIBCMT:tidtable.obj
- 0001:0000f618 __getptd 10010618 f LIBCMT:tidtable.obj
- 0001:0000f632 __freefls@4 10010632 f LIBCMT:tidtable.obj
- 0001:0000f761 __freeptd 10010761 f LIBCMT:tidtable.obj
- 0001:0000f7cf __mtinit 100107cf f LIBCMT:tidtable.obj
- 0001:0000f94a __set_osfhnd 1001094a f LIBCMT:osfinfo.obj
- 0001:0000f9cb __free_osfhnd 100109cb f LIBCMT:osfinfo.obj
- 0001:0000fa51 __get_osfhandle 10010a51 f LIBCMT:osfinfo.obj
- 0001:0000faba ___lock_fhandle 10010aba f LIBCMT:osfinfo.obj
- 0001:0000fb59 __unlock_fhandle 10010b59 f LIBCMT:osfinfo.obj
- 0001:0000fb80 __alloc_osfhnd 10010b80 f LIBCMT:osfinfo.obj
- 0001:0000fd19 __write_nolock 10010d19 f LIBCMT:write.obj
- 0001:00010416 __write 10011416 f LIBCMT:write.obj
- 0001:000104ea __lseeki64_nolock 100114ea f LIBCMT:lseeki64.obj
- 0001:0001056f __lseeki64 1001156f f LIBCMT:lseeki64.obj
- 0001:00010659 __chsize_nolock 10011659 f LIBCMT:chsize.obj
- 0001:0001080f __read_nolock 1001180f f LIBCMT:read.obj
- 0001:00010dc6 __close_nolock 10011dc6 f LIBCMT:close.obj
- 0001:00010e62 __close 10011e62 f LIBCMT:close.obj
- 0001:00010f26 __lseek_nolock 10011f26 f LIBCMT:lseek.obj
- 0001:00010f9b __ioinit 10011f9b f LIBCMT:ioinit.obj
- 0001:000111e0 __ioterm 100121e0 f LIBCMT:ioinit.obj
- 0001:00011233 __setmode_nolock 10012233 f LIBCMT:setmode.obj
- 0001:000112ee __get_fmode 100122ee f LIBCMT:setmode.obj
- 0001:00011320 __SEH_prolog4 10012320 f LIBCMT:sehprolg4.obj
- 0001:00011365 __SEH_epilog4 10012365 f LIBCMT:sehprolg4.obj
- 0001:00011380 __except_handler4 10012380 f LIBCMT:chandler4.obj
- 0001:0001150f __forcdecpt_l 1001250f f LIBCMT:cvt.obj
- 0001:00011583 __cropzeros_l 10012583 f LIBCMT:cvt.obj
- 0001:00011605 __positive 10012605 f LIBCMT:cvt.obj
- 0001:00011621 __fassign_l 10012621 f LIBCMT:cvt.obj
- 0001:00011663 __fassign 10012663 f LIBCMT:cvt.obj
- 0001:0001169c __forcdecpt 1001269c f LIBCMT:cvt.obj
- 0001:000116af __cropzeros 100126af f LIBCMT:cvt.obj
- 0001:00011823 __cftoe_l 10012823 f LIBCMT:cvt.obj
- 0001:000118ea __cftoe 100128ea f LIBCMT:cvt.obj
- 0001:0001190a __cftoa_l 1001290a f LIBCMT:cvt.obj
- 0001:00011d83 __cftof_l 10012d83 f LIBCMT:cvt.obj
- 0001:00011e44 __cftog_l 10012e44 f LIBCMT:cvt.obj
- 0001:00011f31 __cfltcvt_l 10012f31 f LIBCMT:cvt.obj
- 0001:00011fb9 __cfltcvt 10012fb9 f LIBCMT:cvt.obj
- 0001:00011fdc __initp_misc_cfltcvt_tab 10012fdc f LIBCMT:cmiscdat.obj
- 0001:00011fff __setdefaultprecision 10012fff f LIBCMT:fp8.obj
- 0001:00012027 __stbuf 10013027 f LIBCMT:_sftbuf.obj
- 0001:000120c3 __ftbuf 100130c3 f LIBCMT:_sftbuf.obj
- 0001:000120f7 __fileno 100130f7 f LIBCMT:fileno.obj
- 0001:0001211d __vsnprintf_l 1001311d f LIBCMT:vsnprint.obj
- 0001:000121c9 __vsnprintf 100131c9 f LIBCMT:vsnprint.obj
- 0001:000121c9 _vsnprintf 100131c9 f LIBCMT:vsnprint.obj
- 0001:000121e6 __commit 100131e6 f LIBCMT:commit.obj
- 0001:000122bf __mtinitlocks 100132bf f LIBCMT:mlock.obj
- 0001:00012309 __mtdeletelocks 10013309 f LIBCMT:mlock.obj
- 0001:00012360 __unlock 10013360 f LIBCMT:mlock.obj
- 0001:00012377 __mtinitlocknum 10013377 f LIBCMT:mlock.obj
- 0001:00012439 __lock 10013439 f LIBCMT:mlock.obj
- 0001:0001246c __freebuf 1001346c f LIBCMT:_freebuf.obj
- 0001:0001249d __malloc_crt 1001349d f LIBCMT:crtheap.obj
- 0001:000124e2 __calloc_crt 100134e2 f LIBCMT:crtheap.obj
- 0001:0001252e __realloc_crt 1001352e f LIBCMT:crtheap.obj
- 0001:0001257c __recalloc_crt 1001357c f LIBCMT:crtheap.obj
- 0001:000125ce __fcloseall 100135ce f LIBCMT:closeall.obj
- 0001:0001266a ___sys_nerr 1001366a f LIBCMT:syserr.obj
- 0001:00012670 ___sys_errlist 10013670 f LIBCMT:syserr.obj
- 0001:00012676 _strcpy_s 10013676 f LIBCMT:strcpy_s.obj
- 0001:000126d5 _strncpy_s 100136d5 f LIBCMT:strncpy_s.obj
- 0001:0001278a ?terminate@@YAXXZ 1001378a f LIBCMT:hooks.obj
- 0001:000127c3 __initp_eh_hooks 100137c3 f LIBCMT:hooks.obj
- 0001:000127d4 __initp_misc_winsig 100137d4 f LIBCMT:winsig.obj
- 0001:00012829 ___get_sigabrt 10013829 f LIBCMT:winsig.obj
- 0001:00012836 _raise 10013836 f LIBCMT:winsig.obj
- 0001:000129d9 __initp_misc_rand_s 100139d9 f LIBCMT:rand_s.obj
- 0001:000129e8 __initp_misc_purevirt 100139e8 f LIBCMT:inithelp.obj
- 0001:000129f7 __initp_heap_handler 100139f7 f LIBCMT:handler.obj
- 0001:00012a06 __callnewh 10013a06 f LIBCMT:handler.obj
- 0001:00012ae4 ___onexitinit 10013ae4 f LIBCMT:onexit.obj
- 0001:00012b15 __onexit 10013b15 f LIBCMT:onexit.obj
- 0001:00012b51 _atexit 10013b51 f LIBCMT:onexit.obj
- 0001:00012b68 __RTC_Initialize 10013b68 f LIBCMT:_initsect_.obj
- 0001:00012b8e __RTC_Terminate 10013b8e f LIBCMT:_initsect_.obj
- 0001:00012bc0 __ValidateImageBase 10013bc0 f LIBCMT:pesect.obj
- 0001:00012c00 __FindPESection 10013c00 f LIBCMT:pesect.obj
- 0001:00012c50 __IsNonwritableInCurrentImage 10013c50 f LIBCMT:pesect.obj
- 0001:00012d0c __GET_RTERRMSG 10013d0c f LIBCMT:crt0msg.obj
- 0001:00012d32 __NMSG_WRITE 10013d32 f LIBCMT:crt0msg.obj
- 0001:00012ee1 __FF_MSGBANNER 10013ee1 f LIBCMT:crt0msg.obj
- 0001:00012f1a __calloc_impl 10013f1a f LIBCMT:calloc_impl.obj
- 0001:000131c7 _strtol 100141c7 f LIBCMT:strtol.obj
- 0001:000131f2 __VEC_memzero 100141f2 f LIBCMT:p4_memset.obj
- 0001:000132ac ___sse2_available_init 100142ac f LIBCMT:cpu_disp.obj
- 0001:000132bc __VEC_memcpy 100142bc f LIBCMT:p4_memcpy.obj
- 0001:000133bf __setenvp 100143bf f LIBCMT:stdenvp.obj
- 0001:00013635 __setargv 10014635 f LIBCMT:stdargv.obj
- 0001:000136f0 ___crtGetEnvironmentStringsA 100146f0 f LIBCMT:a_env.obj
- 0001:00013787 __XcptFilter 10014787 f LIBCMT:winxfltr.obj
- 0001:000138d1 ___CppXcptFilter 100148d1 f LIBCMT:winxfltr.obj
- 0001:000138f1 ___security_init_cookie 100148f1 f LIBCMT:gs_support.obj
- 0001:0001398c __getbuf 1001498c f LIBCMT:_getbuf.obj
- 0001:000139d5 __isatty 100149d5 f LIBCMT:isatty.obj
- 0001:00013c4e ___updatetmbcinfo 10014c4e f LIBCMT:mbctype.obj
- 0001:00013d6e __setmbcp_nolock 10014d6e f LIBCMT:mbctype.obj
- 0001:00013f57 __setmbcp 10014f57 f LIBCMT:mbctype.obj
- 0001:000140f1 ___initmbctable 100150f1 f LIBCMT:mbctype.obj
- 0001:0001410f ___addlocaleref 1001510f f LIBCMT:localref.obj
- 0001:0001419e ___removelocaleref 1001519e f LIBCMT:localref.obj
- 0001:00014237 ___freetlocinfo 10015237 f LIBCMT:localref.obj
- 0001:00014382 __updatetlocinfoEx_nolock 10015382 f LIBCMT:localref.obj
- 0001:000143cf ___updatetlocinfo 100153cf f LIBCMT:localref.obj
- 0001:00014448 __get_printf_count_output 10015448 f LIBCMT:printf.obj
- 0001:0001445e __wctomb_s_l 1001545e f LIBCMT:wctomb.obj
- 0001:000145b3 _wctomb_s 100155b3 f LIBCMT:wctomb.obj
- 0001:000145d0 __isleadbyte_l 100155d0 f i LIBCMT:_wctype.obj
- 0001:00014608 _isleadbyte 10015608 f i LIBCMT:_wctype.obj
- 0001:00014620 __aulldvrm 10015620 f LIBCMT:ulldvrm.obj
- 0001:000146b5 __crt_debugger_hook 100156b5 f LIBCMT:dbghook.obj
- 0001:00014849 ?_RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z 10015849 f LIBCMT:_pdblkup_.obj
- 0001:00014ad0 _strcmp 10015ad0 f LIBCMT:strcmp.obj
- 0001:00014b58 __getenv_helper_nolock 10015b58 f LIBCMT:getenv.obj
- 0001:00014bdf ____lc_codepage_func 10015bdf f LIBCMT:initctyp.obj
- 0001:00014c05 __putwch_nolock 10015c05 f LIBCMT:putwch.obj
- 0001:00014c47 __mbtowc_l 10015c47 f LIBCMT:mbtowc.obj
- 0001:00014d5d _mbtowc 10015d5d f LIBCMT:mbtowc.obj
- 0001:00014d80 __chkstk 10015d80 f LIBCMT:chkstk.obj
- 0001:00014d80 __alloca_probe 10015d80 LIBCMT:chkstk.obj
- 0001:00014db0 __local_unwind4 10015db0 f LIBCMT:exsup4.obj
- 0001:00014e86 __seh_longjmp_unwind4@4 10015e86 f LIBCMT:exsup4.obj
- 0001:00014ea2 @_EH4_CallFilterFunc@8 10015ea2 f LIBCMT:exsup4.obj
- 0001:00014eb9 @_EH4_TransferToHandler@8 10015eb9 f LIBCMT:exsup4.obj
- 0001:00014ed2 @_EH4_GlobalUnwind2@8 10015ed2 f LIBCMT:exsup4.obj
- 0001:00014eeb @_EH4_LocalUnwind@16 10015eeb f LIBCMT:exsup4.obj
- 0001:00014f02 __isdigit_l 10015f02 f i LIBCMT:_ctype.obj
- 0001:00014f53 _isdigit 10015f53 f i LIBCMT:_ctype.obj
- 0001:00014f81 __tolower_l 10015f81 f LIBCMT:tolower.obj
- 0001:00015096 _tolower 10016096 f LIBCMT:tolower.obj
- 0001:000150c2 __atodbl_l 100160c2 f LIBCMT:atodbl.obj
- 0001:0001516a __atoflt_l 1001616a f LIBCMT:atodbl.obj
- 0001:00015220 _memmove 10016220 f LIBCMT:memmove.obj
- 0001:00015581 __fptostr 10016581 f LIBCMT:_fptostr.obj
- 0001:00015634 ___dtold 10016634 f LIBCMT:_cfout_.obj
- 0001:000156e7 __fltout2 100166e7 f LIBCMT:_cfout_.obj
- 0001:00015780 __alldvrm 10016780 f LIBCMT:lldvrm.obj
- 0001:00015860 __aullshr 10016860 f LIBCMT:ullshr.obj
- 0001:0001587f __fptrap 1001687f f LIBCMT:crt0fp.obj
- 0001:00015888 __controlfp_s 10016888 f LIBCMT:_contrlfp_.obj
- 0001:000158e7 __recalloc 100168e7 f LIBCMT:recalloc.obj
- 0001:00015955 _abort 10016955 f LIBCMT:abort.obj
- 0001:00015988 __freea 10016988 f i LIBCMT:a_loc.obj
- 0001:000159a8 __msize 100169a8 f LIBCMT:msize.obj
- 0001:000159db ___crtMessageBoxW 100169db f LIBCMT:crtmboxw.obj
- 0001:00015b47 _wcscat_s 10016b47 f LIBCMT:wcscat_s.obj
- 0001:00015bbc _wcsncpy_s 10016bbc f LIBCMT:wcsncpy_s.obj
- 0001:00015c89 _wcslen 10016c89 f LIBCMT:wcslen.obj
- 0001:00015ca4 _wcscpy_s 10016ca4 f LIBCMT:wcscpy_s.obj
- 0001:00015d07 __set_error_mode 10016d07 f LIBCMT:errmode.obj
- 0001:00015d46 __isctype_l 10016d46 f LIBCMT:isctype.obj
- 0001:00015e00 __allmul 10016e00 f LIBCMT:llmul.obj
- 0001:00015e87 __ismbblead 10016e87 f LIBCMT:ismbbyte.obj
- 0001:00016086 ___crtLCMapStringA 10017086 f LIBCMT:a_map.obj
- 0001:000161b3 ___crtGetStringTypeA 100171b3 f LIBCMT:a_str.obj
- 0001:000161f3 ___free_lc_time 100171f3 f LIBCMT:inittime.obj
- 0001:0001656a ___free_lconv_num 1001756a f LIBCMT:initnum.obj
- 0001:000165d3 ___free_lconv_mon 100175d3 f LIBCMT:initmon.obj
- 0001:000166d1 __mbsnbicoll_l 100176d1 f LIBCMT:mbsnbico.obj
- 0001:000167af __mbsnbicoll 100177af f LIBCMT:mbsnbico.obj
- 0001:000167c9 ___wtomb_environ 100177c9 f LIBCMT:wtombenv.obj
- 0001:00016860 ___initconout 10017860 f LIBCMT:initcon.obj
- 0001:0001687f ___termconout 1001787f f LIBCMT:initcon.obj
- 0001:000168a0 __global_unwind2 100178a0 f LIBCMT:exsup.obj
- 0001:00016905 __local_unwind2 10017905 f LIBCMT:exsup.obj
- 0001:00016989 __abnormal_termination 10017989 f LIBCMT:exsup.obj
- 0001:000169ac __NLG_Notify1 100179ac f LIBCMT:exsup.obj
- 0001:000169b5 __NLG_Notify 100179b5 f LIBCMT:exsup.obj
- 0001:000169cc __NLG_Dispatch 100179cc LIBCMT:exsup.obj
- 0001:000169cc __NLG_Dispatch2 100179cc LIBCMT:exsup.obj
- 0001:000169d4 __NLG_Call 100179d4 f LIBCMT:exsup.obj
- 0001:000169d6 __NLG_Return2 100179d6 LIBCMT:exsup.obj
- 0001:000169d7 __ld12tod 100179d7 f LIBCMT:_intrncvt_.obj
- 0001:00016f28 __ld12tof 10017f28 f LIBCMT:_intrncvt_.obj
- 0001:00017479 ___strgtold12_l 10018479 f LIBCMT:_strgtold_.obj
- 0001:00017b55 _$I10_OUTPUT 10018b55 f LIBCMT:_x10fout_.obj
- 0001:0001857b __control87 1001957b f i LIBCMT:_ieee87_.obj
- 0001:00018890 __alloca_probe_16 10019890 f LIBCMT:alloca16.obj
- 0001:000188a6 __alloca_probe_8 100198a6 LIBCMT:alloca16.obj
- 0001:000188c0 _strcspn 100198c0 f LIBCMT:strcspn.obj
- 0001:00018910 _strpbrk 10019910 f LIBCMT:strpbrk.obj
- 0001:00018bbe ___crtCompareStringA 10019bbe f LIBCMT:a_cmp.obj
- 0001:00018c00 __strnicoll_l 10019c00 f LIBCMT:strnicol.obj
- 0001:00018d9c ___crtsetenv 10019d9c f LIBCMT:setenv.obj
- 0001:00018fde ___mtold12 10019fde f LIBCMT:_mantold_.obj
- 0001:000191c2 ___set_fpsr_sse2 1001a1c2 f LIBCMT:_fpctrl_.obj
- 0001:00019234 __strnicmp_l 1001a234 f LIBCMT:strnicmp.obj
- 0001:00019316 __strdup 1001a316 f LIBCMT:strdup.obj
- 0001:00019368 __mbschr_l 1001a368 f LIBCMT:mbschr.obj
- 0001:00019418 __mbschr 1001a418 f LIBCMT:mbschr.obj
- 0001:00019430 ___ascii_strnicmp 1001a430 f LIBCMT:_strnicm.obj
- 0001:000194b0 _strchr 1001a4b0 f LIBCMT:strchr.obj
- 0001:000194b6 ___from_strstr_to_strchr 1001a4b6 LIBCMT:strchr.obj
- 0001:0001956e _RtlUnwind@16 1001a56e f kernel32:KERNEL32.dll
- 0001:00019574 __fdopen 1001a574 f LIBCMT:fdopen.obj
- 0001:00019574 _fdopen 1001a574 f LIBCMT:fdopen.obj
- 0001:00019835 _dup 1001a835 f LIBCMT:dup.obj
- 0001:00019835 __dup 1001a835 f LIBCMT:dup.obj
- 0001:00019905 __getstream 1001a905 f LIBCMT:stream.obj
- 0002:00000000 __imp__RegSetValueExA@24 1001b000 Advapi32:ADVAPI32.dll
- 0002:00000004 __imp__RegCreateKeyA@12 1001b004 Advapi32:ADVAPI32.dll
- 0002:00000008 __imp__RegDeleteKeyA@8 1001b008 Advapi32:ADVAPI32.dll
- 0002:0000000c __imp__RegCloseKey@4 1001b00c Advapi32:ADVAPI32.dll
- 0002:00000010 \177ADVAPI32_NULL_THUNK_DATA 1001b010 Advapi32:ADVAPI32.dll
- 0002:00000014 __imp__SetEnvironmentVariableA@8 1001b014 kernel32:KERNEL32.dll
- 0002:00000018 __imp__CompareStringW@24 1001b018 kernel32:KERNEL32.dll
- 0002:0000001c __imp__lstrcpyA@8 1001b01c kernel32:KERNEL32.dll
- 0002:00000020 __imp__GetModuleFileNameA@12 1001b020 kernel32:KERNEL32.dll
- 0002:00000024 __imp__lstrlenA@4 1001b024 kernel32:KERNEL32.dll
- 0002:00000028 __imp__GetOverlappedResult@16 1001b028 kernel32:KERNEL32.dll
- 0002:0000002c __imp__GetLastError@0 1001b02c kernel32:KERNEL32.dll
- 0002:00000030 __imp__WriteFile@20 1001b030 kernel32:KERNEL32.dll
- 0002:00000034 __imp__ReadFile@20 1001b034 kernel32:KERNEL32.dll
- 0002:00000038 __imp__SetEvent@4 1001b038 kernel32:KERNEL32.dll
- 0002:0000003c __imp__WaitForSingleObject@8 1001b03c kernel32:KERNEL32.dll
- 0002:00000040 __imp__TerminateThread@8 1001b040 kernel32:KERNEL32.dll
- 0002:00000044 __imp__CloseHandle@4 1001b044 kernel32:KERNEL32.dll
- 0002:00000048 __imp__Sleep@4 1001b048 kernel32:KERNEL32.dll
- 0002:0000004c __imp__CreateThread@24 1001b04c kernel32:KERNEL32.dll
- 0002:00000050 __imp__CreateEventA@16 1001b050 kernel32:KERNEL32.dll
- 0002:00000054 __imp__SetCommMask@8 1001b054 kernel32:KERNEL32.dll
- 0002:00000058 __imp__SetCommTimeouts@8 1001b058 kernel32:KERNEL32.dll
- 0002:0000005c __imp__SetCommState@8 1001b05c kernel32:KERNEL32.dll
- 0002:00000060 __imp__GetCommState@8 1001b060 kernel32:KERNEL32.dll
- 0002:00000064 __imp__CreateFileA@28 1001b064 kernel32:KERNEL32.dll
- 0002:00000068 __imp__WaitCommEvent@12 1001b068 kernel32:KERNEL32.dll
- 0002:0000006c __imp__ClearCommError@12 1001b06c kernel32:KERNEL32.dll
- 0002:00000070 __imp__HeapFree@12 1001b070 kernel32:KERNEL32.dll
- 0002:00000074 __imp__GetTimeZoneInformation@4 1001b074 kernel32:KERNEL32.dll
- 0002:00000078 __imp__GetSystemTimeAsFileTime@4 1001b078 kernel32:KERNEL32.dll
- 0002:0000007c __imp__GetFileType@4 1001b07c kernel32:KERNEL32.dll
- 0002:00000080 __imp__EnterCriticalSection@4 1001b080 kernel32:KERNEL32.dll
- 0002:00000084 __imp__LeaveCriticalSection@4 1001b084 kernel32:KERNEL32.dll
- 0002:00000088 __imp__GetProcAddress@8 1001b088 kernel32:KERNEL32.dll
- 0002:0000008c __imp__GetModuleHandleW@4 1001b08c kernel32:KERNEL32.dll
- 0002:00000090 __imp__ExitProcess@4 1001b090 kernel32:KERNEL32.dll
- 0002:00000094 __imp__DecodePointer@4 1001b094 kernel32:KERNEL32.dll
- 0002:00000098 __imp__HeapAlloc@12 1001b098 kernel32:KERNEL32.dll
- 0002:0000009c __imp__HeapReAlloc@16 1001b09c kernel32:KERNEL32.dll
- 0002:000000a0 __imp__GetCurrentThreadId@0 1001b0a0 kernel32:KERNEL32.dll
- 0002:000000a4 __imp__GetCommandLineA@0 1001b0a4 kernel32:KERNEL32.dll
- 0002:000000a8 __imp__UnhandledExceptionFilter@4 1001b0a8 kernel32:KERNEL32.dll
- 0002:000000ac __imp__SetUnhandledExceptionFilter@4 1001b0ac kernel32:KERNEL32.dll
- 0002:000000b0 __imp__IsDebuggerPresent@0 1001b0b0 kernel32:KERNEL32.dll
- 0002:000000b4 __imp__EncodePointer@4 1001b0b4 kernel32:KERNEL32.dll
- 0002:000000b8 __imp__TerminateProcess@8 1001b0b8 kernel32:KERNEL32.dll
- 0002:000000bc __imp__GetCurrentProcess@0 1001b0bc kernel32:KERNEL32.dll
- 0002:000000c0 __imp__RaiseException@16 1001b0c0 kernel32:KERNEL32.dll
- 0002:000000c4 __imp__WideCharToMultiByte@32 1001b0c4 kernel32:KERNEL32.dll
- 0002:000000c8 __imp__MultiByteToWideChar@24 1001b0c8 kernel32:KERNEL32.dll
- 0002:000000cc __imp__LoadLibraryW@4 1001b0cc kernel32:KERNEL32.dll
- 0002:000000d0 __imp__HeapCreate@12 1001b0d0 kernel32:KERNEL32.dll
- 0002:000000d4 __imp__HeapDestroy@4 1001b0d4 kernel32:KERNEL32.dll
- 0002:000000d8 __imp__TlsAlloc@0 1001b0d8 kernel32:KERNEL32.dll
- 0002:000000dc __imp__TlsGetValue@4 1001b0dc kernel32:KERNEL32.dll
- 0002:000000e0 __imp__TlsSetValue@8 1001b0e0 kernel32:KERNEL32.dll
- 0002:000000e4 __imp__TlsFree@4 1001b0e4 kernel32:KERNEL32.dll
- 0002:000000e8 __imp__InterlockedIncrement@4 1001b0e8 kernel32:KERNEL32.dll
- 0002:000000ec __imp__SetLastError@4 1001b0ec kernel32:KERNEL32.dll
- 0002:000000f0 __imp__InterlockedDecrement@4 1001b0f0 kernel32:KERNEL32.dll
- 0002:000000f4 __imp__SetStdHandle@8 1001b0f4 kernel32:KERNEL32.dll
- 0002:000000f8 __imp__InitializeCriticalSectionAndSpinCount@8 1001b0f8 kernel32:KERNEL32.dll
- 0002:000000fc __imp__GetConsoleCP@0 1001b0fc kernel32:KERNEL32.dll
- 0002:00000100 __imp__GetConsoleMode@8 1001b100 kernel32:KERNEL32.dll
- 0002:00000104 __imp__SetFilePointer@16 1001b104 kernel32:KERNEL32.dll
- 0002:00000108 __imp__SetEndOfFile@4 1001b108 kernel32:KERNEL32.dll
- 0002:0000010c __imp__GetProcessHeap@0 1001b10c kernel32:KERNEL32.dll
- 0002:00000110 __imp__SetHandleCount@4 1001b110 kernel32:KERNEL32.dll
- 0002:00000114 __imp__GetStdHandle@4 1001b114 kernel32:KERNEL32.dll
- 0002:00000118 __imp__GetStartupInfoW@4 1001b118 kernel32:KERNEL32.dll
- 0002:0000011c __imp__DeleteCriticalSection@4 1001b11c kernel32:KERNEL32.dll
- 0002:00000120 __imp__FlushFileBuffers@4 1001b120 kernel32:KERNEL32.dll
- 0002:00000124 __imp__FreeLibrary@4 1001b124 kernel32:KERNEL32.dll
- 0002:00000128 __imp__GetModuleFileNameW@12 1001b128 kernel32:KERNEL32.dll
- 0002:0000012c __imp__IsProcessorFeaturePresent@4 1001b12c kernel32:KERNEL32.dll
- 0002:00000130 __imp__FreeEnvironmentStringsW@4 1001b130 kernel32:KERNEL32.dll
- 0002:00000134 __imp__GetEnvironmentStringsW@0 1001b134 kernel32:KERNEL32.dll
- 0002:00000138 __imp__QueryPerformanceCounter@4 1001b138 kernel32:KERNEL32.dll
- 0002:0000013c __imp__GetTickCount@0 1001b13c kernel32:KERNEL32.dll
- 0002:00000140 __imp__GetCurrentProcessId@0 1001b140 kernel32:KERNEL32.dll
- 0002:00000144 __imp__GetCPInfo@8 1001b144 kernel32:KERNEL32.dll
- 0002:00000148 __imp__GetACP@0 1001b148 kernel32:KERNEL32.dll
- 0002:0000014c __imp__GetOEMCP@0 1001b14c kernel32:KERNEL32.dll
- 0002:00000150 __imp__IsValidCodePage@4 1001b150 kernel32:KERNEL32.dll
- 0002:00000154 __imp__VirtualQuery@12 1001b154 kernel32:KERNEL32.dll
- 0002:00000158 __imp__WriteConsoleW@20 1001b158 kernel32:KERNEL32.dll
- 0002:0000015c __imp__RtlUnwind@16 1001b15c kernel32:KERNEL32.dll
- 0002:00000160 __imp__HeapSize@12 1001b160 kernel32:KERNEL32.dll
- 0002:00000164 __imp__LCMapStringW@24 1001b164 kernel32:KERNEL32.dll
- 0002:00000168 __imp__GetStringTypeW@16 1001b168 kernel32:KERNEL32.dll
- 0002:0000016c __imp__CreateFileW@28 1001b16c kernel32:KERNEL32.dll
- 0002:00000170 __imp__DuplicateHandle@28 1001b170 kernel32:KERNEL32.dll
- 0002:00000174 \177KERNEL32_NULL_THUNK_DATA 1001b174 kernel32:KERNEL32.dll
- 0002:00000178 __imp__wsprintfA 1001b178 User32:USER32.dll
- 0002:0000017c __imp__MessageBoxA@16 1001b17c User32:USER32.dll
- 0002:00000180 __imp__SendMessageA@16 1001b180 User32:USER32.dll
- 0002:00000184 \177USER32_NULL_THUNK_DATA 1001b184 User32:USER32.dll
- 0002:00000188 ___xc_a 1001b188 LIBCMT:crt0init.obj
- 0002:0000018c ___xc_z 1001b18c LIBCMT:crt0init.obj
- 0002:00000190 ___xi_a 1001b190 LIBCMT:crt0init.obj
- 0002:000001a4 ___xi_z 1001b1a4 LIBCMT:crt0init.obj
- 0002:000001a8 ___xp_a 1001b1a8 LIBCMT:crt0init.obj
- 0002:000001b4 ___xp_z 1001b1b4 LIBCMT:crt0init.obj
- 0002:000001b8 ___xt_a 1001b1b8 LIBCMT:crt0init.obj
- 0002:000001bc ___xt_z 1001b1bc LIBCMT:crt0init.obj
- 0002:000001c0 __real@408ff80000000000 1001b1c0 api.obj
- 0002:000001c8 __real@3f6a6d01a6d01a6d 1001b1c8 api.obj
- 0002:000001d0 __FPinit 1001b1d0 LIBCMT:_fpinit_.obj
- 0002:000001d4 ??_C@_01EEMJAFIK@?6?$AA@ 1001b1d4 LIBCMT:perror.obj
- 0002:000001d8 ??_C@_02LMMGGCAJ@?3?5?$AA@ 1001b1d8 LIBCMT:perror.obj
- 0002:000001e0 ??_C@_0EA@FCLIIPNN@Visual?5C?$CL?$CL?5CRT?3?5Not?5enough?5memor@ 1001b1e0 LIBCMT:strerror.obj
- 0002:00000220 ??_C@_0P@MIGLKIOC@CorExitProcess?$AA@ 1001b220 LIBCMT:crt0dat.obj
- 0002:00000230 ??_C@_1BI@BGOHAHKC@?$AAm?$AAs?$AAc?$AAo?$AAr?$AAe?$AAe?$AA?4?$AAd?$AAl?$AAl?$AA?$AA@ 1001b230 LIBCMT:crt0dat.obj
- 0002:00000248 __pRawDllMain 1001b248 LIBCMT:dllcrt0.obj
- 0002:00000248 __pDefaultRawDllMain 1001b248 LIBCMT:dllcrt0.obj
- 0002:0000024c ??_C@_1O@CEDCILHN@?$AA?$CI?$AAn?$AAu?$AAl?$AAl?$AA?$CJ?$AA?$AA@ 1001b24c LIBCMT:output.obj
- 0002:0000025c ??_C@_06OJHGLDPL@?$CInull?$CJ?$AA@ 1001b25c LIBCMT:output.obj
- 0002:00000268 ___lookuptable 1001b268 LIBCMT:output.obj
- 0002:000002cc ??_C@_0BO@GNIAFIKK@Unknown?5Runtime?5Check?5Error?6?$AN?$AA@ 1001b2cc LIBCMT:_error_.obj
- 0002:000002ec ??_C@_0CM@NGINOKPC@Stack?5memory?5around?5_alloca?5was?5@ 1001b2ec LIBCMT:_error_.obj
- 0002:00000318 ??_C@_0DG@HKJMLLLP@A?5local?5variable?5was?5used?5before@ 1001b318 LIBCMT:_error_.obj
- 0002:00000350 ??_C@_0BN@FFOINMNJ@Stack?5memory?5was?5corrupted?6?$AN?$AA@ 1001b350 LIBCMT:_error_.obj
- 0002:00000370 ??_C@_0BBN@GPMLNJCF@A?5cast?5to?5a?5smaller?5data?5type?5ha@ 1001b370 LIBCMT:_error_.obj
- 0002:00000490 ??_C@_0NN@NGPKDKPD@The?5value?5of?5ESP?5was?5not?5properl@ 1001b490 LIBCMT:_error_.obj
- 0002:0000060c ??_C@_0CA@IODNCDPG@Run?9Time?5Check?5Failure?5?$CD?$CFd?5?9?5?$CFs?$AA@ 1001b60c LIBCMT:_error_.obj
- 0002:0000062c ??_C@_0BE@GNBOBNCK@Unknown?5Module?5Name?$AA@ 1001b62c LIBCMT:_error_.obj
- 0002:00000640 ??_C@_0BB@PFFGGCJP@Unknown?5Filename?$AA@ 1001b640 LIBCMT:_error_.obj
- 0002:00000658 ??_C@_1EA@NFKNIFJP@?$AAR?$AAu?$AAn?$AA?9?$AAT?$AAi?$AAm?$AAe?$AA?5?$AAC?$AAh?$AAe?$AAc?$AAk?$AA?5?$AAF?$AAa?$AAi?$AAl?$AAu?$AAr?$AAe?$AA?5?$AA?$CD?$AA?$CF?$AAd?$AA?5?$AA?9?$AA?5?$AA?$CF?$AAs?$AA?$AA@ 1001b658 LIBCMT:_error_.obj
- 0002:00000698 ??_C@_1GM@OLMCBDMB@?$AAR?$AAu?$AAn?$AAt?$AAi?$AAm?$AAe?$AA?5?$AAC?$AAh?$AAe?$AAc?$AAk?$AA?5?$AAE?$AAr?$AAr?$AAo?$AAr?$AA?4?$AA?6?$AA?$AN?$AA?5?$AAU?$AAn?$AAa?$AAb?$AAl?$AAe?$AA?5?$AAt?$AAo@ 1001b698 LIBCMT:_error_.obj
- 0002:00000704 ??_C@_0CG@IAFNJNEE@Stack?5corrupted?5near?5unknown?5var@ 1001b704 LIBCMT:_error_.obj
- 0002:0000072c ??_C@_0BP@OGBCLIBO@Stack?5around?5_alloca?5corrupted?$AA@ 1001b72c LIBCMT:_userapi_.obj
- 0002:0000074c ??_C@_0CK@CNLNOEPB@Local?5variable?5used?5before?5initi@ 1001b74c LIBCMT:_userapi_.obj
- 0002:00000778 ??_C@_0BI@CIGMDCBH@Stack?5memory?5corruption?$AA@ 1001b778 LIBCMT:_userapi_.obj
- 0002:00000790 ??_C@_0CK@FEGOIOPB@Cast?5to?5smaller?5type?5causing?5los@ 1001b790 LIBCMT:_userapi_.obj
- 0002:000007bc ??_C@_0BJ@HEGAHDFO@Stack?5pointer?5corruption?$AA@ 1001b7bc LIBCMT:_userapi_.obj
- 0002:000007ec ___dnames 1001b7ec LIBCMT:timeset.obj
- 0002:00000804 ___mnames 1001b804 LIBCMT:timeset.obj
- 0002:0000082c ??_C@_02CLFPBFFP@TZ?$AA@ 1001b82c LIBCMT:tzset.obj
- 0002:00000830 ??_C@_1BK@DBDEIDLH@?$AAK?$AAE?$AAR?$AAN?$AAE?$AAL?$AA3?$AA2?$AA?4?$AAD?$AAL?$AAL?$AA?$AA@ 1001b830 LIBCMT:tidtable.obj
- 0002:0000084c ??_C@_07PEJMOBNF@FlsFree?$AA@ 1001b84c LIBCMT:tidtable.obj
- 0002:00000854 ??_C@_0M@JCPCPOEF@FlsSetValue?$AA@ 1001b854 LIBCMT:tidtable.obj
- 0002:00000860 ??_C@_0M@GDNOONDI@FlsGetValue?$AA@ 1001b860 LIBCMT:tidtable.obj
- 0002:0000086c ??_C@_08KNHFBNJ@FlsAlloc?$AA@ 1001b86c LIBCMT:tidtable.obj
- 0002:00000878 ??_C@_05KLBDPFGC@e?$CL000?$AA@ 1001b878 LIBCMT:cvt.obj
- 0002:00000880 ??_C@_0BG@KLEAJEFJ@Illegal?5byte?5sequence?$AA@ 1001b880 LIBCMT:syserr.obj
- 0002:00000898 ??_C@_0BE@ICMCHPHH@Directory?5not?5empty?$AA@ 1001b898 LIBCMT:syserr.obj
- 0002:000008ac ??_C@_0BJ@IHEHINLI@Function?5not?5implemented?$AA@ 1001b8ac LIBCMT:syserr.obj
- 0002:000008c8 ??_C@_0BD@CLHBCGPB@No?5locks?5available?$AA@ 1001b8c8 LIBCMT:syserr.obj
- 0002:000008dc ??_C@_0BC@BEDIHIDK@Filename?5too?5long?$AA@ 1001b8dc LIBCMT:syserr.obj
- 0002:000008f0 ??_C@_0BK@JAEBMJJM@Resource?5deadlock?5avoided?$AA@ 1001b8f0 LIBCMT:syserr.obj
- 0002:0000090c ??_C@_0BB@FCBJFCAJ@Result?5too?5large?$AA@ 1001b90c LIBCMT:syserr.obj
- 0002:00000920 ??_C@_0N@MMJPGLJK@Domain?5error?$AA@ 1001b920 LIBCMT:syserr.obj
- 0002:00000930 ??_C@_0M@LHEPIIOM@Broken?5pipe?$AA@ 1001b930 LIBCMT:syserr.obj
- 0002:0000093c ??_C@_0P@PKCJJLLM@Too?5many?5links?$AA@ 1001b93c LIBCMT:syserr.obj
- 0002:0000094c ??_C@_0BG@DDBFNKBH@Read?9only?5file?5system?$AA@ 1001b94c LIBCMT:syserr.obj
- 0002:00000964 ??_C@_0N@FEHLOILP@Invalid?5seek?$AA@ 1001b964 LIBCMT:syserr.obj
- 0002:00000974 ??_C@_0BI@FEALHKLD@No?5space?5left?5on?5device?$AA@ 1001b974 LIBCMT:syserr.obj
- 0002:0000098c ??_C@_0P@LFMMIPAE@File?5too?5large?$AA@ 1001b98c LIBCMT:syserr.obj
- 0002:0000099c ??_C@_0CE@ONOKNLPF@Inappropriate?5I?1O?5control?5operat@ 1001b99c LIBCMT:syserr.obj
- 0002:000009c0 ??_C@_0BE@INBJMKGG@Too?5many?5open?5files?$AA@ 1001b9c0 LIBCMT:syserr.obj
- 0002:000009d4 ??_C@_0BO@IIFBODJE@Too?5many?5open?5files?5in?5system?$AA@ 1001b9d4 LIBCMT:syserr.obj
- 0002:000009f4 ??_C@_0BB@HMGGCEBG@Invalid?5argument?$AA@ 1001b9f4 LIBCMT:syserr.obj
- 0002:00000a08 ??_C@_0P@NDHGCGKE@Is?5a?5directory?$AA@ 1001ba08 LIBCMT:syserr.obj
- 0002:00000a18 ??_C@_0BA@CJBACOOL@Not?5a?5directory?$AA@ 1001ba18 LIBCMT:syserr.obj
- 0002:00000a28 ??_C@_0P@NLEIANHE@No?5such?5device?$AA@ 1001ba28 LIBCMT:syserr.obj
- 0002:00000a38 ??_C@_0O@OAMDNOCP@Improper?5link?$AA@ 1001ba38 LIBCMT:syserr.obj
- 0002:00000a48 ??_C@_0M@NAAJNNGH@File?5exists?$AA@ 1001ba48 LIBCMT:syserr.obj
- 0002:00000a54 ??_C@_0BA@BIBLIOEK@Resource?5device?$AA@ 1001ba54 LIBCMT:syserr.obj
- 0002:00000a64 ??_C@_0O@NIPGCINC@Unknown?5error?$AA@ 1001ba64 LIBCMT:syserr.obj
- 0002:00000a74 ??_C@_0M@LOEHLCJD@Bad?5address?$AA@ 1001ba74 LIBCMT:syserr.obj
- 0002:00000a80 ??_C@_0BC@HFNFNKAI@Permission?5denied?$AA@ 1001ba80 LIBCMT:syserr.obj
- 0002:00000a94 ??_C@_0BB@IMDKMPFB@Not?5enough?5space?$AA@ 1001ba94 LIBCMT:syserr.obj
- 0002:00000aa8 ??_C@_0CB@EPFKGNAK@Resource?5temporarily?5unavailable@ 1001baa8 LIBCMT:syserr.obj
- 0002:00000acc ??_C@_0BD@LOHELEP@No?5child?5processes?$AA@ 1001bacc LIBCMT:syserr.obj
- 0002:00000ae0 ??_C@_0BE@NFGDDCEF@Bad?5file?5descriptor?$AA@ 1001bae0 LIBCMT:syserr.obj
- 0002:00000af4 ??_C@_0BC@HKPNECK@Exec?5format?5error?$AA@ 1001baf4 LIBCMT:syserr.obj
- 0002:00000b08 ??_C@_0BC@MFFGCDFL@Arg?5list?5too?5long?$AA@ 1001bb08 LIBCMT:syserr.obj
- 0002:00000b1c ??_C@_0BK@DPKMCKJ@No?5such?5device?5or?5address?$AA@ 1001bb1c LIBCMT:syserr.obj
- 0002:00000b38 ??_C@_0BD@KKNFOBBD@Input?1output?5error?$AA@ 1001bb38 LIBCMT:syserr.obj
- 0002:00000b4c ??_C@_0BK@FJBOAFDK@Interrupted?5function?5call?$AA@ 1001bb4c LIBCMT:syserr.obj
- 0002:00000b68 ??_C@_0BA@FKIAIBGA@No?5such?5process?$AA@ 1001bb68 LIBCMT:syserr.obj
- 0002:00000b78 ??_C@_0BK@FMDHKPNF@No?5such?5file?5or?5directory?$AA@ 1001bb78 LIBCMT:syserr.obj
- 0002:00000b94 ??_C@_0BI@BJFCGOHL@Operation?5not?5permitted?$AA@ 1001bb94 LIBCMT:syserr.obj
- 0002:00000bac ??_C@_08INEPGKHH@No?5error?$AA@ 1001bbac LIBCMT:syserr.obj
- 0002:00000bb8 ??_C@_1BK@GAEMIDIL@?$AAA?$AAD?$AAV?$AAA?$AAP?$AAI?$AA3?$AA2?$AA?4?$AAD?$AAL?$AAL?$AA?$AA@ 1001bbb8 LIBCMT:rand_s.obj
- 0002:00000bd4 ??_C@_1BO@BKOMIGKJ@?$AAr?$AAu?$AAn?$AAt?$AAi?$AAm?$AAe?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?5?$AA?$AA@ 1001bbd4 LIBCMT:crt0msg.obj
- 0002:00000bf4 ??_C@_15JNBOKNOG@?$AA?$AN?$AA?6?$AA?$AA@ 1001bbf4 LIBCMT:crt0msg.obj
- 0002:00000bfc ??_C@_1BM@JBBEPPHI@?$AAT?$AAL?$AAO?$AAS?$AAS?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?$AN?$AA?6?$AA?$AA@ 1001bbfc LIBCMT:crt0msg.obj
- 0002:00000c18 ??_C@_1BK@KMOMNAAI@?$AAS?$AAI?$AAN?$AAG?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?$AN?$AA?6?$AA?$AA@ 1001bc18 LIBCMT:crt0msg.obj
- 0002:00000c34 ??_C@_1BO@BFCDCGC@?$AAD?$AAO?$AAM?$AAA?$AAI?$AAN?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?$AN?$AA?6?$AA?$AA@ 1001bc34 LIBCMT:crt0msg.obj
- 0002:00000c58 ??_C@_1BOO@KGEDBGAJ@?$AAR?$AA6?$AA0?$AA3?$AA3?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAA?$AAt?$AAt?$AAe?$AAm?$AAp?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AAu?$AAs?$AAe?$AA?5?$AAM?$AAS?$AAI?$AAL?$AA?5?$AAc?$AAo?$AAd@ 1001bc58 LIBCMT:crt0msg.obj
- 0002:00000e48 ??_C@_1GG@GOPILAJP@?$AAR?$AA6?$AA0?$AA3?$AA2?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAl?$AAo@ 1001be48 LIBCMT:crt0msg.obj
- 0002:00000eb0 ??_C@_1MG@ENCOOIDF@?$AAR?$AA6?$AA0?$AA3?$AA1?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAA?$AAt?$AAt?$AAe?$AAm?$AAp?$AAt?$AA?5?$AAt?$AAo?$AA?5?$AAi?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AA?5?$AAt@ 1001beb0 LIBCMT:crt0msg.obj
- 0002:00000f78 ??_C@_1DO@BMFCDCD@?$AAR?$AA6?$AA0?$AA3?$AA0?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAC?$AAR?$AAT?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAi?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AAd?$AA?$AN?$AA?6?$AA?$AA@ 1001bf78 LIBCMT:crt0msg.obj
- 0002:00000fb8 ??_C@_1EK@HHFLMAOL@?$AAR?$AA6?$AA0?$AA2?$AA8?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAu?$AAn?$AAa?$AAb?$AAl?$AAe?$AA?5?$AAt?$AAo?$AA?5?$AAi?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AA?5?$AAh?$AAe@ 1001bfb8 LIBCMT:crt0msg.obj
- 0002:00001008 ??_C@_1GK@MFGOKLAG@?$AAR?$AA6?$AA0?$AA2?$AA7?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAl?$AAo@ 1001c008 LIBCMT:crt0msg.obj
- 0002:00001078 ??_C@_1GK@MCAAGJMO@?$AAR?$AA6?$AA0?$AA2?$AA6?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAs?$AAt@ 1001c078 LIBCMT:crt0msg.obj
- 0002:000010e8 ??_C@_1EM@MAADIHMB@?$AAR?$AA6?$AA0?$AA2?$AA5?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAp?$AAu?$AAr?$AAe?$AA?5?$AAv?$AAi?$AAr?$AAt?$AAu?$AAa?$AAl?$AA?5?$AAf?$AAu?$AAn?$AAc?$AAt?$AAi?$AAo?$AAn?$AA?5?$AAc@ 1001c0e8 LIBCMT:crt0msg.obj
- 0002:00001138 ??_C@_1GK@FHCKBEFA@?$AAR?$AA6?$AA0?$AA2?$AA4?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AA_?$AAo@ 1001c138 LIBCMT:crt0msg.obj
- 0002:000011a8 ??_C@_1FC@ECHBIFBC@?$AAR?$AA6?$AA0?$AA1?$AA9?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAu?$AAn?$AAa?$AAb?$AAl?$AAe?$AA?5?$AAt?$AAo?$AA?5?$AAo?$AAp?$AAe?$AAn?$AA?5?$AAc?$AAo?$AAn?$AAs?$AAo?$AAl?$AAe?$AA?5@ 1001c1a8 LIBCMT:crt0msg.obj
- 0002:00001200 ??_C@_1EC@JIBHAOPH@?$AAR?$AA6?$AA0?$AA1?$AA8?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAu?$AAn?$AAe?$AAx?$AAp?$AAe?$AAc?$AAt?$AAe?$AAd?$AA?5?$AAh?$AAe?$AAa?$AAp?$AA?5?$AAe?$AAr?$AAr?$AAo?$AAr?$AA?$AN?$AA?6@ 1001c200 LIBCMT:crt0msg.obj
- 0002:00001248 ??_C@_1FK@BEOGODMC@?$AAR?$AA6?$AA0?$AA1?$AA7?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAu?$AAn?$AAe?$AAx?$AAp?$AAe?$AAc?$AAt?$AAe?$AAd?$AA?5?$AAm?$AAu?$AAl?$AAt?$AAi?$AAt?$AAh?$AAr?$AAe?$AAa?$AAd?$AA?5@ 1001c248 LIBCMT:crt0msg.obj
- 0002:000012a8 ??_C@_1FI@LOGNIKDM@?$AAR?$AA6?$AA0?$AA1?$AA6?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAt?$AAh@ 1001c2a8 LIBCMT:crt0msg.obj
- 0002:00001300 ??_C@_1EG@BEHAGFJD@?$AAR?$AA6?$AA0?$AA1?$AA0?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAa?$AAb?$AAo?$AAr?$AAt?$AA?$CI?$AA?$CJ?$AA?5?$AAh?$AAa?$AAs?$AA?5?$AAb?$AAe?$AAe?$AAn?$AA?5?$AAc?$AAa?$AAl?$AAl?$AAe?$AAd@ 1001c300 LIBCMT:crt0msg.obj
- 0002:00001348 ??_C@_1FI@HONFMGBI@?$AAR?$AA6?$AA0?$AA0?$AA9?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAe?$AAn@ 1001c348 LIBCMT:crt0msg.obj
- 0002:000013a0 ??_C@_1FE@LLNEDJMD@?$AAR?$AA6?$AA0?$AA0?$AA8?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAn?$AAo?$AAt?$AA?5?$AAe?$AAn?$AAo?$AAu?$AAg?$AAh?$AA?5?$AAs?$AAp?$AAa?$AAc?$AAe?$AA?5?$AAf?$AAo?$AAr?$AA?5?$AAa?$AAr@ 1001c3a0 LIBCMT:crt0msg.obj
- 0002:000013f8 ??_C@_1FK@PGACCAFB@?$AAR?$AA6?$AA0?$AA0?$AA2?$AA?$AN?$AA?6?$AA?9?$AA?5?$AAf?$AAl?$AAo?$AAa?$AAt?$AAi?$AAn?$AAg?$AA?5?$AAp?$AAo?$AAi?$AAn?$AAt?$AA?5?$AAs?$AAu?$AAp?$AAp?$AAo?$AAr?$AAt?$AA?5@ 1001c3f8 LIBCMT:crt0msg.obj
- 0002:00001508 ??_C@_1EK@MBDPDCGA@?$AAM?$AAi?$AAc?$AAr?$AAo?$AAs?$AAo?$AAf?$AAt?$AA?5?$AAV?$AAi?$AAs?$AAu?$AAa?$AAl?$AA?5?$AAC?$AA?$CL?$AA?$CL?$AA?5?$AAR?$AAu?$AAn?$AAt?$AAi?$AAm?$AAe?$AA?5?$AAL?$AAi?$AAb@ 1001c508 LIBCMT:crt0msg.obj
- 0002:00001554 ??_C@_15IABLJNFO@?$AA?6?$AA?6?$AA?$AA@ 1001c554 LIBCMT:crt0msg.obj
- 0002:0000155c ??_C@_17LGKOMLJ@?$AA?4?$AA?4?$AA?4?$AA?$AA@ 1001c55c LIBCMT:crt0msg.obj
- 0002:00001564 ??_C@_1CO@EAEJAADC@?$AA?$DM?$AAp?$AAr?$AAo?$AAg?$AAr?$AAa?$AAm?$AA?5?$AAn?$AAa?$AAm?$AAe?$AA?5?$AAu?$AAn?$AAk?$AAn?$AAo?$AAw?$AAn?$AA?$DO?$AA?$AA@ 1001c564 LIBCMT:crt0msg.obj
- 0002:00001594 ??_C@_1DE@JNGNBFGO@?$AAR?$AAu?$AAn?$AAt?$AAi?$AAm?$AAe?$AA?5?$AAE?$AAr?$AAr?$AAo?$AAr?$AA?$CB?$AA?6?$AA?6?$AAP?$AAr?$AAo?$AAg?$AAr?$AAa?$AAm?$AA?3?$AA?5?$AA?$AA@ 1001c594 LIBCMT:crt0msg.obj
- 0002:000015c8 __XcptActTab 1001c5c8 LIBCMT:winxfltr.obj
- 0002:00001658 __First_FPE_Indx 1001c658 LIBCMT:winxfltr.obj
- 0002:0000165c __Num_FPE 1001c65c LIBCMT:winxfltr.obj
- 0002:00001660 __XcptActTabSize 1001c660 LIBCMT:winxfltr.obj
- 0002:00001664 __XcptActTabCount 1001c664 LIBCMT:winxfltr.obj
- 0002:00001668 ??_C@_1BC@GDGBMEMK@?$AAH?$AAH?$AA?3?$AAm?$AAm?$AA?3?$AAs?$AAs?$AA?$AA@ 1001c668 LIBCMT:nlsdata2.obj
- 0002:0000167c ??_C@_1CI@KNAKOEBC@?$AAd?$AAd?$AAd?$AAd?$AA?0?$AA?5?$AAM?$AAM?$AAM?$AAM?$AA?5?$AAd?$AAd?$AA?0?$AA?5?$AAy?$AAy?$AAy?$AAy?$AA?$AA@ 1001c67c LIBCMT:nlsdata2.obj
- 0002:000016a4 ??_C@_1BC@IEBCMHCM@?$AAM?$AAM?$AA?1?$AAd?$AAd?$AA?1?$AAy?$AAy?$AA?$AA@ 1001c6a4 LIBCMT:nlsdata2.obj
- 0002:000016b8 ??_C@_15CLMNNGEL@?$AAP?$AAM?$AA?$AA@ 1001c6b8 LIBCMT:nlsdata2.obj
- 0002:000016c0 ??_C@_15ODEHAHHF@?$AAA?$AAM?$AA?$AA@ 1001c6c0 LIBCMT:nlsdata2.obj
- 0002:000016c8 ??_C@_1BC@FEMKIFH@?$AAD?$AAe?$AAc?$AAe?$AAm?$AAb?$AAe?$AAr?$AA?$AA@ 1001c6c8 LIBCMT:nlsdata2.obj
- 0002:000016dc ??_C@_1BC@BGLIFPF@?$AAN?$AAo?$AAv?$AAe?$AAm?$AAb?$AAe?$AAr?$AA?$AA@ 1001c6dc LIBCMT:nlsdata2.obj
- 0002:000016f0 ??_C@_1BA@EPANDLNG@?$AAO?$AAc?$AAt?$AAo?$AAb?$AAe?$AAr?$AA?$AA@ 1001c6f0 LIBCMT:nlsdata2.obj
- 0002:00001700 ??_C@_1BE@DKAAMBJL@?$AAS?$AAe?$AAp?$AAt?$AAe?$AAm?$AAb?$AAe?$AAr?$AA?$AA@ 1001c700 LIBCMT:nlsdata2.obj
- 0002:00001714 ??_C@_1O@PAHLKOAC@?$AAA?$AAu?$AAg?$AAu?$AAs?$AAt?$AA?$AA@ 1001c714 LIBCMT:nlsdata2.obj
- 0002:00001724 ??_C@_19BIFMLPCD@?$AAJ?$AAu?$AAl?$AAy?$AA?$AA@ 1001c724 LIBCMT:nlsdata2.obj
- 0002:00001730 ??_C@_19EPFLPGAP@?$AAJ?$AAu?$AAn?$AAe?$AA?$AA@ 1001c730 LIBCMT:nlsdata2.obj
- 0002:0000173c ??_C@_1M@GJNLMHFD@?$AAA?$AAp?$AAr?$AAi?$AAl?$AA?$AA@ 1001c73c LIBCMT:nlsdata2.obj
- 0002:00001748 ??_C@_1M@IKEENEDF@?$AAM?$AAa?$AAr?$AAc?$AAh?$AA?$AA@ 1001c748 LIBCMT:nlsdata2.obj
- 0002:00001754 ??_C@_1BC@JGDDFFAM@?$AAF?$AAe?$AAb?$AAr?$AAu?$AAa?$AAr?$AAy?$AA?$AA@ 1001c754 LIBCMT:nlsdata2.obj
- 0002:00001768 ??_C@_1BA@EFMEIEBA@?$AAJ?$AAa?$AAn?$AAu?$AAa?$AAr?$AAy?$AA?$AA@ 1001c768 LIBCMT:nlsdata2.obj
- 0002:00001778 ??_C@_17EGKACKIF@?$AAD?$AAe?$AAc?$AA?$AA@ 1001c778 LIBCMT:nlsdata2.obj
- 0002:00001780 ??_C@_17BBDMLCIG@?$AAN?$AAo?$AAv?$AA?$AA@ 1001c780 LIBCMT:nlsdata2.obj
- 0002:00001788 ??_C@_17FNLKOI@?$AAO?$AAc?$AAt?$AA?$AA@ 1001c788 LIBCMT:nlsdata2.obj
- 0002:00001790 ??_C@_17HCHCOKMG@?$AAS?$AAe?$AAp?$AA?$AA@ 1001c790 LIBCMT:nlsdata2.obj
- 0002:00001798 ??_C@_17ICPELBCN@?$AAA?$AAu?$AAg?$AA?$AA@ 1001c798 LIBCMT:nlsdata2.obj
- 0002:000017a0 ??_C@_17IJPCKHK@?$AAJ?$AAu?$AAl?$AA?$AA@ 1001c7a0 LIBCMT:nlsdata2.obj
- 0002:000017a8 ??_C@_17KCJGOCPB@?$AAJ?$AAu?$AAn?$AA?$AA@ 1001c7a8 LIBCMT:nlsdata2.obj
- 0002:000017b0 ??_C@_17PNNKMEED@?$AAM?$AAa?$AAy?$AA?$AA@ 1001c7b0 LIBCMT:nlsdata2.obj
- 0002:000017b8 ??_C@_17LFPOIHDD@?$AAA?$AAp?$AAr?$AA?$AA@ 1001c7b8 LIBCMT:nlsdata2.obj
- 0002:000017c0 ??_C@_17CKNLEDEC@?$AAM?$AAa?$AAr?$AA?$AA@ 1001c7c0 LIBCMT:nlsdata2.obj
- 0002:000017c8 ??_C@_17LMDJEKJN@?$AAF?$AAe?$AAb?$AA?$AA@ 1001c7c8 LIBCMT:nlsdata2.obj
- 0002:000017d0 ??_C@_17DKNBKCHM@?$AAJ?$AAa?$AAn?$AA?$AA@ 1001c7d0 LIBCMT:nlsdata2.obj
- 0002:000017d8 ??_C@_1BC@ENMNNPAJ@?$AAS?$AAa?$AAt?$AAu?$AAr?$AAd?$AAa?$AAy?$AA?$AA@ 1001c7d8 LIBCMT:nlsdata2.obj
- 0002:000017ec ??_C@_1O@PDICJHAG@?$AAF?$AAr?$AAi?$AAd?$AAa?$AAy?$AA?$AA@ 1001c7ec LIBCMT:nlsdata2.obj
- 0002:000017fc ??_C@_1BC@HHMNLIHE@?$AAT?$AAh?$AAu?$AAr?$AAs?$AAd?$AAa?$AAy?$AA?$AA@ 1001c7fc LIBCMT:nlsdata2.obj
- 0002:00001810 ??_C@_1BE@EBOGMDOH@?$AAW?$AAe?$AAd?$AAn?$AAe?$AAs?$AAd?$AAa?$AAy?$AA?$AA@ 1001c810 LIBCMT:nlsdata2.obj
- 0002:00001824 ??_C@_1BA@ENFBFFEK@?$AAT?$AAu?$AAe?$AAs?$AAd?$AAa?$AAy?$AA?$AA@ 1001c824 LIBCMT:nlsdata2.obj
- 0002:00001834 ??_C@_1O@MMNBFLIA@?$AAM?$AAo?$AAn?$AAd?$AAa?$AAy?$AA?$AA@ 1001c834 LIBCMT:nlsdata2.obj
- 0002:00001844 ??_C@_1O@IHNHDHPB@?$AAS?$AAu?$AAn?$AAd?$AAa?$AAy?$AA?$AA@ 1001c844 LIBCMT:nlsdata2.obj
- 0002:00001854 ??_C@_17GGIBDPIH@?$AAS?$AAa?$AAt?$AA?$AA@ 1001c854 LIBCMT:nlsdata2.obj
- 0002:0000185c ??_C@_17HFOLPPLP@?$AAF?$AAr?$AAi?$AA?$AA@ 1001c85c LIBCMT:nlsdata2.obj
- 0002:00001864 ??_C@_17PDPHAADD@?$AAT?$AAh?$AAu?$AA?$AA@ 1001c864 LIBCMT:nlsdata2.obj
- 0002:0000186c ??_C@_17CJEDCEPE@?$AAW?$AAe?$AAd?$AA?$AA@ 1001c86c LIBCMT:nlsdata2.obj
- 0002:00001874 ??_C@_17BMKGEGOJ@?$AAT?$AAu?$AAe?$AA?$AA@ 1001c874 LIBCMT:nlsdata2.obj
- 0002:0000187c ??_C@_17KBOMKBF@?$AAM?$AAo?$AAn?$AA?$AA@ 1001c87c LIBCMT:nlsdata2.obj
- 0002:00001884 ??_C@_17MBGCMIPB@?$AAS?$AAu?$AAn?$AA?$AA@ 1001c884 LIBCMT:nlsdata2.obj
- 0002:0000188c ??_C@_08JCCMCCIL@HH?3mm?3ss?$AA@ 1001c88c LIBCMT:nlsdata2.obj
- 0002:00001898 ??_C@_0BE@CKGJFCPC@dddd?0?5MMMM?5dd?0?5yyyy?$AA@ 1001c898 LIBCMT:nlsdata2.obj
- 0002:000018ac ??_C@_08BPBNCDIB@MM?1dd?1yy?$AA@ 1001c8ac LIBCMT:nlsdata2.obj
- 0002:000018b8 ??_C@_02CJNFDJBF@PM?$AA@ 1001c8b8 LIBCMT:nlsdata2.obj
- 0002:000018bc ??_C@_02DEDBPAFC@AM?$AA@ 1001c8bc LIBCMT:nlsdata2.obj
- 0002:000018c0 ??_C@_08EDHMEBNP@December?$AA@ 1001c8c0 LIBCMT:nlsdata2.obj
- 0002:000018cc ??_C@_08HCHEGEOA@November?$AA@ 1001c8cc LIBCMT:nlsdata2.obj
- 0002:000018d8 ??_C@_07JJNFCEND@October?$AA@ 1001c8d8 LIBCMT:nlsdata2.obj
- 0002:000018e0 ??_C@_09BHHEALKD@September?$AA@ 1001c8e0 LIBCMT:nlsdata2.obj
- 0002:000018ec ??_C@_06LBBHFDDG@August?$AA@ 1001c8ec LIBCMT:nlsdata2.obj
- 0002:000018f4 ??_C@_04MIEPOIFP@July?$AA@ 1001c8f4 LIBCMT:nlsdata2.obj
- 0002:000018fc ??_C@_04CNLMGBGM@June?$AA@ 1001c8fc LIBCMT:nlsdata2.obj
- 0002:00001904 ??_C@_05DMJDNLEJ@April?$AA@ 1001c904 LIBCMT:nlsdata2.obj
- 0002:0000190c ??_C@_05HPCKOFNC@March?$AA@ 1001c90c LIBCMT:nlsdata2.obj
- 0002:00001914 ??_C@_08GNJGEPFN@February?$AA@ 1001c914 LIBCMT:nlsdata2.obj
- 0002:00001920 ??_C@_07CGJPFGJA@January?$AA@ 1001c920 LIBCMT:nlsdata2.obj
- 0002:00001928 ??_C@_03MKABNOCG@Dec?$AA@ 1001c928 LIBCMT:nlsdata2.obj
- 0002:0000192c ??_C@_03JPJOFNIA@Nov?$AA@ 1001c92c LIBCMT:nlsdata2.obj
- 0002:00001930 ??_C@_03BMAOKBAD@Oct?$AA@ 1001c930 LIBCMT:nlsdata2.obj
- 0002:00001934 ??_C@_03GGCAPAJC@Sep?$AA@ 1001c934 LIBCMT:nlsdata2.obj
- 0002:00001938 ??_C@_03IFJFEIGA@Aug?$AA@ 1001c938 LIBCMT:nlsdata2.obj
- 0002:0000193c ??_C@_03LBGABGKK@Jul?$AA@ 1001c93c LIBCMT:nlsdata2.obj
- 0002:00001940 ??_C@_03IDFGHECI@Jun?$AA@ 1001c940 LIBCMT:nlsdata2.obj
- 0002:00001944 ??_C@_03CNMDKL@May?$AA@ 1001c944 LIBCMT:nlsdata2.obj
- 0002:00001948 ??_C@_03LEOLGMJP@Apr?$AA@ 1001c948 LIBCMT:nlsdata2.obj
- 0002:0000194c ??_C@_03ODNJBKGA@Mar?$AA@ 1001c94c LIBCMT:nlsdata2.obj
- 0002:00001950 ??_C@_03HJBDCHOM@Feb?$AA@ 1001c950 LIBCMT:nlsdata2.obj
- 0002:00001954 ??_C@_03JIHJHPIE@Jan?$AA@ 1001c954 LIBCMT:nlsdata2.obj
- 0002:00001958 ??_C@_08INBOOONO@Saturday?$AA@ 1001c958 LIBCMT:nlsdata2.obj
- 0002:00001964 ??_C@_06JECMNKMI@Friday?$AA@ 1001c964 LIBCMT:nlsdata2.obj
- 0002:0000196c ??_C@_08HACCIKIA@Thursday?$AA@ 1001c96c LIBCMT:nlsdata2.obj
- 0002:00001978 ??_C@_09DLIGFAKA@Wednesday?$AA@ 1001c978 LIBCMT:nlsdata2.obj
- 0002:00001984 ??_C@_07BAAGCFCM@Tuesday?$AA@ 1001c984 LIBCMT:nlsdata2.obj
- 0002:0000198c ??_C@_06JLEDEDGH@Monday?$AA@ 1001c98c LIBCMT:nlsdata2.obj
- 0002:00001994 ??_C@_06OOPIFAJ@Sunday?$AA@ 1001c994 LIBCMT:nlsdata2.obj
- 0002:0000199c ??_C@_03FEFJNEK@Sat?$AA@ 1001c99c LIBCMT:nlsdata2.obj
- 0002:000019a0 ??_C@_03IDIOELNC@Fri?$AA@ 1001c9a0 LIBCMT:nlsdata2.obj
- 0002:000019a4 ??_C@_03IOFIKPDN@Thu?$AA@ 1001c9a4 LIBCMT:nlsdata2.obj
- 0002:000019a8 ??_C@_03MHOMLAJA@Wed?$AA@ 1001c9a8 LIBCMT:nlsdata2.obj
- 0002:000019ac ??_C@_03NAGEINEP@Tue?$AA@ 1001c9ac LIBCMT:nlsdata2.obj
- 0002:000019b0 ??_C@_03PDAGKDH@Mon?$AA@ 1001c9b0 LIBCMT:nlsdata2.obj
- 0002:000019b4 ??_C@_03KOEHGMDN@Sun?$AA@ 1001c9b4 LIBCMT:nlsdata2.obj
- 0002:000019b8 ___lookuptable_s 1001c9b8 LIBCMT:outputs.obj
- 0002:00001a30 ??_C@_1CK@HHHCOJPD@?$AAE?$AAn?$AAv?$AAi?$AAr?$AAo?$AAn?$AAm?$AAe?$AAn?$AAt?$AAD?$AAi?$AAr?$AAe?$AAc?$AAt?$AAo?$AAr?$AAy?$AA?$AA@ 1001ca30 LIBCMT:_pdblkup_.obj
- 0002:00001a60 ??_C@_1FM@DNCABAP@?$AAS?$AAO?$AAF?$AAT?$AAW?$AAA?$AAR?$AAE?$AA?2?$AAM?$AAi?$AAc?$AAr?$AAo?$AAs?$AAo?$AAf?$AAt?$AA?2?$AAV?$AAi?$AAs?$AAu?$AAa?$AAl?$AAS?$AAt?$AAu?$AAd?$AAi?$AAo?$AA?2@ 1001ca60 LIBCMT:_pdblkup_.obj
- 0002:00001abc ??_C@_0M@HLOHPNFA@RegCloseKey?$AA@ 1001cabc LIBCMT:_pdblkup_.obj
- 0002:00001ac8 ??_C@_0BB@GLNAEDBD@RegQueryValueExW?$AA@ 1001cac8 LIBCMT:_pdblkup_.obj
- 0002:00001adc ??_C@_0O@COHOBMLB@RegOpenKeyExW?$AA@ 1001cadc LIBCMT:_pdblkup_.obj
- 0002:00001aec ??_C@_01KDCPPGHE@r?$AA@ 1001caec LIBCMT:_pdblkup_.obj
- 0002:00001af0 ??_C@_0BB@KCIACLNC@PDBOpenValidate5?$AA@ 1001caf0 LIBCMT:_pdblkup_.obj
- 0002:00001b04 ??_C@_0BI@DFKBFLJE@GetProcessWindowStation?$AA@ 1001cb04 LIBCMT:crtmboxw.obj
- 0002:00001b1c ??_C@_0BK@DEKFELLI@GetUserObjectInformationW?$AA@ 1001cb1c LIBCMT:crtmboxw.obj
- 0002:00001b38 ??_C@_0BD@HHGDFDBJ@GetLastActivePopup?$AA@ 1001cb38 LIBCMT:crtmboxw.obj
- 0002:00001b4c ??_C@_0BA@HNOPNCHB@GetActiveWindow?$AA@ 1001cb4c LIBCMT:crtmboxw.obj
- 0002:00001b5c ??_C@_0M@DLDCCGNP@MessageBoxW?$AA@ 1001cb5c LIBCMT:crtmboxw.obj
- 0002:00001b68 ??_C@_1BG@GOEBHBDC@?$AAU?$AAS?$AAE?$AAR?$AA3?$AA2?$AA?4?$AAD?$AAL?$AAL?$AA?$AA@ 1001cb68 LIBCMT:crtmboxw.obj
- 0002:00001c00 ___newctype 1001cc00 LIBCMT:ctype.obj
- 0002:00001f00 __wctype 1001cf00 LIBCMT:ctype.obj
- 0002:00002108 ___newclmap 1001d108 LIBCMT:ctype.obj
- 0002:00002288 ___newcumap 1001d288 LIBCMT:ctype.obj
- 0002:00002408 ??_C@_1BA@BALFACEM@?$AAC?$AAO?$AAN?$AAO?$AAU?$AAT?$AA$?$AA?$AA@ 1001d408 LIBCMT:initcon.obj
- 0002:00002418 ??_C@_06IMKFLFPG@1?$CDQNAN?$AA@ 1001d418 LIBCMT:_x10fout_.obj
- 0002:00002420 ??_C@_05DNEBIAHO@1?$CDINF?$AA@ 1001d420 LIBCMT:_x10fout_.obj
- 0002:00002428 ??_C@_05PHHOCPM@1?$CDIND?$AA@ 1001d428 LIBCMT:_x10fout_.obj
- 0002:00002430 ??_C@_06PGGFOGJG@1?$CDSNAN?$AA@ 1001d430 LIBCMT:_x10fout_.obj
- 0002:00002438 __load_config_used 1001d438 LIBCMT:loadcfg.obj
- 0002:00002480 ___safe_se_handler_table 1001d480
- 0002:0000248c ___rtc_iaa 1001d48c LIBCMT:_initsect_.obj
- 0002:00002490 ___rtc_izz 1001d490 LIBCMT:_initsect_.obj
- 0002:00002494 ___rtc_taa 1001d494 LIBCMT:_initsect_.obj
- 0002:00002498 ___rtc_tzz 1001d498 LIBCMT:_initsect_.obj
- 0002:0000293c __IMPORT_DESCRIPTOR_ADVAPI32 1001d93c Advapi32:ADVAPI32.dll
- 0002:00002950 __IMPORT_DESCRIPTOR_USER32 1001d950 User32:USER32.dll
- 0002:00002964 __IMPORT_DESCRIPTOR_KERNEL32 1001d964 kernel32:KERNEL32.dll
- 0002:00002978 __NULL_IMPORT_DESCRIPTOR 1001d978 Advapi32:ADVAPI32.dll
- 0003:00000038 _SVN_REV 1001f038 api.obj
- 0003:00003f20 ___security_cookie 10022f20 LIBCMT:gs_cookie.obj
- 0003:00003f24 ___security_cookie_complement 10022f24 LIBCMT:gs_cookie.obj
- 0003:000040a0 __fltused 100230a0 LIBCMT:_fpinit_.obj
- 0003:000040a4 __ldused 100230a4 LIBCMT:_fpinit_.obj
- 0003:000040a8 __iob 100230a8 LIBCMT:_file.obj
- 0003:00004330 ___nullstring 10023330 LIBCMT:output.obj
- 0003:00004334 ___wnullstring 10023334 LIBCMT:output.obj
- 0003:00004338 ?_RTC_ErrorLevels@@3PAHA 10023338 LIBCMT:_error_.obj
- 0003:00004350 __timezone 10023350 LIBCMT:timeset.obj
- 0003:00004354 __daylight 10023354 LIBCMT:timeset.obj
- 0003:00004358 __dstbias 10023358 LIBCMT:timeset.obj
- 0003:000043e0 __tzname 100233e0 LIBCMT:timeset.obj
- 0003:00004400 ___flsindex 10023400 LIBCMT:tidtable.obj
- 0003:00004404 ___getvalueindex 10023404 LIBCMT:tidtable.obj
- 0003:00004408 __lookuptrailbytes 10023408 LIBCMT:read.obj
- 0003:00004508 ___badioinfo 10023508 LIBCMT:ioinit.obj
- 0003:00004550 __cfltcvt_tab 10023550 LIBCMT:cmiscdat.obj
- 0003:00004698 __sys_errlist 10023698 LIBCMT:syserr.obj
- 0003:00004748 __sys_nerr 10023748 LIBCMT:syserr.obj
- 0003:00004750 ___initialmbcinfo 10023750 LIBCMT:mbctype.obj
- 0003:00004970 __mbctype 10023970 LIBCMT:mbctype.obj
- 0003:00004a78 __mbcasemap 10023a78 LIBCMT:mbctype.obj
- 0003:00004b78 ___ptmbcinfo 10023b78 LIBCMT:mbctype.obj
- 0003:00004c70 ___globallocalestatus 10023c70 LIBCMT:glstatus.obj
- 0003:00004c74 ___clocalestr 10023c74 LIBCMT:nlsdata2.obj
- 0003:00004c78 ___lc_time_c 10023c78 LIBCMT:nlsdata2.obj
- 0003:00004de0 ___initiallocinfo 10023de0 LIBCMT:nlsdata2.obj
- 0003:00004eb8 ___ptlocinfo 10023eb8 LIBCMT:nlsdata2.obj
- 0003:00004ebc ___initiallocalestructinfo 10023ebc LIBCMT:nlsdata2.obj
- 0003:00004ed0 __lpdays 10023ed0 LIBCMT:days.obj
- 0003:00004f04 __days 10023f04 LIBCMT:days.obj
- 0003:00004f40 ___abort_behavior 10023f40 LIBCMT:abort.obj
- 0003:00004f50 ___lconv_static_decimal 10023f50 LIBCMT:lconv.obj
- 0003:00004f54 ___lconv_static_W_decimal 10023f54 LIBCMT:lconv.obj
- 0003:00004f58 ___lconv_c 10023f58 LIBCMT:lconv.obj
- 0003:00004fa8 ___lconv 10023fa8 LIBCMT:lconv.obj
- 0003:00004fac __pctype 10023fac LIBCMT:ctype.obj
- 0003:00004fb0 __pwctype 10023fb0 LIBCMT:ctype.obj
- 0003:00004fb4 __confh 10023fb4 LIBCMT:initcon.obj
- 0003:00004fc0 __NLG_Destination 10023fc0 LIBCMT:exsup.obj
- 0003:00005000 ___mb_cur_max 10024000 LIBCMT:nlsdata1.obj
- 0003:00005004 ___decimal_point 10024004 LIBCMT:nlsdata1.obj
- 0003:00005008 ___decimal_point_length 10024008 LIBCMT:nlsdata1.obj
- 0003:00005010 __pow10pos 10024010 LIBCMT:_constpow_.obj
- 0003:00005170 __pow10neg 10024170 LIBCMT:_constpow_.obj
- 0003:00005300 _svn_rev 10024300 api.obj
- 0003:00005380 _default_xbee 10024380 api.obj
- 0003:00005384 _glob_hModule 10024384 api.obj
- 0003:00005388 _win32_hWnd 10024388 api.obj
- 0003:0000538c _win32_MessageID 1002438c api.obj
- 0003:00005398 ___fastflag 10024398 LIBCMT:_fpinit_.obj
- 0003:0000539c __cflush 1002439c LIBCMT:_file.obj
- 0003:000053a0 __umaskval 100243a0 LIBCMT:crt0dat.obj
- 0003:000053a4 ___argc 100243a4 LIBCMT:crt0dat.obj
- 0003:000053a8 ___argv 100243a8 LIBCMT:crt0dat.obj
- 0003:000053ac ___wargv 100243ac LIBCMT:crt0dat.obj
- 0003:000053b0 __environ 100243b0 LIBCMT:crt0dat.obj
- 0003:000053b4 ___initenv 100243b4 LIBCMT:crt0dat.obj
- 0003:000053b8 __wenviron 100243b8 LIBCMT:crt0dat.obj
- 0003:000053bc ___winitenv 100243bc LIBCMT:crt0dat.obj
- 0003:000053c0 __pgmptr 100243c0 LIBCMT:crt0dat.obj
- 0003:000053c4 __wpgmptr 100243c4 LIBCMT:crt0dat.obj
- 0003:000053c8 __exitflag 100243c8 LIBCMT:crt0dat.obj
- 0003:000053cc __C_Termination_Done 100243cc LIBCMT:crt0dat.obj
- 0003:000053d0 __C_Exit_Done 100243d0 LIBCMT:crt0dat.obj
- 0003:000053d8 __aenvptr 100243d8 LIBCMT:dllcrt0.obj
- 0003:000053dc __wenvptr 100243dc LIBCMT:dllcrt0.obj
- 0003:000053e0 ___error_mode 100243e0 LIBCMT:dllcrt0.obj
- 0003:000053e4 ___app_type 100243e4 LIBCMT:dllcrt0.obj
- 0003:000053e8 ___pInvalidArgHandler 100243e8 LIBCMT:invarg.obj
- 0003:00005714 ?wsprintffp@@3P6AHPADPBDZZA 10024714 LIBCMT:_error_.obj
- 0003:00005720 __crtheap 10024720 LIBCMT:heapinit.obj
- 0003:000057e0 _gpFlsAlloc 100247e0 LIBCMT:tidtable.obj
- 0003:000057e4 _gpFlsGetValue 100247e4 LIBCMT:tidtable.obj
- 0003:000057e8 _gpFlsSetValue 100247e8 LIBCMT:tidtable.obj
- 0003:000057ec _gpFlsFree 100247ec LIBCMT:tidtable.obj
- 0003:000057f0 __stdbuf 100247f0 LIBCMT:_sftbuf.obj
- 0003:00005948 __maxwait 10024948 LIBCMT:crtheap.obj
- 0003:0000594c ?__pInconsistency@@3P6AXXZA 1002494c LIBCMT:hooks.obj
- 0003:00005968 ___pPurecall 10024968 LIBCMT:inithelp.obj
- 0003:0000596c ?_pnhHeap@@3P6AHI@ZA 1002496c LIBCMT:handler.obj
- 0003:00005f98 __newmode 10024f98 LIBCMT:_newmode.obj
- 0003:000060ac ___mbulinfo 100250ac LIBCMT:mbctype.obj
- 0003:000060b8 ___mbcodepage 100250b8 LIBCMT:mbctype.obj
- 0003:000060bc ___ismbcodepage 100250bc LIBCMT:mbctype.obj
- 0003:000060c0 ___mblcid 100250c0 LIBCMT:mbctype.obj
- 0003:000060d0 __fmode 100250d0 LIBCMT:txtmode.obj
- 0003:000060d4 __outputformat 100250d4 LIBCMT:outputformat.obj
- 0003:000060ec ___locale_changed 100250ec LIBCMT:setlocal.obj
- 0003:000060f0 ___lconv_static_null 100250f0 LIBCMT:lconv.obj
- 0003:000060f4 ___lconv_static_W_null 100250f4 LIBCMT:lconv.obj
- 0003:000060f8 __commode 100250f8 LIBCMT:ncommode.obj
- 0003:000060fc _xbee_hnd_mutex 100250fc
- 0003:00006100 __debugger_hook_dummy 10025100
- 0003:00006104 ___sse2_available 10025104
- 0003:00006108 __pDestructExceptionObject 10025108
- 0003:0000610c __nhandle 1002510c
- 0003:00006120 ___pioinfo 10025120
- 0003:00006220 __acmdln 10025220
- 0003:00006224 ___env_initialized 10025224
- 0003:00006228 ___onexitend 10025228
- 0003:0000622c ___onexitbegin 1002522c
- 0003:00006230 ___mbctype_initialized 10025230
- 0003:00006234 ___dyn_tls_init_callback 10025234
- 0003:00006238 ___piob 10025238
- 0003:00006240 __bufin 10025240
- 0003:00007240 __nstream 10026240
-
- entry point at 0001:0000da7c
-
- Static symbols
-
- 0001:00001190 _xbee_logf 10002190 f api.obj
- 0001:00001a00 _Xfree2@4 10002a00 f api.obj
- 0001:00002af0 _init_serial@8 10003af0 f api.obj
- 0001:00002db0 _Xmalloc2@8 10003db0 f api.obj
- 0001:00002e50 _Xcalloc2@8 10003e50 f api.obj
- 0001:00002ef0 _xbee_startAPI@4 10003ef0 f api.obj
- 0001:00003110 _xbee_sendAT@16 10004110 f api.obj
- 0001:00003140 _xbee_sendATdelay@20 10004140 f api.obj
- 0001:00003630 _xbee_select@8 10004630 f api.obj
- 0001:00005820 _xbee_matchpktcon@12 10006820 f api.obj
- 0001:00005b20 _xbee_listen_wrapper@4 10006b20 f api.obj
- 0001:00005c30 _xbee_listen@4 10006c30 f api.obj
- 0001:00008d10 _Xrealloc2@12 10009d10 f api.obj
- 0001:00008d70 _xbee_parse_io@24 10009d70 f api.obj
- 0001:00009480 _xbee_callbackWrapper@4 1000a480 f api.obj
- 0001:00009970 _xbee_thread_watch@4 1000a970 f api.obj
- 0001:00009bb0 _xbee_getbyte@4 1000abb0 f api.obj
- 0001:00009c00 _xbee_getrawbyte@4 1000ac00 f api.obj
- 0001:00009dc0 __xbee_send_pkt@12 1000adc0 f api.obj
- 0001:0000a2e0 _xbee_make_pkt@12 1000b2e0 f api.obj
- 0001:0000a7d1 __tsopen_nolock 1000b7d1 f LIBCMT:open.obj
- 0001:0000b225 _flsall 1000c225 f LIBCMT:fflush.obj
- 0001:0000bae4 _doexit 1000cae4 f LIBCMT:crt0dat.obj
- 0001:0000d986 ___DllMainCRTStartup 1000e986 f LIBCMT:dllcrt0.obj
- 0001:0000dc8a _write_char 1000ec8a f LIBCMT:output.obj
- 0001:0000dcbd _write_string 1000ecbd f LIBCMT:output.obj
- 0001:0000eb56 ?DebuggerProbe@@YAHK@Z 1000fb56 f LIBCMT:_error_.obj
- 0001:0000eba6 ?DebuggerRuntime@@YAHKHPAXPB_W@Z 1000fba6 f LIBCMT:_error_.obj
- 0001:0000ec08 ?failwithmessage@@YAXPAXHHPBD@Z 1000fc08 f LIBCMT:_error_.obj
- 0001:0000f019 __tzset_nolock 10010019 f LIBCMT:tzset.obj
- 0001:0001167d __shift 1001267d f LIBCMT:cvt.obj
- 0001:000116c2 __cftoe2_l 100126c2 f LIBCMT:cvt.obj
- 0001:00011c80 __cftof2_l 10012c80 f LIBCMT:cvt.obj
- 0001:000127f2 _siglookup 100137f2 f LIBCMT:winsig.obj
- 0001:00012a2e __onexit_nolock 10013a2e f LIBCMT:onexit.obj
- 0001:00012f9c ?strtoxl@@YAKPAUlocaleinfo_struct@@PBDPAPBDHH@Z 10013f9c f LIBCMT:strtol.obj
- 0001:0001349b _parse_cmdline 1001449b f LIBCMT:stdargv.obj
- 0001:00013a2b ?CPtoLCID@@YAHH@Z 10014a2b f LIBCMT:mbctype.obj
- 0001:00013a5a ?setSBCS@@YAXPAUthreadmbcinfostruct@@@Z 10014a5a f LIBCMT:mbctype.obj
- 0001:00013abe ?setSBUpLow@@YAXPAUthreadmbcinfostruct@@@Z 10014abe f LIBCMT:mbctype.obj
- 0001:00013cf2 ?getSystemCP@@YAHH@Z 10014cf2 f LIBCMT:mbctype.obj
- 0001:000146bd ?GetPdbDll@@YAPAUHINSTANCE__@@XZ 100156bd f LIBCMT:_pdblkup_.obj
- 0001:00014e40 __unwind_handler4 10015e40 f LIBCMT:exsup4.obj
- 0001:00015e34 ?x_ismbbtype_l@@YAHPAUlocaleinfo_struct@@IHH@Z 10016e34 f LIBCMT:ismbbyte.obj
- 0001:00015e9f ?__crtLCMapStringA_stat@@YAHPAUlocaleinfo_struct@@KKPBDHPADHHH@Z 10016e9f f LIBCMT:a_map.obj
- 0001:000160cc ?__crtGetStringTypeA_stat@@YAHPAUlocaleinfo_struct@@KPBDHPAGHHH@Z 100170cc f LIBCMT:a_str.obj
- 0001:000168c0 __unwind_handler 100178c0 f LIBCMT:exsup.obj
- 0001:0001844d __hw_cw 1001944d f LIBCMT:_ieee87_.obj
- 0001:000184db ___hw_cw_sse2 100194db f LIBCMT:_ieee87_.obj
- 0001:00018950 ?__crtCompareStringA_stat@@YAHPAUlocaleinfo_struct@@KKPBDH1HH@Z 10019950 f LIBCMT:a_cmp.obj
- 0001:00018cea _findenv 10019cea f LIBCMT:setenv.obj
- 0001:00018d3c _copy_environ 10019d3c f LIBCMT:setenv.obj
- 0001:000196ea __dup_nolock 1001a6ea f LIBCMT:dup.obj
diff --git a/libs/thirdParty/libxbee/main.c b/libs/thirdParty/libxbee/main.c
deleted file mode 100644
index 7dcacafa7e1a02da30b1d9397c34e06509143f9f..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/main.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-#include
-#include
-#include
-
-#include "xbee.h"
-
-int main(int argc, char *argv[]) {
- xbee_con *con, *con2;
- xbee_pkt *pkt, *p;
-
- if (xbee_setuplog("/dev/ttyUSB0",57600,2) == -1) {
- perror("xbee_setuplog()");
- exit(1);
- }
- if (argc >= 2 && !strcmp(argv[1],"sleep")) {
- for (;;) {
- sleep(86400); /* sleep for a day... forever :) */
- }
- }
-
- /*if ((con = xbee_newcon(NULL,'X',xbee_localAT)) == (void *)-1) {
- printf("error creating connection...\n");
- exit(1);
- }
-
- while(1){sleep(10);}
-
- xbee_senddata(con,"CH%c",0x0C);
- sleep(1);
- xbee_senddata(con,"ID%c%c",0x33, 0x32);
- sleep(1);
- xbee_senddata(con,"DH%c%c%c%c",0x00,0x00,0x00,0x00);
- sleep(1);
- xbee_senddata(con,"DL%c%c%c%c",0x00,0x00,0x00,0x00);
- sleep(1);
- xbee_senddata(con,"MY%c%c",0x00,0x00);
- sleep(1);
- // SH - read only
- // SL - read only
- xbee_senddata(con,"RR%c",0x00);
- sleep(1);
- xbee_senddata(con,"RN%c",0x00);
- sleep(1);
- xbee_senddata(con,"MM%c",0x00);
- sleep(1);
- xbee_senddata(con,"NT%c",0x19);
- sleep(1);
- xbee_senddata(con,"NO%c",0x00);
- sleep(1);
- xbee_senddata(con,"CE%c",0x00);
- sleep(1);
- xbee_senddata(con,"SC%c%c",0x1F,0xFE);
- sleep(1);
- xbee_senddata(con,"SD%c",0x04);
- sleep(1);
- xbee_senddata(con,"A1%c",0x00);
- sleep(1);
- xbee_senddata(con,"A2%c",0x00);
- sleep(1);
- // AI - read only
- xbee_senddata(con,"EE%c",0x00);
- sleep(1);
- //xbee_senddata(con,"KY%c",0x00);
- //sleep(1);
- xbee_senddata(con,"NI%s","TIGGER");
- sleep(1);
- xbee_senddata(con,"PL%c",0x04);
- sleep(1);
- xbee_senddata(con,"CA%c",0x2C);
- sleep(1);
- xbee_senddata(con,"SM%c",0x00);
- sleep(1);
- xbee_senddata(con,"ST%c%c",0x13,0x88);
- sleep(1);
- xbee_senddata(con,"SP%c%c",0x00,0x00);
- sleep(1);
- xbee_senddata(con,"DP%c%c",0x03,0xE8);
- sleep(1);
- xbee_senddata(con,"SO%c",0x00);
- sleep(1);
- xbee_senddata(con,"BD%c",0x06);
- sleep(1);
- xbee_senddata(con,"RO%c",0x03);
- sleep(1);
- xbee_senddata(con,"AP%c",0x02);
- sleep(1);
- xbee_senddata(con,"PR%c",0xFF);
- sleep(1);
- xbee_senddata(con,"D8%c",0x00);
- sleep(1);
- xbee_senddata(con,"D7%c",0x01);
- sleep(1);
- xbee_senddata(con,"D6%c",0x00);
- sleep(1);
- xbee_senddata(con,"D5%c",0x01);
- sleep(1);
- xbee_senddata(con,"D4%c",0x00);
- sleep(1);
- xbee_senddata(con,"D3%c",0x00);
- sleep(1);
- xbee_senddata(con,"D2%c",0x00);
- sleep(1);
- xbee_senddata(con,"D1%c",0x00);
- sleep(1);
- xbee_senddata(con,"D0%c",0x00);
- sleep(1);
- xbee_senddata(con,"IU%c",0x00);
- sleep(1);
- xbee_senddata(con,"IT%c",0x01);
- sleep(1);
- xbee_senddata(con,"IC%c",0x00);
- sleep(1);
- xbee_senddata(con,"IR%c%c",0x00,0x00);
- sleep(1);
- xbee_senddata(con,"IA%c%c%c%c%c%c%c%c",0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF);
- sleep(1);
- xbee_senddata(con,"T0%c",0xFF);
- sleep(1);
- xbee_senddata(con,"T1%c",0xFF);
- sleep(1);
- xbee_senddata(con,"T2%c",0xFF);
- sleep(1);
- xbee_senddata(con,"T3%c",0xFF);
- sleep(1);
- xbee_senddata(con,"T4%c",0xFF);
- sleep(1);
- xbee_senddata(con,"T5%c",0xFF);
- sleep(1);
- xbee_senddata(con,"T6%c",0xFF);
- sleep(1);
- xbee_senddata(con,"T7%c",0xFF);
- sleep(1);
- xbee_senddata(con,"P0%c",0x01);
- sleep(1);
- xbee_senddata(con,"P1%c",0x00);
- sleep(1);
- xbee_senddata(con,"PT%c",0xFF);
- sleep(1);
- xbee_senddata(con,"RP%c",0x28);
- sleep(1);
- // VR - read only
- // HV - read only
- // DB - read only
- // EC - read only
- // EA - read only
- // DD - read only
- xbee_senddata(con,"CT%c",0x64);
- sleep(1);
- xbee_senddata(con,"GT%c%c",0x03,0xE8);
- sleep(1);
- xbee_senddata(con,"CC%c",0x2B);
- sleep(1);
-
- sleep(10);
- */
-
- /* test 64bit IO and Data */
- con = xbee_newcon('I',xbee_64bitIO, 0x0013A200, 0x403af247);
- con2 = xbee_newcon('I',xbee_64bitData, 0x0013A200, 0x403af247);
-
- while (1) {
- while ((pkt = xbee_getpacket(con)) != NULL) {
- int i;
- for (i = 0; i < pkt->samples; i++) {
- int m;
- for (m = 0; m <= 8; m++) {
- if (xbee_hasdigital(pkt,i,m)) printf("D%d: %d ",m,xbee_getdigital(pkt,i,m));
- }
-#define Vref 3.23
- for (m = 0; m <= 5; m++) {
- if (xbee_hasanalog(pkt,i,m)) printf("A%d: %.2fv ",m,xbee_getanalog(pkt,i,m,Vref));
- }
- printf("\n");
- }
- if (xbee_senddata(con2, "the time is %d\r", time(NULL))) {
- printf("Error: xbee_senddata\n");
- return 1;
- }
- free(pkt);
- if (p) {
- switch (p->status) {
- case 0x01: printf("XBee: txStatus: No ACK\n"); break;
- case 0x02: printf("XBee: txStatus: CCA Failure\n"); break;
- case 0x03: printf("XBee: txStatus: Purged\n"); break;
- }
- free(p);
- }
- }
- while ((pkt = xbee_getpacket(con2)) != NULL) {
- printf("he said '%s'\n", pkt->data);
- if (xbee_senddata(con2, "you said '%s'\r", pkt->data)) {
- printf("Error: xbee_senddata\n");
- return 1;
- }
- free(pkt);
- if (p) {
- switch (p->status) {
- case 0x01: printf("XBee: txStatus: No ACK\n"); break;
- case 0x02: printf("XBee: txStatus: CCA Failure\n"); break;
- case 0x03: printf("XBee: txStatus: Purged\n"); break;
- }
- free(p);
- }
- }
- usleep(100);
- }
-
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/makefile b/libs/thirdParty/libxbee/makefile
deleted file mode 100644
index 11b9d3fa62ba0183ffa10ff4db8c1db8db27e962..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/makefile
+++ /dev/null
@@ -1,226 +0,0 @@
-#-- set this to the man directory you would like to use
-MANPATH:=/usr/share/man
-
-#-- uncomment this to enable debugging
-#DEBUG:=-g -DDEBUG
-
-
-###### YOU SHOULD NOT CHANGE BELOW THIS LINE ######
-
-VERSION:=1.4.1
-SHELL:=/bin/bash
-SRCS:=api.c
-MANS:=man3/libxbee.3 \
- man3/xbee_con.3 \
- man3/xbee_end.3 \
- man3/xbee_endcon.3 \
- man3/xbee_flushcon.3 \
- man3/xbee_purgecon.3 \
- man3/xbee_getanalog.3 \
- man3/xbee_getdigital.3 \
- man3/xbee_getpacket.3 \
- man3/xbee_hasanalog.3 \
- man3/xbee_hasdigital.3 \
- man3/xbee_logit.3 \
- man3/xbee_newcon.3 \
- man3/xbee_nsenddata.3 \
- man3/xbee_pkt.3 \
- man3/xbee_senddata.3 \
- man3/xbee_setup.3 \
- man3/xbee_setupAPI.3 \
- man3/xbee_setuplog.3 \
- man3/xbee_setuplogAPI.3 \
- man3/xbee_vsenddata.3
-MANPATHS:=$(foreach dir,$(shell ls man -ln | grep ^d | tr -s ' ' | cut -d ' ' -f 9),${MANPATH}/$(dir))
-
-PDFS:=${SRCS} ${SRCS:.c=.h} makefile main.c xbee.h
-
-CC:=gcc
-CFLAGS:=-Wall -Wstrict-prototypes -Wno-variadic-macros -pedantic -c -fPIC ${DEBUG}
-CLINKS:=-lpthread -lrt ${DEBUG}
-DEFINES:=
-
-ifeq ($(strip $(wildcard ${MANPATH}/man3/libxbee.3.bz2)),)
-FIRSTTIME:=TRUE
-else
-FIRSTTIME:=FALSE
-endif
-
-ENSCRIPT:=-MA4 --color -f Courier8 -C --margins=15:15:0:20
-ifneq ($(strip $(wildcard /usr/share/enscript/mine-web.hdr)),)
- ENSCRIPT+= --fancy-header=mine-web
-else
- ENSCRIPT+= --fancy-header=a2ps
-endif
-
-SRCS:=${sort ${SRCS}}
-PDFS:=${sort ${PDFS}}
-
-.PHONY: FORCE
-.PHONY: all run new clean cleanpdfs main pdfs html
-.PHONY: install install_su install_man
-.PHONY: uninstall uninstall_su uninstall_man/
-
-
-# all - do everything (default) #
-all: ./lib/libxbee.so.$(VERSION)
- @echo "*** Done! ***"
-
-
-# run - remake main and then run #
-run: all main
- ./bin/main
-
-
-# new - clean and do everything again #
-new: clean all
-
-
-# clean - remove any compiled files and PDFs #
-clean:
- rm -f ./*~
- rm -f ./sample/*~
- rm -f ./obj/*.o
- rm -f ./lib/libxbee.so*
- rm -f ./bin/main
-
-cleanpdfs:
- rm -f ./pdf/*.pdf
-
-
-# install - installs library #
-install: ./lib/libxbee.so.$(VERSION)
- @echo
- @echo
-ifneq ($(shell echo $$USER),root)
- @echo "#######################################################################################"
- @echo "### To Install this library I need the root password please!"
- @echo "#######################################################################################"
-endif
- su -c "make install_su --no-print-directory"
- @echo
-ifeq (${FIRSTTIME},TRUE)
- @echo "#######################################################################################"
- @echo
- @pr -h "" -o 3 -w 86 -tT ./README
- @echo
- @echo "#######################################################################################"
-endif
-
-install_su: /usr/lib/libxbee.so.$(VERSION) /usr/include/xbee.h install_man
-
-/usr/lib/libxbee.so.$(VERSION): ./lib/libxbee.so.$(VERSION)
- cp ./lib/libxbee.so.$(VERSION) /usr/lib/libxbee.so.$(VERSION) -f
- @chmod 755 /usr/lib/libxbee.so.$(VERSION)
- @chown root:root /usr/lib/libxbee.so.$(VERSION)
- ln ./libxbee.so.$(VERSION) /usr/lib/libxbee.so.1 -sf
- @chown root:root /usr/lib/libxbee.so.1
- ln ./libxbee.so.$(VERSION) /usr/lib/libxbee.so -sf
- @chown root:root /usr/lib/libxbee.so
-
-/usr/include/xbee.h: ./xbee.h
- cp ./xbee.h /usr/include/xbee.h -f
- @chmod 644 /usr/include/xbee.h
- @chown root:root /usr/include/xbee.h
-
-install_man: ${MANPATH} ${MANPATHS} ${addsuffix .bz2,${addprefix ${MANPATH}/,${MANS}}}
-
-${MANPATH} ${MANPATHS}:
- @echo "#######################################################################################"
- @echo "### $@ does not exist... cannot install man files here!"
- @echo "### Please check the directory and the MANPATH variable in the makefile"
- @echo "#######################################################################################"
- @false
-
-${MANPATH}/%.bz2: ./man/%
- @echo "cat $< | bzip2 -z > $@"
- @cat $< | bzip2 -z > $@ || ( \
- echo "#######################################################################################"; \
- echo "### Installing man page '$*' to '$@' failed..."; \
- echo "#######################################################################################"; )
- @chmod 644 $@
- @chown root:root $@
-
-./doc/:
- mkdir ./doc/
-
-html: ./doc/ ./man/
- cd ./doc/; mkdir -p `find ../man/ -type d -not -path *.svn* | cut -b 2-`;
- find ./man/ -type f -not -path *.svn* | cut -d / -f 3- | sort > .html_todo
- for item in `cat .html_todo`; do \
- man2html -r ./man/$$item | tail -n +3 > ./doc/man/$$item.html; \
- done 2> /dev/null
- rm .html_todo
-
-uninstall:
- @echo
- @echo
-ifneq ($(shell echo $$USER),root)
- @echo "#######################################################################################"
- @echo "### To Uninstall this library I need the root password please!"
- @echo "#######################################################################################"
-endif
- su -c "make uninstall_su --no-print-directory"
- @echo
- @echo
-
-uninstall_su: ${addprefix uninstall_man/,${MANS}}
- rm /usr/lib/libxbee.so.$(VERSION) -f
- rm /usr/lib/libxbee.so.1 -f
- rm /usr/lib/libxbee.so -f
- rm /usr/include/xbee.h -f
-
-uninstall_man/%:
- rm ${MANPATH}/$*.bz2 -f
-
-# main - compile & link objects #
-main: ./bin/main
-
-./bin/main: ./obj/api.o ./bin/ ./main.c
- ${CC} ${CLINKS} ./main.c ./obj/api.o -o ./bin/main ${DEBUG}
-
-./bin/:
- mkdir ./bin/
-
-./lib/libxbee.so.$(VERSION): ./lib/ ${addprefix ./obj/,${SRCS:.c=.o}} ./xbee.h
- gcc -shared -Wl,-soname,libxbee.so.1 $(CLINKS) -o ./lib/libxbee.so.$(VERSION) ./obj/*.o
- ln ./libxbee.so.$(VERSION) ./lib/libxbee.so.1 -sf
- ln ./libxbee.so.$(VERSION) ./lib/libxbee.so -sf
-
-./lib/:
- mkdir ./lib/
-
-./obj/:
- mkdir ./obj/
-
-./obj/%.o: ./obj/ %.c %.h xbee.h
- ${CC} ${CFLAGS} ${DEFINES} ${DEBUG} $*.c -o $@
-
-./obj/%.o: ./obj/ %.c xbee.h
- ${CC} ${CFLAGS} ${DEFINES} ${DEBUG} $*.c -o $@
-
-
-# pdfs - generate PDFs for each source file #
-ifneq ($(strip $(wildcard /usr/bin/ps2pdf)),)
-ifneq ($(strip $(wildcard /usr/bin/enscript)),)
-pdfs: ./pdf/ ${addprefix ./pdf/,${addsuffix .pdf,${PDFS}}}
-
-./pdf/:
- mkdir ./pdf/
-
-./pdf/makefile.pdf: ./makefile
- enscript ${ENSCRIPT} -Emakefile $< -p - | ps2pdf - $@
-
-./pdf/%.pdf: %
- enscript ${ENSCRIPT} -Ec $< -p - | ps2pdf - $@
-
-./pdf/%.pdf:
- @echo "*** Cannot make $@ - '$*' does not exist ***"
-else
-pdfs:
- @echo "WARNING: enscript is not installed - cannot generate PDF files"
-endif
-else
-pdfs:
- @echo "WARNING: ps2pdf is not installed - cannot generate PDF files"
-endif
diff --git a/libs/thirdParty/libxbee/man/man3/libxbee.3 b/libs/thirdParty/libxbee/man/man3/libxbee.3
deleted file mode 100644
index 6bcb978f6f26255ee8bd5260d244e63a8730620a..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/libxbee.3
+++ /dev/null
@@ -1,91 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH LIBXBEE 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-libxbee
-.SH DESCRIPTION
-libxbee is a C library to aid the use of Series 1 Digi XBee radios running in API mode (AP=2).
-.sp
-I have tried to keep flexibility to a maximum.
-By allowing connections to individual nodes to be created - you don't have to address each packet,
-or filter through incomming packets to get at the one you are after. This is all taken care of
-for you by
-.BR libxbee
-!
-.sp
-libxbee is still in development, so if you find any bugs or have any enhancement requests, please
-feel free to submit an issue on the project page:
-.in +4n
-.nf
-http://code.google.com/p/libxbee/
-.fi
-.in
-or contact me (Attie) directly:
-.in +4n
-.nf
-attie@attie.co.uk
-.fi
-.in
-.SH "MAN PAGES"
-Documentation is avaliable via the following man pages, or by example in the 'sample' folder in the SVN repository
-.in +4n
-.sp
-.BR xbee_pkt "(3) - libxbee's packet structure"
-.sp 0
-.BR xbee_con "(3) - libxbee's connection structure"
-.sp
-.BR xbee_setup "(3) - function to setup libxbee (and its variants)"
-.sp 0
-.BR xbee_end "(3) - function to end the libxbee session and close any open handles"
-.sp
-.BR xbee_logit "(3) - function that allows the user to add to the xbee log output"
-.sp
-.BR xbee_newcon "(3) - function to create a new connection"
-.sp 0
-.BR xbee_purgecon "(3) - function to purge packets from a connection"
-.sp 0
-.BR xbee_endcon "(3) - function to end a connection"
-.sp
-.BR xbee_senddata "(3) - function to send data to a remote XBee (and its variants)"
-.sp 0
-.BR xbee_getpacket "(3) - function to get a packet from a connection (and its variants)"
-.sp
-.BR xbee_hasdigital "(3) - function to check if digital sample is in the packet"
-.sp 0
-.BR xbee_getdigital "(3) - function to get digital sample from the packet"
-.sp
-.BR xbee_hasanalog "(3) - function to check if analog sample is in the packet"
-.sp 0
-.BR xbee_getanalog "(3) - function to get the analog sample from the packet"
-.fi
-.in
-.SH "SEE ALSO"
-.BR xbee_pkt (3),
-.BR xbee_con (3),
-.BR xbee_setup (3),
-.BR xbee_end (3),
-.BR xbee_logit (3),
-.BR xbee_newcon (3),
-.BR xbee_flushcon (3),
-.BR xbee_endcon (3),
-.BR xbee_senddata (3),
-.BR xbee_getpacket (3),
-.BR xbee_hasdigital (3),
-.BR xbee_getdigital (3),
-.BR xbee_hasanalog (3),
-.BR xbee_getanalog (3)
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_con.3 b/libs/thirdParty/libxbee/man/man3/xbee_con.3
deleted file mode 100644
index 37e77050449f6d9365525e0d7df8cb8686e1f26a..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_con.3
+++ /dev/null
@@ -1,22 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH LIBXBEE 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-libxbee
-.sp
-This page has not been written yet...
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_end.3 b/libs/thirdParty/libxbee/man/man3/xbee_end.3
deleted file mode 100644
index 5fd1de51279f51a2b0ec8b137b9731463e0d9732..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_end.3
+++ /dev/null
@@ -1,23 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH LIBXBEE 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-libxbee
-.sp
-This page has not been written yet...
-
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_endcon.3 b/libs/thirdParty/libxbee/man/man3/xbee_endcon.3
deleted file mode 100644
index e64ccedb26c6eed86c4ec13a5d8cbb107cdd6efe..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_endcon.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_newcon.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_flushcon.3 b/libs/thirdParty/libxbee/man/man3/xbee_flushcon.3
deleted file mode 100644
index e64ccedb26c6eed86c4ec13a5d8cbb107cdd6efe..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_flushcon.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_newcon.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_getanalog.3 b/libs/thirdParty/libxbee/man/man3/xbee_getanalog.3
deleted file mode 100644
index f7bc1d0c726036a64c6ace07b4247ccea91e1fcc..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_getanalog.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH XBEE_GETPACKET 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-xbee_hasanalog, xbee_getanalog
-.SH SYNOPSIS
-.B #include
-.sp
-.BI "int xbee_hasanalog(xbee_pkt *" pkt ", int " sample ", int " input ");"
-.sp
-.BI "double xbee_getanalog(xbee_pkt *" pkt ", int " sample ", int " input ", double " Vref ");"
-.ad b
-.SH DESCRIPTION
-The
-.BR xbee_hasanalog ()
-function will check the packet for the presence of an analog sample on the specified input.
-.sp
-The
-.BR xbee_getanalog ()
-function will read the packet and return the sample value for the specified analog input.
-.sp
-They both take 3 arguments, with the same purposes.
-.sp
-The argument
-.I pkt
-points to a packet that was previously retrieved with
-.BR xbee_getpacket ()
-.sp
-The argument
-.I sample
-selects the sample within the packet to use.
-.sp
-The argument
-.I input
-specifies which input you are interested in testing.
-.sp
-.BR xbee_getanalog ()
-also takes a fourth argument that allows you to provide a
-.I Vref
-value. This allows the function to convert the raw ADC value into a voltage for you.
-.SH "RETURN VALUE"
-The
-.BR xbee_hasanalog ()
-function will return
-.B 1
-if the provided packet has sample data for the specified input, otherwise
-.BR 0 .
-.sp
-The
-.BR xbee_getanalog ()
-function will return the raw ADC value (0 - 1023) if the provided packet has sample data for the specified input and Vref was given as zero.
-If Vref was non-zero, then the return value will be the voltage read.
-A
-.B -1
-will be returned if the packet does not contain sample data.
-.sp
-.SH EXAMPLE
-To read sample data from previously made connection:
-.in +4n
-.nf
-#include
-xbee_pkt *pkt;
-double Vref = 3.3;
-if ((pkt = xbee_getpacket(con)) != NULL) {
- if (xbee_hasanalog(pkt,0,0)) {
- printf("A0 read %fv\\n",xbee_getanalog(pkt,0,0,Vref));
- } else {
- printf("No A0 data\\n");
- }
- free(pkt);
-}
-.fi
-.in
-.SH AUTHOR
-Attie Grande
-.SH "SEE ALSO"
-.BR libxbee (3),
-.BR xbee_pkt (3),
-.BR xbee_getpacket (3),
-.BR xbee_hasdigital (3),
-.BR xbee_getdigital (3)
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_getdigital.3 b/libs/thirdParty/libxbee/man/man3/xbee_getdigital.3
deleted file mode 100644
index 4a0af65b50b11759c10080b4f5872995951d2489..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_getdigital.3
+++ /dev/null
@@ -1,91 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH XBEE_GETPACKET 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-xbee_hasdigital, xbee_getdigital
-.SH SYNOPSIS
-.B #include
-.sp
-.BI "int xbee_hasdigital(xbee_pkt *" pkt ", int " sample ", int " input ");"
-.sp
-.BI "int xbee_getdigital(xbee_pkt *" pkt ", int " sample ", int " input ");"
-.ad b
-.SH DESCRIPTION
-The
-.BR xbee_hasdigital ()
-function will check the packet for the presence of a given sample on the specified input.
-.sp
-The
-.BR xbee_getdigital ()
-function will read the packet and return the sample value for the specified input.
-.sp
-They both take 3 arguments, with the same purposes.
-.sp
-The argument
-.I pkt
-points to a packet that was previously retrieved with
-.BR xbee_getpacket ()
-.sp
-The argument
-.I sample
-selects the sample within the packet to use.
-.sp
-The argument
-.I input
-specifies which input you are interested in testing.
-.SH "RETURN VALUE"
-The
-.BR xbee_hasdigital ()
-function will return
-.B 1
-if the provided packet has sample data for the specified input, otherwise
-.BR 0 .
-.sp
-The
-.BR xbee_getdigital ()
-function will return
-.B 1
-if the provided packet has sample data for the specified input and the sample was HIGH.
-A
-.B 0
-will be returned if the sample was LOW, or the packet does not contain sample data.
-.sp
-.SH EXAMPLE
-To read sample data from previously made connection:
-.in +4n
-.nf
-#include
-xbee_pkt *pkt;
-if ((pkt = xbee_getpacket(con)) != NULL) {
- if (xbee_hasdigital(pkt,0,0)) {
- printf("D0 read %d\n",xbee_getdigital(pkt,0));
- } else {
- printf("No D0 data\n");
- }
- free(pkt);
-}
-.fi
-.in
-.SH AUTHOR
-Attie Grande
-.SH "SEE ALSO"
-.BR libxbee (3),
-.BR xbee_pkt (3),
-.BR xbee_getpacket (3),
-.BR xbee_hasanalog (3),
-.BR xbee_getanalog (3)
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_getpacket.3 b/libs/thirdParty/libxbee/man/man3/xbee_getpacket.3
deleted file mode 100644
index a458e49602017c25295ee13bf3766e9b77ca424b..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_getpacket.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH XBEE_GETPACKET 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-xbee_getpacket, xbee_getpacketwait
-.SH SYNOPSIS
-.B #include
-.sp
-.BI "xbee_pkt *xbee_getpacket(xbee_con *" con ");"
-.sp
-.BI "xbee_pkt *xbee_getpacketwait(xbee_con *" con ");"
-.ad b
-.SH DESCRIPTION
-The
-.BR xbee_getpacket ()
-function will return the next avaliable packet for the provided connection.
-It takes 1 argument.
-.sp
-The argument
-.I con
-points to a connection made previously with
-.BR xbee_newcon ().
-.sp
-The
-.BR xbee_getpacketwait ()
-function behaves the same, but will wait for an internally specified time for a packet to arrive (currently around 1 second).
-.SH "RETURN VALUE"
-Upon successful return, this function returns the packet, having unlinked it from the internal list.
-You must keep hold of the packet until you are finished with it, and then you must
-.BR free ()
-it to prevent memory leaks.
-.sp
-If a packet was not avaliable for the provided connection, a
-.B NULL
-is returned.
-.sp
-If an error occured a
-.B NULL
-is also returned (though unlikely).
-.sp
-For more information on the structure of the packet, please see
-.BR xbee_pkt (3)
-.sp
-For information on using callback functions with connections instead, please see
-.BR xbee_con (3)
-or
-.B callback.c
-in the SVN sample directory.
-.SH EXAMPLE
-To recieve a packet from a previously made connection:
-.in +4n
-.nf
-#include
-xbee_pkt *pkt;
-if ((pkt = xbee_getpacket(con)) != NULL) {
- /* process packet... */
- free(pkt);
-}
-.fi
-.in
-.SH AUTHOR
-Attie Grande
-.SH "SEE ALSO"
-.BR libxbee (3),
-.BR xbee_setup (3),
-.BR xbee_newcon (3),
-.BR xbee_senddata (3),
-.BR xbee_pkt (3),
-.BR xbee_con (3),
-.BR xbee_hasDigital (3),
-.BR xbee_getDigital (3),
-.BR xbee_hasAnalog (3),
-.BR xbee_getAnalog (3)
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_hasanalog.3 b/libs/thirdParty/libxbee/man/man3/xbee_hasanalog.3
deleted file mode 100644
index 402a3f266f409988c87e9e6f2509cf9e4caeaccf..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_hasanalog.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_getanalog.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_hasdigital.3 b/libs/thirdParty/libxbee/man/man3/xbee_hasdigital.3
deleted file mode 100644
index 5557111123b0eb4622ba68b2a88c41426dfa685e..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_hasdigital.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_getdigital.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_logit.3 b/libs/thirdParty/libxbee/man/man3/xbee_logit.3
deleted file mode 100644
index 5fd1de51279f51a2b0ec8b137b9731463e0d9732..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_logit.3
+++ /dev/null
@@ -1,23 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH LIBXBEE 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-libxbee
-.sp
-This page has not been written yet...
-
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_newcon.3 b/libs/thirdParty/libxbee/man/man3/xbee_newcon.3
deleted file mode 100644
index 2ec511278d45f27a7d0267bdf4deb2665d2ec6a0..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_newcon.3
+++ /dev/null
@@ -1,152 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH XBEE_NEWCON 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-xbee_newcon, xbee_purgecon, xbee_endcon
-.SH SYNOPSIS
-.B #include
-.sp
-.BI "xbee_con *xbee_newcon(unsigned char " frameID ", xbee_types " type ", ...);"
-.sp
-.BI "void xbee_purgecon(xbee_con *" con ");"
-.sp
-.BI "void xbee_endcon(xbee_con *" con ");"
-.ad b
-.SH DESCRIPTION
-The
-.BR xbee_newcon ()
-function will setup a new connection with the specified settings.
-It takes at least 2 arguments, and potentially up to 4 depending on the
-.I type.
-.sp
-.B NOTE:
-Packets will only be collected when they match an active connection.
-You must setup a connection in order to recieve packets.
-.sp
-The argument
-.I frameID
-allows similar functionality to that of TCP/IP port numbers. This is 1
-.I unsigned char
-(or 8-bit integer) that identifies where the data is coming from or going to.
-.s
-The
-.I type
-specifies the type of connection you would like. The following types are avaliable:
-.TP
-.B xbee_localAT
-communicates AT commands with the local XBee
-.TP
-.B xbee_txStatus
-recieves transmit status information from the local XBee
-.TP
-.B xbee_modemStatus
-recieves modem status information from the local XBee
-.TP
-.B xbee_16bitRemoteAT
-communicates AT commands with a remote node (using 16-bit addressing)
-.TP
-.B xbee_64bitRemoteAT
-communicates AT commands with a remote node (using 64-bit addressing)
-.TP
-.B xbee_16bitData
-sends/recieves data through a remote node (using 16-bit addressing)
-.TP
-.B xbee_64bitData
-sends/recieves data through a remote node (using 64-bit addressing)
-.TP
-.B xbee_16bitIO
-sends/recieves I/O data through a remote node (using 16-bit addressing)
-.TP
-.B xbee_64bitIO
-sends/recieves I/O data through a remote node (using 64-bit addressing)
-.TP
-.B xbee2_data
-sends/recieves data using a Series 2 XBee (uses 64-bit addressing)
-.TP
-.B xbee2_txStatus
-recieves transmit status information from the local Series 2 XBee
-.PP
-If you are using
-.BR xbee_localAT ", " xbee_txStatus ", " xbee2_txStatus " or " xbee_modemStatus
-then only the
-.I frameID
-and
-.I type
-arguments are required.
-.sp
-If you are using any 16-bit connection, you must also specify 1 right aligned integer,
-containing the 16-bit address (e.g. 0x1234).
-.sp
-If you are using any 64-bit connection, you must also specify 2 integers containing the
-64-bit address, first the high 32-bits, then the low 32-bits.
-.sp
-The
-.BR xbee_purgecon ()
-function is very basic. It removes any packets that have been collected in the buffer for the specified connection.
-.sp
-The
-.BR xbee_endcon ()
-function is used to end a connection. This will stop collecting packets for the given connection, and remove any packets from the buffer.
-.SH "RETURN VALUE"
-A pointer to the connection is returned. A connection can only be made once, using the same
-.I type
-,
-.I frameID
-and address (if needed). The second call using the same parameters will return the same
-connection.
-.sp
-For information on using callback functions for packet handling please see
-.BR xbee_con (3)
-or
-.B callback.c
-in the SVN sample directory.
-.SH EXAMPLE
-To create a local AT connection:
-.in +4n
-.nf
-#include
-xbee_con *con;
-con = xbee_newcon('A', xbee_localAT);
-.fi
-.in
-.sp
-To create a 16-bit Data connection:
-.in +4n
-.nf
-#include
-xbee_con *con;
-con = xbee_newcon('A', xbee_16bitData, 0x1234);
-.fi
-.in
-.sp
-To create a 64-bit Data connection:
-.in +4n
-.nf
-#include
-xbee_con *con;
-con = xbee_newcon('A', xbee_64bitData, 0x0013A200, 0x40081826);
-.fi
-.in
-.SH AUTHOR
-Attie Grande
-.SH "SEE ALSO"
-.BR libxbee (3),
-.BR xbee_setup (3),
-.BR xbee_getpacket (3),
-.BR xbee_con (3),
-.BR xbee_senddata (3)
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_nsenddata.3 b/libs/thirdParty/libxbee/man/man3/xbee_nsenddata.3
deleted file mode 100644
index b36885d8542376a90c89c5864563bd12398a3cd0..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_nsenddata.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_senddata.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_pkt.3 b/libs/thirdParty/libxbee/man/man3/xbee_pkt.3
deleted file mode 100644
index d5e269c13c7b6a702c91d9d341a732d2184b8a60..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_pkt.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH XBEE_PKT 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-xbee_pkt
-.SH SYNOPSIS
-.B #include
-.ad b
-.SH DESCRIPTION
-This is the packet structure. If you want to get more advanced information from connections (such as RSSI) then this is where it lives.
-.sp
-.in +4n
-.nf
-struct xbee_pkt {
- unsigned char frameID; /* AT Status */
- unsigned char atCmd[2]; /* AT */
- unsigned char status; /* AT Data Status */ /* status / options */
- unsigned char Addr64[8]; /* AT Data */
- unsigned char Addr16[2]; /* AT Data */
- unsigned char data[128]; /* AT Data */
- unsigned char RSSI; /* Data */
- unsigned int datalen;
-
- /* X A5 A4 A3 A2 A1 A0 D8 D7 D6 D5 D4 D3 D2 D1 D0 */
- unsigned short IOmask; /* IO */
-
- /* X X X X X X X D8 D7 D6 D5 D4 D3 D2 D1 D0 */
- unsigned short IOdata; /* IO */
-
- /* X X X X X D D D D D D D D D D D */
- unsigned short IOanalog[6]; /* IO */
-};
-typedef struct xbee_pkt xbee_pkt;
-.fi
-.in
-.sp
-Most of these fields are fairly self explanatory, however some need attention brought to them
-and others need explaining. I will touch on the most important here:
-.TP
-.B atCmd
-This is the 2 character identifier for the AT command response you just recieved.
-Of course if you didnt setup an AT connection, you should never see, or try to see data here.
-.TP
-.BR Addr64 " and " Addr16
-These contain the address of the XBee that you recieved the packet from. You should really know this
-because you setup the connection. However remote AT packets will contain both 16 and 64 bit
-addresses.
-.TP
-.B data
-This is the data you just recieved. Either the AT reponse, or the data from the remote XBee node.
-.TP
-.B datalen
-Would you be suprised if I told you this is how much data there is?... Dont try and
-.BR printf ()
-the
-.B data
-as it isn't null terminated. Use this for processing instead.
-.fi
-.in
-.SH AUTHOR
-Attie Grande
-.SH "SEE ALSO"
-.BR libxbee (3),
-.BR xbee_getpacket (3)
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_purgecon.3 b/libs/thirdParty/libxbee/man/man3/xbee_purgecon.3
deleted file mode 100644
index e64ccedb26c6eed86c4ec13a5d8cbb107cdd6efe..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_purgecon.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_newcon.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_senddata.3 b/libs/thirdParty/libxbee/man/man3/xbee_senddata.3
deleted file mode 100644
index 10296bb8c12be3e6ad2c7e4420123a9f9a869ac4..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_senddata.3
+++ /dev/null
@@ -1,86 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH XBEE_SENDDATA 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-xbee_senddata, xbee_nsenddata, xbee_vsenddata
-.SH SYNOPSIS
-.B #include
-.sp
-.BI "int xbee_senddata(xbee_con *" con ", char *" format ", ...);"
-.sp
-.BI "int xbee_nsenddata(xbee_con *" con ", char *" data ", int " length ");"
-.sp
-.B #include
-.sp
-.BI "int xbee_vsenddata(xbee_con *" con ", char *" format ", va_list " ap ");
-.ad b
-.SH DESCRIPTION
-The
-.BR xbee_senddata ()
-function will send data via a provided connection.
-It takes at least 2 arguments, and possibly more depending on the format string.
-.sp
-The argument
-.I con
-points to a connection made previously with
-.BR xbee_newcon ().
-.sp
-The
-.I format
-string and any following parameters are passed to
-.BR snprintf ()
-within these functions.
-Please see the
-.BR printf (3)
-man page for more information.
-.sp
-If you are using
-.BR xbee_nsenddata ()
-you must provide a character array of the data, and the data's length.
-.sp
-If you are using
-.BR xbee_vsenddata ()
-you must provide a va_list. See
-.BR stdarg (3).
-.SH "RETURN VALUE"
-Upon successful completion, these functions return 0.
-.sp
-If an invalid packet or connection was provided, -1 is returned.
-.sp
-If an unknown error occured, -2 is returned.
-.sp
-If
-.I con
-has
-.I waitforACK
-enabled, then these functions return 1 when an ACK was not recieved within 1 second.
-.SH EXAMPLE
-To send the string "Hello World!" through a previously made connection:
-.in +4n
-.nf
-#include
-xbee_senddata(con,"Hello World!");
-.fi
-.in
-.SH AUTHOR
-Attie Grande
-.SH "SEE ALSO"
-.BR libxbee (3),
-.BR xbee_setup (3),
-.BR xbee_newcon (3),
-.BR xbee_getpacket (3)
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_setup.3 b/libs/thirdParty/libxbee/man/man3/xbee_setup.3
deleted file mode 100644
index 2628c46f71f4cd59789dfa5636d35293bd83e6d2..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_setup.3
+++ /dev/null
@@ -1,108 +0,0 @@
-.\" libxbee - a C library to aid the use of Digi's Series 1 XBee modules
-.\" running in API mode (AP=2).
-.\"
-.\" Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-.\"
-.\" This program is free software: you can redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as published by
-.\" the Free Software Foundation, either version 3 of the License, or
-.\" (at your option) any later version.
-.\"
-.\" This program is distributed in the hope that it will be useful,
-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program. If not, see .
-.TH XBEE_SETUP 3 2009-11-01 "GNU" "Linux Programmer's Manual"
-.SH NAME
-xbee_setup, xbee_setuplog, xbee_setupAPI, xbee_setuplogAPI
-.SH SYNOPSIS
-.B #include
-.sp
-.BI "int xbee_setup(char *" path ", int " baudrate ");"
-.sp
-.BI "int xbee_setuplog(char *" path ", int " baudrate ", int " logfd ");"
-.sp
-.BI "int xbee_setupAPI(char *" path ", int " baudrate ", char " cmdSeq ", int " cmdTime ");"
-.sp
-.BI "int xbee_setuplogAPI(char *" path ", int " baudrate ", int " logfd ", char " cmdSeq ", int " cmdTime ");"
-.ad b
-.SH DESCRIPTION
-.sp
-.B A VERSION OF THIS FUNCTION MUST BE CALLED BEFORE ANY OTHER libxbee FUNCTION!
-The
-.BR xbee_setup ()
-function will setup libxbee so that it can handle an XBee.
-It takes 2 arguments.
-.sp
-The argument
-.I path
-is the path to the serial port that the XBee is connected to (e.g. /dev/ttyUSB0).
-.sp
-The
-.I baudrate
-is the baud rate that the local XBee is configured to run at. The following are avaliable:
-.in +2n
-.nf
-.B 1200
-.B 2400
-.B 4800
-.B 9600
-.B 19200
-.B 38400
-.B 57600
-.BR 115200 " - this is potentially unstable (read the XBee manual to find out why...)"
-.fi
-.in
-.sp
-Using
-.BR xbee_setuplog ()
-is exactly the same, but instead you give an open file descriptor. All log messages will be written to this file (you can use stderr or stdout if you want!). NOTE: The file descriptor is
-.BR dup ()'ed
-before use, so you may close it immediately. Providing a value of
-.B 0
-will disable the log output.
-.sp
-Using
-.BR xbee_setupAPI ()
-is exactly the same, but instead you provide the 'Command Sequence' character and the 'Guard Time' that your local XBee has been configured with.
-libxbee will then place your XBee in API mode 2, and when you call
-.BR xbee_end ()
-it will return your XBee to its previous API mode.
-.sp
-Using
-.BR xbee_setuplogAPI ()
-is simply a combination of
-.BR xbee_setuplog ()
-and
-.BR xbee_setupAPI ()
-.SH "RETURN VALUE"
-If any error occures,
-.B -1
-is returned. Otherwise
-.B 0
-is returned.
-.SH EXAMPLE
-To setup libxbee to use /dev/ttyUSB0 at 57600 baud:
-.in +4n
-.nf
-#include
-if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
- printf("Oh no...\n");
- exit(1);
-}
-.fi
-.in
-.SH NOTE
-If libxbee is compiled with
-.B DEBUG
-defined, then the log output will ALWAYS be enabled. If no file descriptor is provided, then stderr will be used.
-.SH AUTHOR
-Attie Grande
-.SH "SEE ALSO"
-.BR libxbee (3),
-.BR xbee_newcon (3),
-.BR xbee_getpacket (3),
-.BR xbee_senddata (3)
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_setupAPI.3 b/libs/thirdParty/libxbee/man/man3/xbee_setupAPI.3
deleted file mode 100644
index 56a5fcac56acdd751ad631991f2ba13495fc9fea..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_setupAPI.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_setup.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_setuplog.3 b/libs/thirdParty/libxbee/man/man3/xbee_setuplog.3
deleted file mode 100644
index 56a5fcac56acdd751ad631991f2ba13495fc9fea..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_setuplog.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_setup.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_setuplogAPI.3 b/libs/thirdParty/libxbee/man/man3/xbee_setuplogAPI.3
deleted file mode 100644
index 56a5fcac56acdd751ad631991f2ba13495fc9fea..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_setuplogAPI.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_setup.3
diff --git a/libs/thirdParty/libxbee/man/man3/xbee_vsenddata.3 b/libs/thirdParty/libxbee/man/man3/xbee_vsenddata.3
deleted file mode 100644
index b36885d8542376a90c89c5864563bd12398a3cd0..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/man/man3/xbee_vsenddata.3
+++ /dev/null
@@ -1 +0,0 @@
-.so man3/xbee_senddata.3
diff --git a/libs/thirdParty/libxbee/notes/Notepad++ Style.xml b/libs/thirdParty/libxbee/notes/Notepad++ Style.xml
deleted file mode 100644
index 5e56ab9ce39d3f848af6ea05bc753c76fa08db27..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/notes/Notepad++ Style.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
- 000000
-
-
-
-
- _xbee_nsenddata(): xbee_send_pkt():
- xbee_listen():
- _xbee_logit():
- _xbee_getpacket():
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/libs/thirdParty/libxbee/notes/v1-v2.txt b/libs/thirdParty/libxbee/notes/v1-v2.txt
deleted file mode 100644
index cb2e1c923dd418a905c61879eecd69ca14118613..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/notes/v1-v2.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-XBee
-0x8A* Modem Status
-0x08* AT Command
-0x09* AT Command (Queue)
-0x88* AT Command Response
-0x17* Remote AT Command Request
-0x97* Remote AT Command Response
-0x00* Tx Request (64-bit)
-0x01* Tx Request (16-bit)
-0x89* Tx Status
-0x80* Rx Data (64-bit)
-0x81* Rx Data (16-bit)
-
-XBee 2.5
-0x8A* Modem Status
-0x08* AT Command
-0x09* AT Command (Queue)
-0x88* AT Command Response
-0x17* Remote AT Command Request
-0x97* Remote AT Command Response
-0x10* ZigBee Transmit Request
-0x11 Explicit Addressing ZigBee Command Frame
-0x8B* ZigBee Transmit Status
-0x90* ZigBee Recieve Packet
-0x91 ZigBee Explicit Rx
-0x92 ZigBee IO Data Sample Rx
-0x94 Xbee Sensor Read
-0x95 Node Identification
-
diff --git a/libs/thirdParty/libxbee/pdf/api.c.pdf b/libs/thirdParty/libxbee/pdf/api.c.pdf
deleted file mode 100644
index dc8c75af3cb7130fa8716de8a733fd3a3fe13ba3..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/pdf/api.c.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/pdf/api.h.pdf b/libs/thirdParty/libxbee/pdf/api.h.pdf
deleted file mode 100644
index 43d99a493e1864ab981612be1960ae6e71117f56..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/pdf/api.h.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/pdf/main.c.pdf b/libs/thirdParty/libxbee/pdf/main.c.pdf
deleted file mode 100644
index 4410e6b8e4d9f3a95779694316ce6943da6202e7..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/pdf/main.c.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/pdf/xbee.h.pdf b/libs/thirdParty/libxbee/pdf/xbee.h.pdf
deleted file mode 100644
index a4ee0d754dea35167f2c622db520a173d2fcd0e6..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/pdf/xbee.h.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/sample/README b/libs/thirdParty/libxbee/sample/README
deleted file mode 100644
index 3610d034694527c4111e1e8a08652f882ff26b74..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/README
+++ /dev/null
@@ -1,12 +0,0 @@
-To use these samples, you must first install libxbee.
-To install, simply type `make install` and provide the root password.
-
-If you cannot install the library for any reason, follow these instructions:
- http://code.google.com/p/libxbee/wiki/install_libxbee#But_I_can't_install_it!
-
-The compile line can be found at the top of the source files, surrounded by #ifdef
-and #endif. These allow us to run the source file as a shell script. Simply type
-`sh simple.c` to compile the simple sample.
-If you do not have the library installed, you must edit the compile line, or type
-it by hand.
- gcc .c ../obj/api.o -o -lpthread -lrt
diff --git a/libs/thirdParty/libxbee/sample/analog.c b/libs/thirdParty/libxbee/sample/analog.c
deleted file mode 100644
index 84069e39a25e3be537c8c94c45b5e55e947147b8..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/analog.c
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will output the voltage read from analog 0 */
-
-#include
-#include
-#include
-
-/* set this to the voltage measured between GND and Vref - 3.3 is a good place to start */
-#define Vref 3.3
-
-int main(int argc, char *argv[]) {
- xbee_con *con;
- xbee_pkt *pkt;
- int i;
-
- /* setup libxbee */
- if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
- return 1;
- }
-
- /* get a connection to the remote XBee */
- con = xbee_newcon('I',xbee_64bitIO, 0x13A200, 0x403CB26A);
- /* do this forever! */
- while (1) {
- /* get as many packets as we can */
- while ((pkt = xbee_getpacket(con)) != NULL) {
- for (i = 0; i < pkt->samples; i++) {
- /* did we get a value for A0? */
- if (!xbee_hasanalog(pkt,i,0)) {
- /* there was no data for A0 in the packet */
- printf("A0: -- No Data --\n");
- continue;
- }
- /* print out the reading in raw, and adjusted */
- printf("A0: %.0f (~%.2fv)\n",
- xbee_getanalog(pkt,i,0,0),
- xbee_getanalog(pkt,i,0,Vref));
- fflush(stdout);
- }
- /* release the packet */
- free(pkt);
- }
- usleep(100);
- }
-
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/api.c b/libs/thirdParty/libxbee/sample/api.c
deleted file mode 100644
index cff70bf1ae9e643b220520753e7cf8493440ac81..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/api.c
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee -g
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will show you how to seup the xbee and ensure that it is in API mode */
-
-#include
-#include
-#include
-
-int main(int argc, char *argv[]) {
- /* the extra arguments are the CC ('+' by default) and GT (1000) by default AT values */
- xbee_setuplogAPI("/dev/ttyUSB0",57600,2,'+',1000);
-
- /* now we can do our stuff! */
- sleep(10);
-
- /* calling xbee_end() will return the xbee to its previous API mode */
- xbee_end();
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/atis.c b/libs/thirdParty/libxbee/sample/atis.c
deleted file mode 100644
index 66946f184820cf3216089c8d8ffe2a6445523d4d..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/atis.c
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will output the voltage read from analog 0 */
-
-#include
-#include
-#include
-
-/* set this to the voltage measured between GND and Vref - 3.3 is a good place to start */
-#define Vref 3.3
-
-int main(int argc, char *argv[]) {
- xbee_con *con;
- xbee_pkt *pkt;
-
- /* setup libxbee */
- if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
- printf("xbee_setup failed...\n");
- return 1;
- }
-
- /* create an AT connection */
- con = xbee_newcon('I',xbee_64bitRemoteAT,0x13A200,0x403CB26A);
-
- /* do this forever! */
- for (;;) {
- /* request samples now! */
- xbee_senddata(con,"IS");
- /* get as many packets as we can */
- while ((pkt = xbee_getpacketwait(con)) != NULL) {
- if (pkt) {
- if (pkt->status != 0x00) {
- /* if the return status was not 0x00 (OK) then the request failed... */
- printf("Sample A0: -- Request Failed --\n");
- } else {
- if (!xbee_hasanalog(pkt,0,0)) {
- /* there was no data for A0 in the packet */
- printf("Sample A0: -- No Data --\n");
- } else {
- /* it appears that there is sample data for A0! */
- printf("Sample A0: %.0f (~%.2fv)\n",
- xbee_getanalog(pkt,0,0,0),
- xbee_getanalog(pkt,0,0,Vref));
- }
- }
- /* dont forget to free the packet! */
- free(pkt);
- } else {
- /* couldnt get a packet */
- printf("Sample A0: -- No Packet Returned --\n");
- }
- }
- /* wait a second for the next sample */
- sleep(1);
- }
-
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/atsetup.c b/libs/thirdParty/libxbee/sample/atsetup.c
deleted file mode 100644
index 13afbe4169882f94c6de568370c0de3e6a7f3741..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/atsetup.c
+++ /dev/null
@@ -1,157 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will setup certain AT parameters of the local XBee unit */
-
-#include
-#include
-#include
-#include
-
-/* con = connection to use
- cmd = 2 character command string, eg NI
- parameter = NULL - no parameter
- !NULL - command parameter, either NULL terminated string, or block of memory
- length = 0 - use parameter as NULL terminated string
- !0 - use 'length' bytes from parameter
- ret = NULL - don't return anything
- !NULL - pointer to pointer. doAT will allocate memory, you must free it!
- str = return data pointer
-
- returns the length of the data in ret, or -ve for error */
-int doAT(xbee_con *con, char *cmd, char *parameter, int length, unsigned char **ret) {
- xbee_pkt *pkt;
- if (con->type != xbee_localAT && con->type != xbee_16bitRemoteAT && con->type != xbee_64bitRemoteAT) {
- printf("Thats not an AT connection!...\n");
- return -1;
- }
- if (strlen(cmd) != 2) {
- printf("Invalid command: \"%s\"\n",cmd);
- return -2;
- }
- if (parameter == NULL) {
- xbee_senddata(con,"%s",cmd);
- } else if (length != 0) {
- char *tmp;
- if ((tmp = malloc(1024)) == NULL) {
- printf("Failed to get memory!\n");
- return -3;
- }
- snprintf(tmp,1024,"%s",cmd);
- memcpy(&(tmp[2]),parameter,(length>1022)?1022:length);
- xbee_nsenddata(con,tmp,length+2);
- free(tmp);
- } else {
- xbee_senddata(con,"%s%s",cmd,parameter);
- }
- pkt = xbee_getpacketwait(con);
- if (pkt == NULL) {
- printf("Failed to set %s!\n",cmd);
- return -4;
- }
- if (pkt->status != 0) {
- printf("An error occured while setting %s!\n",cmd);
- return -5;
- }
- if (ret && pkt->datalen > 0) {
- *ret = realloc(*ret,sizeof(char) * (pkt->datalen + 1));
- memcpy(*ret,pkt->data,pkt->datalen);
- (*ret)[pkt->datalen] = '\0';
- free(pkt);
- return pkt->datalen;
- }
- free(pkt);
- return 0;
-}
-
-int main(int argc, char *argv[]) {
- xbee_con *con;
- int ret,i;
- unsigned char *str = NULL;
-
- if (argc != 2) {
- printf("Usage: %s \n",argv[0]);
- return 1;
- }
-
- /* setup libxbee */
- if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
- printf("xbee_setup failed...\n");
- return 1;
- }
-
- /* create an AT connection */
- con = xbee_newcon('I',xbee_localAT);
- /*con = xbee_newcon('I',xbee_64bitRemoteAT,0x13A200,0x403CB26A);*/
-
-
- /* get the node's address! */
- if ((ret = doAT(con,"SH",NULL,0,&str)) < 0) return 1;
- if (ret == 4) {
- printf("SH: 0x%02X%02X%02X%02X\n", str[0], str[1], str[2], str[3]);
- }
- if ((ret = doAT(con,"SL",NULL,0,&str)) < 0) return 1;
- if (ret == 4) {
- printf("SL: 0x%02X%02X%02X%02X\n", str[0], str[1], str[2], str[3]);
- }
-
- /* set the power level - 2 methods, i prefer the first but it generates compile warnings :( */
- /*if ((ret = doAT(con,"PL",&((unsigned char[]){4}),1,&str)) < 0) return 1;*/
- /*{
- char t[] = {0};
- if ((ret = doAT(con,"PL",t,1,&str)) < 0) return 1;
- }*/
-
- /* get the power level */
- if ((ret = doAT(con,"PL",NULL,0,&str)) < 0) return 1;
- if (ret == 1) {
- printf("PL: 0x%02X\n", str[0]);
- }
-
- /* get NI */
- if ((ret = doAT(con,"NI",NULL,0,&str)) < 0) return 1;
- if (ret > 0) {
- printf("NI: ");
- for (i = 0; i < ret; i++) {
- printf("%c",(str[i]>=32 && str[i]<=126)?str[i]:'.');
- }
- printf("\n");
- }
-
- printf("Setting NI to '%s': ",(argc!=2)?"MyNode":argv[1]);
- if ((ret = doAT(con,"NI",(argc!=2)?"MyNode":argv[1],0,NULL)) < 0) return 1;
- printf("OK\n");
-
- if ((ret = doAT(con,"NI",NULL,0,&str)) < 0) return 1;
- if (ret > 0) {
- printf("NI: ");
- for (i = 0; i < ret; i++) {
- printf("%c",(str[i]>=32 && str[i]<=126)?str[i]:'.');
- }
- printf("\n");
- }
-
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/callback.c b/libs/thirdParty/libxbee/sample/callback.c
deleted file mode 100644
index 9e48276b0fcba221e7f294ae07d53822314bd768..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/callback.c
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will return any recieved data, using a callback function */
-
-#include
-#include
-#include
-#include
-
-void sighandler(int sig) {
- xbee_pkt *pkt;
- if (sig == SIGINT) {
- xbee_end();
- exit(0);
- }
-}
-
-void callback(xbee_con *con, xbee_pkt *pkt) {
- int ret;
- /* print the recieved data */
- printf("Rx: %s\n",pkt->data);
- /* say thank you */
- if ((ret = xbee_senddata(con,"%s",pkt->data)) != 0) {
- printf("xbee_senddata: Error %d... Retrying!\n",ret);
- if ((ret = xbee_senddata(con,"%s",pkt->data)) != 0) {
- printf("xbee_senddata: Error %d... Data lost!\n",ret);
- } else {
- printf("xbee_senddata: Success after retry!\n",ret);
- }
- }
-free(pkt);
-}
-
-int main(int argc, char *argv[]) {
- xbee_con *con;
- xbee_pkt *pkt, *rpkt;
-
- /* setup the xbee */
- //if (xbee_setupAPI("/dev/ttyUSB0",57600,'+',250) == -1) {
- //if (xbee_setuplogAPI("/dev/ttyUSB0",57600,2,'+',250) == -1) {
- if (xbee_setuplog("/dev/ttyUSB0",57600,2) == -1) {
- /* oh no... it failed */
- printf("xbee_setup() failed...\n");
- exit(1);
- }
-
- /* handle ^C */
- signal(SIGINT, sighandler);
-
- /* setup a connection */
- con = xbee_newcon('I',xbee_64bitData, 0x0013A200, 0x40081826);
- con->waitforACK = 1;
- con->callback = callback;
-
- printf("Waiting...\n");
-
- /* do nothing forever! */
- for (;;) {
- sleep(86400); /* 24hrs */
- }
-
- /* shouldn't ever get here but... */
- return 0;
-}
-
diff --git a/libs/thirdParty/libxbee/sample/digital.c b/libs/thirdParty/libxbee/sample/digital.c
deleted file mode 100644
index 4b0c9f63310654ae56cdd006b8d443c359b2e505..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/digital.c
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee -g
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will control digital output pins of a chosen node */
-
-#include
-#include
-#include
-#include
-
-int mode;
-char bitmask;
-char outputs;
-
-void sighandler(int sig) {
- if (sig == SIGINT) {
- xbee_end();
- exit(0);
- }
-}
-
-void doneCB(xbee_con *con, xbee_pkt *pkt) {
- /* this packet should be confirmation... */
- xbee_end();
- exit(0);
-}
-void doCB(xbee_con *con, xbee_pkt *pkt) {
- int i,m;
- outputs = pkt->IOdata[0].IOdigital;
- printf("\n 7 6 5 4 3 2 1 0\n");
- printf("Current output state: ");
- for (i = 0; i < 8; i++) {
- if (xbee_hasdigital(pkt,0,7-i)) {
- if (xbee_getdigital(pkt,0,7-i)) {
- printf(" 1");
- } else {
- printf(" 0");
- }
- } else {
- printf(" x");
- }
- }
- printf("\n");
- switch (mode) {
- case 0: outputs |= bitmask; break;
- case 1: outputs &= ~bitmask; break;
- case 2: default:
- xbee_end();
- exit(0);
- }
- m = outputs;
- printf("New output state: ");
- for (i = 0; i < 8; i++) {
- if (xbee_hasdigital(pkt,0,7-i)) {
- if (m & 0x80) {
- printf(" 1");
- } else {
- printf(" 0");
- }
- } else {
- printf(" x");
- }
- m <<= 1;
- }
- printf("\n\n");
- con->callback = doneCB;
- xbee_senddata(con,"IO%c",outputs);
-}
-
-void usage(char *argv0) {
- printf("Usage: %s \n",argv0);
- printf("Usage: %s [port[0-7]]...\n",argv0);
- exit(1);
-}
-int main(int argc, char *argv[]) {
- xbee_con *con;
-
- if (argc < 2) usage(argv[0]);
-
- if (!strcasecmp(argv[1],"on")) {
- mode = 0;
- } else if (!strcasecmp(argv[1],"off")) {
- mode = 1;
- } else if (!strcasecmp(argv[1],"query")) {
- mode = 2;
- } else usage(argv[0]);
-
- if (mode != 2) {
- int i;
- char *c;
- bitmask = 0;
- c = argv[2];
- while (*c != '\0') {
- *c -= '0';
- if ((*c >= 0) && (*c <= 7)) {
- bitmask |= 0x01 << *c;
- } else {
- usage(argv[0]);
- }
- c++;
- }
- }
-
- /* setup libxbee */
- if (xbee_setupAPI("/dev/ttyUSB0",57600,'+',250) == -1) {
- return 1;
- }
-
- /* handle ^C */
- signal(SIGINT, sighandler);
-
- /* get a connection to the remote XBee */
- con = xbee_newcon('I',xbee_64bitRemoteAT, 0x0013A200, 0x403CB26B);
- con->waitforACK = 1;
- con->callback = doCB;
-
- xbee_senddata(con,"IS");
-
- /* timeout after 1 second... */
- sleep(1);
-
- xbee_end();
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/digitalout.c b/libs/thirdParty/libxbee/sample/digitalout.c
deleted file mode 100644
index 46db084f1381fba9c34d0ebaadfdbc6905748d19..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/digitalout.c
+++ /dev/null
@@ -1,128 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will control the digital 0 output from the keyboard. Type:
- 0, - off
- 1, - on
- q, - quit */
-
-#include
-#include
-#include
-
-#include
-
-int main(int argc,char *argv[]) {
- xbee_con *con;
- xbee_pkt *pkt;
-
- printf("Hello\n");
-
- if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
- printf("failed to setup xbee\n");
- return 1;
- }
-
- con = xbee_newcon('R',xbee_64bitRemoteAT,0x0013a200,0x403af247);
- if (!con) {
- printf("no connection returned\n");
- return 1;
- }
-
- for (;;) {
-
- xbee_senddata(con,"D0");
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("no packet returned from state probe\n");
- return 1;
- }
-
- if (pkt->status != 0) {
- printf("state probe failed (ret=0x%02X - ",pkt->status);
- switch (pkt->status) {
- case 0x1: printf("Error"); break;
- case 0x2: printf("Invalid Command"); break;
- case 0x3: printf("Invalid Parameter"); break;
- case 0x4: printf("No Response"); break;
- default: printf("Unknown"); break;
- }
- printf(")\n");
- return 1;
- }
-
- if (pkt->datalen != 1) {
- printf("unexpected datalen from state probe\n");
- return 1;
- }
-
- if (pkt->data[0] == 0x05) {
- printf("this port is currently ON\n");
- } else if (pkt->data[0] == 0x04) {
- printf("this port is currently OFF\n");
- } else {
- printf("this port is currently in an unknown state\n");
- return 1;
- }
- free(pkt);
- pkt = NULL;
-
- recharprompt:
- printf("--> ");
- rechar:
- switch(getchar()) {
- case 'q': case 'Q':
- printf("byebye\n");
- return 0;
- case '0':
- printf("turning off...\n");
- xbee_senddata(con,"D0%c",0x04);
- break;
- case '1':
- printf("turning on...\n");
- xbee_senddata(con,"D0%c",0x05);
- break;
- case '\n': goto rechar;
- default: goto recharprompt;
- }
-
- if ((pkt = xbee_getpacketwait(con)) != NULL) {
- if (pkt->status != 0) {
- printf("state set failed (ret=0x%02X - ",pkt->status);
- switch (pkt->status) {
- case 0x1: printf("Error"); break;
- case 0x2: printf("Invalid Command"); break;
- case 0x3: printf("Invalid Parameter"); break;
- case 0x4: printf("No Response"); break;
- default: printf("Unknown"); break;
- }
- printf(")\n");
- return 1;
- }
- }
-
- }
-
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/multi.c b/libs/thirdParty/libxbee/sample/multi.c
deleted file mode 100644
index 107f88f6e9b7a570e293e50edf47e63016afc4be..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/multi.c
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee -g
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will make use of multiple instances of libxbee and send messages between the attached XBees */
-
-#include
-#include
-#include
-#include
-
-int mode;
-char bitmask;
-char outputs;
-
-xbee_hnd xbee1;
-xbee_hnd xbee2;
-
-void sighandler(int sig) {
- if (sig == SIGINT) {
- _xbee_end(xbee1);
- _xbee_end(xbee2);
- exit(0);
- }
-}
-
-void xbee1CB(xbee_con *con, xbee_pkt *pkt) {
- char data[128];
- snprintf(data,pkt->datalen+1,"%s",pkt->data);
- printf("XBee1: Rx[%3d]: %s\n",pkt->datalen,data);
-}
-
-void xbee2CB(xbee_con *con, xbee_pkt *pkt) {
- char data[128];
- snprintf(data,pkt->datalen+1,"%s",pkt->data);
- printf("XBee2: Rx[%3d]: %s\n",pkt->datalen,data);
-}
-
-int main(int argc, char *argv[]) {
- xbee_con *con1;
- xbee_con *con2;
-
- if (!(xbee1 = _xbee_setuplogAPI("/dev/ttyUSB0",57600,3,'+',250))) {
- //if (!(xbee1 = _xbee_setupAPI("/dev/ttyUSB0",57600,'+',250))) {
- printf("xbee1: setup error...\n");
- return 1;
- }
- if (!(xbee2 = _xbee_setuplogAPI("/dev/ttyUSB1",57600,4,'+',250))) {
- //if (!(xbee2 = _xbee_setupAPI("/dev/ttyUSB1",57600,'+',250))) {
- printf("xbee2: setup error...\n");
- return 1;
- }
-
- /* handle ^C */
- signal(SIGINT, sighandler);
-
- con1 = _xbee_newcon(xbee1,'1',xbee_64bitData, 0x0013A200, 0x40081826);
- con1->waitforACK = 1;
- con1->callback = xbee1CB;
-
- con2 = _xbee_newcon(xbee2,'2',xbee_64bitData, 0x0013A200, 0x404B75DE);
- con2->waitforACK = 1;
- con2->callback = xbee2CB;
-
- while (1) {
- printf("xbee1: Tx\n");
- _xbee_logit(xbee1,"xbee1: Tx");
- _xbee_logit(xbee2,"xbee1: Tx");
- _xbee_senddata(xbee1,con1,"Hello");
- usleep(1000000);
- printf("xbee2: Tx\n");
- _xbee_logit(xbee1,"xbee2: Tx");
- _xbee_logit(xbee2,"xbee2: Tx");
- _xbee_senddata(xbee2,con2,"Hi There!");
- usleep(1000000);
- }
-
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/scan.c b/libs/thirdParty/libxbee/sample/scan.c
deleted file mode 100644
index 4546887f9e541782a5b512213ffe72860185f359..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/scan.c
+++ /dev/null
@@ -1,144 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will scan the currently configured channel for all nodes,
- returning the values of a few useful settings */
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define MAXNODES 100
-
-int main(int argc, char *argv[]) {
- int i;
- int saidfull = 0;
- int ATNT = 0x19; /* node discover timeout */
- int ATNTc; /* counter */
-
- int nodes = 0;
- char addrs[MAXNODES][8];
-
- xbee_con *con;
- xbee_pkt *pkt, *rpkt;
-
- time_t ttime;
- char stime[32];
-
- /* setup libxbee */
- if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
- return 1;
- }
-
- /* grab a local AT connection */
- con = xbee_newcon('I',xbee_localAT);
-
- /* get the ND timeout */
- xbee_senddata(con,"NT");
- if ((rpkt = xbee_getpacketwait(con)) == NULL) {
- printf("XBee didnt return a result for NT\n");
- return 1;
- }
- ATNT = rpkt->data[0];
- free(rpkt);
-
- while (1) {
- /* send a ND - Node Discover request */
- xbee_senddata(con,"ND");
- /* only wait for a bit longer than the ND timeout */
- ATNTc = ATNT + 10;
- /* loop until the end packet has been received or timeout reached */
- while (ATNTc--) {
- /* get a packet */
- pkt = xbee_getpacketwait(con);
- /* check a packet was returned, and that its one we are after... */
- if (pkt && !memcmp(pkt->atCmd,"ND",2)) {
- /* is this the end packet? you can tell from the 0 datalen */
- if (pkt->datalen == 0) {
- /* free the packet */
- free(pkt);
- break;
- } else {
- /* check if we know this node already */
- for (i = 0; i < nodes; i++) {
- /* the 64bit address will match one in the list */
- if (!memcmp(&(pkt->data[2]),&(addrs[i]),8)) break;
- }
- ttime = time(NULL);
- strftime(stime,32,"%I:%M:%S %p",gmtime(&ttime));
- /* is there space for another? */
- if ((i == nodes) &&
- (nodes == MAXNODES) &&
- (!saidfull)) {
- printf("MAXNODES reached... Can't add more...\r");
- /* flush so the change is seen! */
- fflush(stdout);
- saidfull = 1;
- } else {
- /* is this a rewrite? */
- if (i != nodes) {
- /* find the line to edit */
- printf("%c[%dA",27,nodes-i);
- /* clear the line */
- printf("%c[2K",27);
- }
- /* write out the info */
- memcpy(&(addrs[nodes]),&(pkt->data[2]),8);
- printf("MY: 0x%02X%02X ",pkt->data[0],pkt->data[1]);
- printf("SH: 0x%02X%02X%02X%02X ",pkt->data[2],pkt->data[3],pkt->data[4],pkt->data[5]);
- printf("SL: 0x%02X%02X%02X%02X ",pkt->data[6],pkt->data[7],pkt->data[8],pkt->data[9]);
- printf("dB: -%2d ",pkt->data[10]);
- printf("NI: %-20s ",&(pkt->data[11]));
- printf("@: %s",stime);
- /* is this a rewrite? */
- if (i != nodes) {
- /* go back the the bottom */
- printf("%c[%dB\r",27,nodes-i);
- } else {
- /* new line is only wanted for new nodes */
- printf("\n");
- /* if not, then add 1 to the number of nodes! */
- nodes++;
- }
- }
- /* flush so the change is seen! */
- fflush(stdout);
- }
- /* free the packet */
- free(pkt);
- }
- /* sleep for 100ms (same as NT steps) */
- usleep(100000);
- }
- /* try again! */
- usleep(100000);
- }
-
- return 0;
-}
-
diff --git a/libs/thirdParty/libxbee/sample/scan_adv.c b/libs/thirdParty/libxbee/sample/scan_adv.c
deleted file mode 100644
index d3360222cc690f23d6032b6919072ec7377a1664..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/scan_adv.c
+++ /dev/null
@@ -1,589 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will scan all possible channels for remote nodes and return
- the value of a few useful settings */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define MAXNODES 100
-
-int ATCH = 0x0C; /* origional channel number */
-int ATNT = 0x19; /* node discover timeout */
-int ATNTc; /* node discover timeout counter */
-int BREAK = 0;
-xbee_con *con;
-
-void sighandler(int sig) {
- xbee_pkt *pkt;
- if (sig == SIGINT) {
- BREAK = 1;
- /* wait for the rest of the timeout... */
- printf("\r%c[2KWaiting for node discover command to timeout...",27);
- fflush(stdout);
- for (; ATNTc; ATNTc--) {
- usleep(100000);
- }
- /* Restore the XBee's channel setting */
- printf("\r%c[2KRestoring channel to 0x%02X...",27,ATCH);
- fflush(stdout);
- if (xbee_senddata(con,"CH%c",ATCH)) {
- printf("xbee_senddata: Error\n");
- exit(1);
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\r%c[2K*** XBee didnt return a result for CH... ***\nPlease manually reset your channel to 0x%02X\n",27,ATCH);
- }
- if (pkt->status) {
- printf("\r%c[2K*** An error occured while restoring the channel setting... ***\nPlease manually reset your channel to 0x%02X\n",27,ATCH);
- } else {
- printf("\nDone!\n");
- }
- free(pkt);
- /* Restore the terminal */
- printf("%c[?25h%c[0m",27,27);
- fflush(stdout);
- exit(0);
- }
-}
-
-int main(int argc, char *argv[]) {
- int i;
- int saidfull = 0;
- int ATCHc; /* current channel number */
- int XBeePro = 0; /* XBee pro? */
-
- int nodes = 0;
- unsigned char addrs[MAXNODES][19]; /* 0-7 : 64 bit address
- 8 : channel
- 9-10 : id
- 11 : baud
- 12 : API
- 13-14: HV
- 15-16: VR
- 17 : CC
- 18 : mask - not address */
-
- xbee_pkt *pkt, *rpkt;
-
- time_t ttime;
- char stime[32];
-
- /* handle ^C */
- signal(SIGINT, sighandler);
-
- /* setup libxbee */
- if (xbee_setupAPI("/dev/ttyUSB0",57600,'+',250) == -1) {
- return 1;
- }
-
- /* grab a local AT connection */
- con = xbee_newcon('I',xbee_localAT);
-
- /* get the current channel */
- if (xbee_senddata(con,"CH")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("XBee didnt return a result for CH\n");
- return 1;
- }
- ATCH = pkt->data[0];
- free(pkt);
-
- /* XBee - 0x0B - 0x1A
- XBee Pro - 0x0C - 0x17 */
- if (xbee_senddata(con,"CH%c",0x0B)) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("XBee didnt return a result for CH\n");
- return 1;
- }
- /* did that fail? */
- if (pkt->status == 0) {
- /* nope.. its not a pro */
- printf("Using XBee (not Pro) channels (0x0B - 0x1A)...\n");
- XBeePro = 0;
- ATCHc = 0x0B;
- } else {
- /* yup... its a pro */
- printf("Using XBee Pro channels (0x0C - 0x17)...\n");
- XBeePro = 1;
- ATCHc = 0x0C;
- }
- free(pkt);
-
- /* find and print data for the local node */
- printf("\n%c[31mCH:%c[32m 0x%02X ",27,27,ATCH);
- if (xbee_senddata(con,"ID")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for ID\n");
- return 1;
- }
- printf("%c[31mID:%c[32m 0x%02X%02X ",27,27,pkt->data[0],pkt->data[1]);
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"MY")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for MY\n");
- return 1;
- }
- printf("%c[31mMY:%c[32m 0x%02X%02X ",27,27,pkt->data[0],pkt->data[1]);
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"SH")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for SH\n");
- return 1;
- }
- printf("%c[31mSH:%c[32m 0x%02X%02X%02X%02X ",27,27,pkt->data[0],pkt->data[1],pkt->data[2],pkt->data[3]);
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"SL")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for SL\n");
- return 1;
- }
- printf("%c[31mSL:%c[32m 0x%02X%02X%02X%02X ",27,27,pkt->data[0],pkt->data[1],pkt->data[2],pkt->data[3]);
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"BD")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for BD\n");
- return 1;
- }
- printf("%c[31mBD:%c[32m ",27,27);
- /* print the baud rate */
- switch (pkt->data[3]) {
- case 0: printf(" 1200"); break;
- case 1: printf(" 2400"); break;
- case 2: printf(" 4800"); break;
- case 3: printf(" 9600"); break;
- case 4: printf(" 19200"); break;
- case 5: printf(" 38400"); break;
- case 6: printf(" 57600"); break;
- case 7: printf("115200"); break;
- default: printf(" other"); break;
- }
- printf(" ");
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"AP")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for AP\n");
- return 1;
- }
- printf("%c[31mAP:%c[32m 0x%02X ",27,27,pkt->data[0]);
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"HV")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for HV\n");
- return 1;
- }
- printf("%c[31mHV:%c[32m 0x%02X%02X ",27,27,pkt->data[0],pkt->data[1]);
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"VR")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for VR\n");
- return 1;
- }
- printf("%c[31mVR:%c[32m 0x%02X%02X ",27,27,pkt->data[0],pkt->data[1]);
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"CC")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for CC\n");
- return 1;
- }
- printf("%c[31mCC:%c[32m '%c' (0x%02X) ",27,27,pkt->data[0],pkt->data[0]);
- free(pkt);
- /* ### */
- if (xbee_senddata(con,"NI")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("\nXBee didnt return a result for NI\n");
- return 1;
- }
- printf("%c[31mNI:%c[32m %-20s ",27,27,pkt->data);
- free(pkt);
- /* ### */
- printf("%c[95m* This is the lobal XBee *",27);
-
- printf("%c[34m\n---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------%c[0m\n\n",27,27);
-
- /* get the ND timeout */
- if (xbee_senddata(con,"NT")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if ((pkt = xbee_getpacketwait(con)) == NULL) {
- printf("XBee didnt return a result for NT\n");
- return 1;
- }
- ATNT = pkt->data[0];
- free(pkt);
-
- printf("%c[?25l",27);
- fflush(stdout);
-
- usleep(100000);
-
- while (!BREAK) {
- /* set the channel to scan */
- if (xbee_senddata(con,"CH%c",ATCHc)) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- pkt = xbee_getpacketwait(con);
- if (!pkt || pkt->status) {
- printf("\nXBee didnt return a result for CH\n");
- return 1;
- }
- free(pkt);
- printf("%c[2KScanning channel 0x%02X...\r",27,ATCHc);
- fflush(stdout);
- /* send a ND - Node Discover request */
- if (!xbee_senddata(con,"ND")) {
- /* only wait for a bit longer than the ND timeout */
- ATNTc = ATNT + 10;
- /* loop until the end packet has been received or timeout reached */
- while (!BREAK && ATNTc--) {
- /* get a packet */
- pkt = xbee_getpacket(con);
- /* check a packet was returned, and that its one we are after... */
- if (pkt && !memcmp(pkt->atCmd,"ND",2)) {
- /* is this the end packet? you can tell from the 0 datalen */
- if (pkt->datalen == 0) {
- /* free the packet */
- free(pkt);
- break;
- } else {
- /* check if we know this node already */
- for (i = 0; i < nodes; i++) {
- /* the 64bit address will match one in the list */
- if (!memcmp(&(pkt->data[2]),&(addrs[i][0]),8)) break;
- }
- ttime = time(NULL);
- strftime(stime,32,"%I:%M:%S %p",gmtime(&ttime));
- /* is there space for another? */
- if ((i == nodes) &&
- (nodes == MAXNODES) &&
- (!saidfull)) {
- printf("%c[2KMAXNODES reached... Can't add more...\r",27);
- /* flush so the change is seen! */
- fflush(stdout);
- saidfull = 1;
- } else {
- /* is this a rewrite? */
- if (i != nodes) {
- /* find the line to edit */
- printf("%c[%dA",27,nodes-i+1);
- /* clear the line */
- printf("%c[2K",27);
- } else {
- /* fill the blank line */
- printf("%c[%dA",27,1);
- }
- /* save the channel */
- addrs[i][8] = ATCHc;
- /* write out the info */
- printf("%c[31mCH:%c[32m 0x%02X ",27,27,ATCHc);
- printf("%c[31mID:%c[32m 0x",27,27);
- if (i == nodes || !(addrs[i][18] & 0x80)) {
- printf("....");
- } else {
- printf("%02X%02X",addrs[i][9],addrs[i][10]);
- }
- printf(" ");
- printf("%c[31mMY:%c[32m 0x%02X%02X ",27,27,pkt->data[0],pkt->data[1]);
- printf("%c[31mSH:%c[32m 0x%02X%02X%02X%02X ",27,27,pkt->data[2],pkt->data[3],pkt->data[4],pkt->data[5]);
- printf("%c[31mSL:%c[32m 0x%02X%02X%02X%02X ",27,27,pkt->data[6],pkt->data[7],pkt->data[8],pkt->data[9]);
- printf("%c[31mBD:%c[32m ",27,27);
- if (i == nodes || !(addrs[i][18] & 0x40)) {
- printf("......");
- } else {
- switch (addrs[i][11]) {
- case 0: printf(" 1200"); break;
- case 1: printf(" 2400"); break;
- case 2: printf(" 4800"); break;
- case 3: printf(" 9600"); break;
- case 4: printf(" 19200"); break;
- case 5: printf(" 38400"); break;
- case 6: printf(" 57600"); break;
- case 7: printf("115200"); break;
- default: printf(" other"); break;
- }
- }
- printf(" ");
- printf("%c[31mAP:%c[32m 0x",27,27);
- if (i == nodes || !(addrs[i][18] & 0x20)) {
- printf("..");
- } else {
- printf("%02X",addrs[i][12]);
- }
- printf(" ");
- printf("%c[31mHV:%c[32m 0x",27,27);
- if (i == nodes || !(addrs[i][18] & 0x10)) {
- printf("....");
- } else {
- printf("%02X%02X",addrs[i][13],addrs[i][14]);
- }
- printf(" ");
- printf("%c[31mVR:%c[32m 0x",27,27);
- if (i == nodes || !(addrs[i][18] & 0x08)) {
- printf("....");
- } else {
- printf("%02X%02X",addrs[i][15],addrs[i][16]);
- }
- printf(" ");
- printf("%c[31mCC:%c[32m ",27,27);
- if (i == nodes || !(addrs[i][18] & 0x04)) {
- printf(" . (0x..)");
- } else {
- printf("'%c' (0x%02X)",addrs[i][17],addrs[i][17]);
- }
- printf(" ");
- printf("%c[31mNI:%c[32m %-20s ",27,27,&(pkt->data[11]));
- printf("%c[31mdB:%c[32m -%2d ",27,27,pkt->data[10]);
- printf("%c[31m@:%c[32m %s",27,27,stime);
- /* is this a rewrite? */
- if (i != nodes) {
- /* go back the the bottom */
- printf("%c[%dB\r",27,nodes-i+1);
- } else {
- /* if its new... save the address */
- memcpy(&(addrs[nodes][0]),&(pkt->data[2]),8);
- /* turn off all the flags */
- addrs[nodes][18] = 0;
- /* new line is only wanted for new nodes */
- printf("\n%c[2K\n%c[0m",27,27);
- /* if not, then add 1 to the number of nodes! */
- nodes++;
- }
- printf("%c[0m%c[2KScanning channel 0x%02X...\r",27,27,ATCHc);
- fflush(stdout);
- }
- /* flush so the change is seen! */
- fflush(stdout);
- }
- /* free the packet */
- free(pkt);
- }
- /* sleep for 100ms (same as NT steps */
- usleep(100000);
- }
- }
- fflush(stdout);
- /* check for all nodes on this channel, and get thier pan id */
- for (i = 0; i < nodes; i++) {
- int first = 1;
- if (addrs[i][8] == ATCHc) {
- xbee_con *tcon;
- unsigned int dh,dl;
- if (first) {
- printf("%c[2KGathering settings for nodes on channel 0x%02X...\r",27,ATCHc);
- first = 0;
- }
- /* get the address, and turn it the right way up! */
- memcpy(&dh,&(addrs[i][0]),4);
- dh = ((dh & 0xFF) << 24) | ((dh & 0xFF00) << 8) | ((dh & 0xFF0000) >> 8) | ((dh & 0xFF000000) >> 24);
- memcpy(&dl,&(addrs[i][4]),4);
- dl = ((dl & 0xFF) << 24) | ((dl & 0xFF00) << 8) | ((dl & 0xFF0000) >> 8) | ((dl & 0xFF000000) >> 24);
- /* setup a connection the the remote node */
- if ((tcon = xbee_newcon('I',xbee_64bitRemoteAT,dh,dl)) != NULL) {
- /* find the line to edit */
- printf("\r%c[%dA",27,nodes-i+1);
-
- /* in this case we dont care if we dont get a response packet... */
- if (xbee_senddata(tcon,"ID")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if (((rpkt = xbee_getpacketwait(tcon)) != NULL) && (rpkt->status == 0)) {
- /* move over the ID column */
- printf("\r%c[18C",27);
- /* print the ID */
- printf("%c[32m%02X%02X%c[0m",27,rpkt->data[0],rpkt->data[1],27);
- addrs[i][9] = rpkt->data[0];
- addrs[i][10] = rpkt->data[1];
- /* turn on the flag */
- addrs[i][18] |= 0x80;
- free(rpkt);
- }
-
- /* in this case we dont care if we dont get a response packet... */
- if (xbee_senddata(tcon,"BD")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if (((rpkt = xbee_getpacketwait(tcon)) != NULL) && (rpkt->status == 0)) {
- /* move over the BD column */
- printf("\r%c[80C",27);
- if ((rpkt->data[0] != 0x00) || (rpkt->data[1] != 0x00) || (rpkt->data[2] != 0x00) || ((rpkt->data[3] & 0xF8) != 0x00)) {
- addrs[i][11] = 8;
- } else {
- addrs[i][11] = rpkt->data[3];
- }
- /* turn on the flag */
- addrs[i][18] |= 0x40;
- /* print the baud rate */
- printf("%c[32m",27);
- switch (addrs[i][11]) {
- case 0: printf(" 1200"); break;
- case 1: printf(" 2400"); break;
- case 2: printf(" 4800"); break;
- case 3: printf(" 9600"); break;
- case 4: printf(" 19200"); break;
- case 5: printf(" 38400"); break;
- case 6: printf(" 57600"); break;
- case 7: printf("115200"); break;
- default: printf(" other"); break;
- }
- printf("%c[0m",27);
- free(rpkt);
- }
- /* in this case we dont care if we dont get a response packet... */
- if (xbee_senddata(tcon,"AP")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if (((rpkt = xbee_getpacketwait(tcon)) != NULL) && (rpkt->status == 0)) {
- /* move over the AP column */
- printf("\r%c[96C",27);
- /* print the ID */
- printf("%c[32m%02X%c[0m",27,rpkt->data[0],27);
- addrs[i][12] = rpkt->data[0];
- /* turn on the flag */
- addrs[i][18] |= 0x20;
- free(rpkt);
- }
- /* in this case we dont care if we dont get a response packet... */
- if (xbee_senddata(tcon,"HV")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if (((rpkt = xbee_getpacketwait(tcon)) != NULL) && (rpkt->status == 0)) {
- /* move over the HV column */
- printf("\r%c[108C",27);
- /* print the ID */
- printf("%c[32m%02X%02X%c[0m",27,rpkt->data[0],rpkt->data[1],27);
- addrs[i][13] = rpkt->data[0];
- addrs[i][14] = rpkt->data[1];
- /* turn on the flag */
- addrs[i][18] |= 0x10;
- free(rpkt);
- }
- /* in this case we dont care if we dont get a response packet... */
- if (xbee_senddata(tcon,"VR")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if (((rpkt = xbee_getpacketwait(tcon)) != NULL) && (rpkt->status == 0)) {
- /* move over the VR column */
- printf("\r%c[122C",27);
- /* print the ID */
- printf("%c[32m%02X%02X%c[0m",27,rpkt->data[0],rpkt->data[1],27);
- addrs[i][15] = rpkt->data[0];
- addrs[i][16] = rpkt->data[1];
- /* turn on the flag */
- addrs[i][18] |= 0x08;
- free(rpkt);
- }
- /* in this case we dont care if we dont get a response packet... */
- if (xbee_senddata(tcon,"CC")) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- if (((rpkt = xbee_getpacketwait(tcon)) != NULL) && (rpkt->status == 0)) {
- /* move over the CC column */
- printf("\r%c[134C",27);
- /* print the ID */
- printf("%c[32m'%c' (0x%02X)%c[0m",27,rpkt->data[0],rpkt->data[0],27);
- addrs[i][17] = rpkt->data[0];
- /* turn on the flag */
- addrs[i][18] |= 0x04;
- free(rpkt);
- }
- /* go back the the bottom */
- printf("%c[%dB\r",27,nodes-i+1);
- fflush(stdout);
- }
- }
- }
- /* fall back to the first channel if that was the last */
- if (XBeePro && ATCHc == 0x17) {
- ATCHc = 0x0C;
- } else if (!XBeePro && ATCHc == 0x1A) {
- ATCHc = 0x0B;
- } else {
- /* else move onto next channel */
- ATCHc++;
- }
- usleep(100000);
- }
-
- return 0;
-}
-
diff --git a/libs/thirdParty/libxbee/sample/simple.c b/libs/thirdParty/libxbee/sample/simple.c
deleted file mode 100644
index 8ab776f127556968cf90f2a26b3daf30b02c4ea1..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/simple.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will politely return any recieved data */
-
-#include
-#include
-#include
-
-int main(int argc, char *argv[]) {
- xbee_con *con;
- xbee_pkt *pkt, *rpkt;
-
- /* setup the xbee */
- if (xbee_setup("/dev/ttyUSB0",57600) == -1) {
- /* oh no... it failed */
- printf("xbee_setup() failed...\n");
- exit(1);
- }
-
- /* setup a connection */
- con = xbee_newcon('I',xbee_64bitData, 0x0013A200, 0x40081826);
-
- printf("Waiting...\n");
-
- /* just wait for data, and echo it back! */
- while (1) {
- /* while there are packets avaliable... */
- while ((pkt = xbee_getpacket(con)) != NULL) {
- /* print the recieved data */
- printf("Rx: %s\n",pkt->data);
- /* say thank you */
- if (xbee_senddata(con,"thank you for saying '%s'\r\n",pkt->data)) {
- printf("xbee_senddata: Error\n");
- return 1;
- }
- /* free the packet */
- free(pkt);
- }
- usleep(100000);
- }
-
- /* shouldn't ever get here but... */
- return 0;
-}
-
diff --git a/libs/thirdParty/libxbee/sample/talk_to_me.c b/libs/thirdParty/libxbee/sample/talk_to_me.c
deleted file mode 100644
index 26750988abade8d0c1db9820391e660bc6cd7764..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/talk_to_me.c
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee -g
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample will make the remote XBee talk to us! */
-
-#include
-#include
-#include
-#include
-
-int main(int argc, char *argv[]) {
- union {
- unsigned char as8[8];
- unsigned int as32[2];
- } addr;
- xbee_con *atCon, *rCon;
- xbee_pkt *pkt;
-
- /* the extra arguments are the CC ('+' by default) and GT (1000) by default AT values */
- xbee_setuplogAPI("/dev/ttyUSB0",57600,2,'+',1000);
-
- atCon = xbee_newcon('@', xbee_localAT);
-
- xbee_senddata(atCon, "SH");
- pkt = xbee_getpacketwait(atCon);
- if (!pkt || pkt->status || pkt->atCmd[0] != 'S' || pkt->atCmd[1] != 'H') {
- printf("Missing SH Packet!\n");
- return 1;
- }
- addr.as8[3] = pkt->data[0];
- addr.as8[2] = pkt->data[1];
- addr.as8[1] = pkt->data[2];
- addr.as8[0] = pkt->data[3];
- free(pkt);
-
- xbee_senddata(atCon, "SL");
- pkt = xbee_getpacketwait(atCon);
- if (!pkt || pkt->status || pkt->atCmd[0] != 'S' || pkt->atCmd[1] != 'L') {
- printf("Missing SL Packet!\n");
- return 1;
- }
- addr.as8[7] = pkt->data[0];
- addr.as8[6] = pkt->data[1];
- addr.as8[5] = pkt->data[2];
- addr.as8[4] = pkt->data[3];
- free(pkt);
-
- printf("Local XBee address is: 0x%08X %08X\n", addr.as32[0], addr.as32[1]);
-
- rCon = xbee_newcon('#', xbee_64bitRemoteAT, 0x13A200, 0x403CB26A);
-
- xbee_senddata(rCon, "DH%c%c%c%c", addr.as8[3], addr.as8[2], addr.as8[1], addr.as8[0]);
- usleep(250000);
- xbee_senddata(rCon, "DL%c%c%c%c", addr.as8[7], addr.as8[6], addr.as8[5], addr.as8[4]);
- usleep(250000);
-
- /* calling xbee_end() will return the xbee to its previous API mode */
- xbee_end();
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/vb6/README.txt b/libs/thirdParty/libxbee/sample/vb6/README.txt
deleted file mode 100644
index fe13a7dfcb43ee491a575dd2458781a8511ae2a0..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/vb6/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-These sample projects provide a quick demo of how to use various functions
-
-Running these assume that you have first compiled libxbee.dll successfully
-You will also need to either copy libxbee.dll into this folder or into a
- directory in your PATH
-
-If you want to use libxbee in your own projects, you must include libxbee.bas
- which will provide you with access to the functions and type declarations
diff --git a/libs/thirdParty/libxbee/sample/vb6/demo/Form1.frm b/libs/thirdParty/libxbee/sample/vb6/demo/Form1.frm
deleted file mode 100644
index 4c7c6655bce1337956327e4676c5a025526583f2..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/vb6/demo/Form1.frm
+++ /dev/null
@@ -1,64 +0,0 @@
-VERSION 5.00
-Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 2250
- ClientLeft = 120
- ClientTop = 450
- ClientWidth = 3855
- LinkTopic = "Form1"
- ScaleHeight = 2250
- ScaleWidth = 3855
- StartUpPosition = 3 'Windows Default
- Begin VB.TextBox tb
- Height = 1995
- Left = 120
- MultiLine = -1 'True
- TabIndex = 0
- Top = 120
- Width = 3615
- End
-End
-Attribute VB_Name = "Form1"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Option Explicit
-
-Dim myCon As Long
-Dim myDataCon As Long
-
-Private Sub Form_Load()
- Dim i As Long
- Dim x As Byte
- Dim ctype, addrH, addrL As Long
- Me.Show
- DoEvents
-
- ' Connect to the XBee on COM1 with a baud rate of 57600
- ' The XBee should be in API mode 2 (ATAP2)
- If xbee_setupDebug("COM8", 57600, "xbee.log") <> 0 Then
- MsgBox "Error while setting up the local XBee module", vbCritical, "xbee_setup()"
- End
- End If
- xbee_logit "Hello!"
-
- ' Enable callbacks, this only needs to be done ONCE
- ' The window handle provided must remain in memory (dont unload the form - callbacks will automatically be disabled)
- xbee_enableCallbacks Me.hWnd
-
- ' Create a Remote AT connection to a node using 64-bit addressing
- myCon = xbee_newcon_64bit(&H30, xbee_64bitRemoteAT, &H13A200, &H404B75DE)
- xbee_enableACKwait myCon
-
- myDataCon = xbee_newcon_64bit(&H31, xbee_64bitData, &H13A200, &H404B75DE)
-
- ' Setup callbacks
- xbee_attachCallback myCon, AddressOf Module1.callback1
- xbee_attachCallback myDataCon, AddressOf Module1.callback2
-
- ' Send the AT command NI (Node Identifier)
- tb.text = "Sending 'ATNI'..."
- xbee_sendstring myCon, "NI"
-End Sub
-
diff --git a/libs/thirdParty/libxbee/sample/vb6/demo/demo.bas b/libs/thirdParty/libxbee/sample/vb6/demo/demo.bas
deleted file mode 100644
index b1e51fd90780c9bc8ae03e29760788520990b97b..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/vb6/demo/demo.bas
+++ /dev/null
@@ -1,19 +0,0 @@
-Attribute VB_Name = "Module1"
-Public Function callback1(ByVal con As Long, ByRef pkt As xbee_pkt) As Long
- ' Check the returned status, if it isnt 0 then an error occured
- If pkt.status <> 0 Then
- Form1.tb.Text = Form1.tb.Text & vbNewLine & "An error occured (" & pkt.status & ")"
- Exit Function
- End If
-
- ' Display the Node Identifier
- Form1.tb.Text = Form1.tb.Text & vbNewLine & "Node Identifier:" & StrConv(pkt.data, vbUnicode)
- Form1.tb.SelStart = Len(Form1.tb.Text)
-End Function
-
-Public Function callback2(ByVal con As Long, ByRef pkt As xbee_pkt) As Long
- ' Display the data
- Form1.tb.Text = Form1.tb.Text & vbNewLine & "Rx:" & StrConv(pkt.data, vbUnicode)
- Form1.tb.SelStart = Len(Form1.tb.Text)
-End Function
-
diff --git a/libs/thirdParty/libxbee/sample/vb6/demo/demo.vbp b/libs/thirdParty/libxbee/sample/vb6/demo/demo.vbp
deleted file mode 100644
index 815e949e70ca2644e8bb8a92a830e0aee07670ac..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/vb6/demo/demo.vbp
+++ /dev/null
@@ -1,33 +0,0 @@
-Type=Exe
-Form=Form1.frm
-Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automation
-Module=Module1; demo.bas
-Module=libxbee; ..\libxbee.bas
-IconForm="Form1"
-Startup="Form1"
-ExeName32="demo.exe"
-Command32=""
-Name="Project1"
-HelpContextID="0"
-CompatibleMode="0"
-MajorVer=1
-MinorVer=0
-RevisionVer=0
-AutoIncrementVer=0
-ServerSupportFiles=0
-VersionCompanyName="Microsoft"
-CompilationType=0
-OptimizationType=0
-FavorPentiumPro(tm)=0
-CodeViewDebugInfo=0
-NoAliasing=0
-BoundsCheck=0
-OverflowCheck=0
-FlPointCheck=0
-FDIVCheck=0
-UnroundedFP=0
-StartMode=0
-Unattended=0
-Retained=0
-ThreadPerObject=0
-MaxNumberOfThreads=1
diff --git a/libs/thirdParty/libxbee/sample/vb6/libxbee.bas b/libs/thirdParty/libxbee/sample/vb6/libxbee.bas
deleted file mode 100644
index 0875907f91b157d595fe58d4906c4c42e53bddcb..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/vb6/libxbee.bas
+++ /dev/null
@@ -1,285 +0,0 @@
-Attribute VB_Name = "libxbee"
-Option Explicit
-
-Enum xbee_types
- xbee_unknown
-
- xbee_localAT
- xbee_remoteAT
- xbee_modemStatus
- xbee_txStatus
-
- ' XBee Series 1 stuff
- xbee_16bitRemoteAT
- xbee_64bitRemoteAT
-
- xbee_16bitData
- xbee_64bitData
-
- xbee_16bitIO
- xbee_64bitIO
-
- ' XBee Series 2 stuff
- xbee2_data
- xbee2_txStatus
-End Enum
-
-Type xbee_sample
- '# X A5 A4 A3 A2 A1 A0 D8 D7 D6 D5 D4 D3 D2 D1 D0
- IOmask As Integer
- '# X X X X X X X D8 D7 D6 D5 D4 D3 D2 D1 D0
- IOdigital As Integer
- '# X X X X X D D D D D D D D D D D
- IOanalog(0 To 5) As Integer
-End Type
-
-Type xbee_pkt
- flags As Long '# bit 0 - is64
- '# bit 1 - dataPkt
- '# bit 2 - txStatusPkt
- '# bit 3 - modemStatusPkt
- '# bit 4 - remoteATPkt
- '# bit 5 - IOPkt
- frameID As Byte
- atCmd(0 To 1) As Byte
-
- status As Byte
- samples As Byte
- RSSI As Byte
-
- Addr16(0 To 1) As Byte
-
- Addr64(0 To 7) As Byte
-
- data(0 To 127) As Byte
-
- datalen As Long
-
- type As Long ' enum xbee_types
-
- SPARE As Long ' IGNORE THIS (is the pointer to the next packet in C... this will ALWAYS be 0 in VB)
-
- IOdata As xbee_sample
-End Type
-
-Private OldhWndHandler As Long
-Private ActivehWnd As Long
-Private callbackMessageID As Long
-Private Callbacks As New Collection
-
-Public Declare Sub xbee_free Lib "libxbee.dll" (ByVal ptr As Long)
-
-Public Declare Function xbee_setup Lib "libxbee.dll" (ByVal port As String, ByVal baudRate As Long) As Long
-Public Declare Function xbee_setupDebug Lib "libxbee.dll" (ByVal port As String, ByVal baudRate As Long, ByVal logfile As String) As Long
-Private Declare Function xbee_setupDebugAPIRaw Lib "libxbee.dll" Alias "xbee_setupDebugAPI" (ByVal port As String, ByVal baudRate As Long, ByVal logfile As String, ByVal cmdSeq As Byte, ByVal cmdTime As Long) As Long
-Private Declare Function xbee_setupAPIRaw Lib "libxbee.dll" Alias "xbee_setupAPI" (ByVal port As String, ByVal baudRate As Long, ByVal cmdSeq As Byte, ByVal cmdTime As Long) As Long
-
-Public Declare Function xbee_end Lib "libxbee.dll" () As Long
-
-Public Declare Function xbee_newcon_simple Lib "libxbee.dll" (ByVal frameID As Byte, ByVal conType As Long) As Long 'xbee_con *
-Public Declare Function xbee_newcon_16bit Lib "libxbee.dll" (ByVal frameID As Byte, ByVal conType As Long, ByVal addr16bit As Long) As Long 'xbee_con *
-Public Declare Function xbee_newcon_64bit Lib "libxbee.dll" (ByVal frameID As Byte, ByVal conType As Long, ByVal addr64bitLow As Long, ByVal addr64bitHigh As Long) As Long 'xbee_con *
-Public Declare Sub xbee_enableACKwait Lib "libxbee.dll" (ByVal con As Long)
-Public Declare Sub xbee_disableACKwait Lib "libxbee.dll" (ByVal con As Long)
-Public Declare Sub xbee_enableDestroySelf Lib "libxbee.dll" (ByVal con As Long)
-
-Private Declare Sub xbee_enableCallbacksRaw Lib "libxbee.dll" Alias "xbee_enableCallbacks" (ByVal hWnd As Long, ByVal uMsg As Long)
-Private Declare Sub xbee_attachCallbackRaw Lib "libxbee.dll" Alias "xbee_attachCallback" (ByVal con As Long)
-Private Declare Sub xbee_detachCallbackRaw Lib "libxbee.dll" Alias "xbee_detachCallback" (ByVal con As Long)
-Private Declare Function xbee_runCallback Lib "libxbee.dll" (ByVal func As Long, ByVal con As Long, ByVal pkt As Long) As Long
-
-Public Declare Sub xbee_endcon2 Lib "libxbee.dll" (ByVal con As Long)
-Public Declare Sub xbee_flushcon Lib "libxbee.dll" (ByVal con As Long)
-
-Public Declare Function xbee_senddata Lib "libxbee.dll" Alias "xbee_nsenddata" (ByVal con As Long, ByRef data As Byte, ByVal Length As Long) As Long
-Private Declare Function xbee_senddata_str Lib "libxbee.dll" Alias "xbee_nsenddata" (ByVal con As Long, ByVal data As String, ByVal Length As Long) As Long
-
-Public Declare Function xbee_getpacketRaw Lib "libxbee.dll" Alias "xbee_getpacket" (ByVal con As Long) As Long 'xbee_pkt *
-
-Public Declare Function xbee_hasanalog Lib "libxbee.dll" (ByRef pkt As xbee_pkt, ByVal sample As Long, ByVal inputPin As Long) As Long
-Public Declare Function xbee_getanalog Lib "libxbee.dll" (ByRef pkt As xbee_pkt, ByVal sample As Long, ByVal inputPin As Long, ByVal Vref As Double) As Double
-
-Public Declare Function xbee_hasdigital Lib "libxbee.dll" (ByRef pkt As xbee_pkt, ByVal sample As Long, ByVal inputPin As Long) As Long
-Public Declare Function xbee_getdigital Lib "libxbee.dll" (ByRef pkt As xbee_pkt, ByVal sample As Long, ByVal inputPin As Long) As Long
-
-Private Declare Function xbee_svn_versionRaw Lib "libxbee.dll" Alias "xbee_svn_version" () As Long
-Public Declare Sub xbee_logit Lib "libxbee.dll" (ByVal text As String)
-
-'###########################################################################################################################################################################
-
-Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
-Private Declare Function lstrlenW Lib "kernel32" (ByVal lpString As Long) As Long
-Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long
-Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
-Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
-Private Const WM_DESTROY = &H2
-Private Const GWL_WNDPROC = -4
-
-Public Function PointerToString(lngPtr As Long) As String
- Dim strTemp As String
- Dim lngLen As Long
- If lngPtr Then
- lngLen = lstrlenW(lngPtr) * 2
- If lngLen Then
- strTemp = Space(lngLen)
- CopyMemory ByVal strTemp, ByVal lngPtr, lngLen
- PointerToString = Replace(strTemp, Chr(0), "")
- End If
- End If
-End Function
-
-Public Function ArrayToString(data() As Byte, Optional lb As Integer = -1, Optional ub As Integer = -1) As String
- Dim tmp As String
- Dim i
- If lb = -1 Then lb = LBound(data)
- If ub = -1 Then ub = UBound(data)
- tmp = ""
- For i = lb To ub
- If (data(i) = 0) Then Exit For
- tmp = tmp & Chr(data(i))
- Next
- ArrayToString = tmp
-End Function
-
-Public Function xbee_pointerToPacket(lngPtr As Long) As xbee_pkt
- Dim p As xbee_pkt
- CopyMemory p, ByVal lngPtr, Len(p)
- xbee_pointerToPacket = p
-End Function
-
-Public Sub libxbee_load()
- ' this function is simply to get VB6 to call a libxbee function
- ' if you are using any C DLLs that make use of libxbee, then you should call this function first so that VB6 will load libxbee
- xbee_svn_versionRaw
-End Sub
-
-Public Function xbee_svn_version() As String
- xbee_svn_version = PointerToString(xbee_svn_versionRaw())
-End Function
-
-Public Function xbee_setupAPI(ByVal port As String, ByVal baudRate As Long, ByVal cmdSeq As String, ByVal cmdTime As Long)
- xbee_setupAPI = xbee_setupAPIRaw(port, baudRate, Asc(cmdSeq), cmdTime)
-End Function
-
-Public Function xbee_setupDebugAPI(ByVal port As String, ByVal baudRate As Long, ByVal logfile As String, ByVal cmdSeq As String, ByVal cmdTime As Long)
- xbee_setupDebugAPI = xbee_setupDebugAPIRaw(port, baudRate, logfile, Asc(cmdSeq), cmdTime)
-End Function
-
-Private Sub xbee_ensureMessageID()
- If callbackMessageID = 0 Then
- callbackMessageID = RegisterWindowMessage("libxbee")
- End If
- xbee_enableCallbacksRaw ActivehWnd, callbackMessageID
-End Sub
-
-Public Sub xbee_attachCallback(ByVal con As Long, ByVal func As Long)
- Dim t(0 To 1) As Long
- Dim c As String
- If ActivehWnd = 0 Then
- Debug.Print "Callbacks not enabled!"
- Exit Sub
- End If
- xbee_ensureMessageID
- c = CStr(con)
- t(0) = con
- t(1) = func
- On Error Resume Next
- Callbacks.Remove c
- Callbacks.Add t, c
- On Error GoTo 0
- xbee_attachCallbackRaw con
-End Sub
-
-Public Sub xbee_detachCallback(ByVal con As Long)
- If ActivehWnd = 0 Then
- Debug.Print "Callbacks not enabled!"
- Exit Sub
- End If
- On Error Resume Next
- xbee_detachCallbackRaw con
- Callbacks.Remove CStr(con)
-End Sub
-
-Public Sub xbee_enableCallbacks(ByVal hWnd As Long)
- If ActivehWnd <> 0 Then
- Debug.Print "Callbacks already enabled!"
- Exit Sub
- End If
- ActivehWnd = hWnd
- OldhWndHandler = SetWindowLong(hWnd, GWL_WNDPROC, AddressOf libxbee.xbee_messageHandler)
- xbee_ensureMessageID
-End Sub
-
-Public Sub xbee_disableCallbacks()
- Dim id As Variant
- If ActivehWnd = 0 Then
- Debug.Print "Callbacks not enabled!"
- Exit Sub
- End If
- For Each id In Callbacks
- xbee_detachCallback id(0)
- Next
- SetWindowLong ActivehWnd, GWL_WNDPROC, OldhWndHandler
- ActivehWnd = 0
- OldhWndHandler = 0
-End Sub
-
-Private Function xbee_messageHandler(ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
- If uMsg = callbackMessageID Then
- Dim t As Long
- On Error Resume Next
- Err.Clear
- t = Callbacks.Item(CStr(wParam))(1)
- If Err.Number = 0 Then
- On Error GoTo 0
- xbee_messageHandler = xbee_runCallback(t, wParam, lParam)
- Exit Function
- End If
- On Error GoTo 0
- xbee_logit "Unable to match Connection with active callback!"
- End If
- xbee_messageHandler = CallWindowProc(OldhWndHandler, hWnd, uMsg, wParam, lParam)
- If uMsg = WM_DESTROY And ActivehWnd <> 0 Then
- ' Disable the MessageHandler if the form "unload" event is detected
- xbee_disableCallbacks
- End If
-End Function
-
-Public Sub xbee_endcon(ByRef con As Long)
- xbee_endcon2 con
- con = 0
-End Sub
-
-Public Function xbee_sendstring(ByVal con As Long, ByVal str As String)
- xbee_sendstring = xbee_senddata_str(con, str, Len(str))
-End Function
-
-Public Function xbee_getpacketPtr(ByVal con As Long, ByRef pkt As Long) As Integer
- Dim ptr As Long
-
- ptr = xbee_getpacketRaw(con)
- If ptr = 0 Then
- pkt = 0
- xbee_getpacketPtr = 0
- Exit Function
- End If
-
- pkt = ptr
- xbee_getpacketPtr = 1
-End Function
-
-Public Function xbee_getpacket(ByVal con As Long, ByRef pkt As xbee_pkt) As Integer
- Dim ptr As Long
-
- ptr = xbee_getpacketRaw(con)
- If ptr = 0 Then
- xbee_getpacket = 0
- Exit Function
- End If
-
- pkt = xbee_pointerToPacket(ptr)
- xbee_free ptr
-
- xbee_getpacket = 1
-End Function
-
diff --git a/libs/thirdParty/libxbee/sample/vb6/talk_to_me/Form1.frm b/libs/thirdParty/libxbee/sample/vb6/talk_to_me/Form1.frm
deleted file mode 100644
index 426a9df9395c731c789ccc64ec25a3f70fc8f160..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/vb6/talk_to_me/Form1.frm
+++ /dev/null
@@ -1,1197 +0,0 @@
-VERSION 5.00
-Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "Talk to Me"
- ClientHeight = 7875
- ClientLeft = 45
- ClientTop = 375
- ClientWidth = 7515
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 7875
- ScaleWidth = 7515
- StartUpPosition = 1 'CenterOwner
- Begin VB.Timer tmr_timeout
- Enabled = 0 'False
- Interval = 5000
- Left = 3720
- Top = 1380
- End
- Begin VB.Frame Frame2
- Caption = " Actions "
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1335
- Left = 180
- TabIndex = 1
- Top = 6420
- Width = 7215
- Begin VB.CommandButton write_settings
- Caption = "Write Settings"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 1920
- TabIndex = 50
- Top = 780
- Width = 1935
- End
- Begin VB.CommandButton set_default
- Caption = "Set Default"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 180
- TabIndex = 49
- Top = 780
- Width = 1575
- End
- Begin VB.CommandButton reset_node
- Caption = "Reset Node"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 4020
- TabIndex = 47
- Top = 780
- Width = 1575
- End
- Begin VB.CommandButton set_dest
- Caption = "Set destination"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 1920
- TabIndex = 46
- Top = 300
- Width = 1935
- End
- Begin VB.CommandButton talk_to_me
- Caption = "Talk to Me"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 180
- TabIndex = 45
- Top = 300
- Width = 1575
- End
- Begin VB.CommandButton set_ni
- Caption = "Set Node Identifier"
- Enabled = 0 'False
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 4020
- TabIndex = 51
- Top = 300
- Width = 2355
- End
- End
- Begin VB.Frame Frame1
- Caption = " Settings "
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 3315
- Left = 180
- TabIndex = 0
- Top = 3000
- Width = 7215
- Begin VB.Label ni
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 24
- Top = 300
- Width = 3915
- End
- Begin VB.Label sl
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 22
- Top = 1020
- Width = 3915
- End
- Begin VB.Label sh
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 20
- Top = 780
- Width = 3915
- End
- Begin VB.Label my
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 18
- Top = 540
- Width = 3915
- End
- Begin VB.Label ap
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 17
- Top = 1260
- Width = 3915
- End
- Begin VB.Label bd
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 16
- Top = 1500
- Width = 3915
- End
- Begin VB.Label ch
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 15
- Top = 1740
- Width = 3915
- End
- Begin VB.Label dh
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 14
- Top = 1980
- Width = 3915
- End
- Begin VB.Label dl
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 13
- Top = 2220
- Width = 3915
- End
- Begin VB.Label ia
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 11
- Top = 2460
- Width = 3915
- End
- Begin VB.Label vr
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 10
- Top = 2940
- Width = 3915
- End
- Begin VB.Label hv
- BackStyle = 0 'Transparent
- Caption = "-"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 3180
- TabIndex = 12
- Top = 2700
- Width = 3915
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "NI - Node Identifier"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 17
- Left = 180
- TabIndex = 25
- Top = 300
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "MY - 16-bit Address"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 13
- Left = 180
- TabIndex = 19
- Top = 540
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "VR - Firmware Version"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 14
- Left = 180
- TabIndex = 9
- Top = 2940
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "IA - I/O Address"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 12
- Left = 180
- TabIndex = 8
- Top = 2460
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "DL - Destination Low"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 10
- Left = 180
- TabIndex = 6
- Top = 2220
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "DH - Destination High"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 9
- Left = 180
- TabIndex = 5
- Top = 1980
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "CH - Channel"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 8
- Left = 180
- TabIndex = 4
- Top = 1740
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "BD - Interface Rate"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 7
- Left = 180
- TabIndex = 3
- Top = 1500
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "AP - API Enable"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 6
- Left = 180
- TabIndex = 2
- Top = 1260
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "HV - Hardware Version"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 11
- Left = 180
- TabIndex = 7
- Top = 2700
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " .....:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 29
- Left = 180
- TabIndex = 44
- Top = 2700
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " ...........:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 28
- Left = 180
- TabIndex = 43
- Top = 1260
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " .......:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 27
- Left = 180
- TabIndex = 42
- Top = 1500
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " ..............:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 26
- Left = 180
- TabIndex = 41
- Top = 1740
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " .....:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 25
- Left = 180
- TabIndex = 40
- Top = 1980
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " ......:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 24
- Left = 180
- TabIndex = 39
- Top = 2220
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " ..........:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 23
- Left = 180
- TabIndex = 38
- Top = 2460
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " .....:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 22
- Left = 180
- TabIndex = 37
- Top = 2940
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " .......:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 21
- Left = 180
- TabIndex = 36
- Top = 540
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " ......:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 18
- Left = 180
- TabIndex = 33
- Top = 300
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "SL - 64-bit Address (Lo)"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 16
- Left = 180
- TabIndex = 23
- Top = 1020
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "SH - 64-bit Address (Hi)"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 15
- Left = 180
- TabIndex = 21
- Top = 780
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " ..:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 20
- Left = 180
- TabIndex = 35
- Top = 780
- Width = 2955
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = " ..:"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 255
- Index = 19
- Left = 180
- TabIndex = 34
- Top = 1020
- Width = 2955
- End
- End
- Begin VB.Timer tmr_refresh
- Enabled = 0 'False
- Interval = 500
- Left = 3240
- Top = 1380
- End
- Begin VB.Frame Frame3
- Caption = " Node List "
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 2775
- Left = 180
- TabIndex = 26
- Top = 120
- Width = 7215
- Begin VB.ListBox nodelist
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 2085
- Left = 180
- TabIndex = 27
- Top = 540
- Width = 6855
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "16-bit"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 0
- Left = 240
- TabIndex = 32
- Top = 300
- Width = 675
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "RSSI"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 3
- Left = 3660
- TabIndex = 30
- Top = 300
- Width = 435
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "@"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 4
- Left = 4440
- TabIndex = 29
- Top = 300
- Width = 135
- End
- Begin VB.Label Label
- BackStyle = 0 'Transparent
- Caption = "Node Name"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 5
- Left = 4740
- TabIndex = 28
- Top = 300
- Width = 915
- End
- Begin VB.Label Label
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "- -"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 195
- Index = 2
- Left = 1020
- TabIndex = 48
- Top = 300
- Width = 2355
- End
- Begin VB.Label Label
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "(Hi) 64-bit (Lo)"
- BeginProperty Font
- Name = "Courier New"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 1
- Left = 1020
- TabIndex = 31
- Top = 300
- Width = 2355
- End
- End
-End
-Attribute VB_Name = "Form1"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = False
-Attribute VB_PredeclaredId = True
-Attribute VB_Exposed = False
-Dim dieNow As Boolean
-
-Private Sub Form_Load()
- Me.Show
- DoEvents
- dieNow = False
-
- ' setup libxbee
- If (xbee_setupDebugAPI("COM8", 57600, "xbee.log", "+", 250) = -1) Then
- MsgBox "libxbee setup failed...", vbCritical
- Unload Me
- End
- End If
-
- ' enable callback functions
- xbee_enableCallbacks Me.hWnd
-
- ' setup a local at connection
- atcon = xbee_newcon_simple(Asc("A"), xbee_localAT)
- xbee_enableACKwait atcon
- xbee_attachCallback atcon, AddressOf localCB
-
- ' set off the chain reaction!
- xbeesend atcon, "MY"
-End Sub
-
-Private Sub Form_Unload(Cancel As Integer)
- Static c As Integer
- dieNow = 1
- Cancel = 1
- Me.Caption = "Waiting for command to complete..."
- c = c + 1
- If (c >= 2) Then
- Cancel = 0
- End If
-End Sub
-
-Private Sub nodelist_Click()
- Dim tmp() As String
- If nodelist.ListCount = 0 Or nodelist.ListIndex = -1 Then Exit Sub
- If set_dest.Tag = "yes" Then
- nodelist.Enabled = False
- Else
- If nodelist.ListIndex = 0 Then
- remoteCon = atcon
- Else
- str2 = Split(nodelist.text, " ")
- remoteCon = xbee_newcon_64bit(Asc("2"), xbee_64bitRemoteAT, CLng("&H" & Right(str2(1), 8)), CLng("&H" & Right(str2(2), 8)))
- End If
- setButtons False
- nodelist.Enabled = False
- tmp = Split(nodelist.List(nodelist.ListIndex), " ")
- ni = tmp(5)
- my = tmp(0)
- sh = tmp(1)
- sl = tmp(2)
- ap = "-"
- bd = "-"
- ch = "-"
- dh = "-"
- dl = "-"
- ia = "-"
- hv = "-"
- vr = "-"
- End If
-End Sub
-
-Private Sub reset_node_Click()
- If nodelist.ListCount = 0 Or nodelist.ListIndex = -1 Then Exit Sub
- nodelist.Enabled = False
- setButtons False
- reset_node.Tag = "yes"
-End Sub
-
-Private Sub set_default_Click()
- If nodelist.ListCount = 0 Or nodelist.ListIndex = -1 Then Exit Sub
- nodelist.Enabled = False
- setButtons False
- set_default.Tag = "yes"
-End Sub
-
-Private Sub set_dest_Click()
- If nodelist.ListCount = 0 Or nodelist.ListIndex = -1 Then Exit Sub
- nodelist.Tag = nodelist.ListIndex
- setButtons False
- set_dest.Tag = "yes"
-End Sub
-
-Private Sub set_ni_Click()
- Dim newni As String
- Dim oldni As String
- oldni = Split(nodelist.text, " ")(5)
- newni = InputBox("New node identifier:", "Set Node Identifier", oldni)
- If newni = oldni Then Exit Sub
- nodelist.Enabled = False
- setButtons False
- set_ni.Tag = newni
-End Sub
-
-Private Sub talk_to_me_Click()
- If nodelist.ListCount = 0 Or nodelist.ListIndex = -1 Then Exit Sub
- nodelist.Enabled = False
- setButtons False
- talk_to_me.Tag = "yes"
-End Sub
-
-Private Sub tmr_refresh_Timer()
- Dim str As String
- Dim str2() As String
- tmr_refresh.Enabled = False
- If atcon = 0 Then Exit Sub
-
- If (dieNow) Then
- xbee_end
- DoEvents
- xbee_disableCallbacks
- Unload Me
- End
- End If
-
- If nodelist.Enabled = False Then
- xbee_attachCallback remoteCon, AddressOf remoteCB
- If talk_to_me.Tag = "yes" Then
- str2 = Split(Form1.nodelist.text, " ")
- xbee_attachCallback remoteCon, AddressOf setupCB_TTM
- str2 = Split(nodelist.List(0), " ")
- str = Chr(CInt("&H" & Mid(str2(1), 9, 2)))
- str = Chr(CInt("&H" & Mid(str2(1), 7, 2))) & str
- str = Chr(CInt("&H" & Mid(str2(1), 5, 2))) & str
- str = Chr(CInt("&H" & Mid(str2(1), 3, 2))) & str
- str = "DH" & str
- xbeesend remoteCon, str
- ElseIf set_dest.Tag = "yes" Then
- str2 = Split(Form1.nodelist.text, " ")
- xbee_attachCallback remoteCon, AddressOf setupCB_SDEST
- str2 = Split(nodelist.text, " ")
- str = Chr(CInt("&H" & Mid(str2(1), 9, 2)))
- str = Chr(CInt("&H" & Mid(str2(1), 7, 2))) & str
- str = Chr(CInt("&H" & Mid(str2(1), 5, 2))) & str
- str = Chr(CInt("&H" & Mid(str2(1), 3, 2))) & str
- str = "DH" & str
- xbeesend remoteCon, str
- ElseIf reset_node.Tag = "yes" Then
- xbee_sendstring remoteCon, "FR"
- setButtons True
- reset_node.Tag = ""
- tmr_refresh.Enabled = True
- ElseIf write_settings.Tag = "yes" Then
- xbee_sendstring remoteCon, "WR"
- setButtons True
- write_settings.Tag = ""
- tmr_refresh.Enabled = True
- ElseIf set_default.Tag = "yes" Then
- setupCB_Default_Start
- ElseIf set_ni.Tag <> "" Then
- xbeesend remoteCon, "NI" & set_ni.Tag
- set_ni.Tag = ""
- Else
- xbeesend remoteCon, "AP"
- End If
- Exit Sub
- End If
- ' initiate network scan
- xbee_attachCallback atcon, AddressOf localCB
- xbeesend atcon, "MY"
-End Sub
-
-Private Sub tmr_timeout_Timer()
- Dim con As Long
- Dim str As String
- Dim str2() As String
- tmr_timeout.Enabled = False
- str2 = Split(tmr_timeout.Tag, Chr(1), 2)
- con = CStr(str2(0))
- str = str2(1)
- If MsgBox("Request timed out... Retry?", vbYesNo + vbQuestion, "Retry?") = vbNo Then
- setButtons True
- nodelist.Enabled = True
- tmr_refresh.Enabled = True
- Exit Sub
- End If
- xbeesend con, str
-End Sub
-
-Private Sub write_settings_Click()
- If nodelist.ListCount = 0 Or nodelist.ListIndex = -1 Then Exit Sub
- nodelist.Enabled = False
- setButtons False
- write_settings.Tag = "yes"
-End Sub
diff --git a/libs/thirdParty/libxbee/sample/vb6/talk_to_me/talk_to_me.bas b/libs/thirdParty/libxbee/sample/vb6/talk_to_me/talk_to_me.bas
deleted file mode 100644
index dc9f5f76d16bf1e09c4be2fc43ad579c411b04c2..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/vb6/talk_to_me/talk_to_me.bas
+++ /dev/null
@@ -1,431 +0,0 @@
-Attribute VB_Name = "Module1"
-Public atcon As Long
-Public remoteCon As Long
-
-Public Sub setButtons(ByVal state As Boolean)
- Form1.talk_to_me.Tag = ""
- Form1.talk_to_me.Enabled = state
- Form1.set_dest.Tag = ""
- Form1.set_dest.Enabled = state
- Form1.reset_node.Tag = ""
- Form1.reset_node.Enabled = state
- Form1.set_default.Tag = ""
- Form1.set_default.Enabled = state
- Form1.write_settings.Tag = ""
- Form1.write_settings.Enabled = state
- Form1.set_ni.Tag = ""
- Form1.set_ni.Enabled = state
-End Sub
-
-Public Function xbeesend(ByVal con As Long, ByVal str As String) As Long
- Form1.tmr_timeout.Enabled = False
- Form1.tmr_timeout.Tag = CStr(con) & Chr(1) & str
- Form1.tmr_timeout.Enabled = True
- xbee_sendstring con, str
-End Function
-
-Public Sub setupCB_Default_Start()
- xbee_attachCallback remoteCon, AddressOf setupCB_Default
- xbee_attachCallback atcon, AddressOf setupCB_Default
- xbeesend remoteCon, "CH" & Chr(16)
-End Sub
-Public Function setupCB_Default(ByVal con As Long, ByRef pkt As xbee_pkt) As Long
- Dim str As String
- Dim str2() As String
- ' default values (in order of setting):
- ' CH = 10
- ' local CH = 10
- ' MY = FF
- ' T3 = 1
- ' BD = 6
- ' AP = 0
- ' RO = 1
- ' D0 = 5 (turn on rest of system)
- ' D1 = 2 (battery reading)
- ' D2 = 0
- ' D3 = 5 (reset)
- ' D4 = 4 (battery reading power)
- ' D5 = 0
- ' D6 = 0
- ' D7 = 0
- ' D8 = 0
- ' IA = 0xFFFF (accept inputs from anyone)
- ' IU = 0
- Debug.Print ArrayToString(pkt.atCmd)
- If con = atcon Then
- xbee_attachCallback con, AddressOf localCB
- xbeesend remoteCon, "MY" & Chr(255) & Chr(255)
- Exit Function
- End If
- Select Case ArrayToString(pkt.atCmd)
- Case "CH"
- xbeesend atcon, "CH" & Chr(16)
- Case "MY"
- xbeesend con, "T3" & Chr(1)
- Case "T3"
- xbeesend con, "BD" & Chr(0) & Chr(0) & Chr(0) & Chr(6)
- Case "BD"
- xbeesend con, "AP" & Chr(0)
- Case "AP"
- xbeesend con, "RO" & Chr(1)
- Case "RO"
- xbeesend con, "D0" & Chr(5)
- Case "D0"
- xbeesend con, "D1" & Chr(2)
- Case "D1"
- xbeesend con, "D2" & Chr(0)
- Case "D2"
- xbeesend con, "D3" & Chr(4)
- Case "D3"
- xbeesend con, "D4" & Chr(4)
- Case "D4"
- xbeesend con, "D5" & Chr(0)
- Case "D5"
- xbeesend con, "D6" & Chr(0)
- Case "D6"
- xbeesend con, "D7" & Chr(0)
- Case "D7"
- xbeesend con, "D8" & Chr(0)
- Case "D8"
- xbeesend con, "IA" & Chr(0) & Chr(0) & Chr(0) & Chr(0) & Chr(0) & Chr(0) & Chr(255) & Chr(255)
- Case "IA"
- xbeesend con, "IU" & Chr(0)
- Case "IU"
- Form1.set_default.Tag = ""
- Form1.tmr_refresh.Enabled = True
- Form1.tmr_timeout.Enabled = False
- End Select
-End Function
-
-Public Function setupCB_TTM(ByVal con As Long, ByRef pkt As xbee_pkt) As Long
- Dim str As String
- Dim str2() As String
- Select Case ArrayToString(pkt.atCmd)
- Case "DH"
- str2 = Split(Form1.nodelist.List(0), " ")
- str = Chr(CInt("&H" & Mid(str2(2), 9, 2)))
- str = Chr(CInt("&H" & Mid(str2(2), 7, 2))) & str
- str = Chr(CInt("&H" & Mid(str2(2), 5, 2))) & str
- str = Chr(CInt("&H" & Mid(str2(2), 3, 2))) & str
- str = "DL" & str
- xbeesend con, str
- Case "DL"
- Form1.talk_to_me.Tag = ""
- Form1.tmr_refresh.Enabled = True
- End Select
-End Function
-
-Public Function setupCB_SDEST(ByVal con As Long, ByRef pkt As xbee_pkt) As Long
- Dim str As String
- Dim str2() As String
- Select Case ArrayToString(pkt.atCmd)
- Case "DH"
- str2 = Split(Form1.nodelist.text, " ")
- str = Chr(CInt("&H" & Mid(str2(2), 9, 2)))
- str = Chr(CInt("&H" & Mid(str2(2), 7, 2))) & str
- str = Chr(CInt("&H" & Mid(str2(2), 5, 2))) & str
- str = Chr(CInt("&H" & Mid(str2(2), 3, 2))) & str
- str = "DL" & str
- xbeesend con, str
- Case "DL"
- Form1.set_dest.Tag = ""
- Form1.nodelist.ListIndex = Form1.nodelist.Tag
- Form1.tmr_refresh.Enabled = True
- End Select
-End Function
-
-Public Function remoteCB(ByVal con As Long, ByRef pkt As xbee_pkt) As Long
- Dim t As String
- Dim i As Long
- Debug.Print "<+>", ArrayToString(pkt.atCmd)
- Form1.tmr_timeout.Enabled = False
- Select Case ArrayToString(pkt.atCmd)
- Case "AP"
- Select Case pkt.data(0)
- Case 0
- Form1.ap.Caption = "0 - API Disabled"
- Case 1
- Form1.ap.Caption = "1 - API Enabled (no escapes)"
- Case 2
- Form1.ap.Caption = "2 - API Enabled (with escapes)"
- Case Default
- Form1.ap.Caption = "0x" & Hex(pkt.data(0)) & " - Unknown..."
- End Select
- xbeesend con, "BD"
- Case "BD"
- t = Hex(pkt.data(3))
- If (Len(t) < 2) Then t = "0" & t
- t = Hex(pkt.data(2)) & t
- If (Len(t) < 4) Then t = "0" & t
- t = Hex(pkt.data(1)) & t
- If (Len(t) < 6) Then t = "0" & t
- t = Hex(pkt.data(0)) & t
- If (Len(t) < 8) Then t = "0" & t
- i = CStr("&H" & t)
- Select Case i
- Case 0
- Form1.bd.Caption = "0 - 1200 bps"
- Case 1
- Form1.bd.Caption = "1 - 2400 bps"
- Case 2
- Form1.bd.Caption = "2 - 4800 bps"
- Case 3
- Form1.bd.Caption = "3 - 9600 bps"
- Case 4
- Form1.bd.Caption = "4 - 19200 bps"
- Case 5
- Form1.bd.Caption = "5 - 38400 bps"
- Case 6
- Form1.bd.Caption = "6 - 57600 bps"
- Case 7
- Form1.bd.Caption = "7 - 115200 bps"
- Case Default
- Form1.bd.Caption = "0x" & Hex(i) & " - Unknwon..."
- End Select
- xbeesend con, "CH"
- Case "CH"
- t = Hex(pkt.data(0))
- If (Len(t) < 2) Then t = "0" & t
- Form1.ch.Caption = "0x" & t
- xbeesend con, "DH"
- Case "DH"
- t = Hex(pkt.data(3))
- If (Len(t) < 2) Then t = "0" & t
- t = Hex(pkt.data(2)) & t
- If (Len(t) < 4) Then t = "0" & t
- t = Hex(pkt.data(1)) & t
- If (Len(t) < 6) Then t = "0" & t
- t = Hex(pkt.data(0)) & t
- If (Len(t) < 8) Then t = "0" & t
- Form1.dh.Caption = "0x" & t
- xbeesend con, "DL"
- Case "DL"
- t = Hex(pkt.data(3))
- If (Len(t) < 2) Then t = "0" & t
- t = Hex(pkt.data(2)) & t
- If (Len(t) < 4) Then t = "0" & t
- t = Hex(pkt.data(1)) & t
- If (Len(t) < 6) Then t = "0" & t
- t = Hex(pkt.data(0)) & t
- If (Len(t) < 8) Then t = "0" & t
- Form1.dl.Caption = "0x" & t
- xbeesend con, "IA"
- Case "IA"
- t = Hex(pkt.data(7)) & t
- If (Len(t) < 2) Then t = "0" & t
- t = Hex(pkt.data(6)) & t
- If (Len(t) < 4) Then t = "0" & t
- t = Hex(pkt.data(5)) & t
- If (Len(t) < 6) Then t = "0" & t
- t = Hex(pkt.data(4)) & t
- If (Len(t) < 8) Then t = "0" & t
- t = Hex(pkt.data(3)) & t
- If (Len(t) < 10) Then t = "0" & t
- t = Hex(pkt.data(2)) & t
- If (Len(t) < 12) Then t = "0" & t
- t = Hex(pkt.data(1)) & t
- If (Len(t) < 14) Then t = "0" & t
- t = Hex(pkt.data(0)) & t
- If (Len(t) < 16) Then t = "0" & t
- Form1.ia.Caption = "0x" & t
- xbeesend con, "HV"
- Case "HV"
- t = Hex(pkt.data(1))
- If (Len(t) < 2) Then t = "0" & t
- t = Hex(pkt.data(0)) & t
- If (Len(t) < 4) Then t = "0" & t
- Form1.hv.Caption = "0x" & t
- xbeesend con, "VR"
- Case "VR"
- t = Hex(pkt.data(1))
- If (Len(t) < 2) Then t = "0" & t
- t = Hex(pkt.data(0)) & t
- If (Len(t) < 4) Then t = "0" & t
- Form1.vr.Caption = "0x" & t
- If con = atcon Then
- xbee_attachCallback con, AddressOf localCB
- End If
- setButtons True
- Form1.nodelist.Enabled = True
- Form1.tmr_refresh.Enabled = True
- Form1.tmr_timeout.Enabled = False
- Case Else
- If con = atcon Then
- xbee_attachCallback con, AddressOf localCB
- End If
- setButtons True
- Form1.nodelist.Enabled = True
- Form1.tmr_refresh.Enabled = True
- Form1.tmr_timeout.Enabled = False
- End Select
-End Function
-
-Public Function localCB(ByVal con As Long, ByRef pkt As xbee_pkt) As Long
- Dim nodeinfo As String
- Dim nodename As String
- Dim tmp As String
- Dim tmp2() As String
- Dim sh, sl As String
- Dim i, m As Integer
- Dim AT As String
- Form1.tmr_timeout.Enabled = False
- AT = ArrayToString(pkt.atCmd)
- ' handle initial stuff
- Select Case AT
- Case "MY"
- nodeinfo = "0x"
- tmp = Hex(pkt.data(0))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- tmp = Hex(pkt.data(1))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- If Form1.nodelist.ListCount > 0 Then
- Form1.nodelist.List(0) = nodeinfo
- Else
- Form1.nodelist.AddItem nodeinfo
- End If
- ' issue next command
- xbeesend con, "SH"
- Case "SH"
- nodeinfo = Form1.nodelist.List(0) & " 0x"
- tmp = Hex(pkt.data(0))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- tmp = Hex(pkt.data(1))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- tmp = Hex(pkt.data(2))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- tmp = Hex(pkt.data(3))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- Form1.nodelist.List(0) = nodeinfo
- ' issue next command
- xbeesend con, "SL"
- Case "SL"
- nodeinfo = Form1.nodelist.List(0) & " 0x"
- tmp = Hex(pkt.data(0))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- tmp = Hex(pkt.data(1))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- tmp = Hex(pkt.data(2))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- tmp = Hex(pkt.data(3))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- nodeinfo = nodeinfo & tmp
- Form1.nodelist.List(0) = nodeinfo
- ' issue next command
- xbeesend con, "NI"
- Case "NI"
- nodeinfo = Form1.nodelist.List(0) & " -***dB * "
- tmp = ArrayToString(pkt.data)
- nodeinfo = nodeinfo & tmp
- Form1.nodelist.List(0) = nodeinfo
- ' issue next command
- xbeesend con, "ND"
- End Select
-
- If (AT <> "ND") Then Exit Function
- If (pkt.status <> 0) Then
- MsgBox "An error occured when attempting to scan!", vbCritical
- Exit Function
- End If
-
- If (pkt.datalen = 0) Then
- ' increment the counter for each node
- For i = 0 To Form1.nodelist.ListCount - 1
- tmp2 = Split(Form1.nodelist.List(i), " ")
- If tmp2(4) <> "+" And tmp2(4) <> "*" Then
- tmp2(4) = CInt(tmp2(4)) + 1
- If (CInt(tmp2(4)) > 9) Then tmp2(4) = "+"
- End If
- tmp = ""
- For m = LBound(tmp2) To UBound(tmp2)
- If m > 0 Then tmp = tmp & " "
- tmp = tmp & tmp2(m)
- Next
- Form1.nodelist.List(i) = tmp
- Next
-
- ' restart the refresh timer
- Form1.tmr_refresh.Enabled = True
- Exit Function
- End If
-
- ' extract the 16-bit address
- nodeinfo = ""
- tmp = Hex(pkt.data(1))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- tmp = Hex(pkt.data(0)) & tmp
- If (Len(tmp) < 4) Then tmp = "0" & tmp
- tmp = "0x" & tmp
- nodeinfo = nodeinfo & tmp
-
- nodeinfo = nodeinfo & " "
-
- ' extract the high portion of the 64-bit address
- nodeinfo = nodeinfo
- tmp = Hex(pkt.data(5))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- tmp = Hex(pkt.data(4)) & tmp
- If (Len(tmp) < 4) Then tmp = "0" & tmp
- tmp = Hex(pkt.data(3)) & tmp
- If (Len(tmp) < 6) Then tmp = "0" & tmp
- tmp = Hex(pkt.data(2)) & tmp
- If (Len(tmp) < 8) Then tmp = "0" & tmp
- tmp = "0x" & tmp
- nodeinfo = nodeinfo & tmp
- sh = tmp
-
- nodeinfo = nodeinfo & " "
-
- ' extract the low portion of the 64-bit address
- nodeinfo = nodeinfo
- tmp = Hex(pkt.data(9))
- If (Len(tmp) < 2) Then tmp = "0" & tmp
- tmp = Hex(pkt.data(8)) & tmp
- If (Len(tmp) < 4) Then tmp = "0" & tmp
- tmp = Hex(pkt.data(7)) & tmp
- If (Len(tmp) < 6) Then tmp = "0" & tmp
- tmp = Hex(pkt.data(6)) & tmp
- If (Len(tmp) < 8) Then tmp = "0" & tmp
- tmp = "0x" & tmp
- nodeinfo = nodeinfo & tmp
- sl = tmp
-
- nodeinfo = nodeinfo & " "
-
- ' extract the rssi (signal strength)
- tmp = "-" & CStr(pkt.data(10))
- If Len(tmp) < 3 Then tmp = " " & tmp
- If Len(tmp) < 4 Then tmp = " " & tmp
- tmp = tmp & "dB"
- nodeinfo = nodeinfo & tmp
-
- nodeinfo = nodeinfo & " "
- ' add a number of scans
- nodeinfo = nodeinfo & 0
-
- nodeinfo = nodeinfo & " "
-
- ' extract the node name
- nodename = ArrayToString(pkt.data, 11)
- nodeinfo = nodeinfo & nodename
-
- ' see if we have already got this node
- For i = 0 To Form1.nodelist.ListCount - 1
- tmp2 = Split(Form1.nodelist.List(i), " ")
- If tmp2(1) = sh And tmp2(2) = sl Then
- Form1.nodelist.List(i) = nodeinfo
- Exit Function
- End If
- Next
-
- ' otherwise add the info to the list
- Form1.nodelist.AddItem nodeinfo
-End Function
diff --git a/libs/thirdParty/libxbee/sample/vb6/talk_to_me/talk_to_me.vbp b/libs/thirdParty/libxbee/sample/vb6/talk_to_me/talk_to_me.vbp
deleted file mode 100644
index a80cc9bf25076b17986bd5d820465024fc8da7b5..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/vb6/talk_to_me/talk_to_me.vbp
+++ /dev/null
@@ -1,33 +0,0 @@
-Type=Exe
-Form=Form1.frm
-Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automation
-Module=libxbee; ..\libxbee.bas
-Module=Module1; talk_to_me.bas
-IconForm="Form1"
-Startup="Form1"
-ExeName32="talk_to_me.exe"
-Command32=""
-Name="Project1"
-HelpContextID="0"
-CompatibleMode="0"
-MajorVer=1
-MinorVer=0
-RevisionVer=0
-AutoIncrementVer=0
-ServerSupportFiles=0
-VersionCompanyName="Microsoft"
-CompilationType=0
-OptimizationType=0
-FavorPentiumPro(tm)=0
-CodeViewDebugInfo=0
-NoAliasing=0
-BoundsCheck=0
-OverflowCheck=0
-FlPointCheck=0
-FDIVCheck=0
-UnroundedFP=0
-StartMode=0
-Unattended=0
-Retained=0
-ThreadPerObject=0
-MaxNumberOfThreads=1
diff --git a/libs/thirdParty/libxbee/sample/xbee2_rx.c b/libs/thirdParty/libxbee/sample/xbee2_rx.c
deleted file mode 100644
index 223ddcf63777e04cb991872a9e62facafa09cdf5..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/xbee2_rx.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee -g
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample demonstrates how to communicate using series 2 radios */
-
-#include
-#include
-#include
-#include
-
-void callback(xbee_con *con, xbee_pkt *pkt) {
- int ret;
- /* print the recieved data */
- printf("Rx: %s\n",pkt->data);
-}
-
-int main(int argc, char *argv[]) {
- union {
- unsigned char as8[8];
- unsigned int as32[2];
- } addr;
- xbee_con *rCon;
- xbee_pkt *pkt;
-
- xbee_setuplog("/dev/ttyUSB1",57600, 2);
-
- rCon = xbee_newcon('#', xbee2_data, 0x13A200, 0x403302B1);
- rCon->waitforACK = 1;
- rCon->callback = callback;
-
- for (;;) {
- sleep(60);
- }
-
- /* calling xbee_end() will return the xbee to its previous API mode */
- xbee_end();
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/sample/xbee2_tx.c b/libs/thirdParty/libxbee/sample/xbee2_tx.c
deleted file mode 100644
index db49fe6fa618226cdcfba3c99b8cf79e4a57765a..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/sample/xbee2_tx.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifdef shell
-gcc -o ${0//.c/} $0 -lxbee -g
-exit
-}
-#endif
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this sample demonstrates how to communicate using series 2 radios */
-
-#include
-#include
-#include
-#include
-
-int main(int argc, char *argv[]) {
- union {
- unsigned char as8[8];
- unsigned int as32[2];
- } addr;
- xbee_con *rCon;
- xbee_pkt *pkt;
-
- xbee_setuplog("/dev/ttyUSB0",57600, 2);
-
- rCon = xbee_newcon('#', xbee2_data, 0x13A200, 0x403302BF);
-
- for (;;) {
- xbee_senddata(rCon, "Hello!");
- printf("Sent!\n");
- sleep(1);
- }
-
- /* calling xbee_end() will return the xbee to its previous API mode */
- xbee_end();
- return 0;
-}
diff --git a/libs/thirdParty/libxbee/umakefile b/libs/thirdParty/libxbee/umakefile
deleted file mode 100644
index 597a32377f01ad4e74fc4f3029c817512035da6f..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/umakefile
+++ /dev/null
@@ -1,91 +0,0 @@
-#-- uncomment this to enable debugging
-#DEBUG:=-g -DDEBUG
-
-#-- what compiler are you using?
-CC:=gcc
-
-
-###### YOU SHOULD NOT CHANGE BELOW THIS LINE ######
-
-VERSION:=1.4.0
-SRCS:=api.c
-
-CFLAGS:=-Wall -Wstrict-prototypes -Wno-variadic-macros -pedantic -c -fPIC ${DEBUG}
-CLINKS:=-lpthread -lrt ${DEBUG}
-DEFINES:=-D__UMAKEFILE
-
-SRCS:=${sort ${SRCS}}
-
-.PHONY: all run new clean main
-
-
-# all - do everything (default) #
-all: ./lib/libxbee.so.$(VERSION) main
- @echo "*** Done! ***"
-
-
-# run - remake main and then run #
-run: main
- ./bin/main
-
-
-# new - clean and do everything again #
-new: clean all
-
-
-# clean - remove any compiled files and PDFs #
-clean:
- rm -f ./*~
- rm -f ./sample/*~
- rm -f ./obj/*.o
- rm -f ./lib/libxbee.so*
- rm -f ./bin/main
-
-# install - installs library #
-install: /usr/lib/libxbee.so.$(VERSION) /usr/include/xbee.h
-
-/usr/lib/libxbee.so.$(VERSION): ./lib/libxbee.so.$(VERSION)
- cp ./lib/libxbee.so.$(VERSION) /usr/lib/libxbee.so.$(VERSION) -f
- @chmod 755 /usr/lib/libxbee.so.$(VERSION)
- @chown root:root /usr/lib/libxbee.so.$(VERSION)
- ln ./libxbee.so.$(VERSION) /usr/lib/libxbee.so.1 -sf
- @chown root:root /usr/lib/libxbee.so.1
- ln ./libxbee.so.$(VERSION) /usr/lib/libxbee.so -sf
- @chown root:root /usr/lib/libxbee.so
-
-/usr/include/xbee.h: ./xbee.h
- cp ./xbee.h /usr/include/xbee.h -f
- @chmod 644 /usr/include/xbee.h
- @chown root:root /usr/include/xbee.h
-
-uninstall:
- rm /usr/lib/libxbee.so.$(VERSION) -f
- rm /usr/lib/libxbee.so.1 -f
- rm /usr/lib/libxbee.so -f
- rm /usr/include/xbee.h -f
-
-# main - compile & link objects #
-main: ./bin/main
-
-./bin/main: ./obj/api.o ./bin/ ./main.c
- ${CC} ${CLINKS} ./main.c ./obj/api.o -o ./bin/main ${DEBUG}
-
-./bin/:
- mkdir ./bin/
-
-./lib/libxbee.so.$(VERSION): ./lib/ ${addprefix ./obj/,${SRCS:.c=.o}} ./xbee.h
- gcc -shared -Wl,-soname,libxbee.so.1 -o ./lib/libxbee.so.$(VERSION) ./obj/*.o -lrt
- ln ./libxbee.so.$(VERSION) ./lib/libxbee.so.1 -sf
- ln ./libxbee.so.$(VERSION) ./lib/libxbee.so -sf
-
-./lib/:
- mkdir ./lib/
-
-./obj/:
- mkdir ./obj/
-
-./obj/%.o: ./obj/ %.c %.h xbee.h
- ${CC} ${CFLAGS} ${DEFINES} ${DEBUG} $*.c -o $@
-
-./obj/%.o: ./obj/ %.c xbee.h
- ${CC} ${CFLAGS} ${DEFINES} ${DEBUG} $*.c -o $@
diff --git a/libs/thirdParty/libxbee/win32.README.txt b/libs/thirdParty/libxbee/win32.README.txt
deleted file mode 100644
index f16dc0d94eda4b5ad239c31e806ee2a90f970d92..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/win32.README.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Welcome to libxbee!
-
-I have proveded sample code in the ./sample directory. Hopefully this will help
-get you up and running with libxbee. If you would like samples showing a different
-aspect of libxbee, then please do not hesitate to file an 'issue' on the project
-site, and I will get to it ASAP:
- http://code.google.com/p/libxbee/issues/list
-
-
-Documentation is avaliable as HTML in the 'doc' folder.
-
-
-Please note that this project is still in development, so should not be used for
-any purpose other than learning/playing/testing etc... Basically don't use it to
-make money, and then hold me responsible if it breaks!
-
-Feel free to contact me directly with any queries:
- attie@attie.co.uk
-
-
-=== Compiling & Using ===
-
-To compile you must:
- 1) Have Visual C++ 2008 (v9.0) installed (Express or otherwise)
- 2) Have make installed - see GnuWin
- 3) Modify win32.makefile so that the paths at the top are correct
-
-Compile using `make -f win32.makefile` from the command prompt
-
-For C/C++ (and probrably others) just include xbee.h and link with libxbee.dll
-For VB6 see ./sample/vb6/ for more info & examples
diff --git a/libs/thirdParty/libxbee/win32.makefile b/libs/thirdParty/libxbee/win32.makefile
deleted file mode 100644
index d90965681799c87a2e9f7b4b0da82d67f4d418bc..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/win32.makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#-- uncomment this to enable debugging
-#DEBUG:=/Zi /DDEBUG /MTd
-#LDBUG:=/DEBUG
-
-#-- you may need to edit these lines if your installation is different
-VCPath:=C:\Program Files\Microsoft Visual Studio 10.0\VC
-SDKPath:=C:\Program Files\Microsoft SDKs\Windows\v7.1
-
-#!! if using visual studio 2010, you may need to run the following in a shell,
-# and then within the same shell run `make -f win32.makefile`
-# C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat
-
-###### YOU SHOULD NOT CHANGE BELOW THIS LINE ######
-SHELL:=cmd
-DEBUG?=/MT
-
-SRCS:=api.c
-
-CC:="${VCPath}\bin\cl.exe"
-LINK:="${VCPath}\bin\link.exe"
-RC:="${SDKPath}\bin\rc.exe"
-
-.PHONY: all new clean
-
-all: .\lib\libxbee.dll
-
-new: clean all
-
-clean:
- -rmdir /Q /S lib
- -rmdir /Q /S obj
-
-.\obj:
- mkdir obj
-
-.\lib:
- mkdir lib
-
-.\lib\libxbee.dll: .\lib .\obj\api.obj .\obj\win32.res
- ${LINK} ${LDBUG} /nologo /DLL /MAP:lib\libxbee.map /DEF:xsys\win32.def \
- "/LIBPATH:${SDKPath}\Lib" "/LIBPATH:${VCPath}\lib" \
- /OUT:.\lib\libxbee.dll .\obj\api.obj .\obj\win32.res
-
-.\obj\api.obj: .\obj api.c api.h xbee.h
- ${CC} ${DEBUG} /nologo "/I${SDKPath}\Include" "/I${VCPath}\include" /RTCs /Gz /c /Fd.\lib\libxbee.pdb /Fo.\obj\api.obj ${SRCS}
-
-.\obj\win32.res: .\xsys\win32.rc
- ${RC} "/I${SDKPath}\Include" "/I${VCPath}\include" /n /fo.\obj\win32.res .\xsys\win32.rc
diff --git a/libs/thirdParty/libxbee/xbee.h b/libs/thirdParty/libxbee/xbee.h
deleted file mode 100644
index 61331d84434f4170501acda1e794a6a8d669ad3c..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xbee.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-#ifndef XBEE_H
-#define XBEE_H
-
-#if !defined(__GNUC__) && !defined(_WIN32)
-#error "This library is only currently compatible with Linux and Win32"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __LIBXBEE_API_H
-typedef void* xbee_hnd;
-#endif
-
-#include
-
-#ifdef __GNUC__ /* ---- */
-#include
-typedef pthread_mutex_t xbee_mutex_t;
-typedef pthread_cond_t xbee_cond_t;
-typedef pthread_t xbee_thread_t;
-typedef sem_t xbee_sem_t;
-typedef FILE* xbee_file_t;
-#elif (defined(WIN32) || defined(_WIN32)) /* -------------- */
-#include
-#define CALLTYPE __stdcall
-#define CALLTYPEVA __cdecl
-typedef HANDLE xbee_mutex_t;
-typedef CONDITION_VARIABLE xbee_cond_t;
-typedef HANDLE xbee_thread_t;
-typedef HANDLE xbee_sem_t;
-typedef HANDLE xbee_file_t;
-#else
-#error "Unknown operating system or compiler"
-#endif /* ------------- */
-
-#ifndef CALLTYPE
-#define CALLTYPE
-#endif
-
-#ifndef CALLTYPEVA
-#define CALLTYPEVA
-#endif
-
-enum xbee_types {
- xbee_unknown,
-
- xbee_localAT, /* frame ID */
- xbee_remoteAT,
- xbee_modemStatus,
- xbee_txStatus,
-
- /* XBee Series 1 stuff */
- xbee_16bitRemoteAT, /* frame ID */
- xbee_64bitRemoteAT, /* frame ID */
-
- xbee_16bitData, /* frame ID for ACKs */
- xbee_64bitData, /* frame ID for ACKs */
-
- xbee_16bitIO,
- xbee_64bitIO,
-
- /* XBee Series 2 stuff */
- xbee2_data,
- xbee2_txStatus
-};
-typedef enum xbee_types xbee_types;
-
-typedef struct xbee_sample xbee_sample;
-struct xbee_sample {
- /* X A5 A4 A3 A2 A1 A0 D8 D7 D6 D5 D4 D3 D2 D1 D0 */
- unsigned short IOmask; /* IO */
- /* X X X X X X X D8 D7 D6 D5 D4 D3 D2 D1 D0 */
- unsigned short IOdigital; /* IO */
- /* X X X X X D D D D D D D D D D D */
- unsigned short IOanalog[6]; /* IO */
-};
-
-typedef struct xbee_pkt xbee_pkt;
-struct xbee_pkt {
- unsigned int sAddr64 : 1; /* yes / no */
- unsigned int dataPkt : 1; /* if no - AT packet */
- unsigned int txStatusPkt : 1;
- unsigned int modemStatusPkt : 1;
- unsigned int remoteATPkt : 1;
- unsigned int IOPkt : 1;
- unsigned int isBroadcastADR : 1;
- unsigned int isBroadcastPAN : 1;
-
- unsigned char frameID; /* AT Status */
- unsigned char atCmd[2]; /* AT */
-
- unsigned char status; /* AT Data Status */ /* status / options */
- unsigned char samples;
- unsigned char RSSI; /* Data */
-
- unsigned char Addr16[2]; /* AT Data */
-
- unsigned char Addr64[8]; /* AT Data */
-
- unsigned char data[128]; /* AT Data */
-
- unsigned int datalen;
- xbee_types type;
-
- xbee_pkt *next;
-
- xbee_sample IOdata[1]; /* this array can be extended by using a this trick:
- p = calloc(sizeof(xbee_pkt) + (sizeof(xbee_sample) * (samples - 1))) */
-};
-
-typedef struct xbee_con xbee_con;
-struct xbee_con {
- unsigned int tAddr64 : 1;
- unsigned int atQueue : 1; /* queues AT commands until AC is sent */
- unsigned int txDisableACK : 1;
- unsigned int txBroadcastPAN: 1; /* broadcasts to PAN */
- unsigned int destroySelf : 1; /* if set, the callback thread will destroy the connection
- after all of the packets have been processed */
- unsigned int waitforACK : 1; /* waits for the ACK or NAK after transmission */
- unsigned int noFreeAfterCB : 1; /* prevents libxbee from free'ing the packet after the callback has completed */
- unsigned int __spare__ : 1;
- xbee_types type;
- unsigned char frameID;
- unsigned char tAddr[8]; /* 64-bit 0-7 16-bit 0-1 */
- void *customData; /* can be used to store data related to this connection */
- void (CALLTYPE *callback)(xbee_con*,xbee_pkt*); /* call back function */
- void *callbackList;
- xbee_mutex_t callbackmutex;
- xbee_mutex_t callbackListmutex;
- xbee_mutex_t Txmutex;
- xbee_sem_t waitforACKsem;
- volatile unsigned char ACKstatus; /* 255 = waiting, 0 = success, 1 = no ack, 2 = cca fail, 3 = purged */
- xbee_con *next;
-};
-
-int CALLTYPE xbee_setup(char *path, int baudrate);
-int CALLTYPE xbee_setuplog(char *path, int baudrate, int logfd);
-int CALLTYPE xbee_setupAPI(char *path, int baudrate, char cmdSeq, int cmdTime);
-int CALLTYPE xbee_setuplogAPI(char *path, int baudrate, int logfd, char cmdSeq, int cmdTime);
-xbee_hnd CALLTYPE _xbee_setup(char *path, int baudrate);
-xbee_hnd CALLTYPE _xbee_setuplog(char *path, int baudrate, int logfd);
-xbee_hnd CALLTYPE _xbee_setupAPI(char *path, int baudrate, char cmdSeq, int cmdTime);
-xbee_hnd CALLTYPE _xbee_setuplogAPI(char *path, int baudrate, int logfd, char cmdSeq, int cmdTime);
-
-int CALLTYPE xbee_end(void);
-int CALLTYPE _xbee_end(xbee_hnd xbee);
-
-void CALLTYPE xbee_logitf(char *format, ...);
-void CALLTYPE _xbee_logitf(xbee_hnd xbee, char *format, ...);
-void CALLTYPE xbee_logit(char *str);
-void CALLTYPE _xbee_logit(xbee_hnd xbee, char *str);
-
-xbee_con * CALLTYPEVA xbee_newcon(unsigned char frameID, xbee_types type, ...);
-xbee_con * CALLTYPEVA _xbee_newcon(xbee_hnd xbee, unsigned char frameID, xbee_types type, ...);
-xbee_con * CALLTYPE _xbee_vnewcon(xbee_hnd xbee, unsigned char frameID, xbee_types type, va_list ap);
-
-void CALLTYPE xbee_purgecon(xbee_con *con);
-void CALLTYPE _xbee_purgecon(xbee_hnd xbee, xbee_con *con);
-
-void CALLTYPE xbee_endcon2(xbee_con **con, int alreadyUnlinked);
-void CALLTYPE _xbee_endcon2(xbee_hnd xbee, xbee_con **con, int alreadyUnlinked);
-#define xbee_endcon(x) xbee_endcon2(&(x),0)
-#define _xbee_endcon(xbee,x) _xbee_endcon2((xbee),&(x),0)
-
-int CALLTYPE xbee_nsenddata(xbee_con *con, char *data, int length);
-int CALLTYPE _xbee_nsenddata(xbee_hnd xbee, xbee_con *con, char *data, int length);
-int CALLTYPEVA xbee_senddata(xbee_con *con, char *format, ...);
-int CALLTYPEVA _xbee_senddata(xbee_hnd xbee, xbee_con *con, char *format, ...);
-int CALLTYPE xbee_vsenddata(xbee_con *con, char *format, va_list ap);
-int CALLTYPE _xbee_vsenddata(xbee_hnd xbee, xbee_con *con, char *format, va_list ap);
-
-#if defined(WIN32)
-/* oh and just 'cos windows has rubbish memory management rules... this too */
-void CALLTYPE xbee_free(void *ptr);
-#endif /* ------------- */
-
-xbee_pkt * CALLTYPE xbee_getpacket(xbee_con *con);
-xbee_pkt * CALLTYPE _xbee_getpacket(xbee_hnd xbee, xbee_con *con);
-xbee_pkt * CALLTYPE xbee_getpacketwait(xbee_con *con);
-xbee_pkt * CALLTYPE _xbee_getpacketwait(xbee_hnd xbee, xbee_con *con);
-
-int CALLTYPE xbee_hasdigital(xbee_pkt *pkt, int sample, int input);
-int CALLTYPE xbee_getdigital(xbee_pkt *pkt, int sample, int input);
-
-int CALLTYPE xbee_hasanalog(xbee_pkt *pkt, int sample, int input);
-double CALLTYPE xbee_getanalog(xbee_pkt *pkt, int sample, int input, double Vref);
-
-const char * CALLTYPE xbee_svn_version(void);
-const char * CALLTYPE xbee_build_info(void);
-
-void CALLTYPE xbee_listen_stop(xbee_hnd xbee);
-
-#ifdef __cplusplus
-} /* cplusplus */
-#endif
-
-#endif
diff --git a/libs/thirdParty/libxbee/xsys/README b/libs/thirdParty/libxbee/xsys/README
deleted file mode 100644
index 48d3928505730bab3f66fd31195b427700648bd3..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xsys/README
+++ /dev/null
@@ -1 +0,0 @@
-This directory contains cross-system support files.
\ No newline at end of file
diff --git a/libs/thirdParty/libxbee/xsys/linux.c b/libs/thirdParty/libxbee/xsys/linux.c
deleted file mode 100644
index 768d5b3d4ecb9edf05cc53bbc2c088df398810d6..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xsys/linux.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* ################################################################# */
-/* ### Linux Code ################################################## */
-/* ################################################################# */
-
-/* this file contains code that is used by Linux ONLY */
-#ifndef __GNUC__
-#error "This file should only be used on a Linux system"
-#endif
-
-#include "linux.h"
-
-int init_serial(xbee_hnd xbee, int baudrate) {
- struct flock fl;
- struct termios tc;
- speed_t chosenbaud;
-
- /* select the baud rate */
- switch (baudrate) {
- case 1200: chosenbaud = B1200; break;
- case 2400: chosenbaud = B2400; break;
- case 4800: chosenbaud = B4800; break;
- case 9600: chosenbaud = B9600; break;
- case 19200: chosenbaud = B19200; break;
- case 38400: chosenbaud = B38400; break;
- case 57600: chosenbaud = B57600; break;
- case 115200:chosenbaud = B115200; break;
- default:
- fprintf(stderr,"%s(): Unknown or incompatiable baud rate specified... (%d)\n",__FUNCTION__,baudrate);
- return -1;
- };
-
- /* open the serial port as a file descriptor */
- if ((xbee->ttyfd = open(xbee->path,O_RDWR | O_NOCTTY | O_NONBLOCK)) == -1) {
- xbee_perror("xbee_setup():open()");
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee->path);
- return -1;
- }
-
- /* lock the file */
- fl.l_type = F_WRLCK | F_RDLCK;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_pid = getpid();
- if (fcntl(xbee->ttyfd, F_SETLK, &fl) == -1) {
- xbee_perror("xbee_setup():fcntl()");
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee->path);
- close(xbee->ttyfd);
- return -1;
- }
-
- /* open the serial port as a FILE* */
- if ((xbee->tty = fdopen(xbee->ttyfd,"r+")) == NULL) {
- xbee_perror("xbee_setup():fdopen()");
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee->path);
- close(xbee->ttyfd);
- return -1;
- }
-
- /* flush the serial port */
- fflush(xbee->tty);
-
- /* disable buffering */
- setvbuf(xbee->tty,NULL,_IONBF,BUFSIZ);
-
- /* setup the baud rate and other io attributes */
- tcgetattr(xbee->ttyfd, &tc);
- /* input flags */
- tc.c_iflag &= ~ IGNBRK; /* enable ignoring break */
- tc.c_iflag &= ~(IGNPAR | PARMRK); /* disable parity checks */
- tc.c_iflag &= ~ INPCK; /* disable parity checking */
- tc.c_iflag &= ~ ISTRIP; /* disable stripping 8th bit */
- tc.c_iflag &= ~(INLCR | ICRNL); /* disable translating NL <-> CR */
- tc.c_iflag &= ~ IGNCR; /* disable ignoring CR */
- tc.c_iflag &= ~(IXON | IXOFF); /* disable XON/XOFF flow control */
- /* output flags */
- tc.c_oflag &= ~ OPOST; /* disable output processing */
- tc.c_oflag &= ~(ONLCR | OCRNL); /* disable translating NL <-> CR */
- tc.c_oflag &= ~ OFILL; /* disable fill characters */
- /* control flags */
- tc.c_cflag |= CREAD; /* enable reciever */
- tc.c_cflag &= ~ PARENB; /* disable parity */
- tc.c_cflag &= ~ CSTOPB; /* disable 2 stop bits */
- tc.c_cflag &= ~ CSIZE; /* remove size flag... */
- tc.c_cflag |= CS8; /* ...enable 8 bit characters */
- tc.c_cflag |= HUPCL; /* enable lower control lines on close - hang up */
- /* local flags */
- tc.c_lflag &= ~ ISIG; /* disable generating signals */
- tc.c_lflag &= ~ ICANON; /* disable canonical mode - line by line */
- tc.c_lflag &= ~ ECHO; /* disable echoing characters */
- tc.c_lflag &= ~ ECHONL; /* ??? */
- tc.c_lflag &= ~ NOFLSH; /* disable flushing on SIGINT */
- tc.c_lflag &= ~ IEXTEN; /* disable input processing */
- /* control characters */
- memset(tc.c_cc,0,sizeof(tc.c_cc));
- /* i/o rates */
- cfsetspeed(&tc, chosenbaud); /* set i/o baud rate */
- tcsetattr(xbee->ttyfd, TCSANOW, &tc);
- tcflow(xbee->ttyfd, TCOON|TCION); /* enable input & output transmission */
-
- return 0;
-}
-
-static int xbee_select(xbee_hnd xbee, struct timeval *timeout) {
- fd_set fds;
-
- FD_ZERO(&fds);
- FD_SET(xbee->ttyfd, &fds);
-
- return select(xbee->ttyfd+1, &fds, NULL, NULL, timeout);
-}
-
-#define xbee_sem_wait1sec(a) xbee_sem_wait1sec2(&(a))
-static inline int xbee_sem_wait1sec2(xbee_sem_t *sem) {
- struct timespec to;
- clock_gettime(CLOCK_REALTIME,&to);
- to.tv_sec++;
- return sem_timedwait(sem,&to);
-}
diff --git a/libs/thirdParty/libxbee/xsys/linux.h b/libs/thirdParty/libxbee/xsys/linux.h
deleted file mode 100644
index 886bbf5bf1c33ed4a59fa6d7396dc198ff3d9342..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xsys/linux.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this file contains code that is used by Linux ONLY */
-#ifndef __GNUC__
-#error "This file should only be used on a Linux system"
-#endif
-
-/* ################################################################# */
-/* ### Linux Code ################################################## */
-/* ################################################################# */
-
-#define xbee_thread_create(a,b,c) pthread_create(&(a),NULL,(void *(*)(void *))(b),(void *)(c))
-#define xbee_thread_cancel(a,b) pthread_cancel((a))
-#define xbee_thread_join(a) pthread_join((a),NULL)
-#define xbee_thread_tryjoin(a) pthread_tryjoin_np((a),NULL)
-
-#define xbee_mutex_init(a) pthread_mutex_init(&(a),NULL)
-#define xbee_mutex_destroy(a) pthread_mutex_destroy(&(a))
-#define xbee_mutex_lock(a) pthread_mutex_lock(&(a))
-#define xbee_mutex_trylock(a) pthread_mutex_trylock(&(a))
-#define xbee_mutex_unlock(a) pthread_mutex_unlock(&(a))
-
-#define xbee_sem_init(a) sem_init(&(a),0,0)
-#define xbee_sem_destroy(a) sem_destroy(&(a))
-#define xbee_sem_wait(a) sem_wait(&(a))
-#define xbee_sem_post(a) sem_post(&(a))
-
-#define xbee_cond_init(a) pthread_cond_init(&(a),NULL)
-#define xbee_cond_destroy(a) pthread_cond_destroy(&(a))
-#define xbee_cond_wait(a,b) pthread_cond_wait(&(a),&(b))
-#define xbee_cond_signal(a) pthread_cond_signal(&(a))
-#define xbee_cond_broadcast(a) pthread_cond_broadcast(&(a))
-
-#define xbee_write(xbee,a,b) fwrite((a),1,(b),(xbee)->tty)
-#define xbee_read(xbee,a,b) fread((a),1,(b),(xbee)->tty)
-#define xbee_ferror(xbee) ferror((xbee)->tty)
-#define xbee_feof(xbee) feof((xbee)->tty)
-#define xbee_close(a) fclose((a))
-
diff --git a/libs/thirdParty/libxbee/xsys/pdf/linux.c.pdf b/libs/thirdParty/libxbee/xsys/pdf/linux.c.pdf
deleted file mode 100644
index 75a9a38b29af858ad4bb773704982d44fa400b32..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/xsys/pdf/linux.c.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/xsys/pdf/linux.h.pdf b/libs/thirdParty/libxbee/xsys/pdf/linux.h.pdf
deleted file mode 100644
index a4c65ae408966bc912ed72e08fc49c4edee516ff..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/xsys/pdf/linux.h.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/xsys/pdf/win32.c.pdf b/libs/thirdParty/libxbee/xsys/pdf/win32.c.pdf
deleted file mode 100644
index ec776c30b824ae659ab2cb2f31907df2f608dff8..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/xsys/pdf/win32.c.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/xsys/pdf/win32.def.pdf b/libs/thirdParty/libxbee/xsys/pdf/win32.def.pdf
deleted file mode 100644
index 99b0548e4d2703b57cf69ec0fde18166639f570e..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/xsys/pdf/win32.def.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/xsys/pdf/win32.dll.c.pdf b/libs/thirdParty/libxbee/xsys/pdf/win32.dll.c.pdf
deleted file mode 100644
index 97d7acb34cfe49904b5c08b6c227512fc8bc6048..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/xsys/pdf/win32.dll.c.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/xsys/pdf/win32.h.pdf b/libs/thirdParty/libxbee/xsys/pdf/win32.h.pdf
deleted file mode 100644
index b844726f1a19607952831452b160be3896a412b1..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/xsys/pdf/win32.h.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/xsys/pdf/win32.rc.pdf b/libs/thirdParty/libxbee/xsys/pdf/win32.rc.pdf
deleted file mode 100644
index 8ff8a7956bff9e4e4ff4b5cb33683835c635a36c..0000000000000000000000000000000000000000
Binary files a/libs/thirdParty/libxbee/xsys/pdf/win32.rc.pdf and /dev/null differ
diff --git a/libs/thirdParty/libxbee/xsys/win32.c b/libs/thirdParty/libxbee/xsys/win32.c
deleted file mode 100644
index a05950a94b6a44e84db33f067f85c07ae9c90342..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xsys/win32.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* ################################################################# */
-/* ### Win32 Code ################################################## */
-/* ################################################################# */
-
-/* this file contains code that is used by Win32 ONLY */
-#ifndef _WIN32
-#error "This file should only be used on a Win32 system"
-#endif
-
-#include "win32.h"
-#include "win32.dll.c"
-
-static int init_serial(xbee_hnd xbee, int baudrate) {
- int chosenbaud;
- DCB tc;
- int evtMask;
- COMMTIMEOUTS timeouts;
-
- /* open the serial port */
- xbee->tty = CreateFile(TEXT(xbee->path),
- GENERIC_READ | GENERIC_WRITE,
- 0, /* exclusive access */
- NULL, /* default security attributes */
- OPEN_EXISTING,
- FILE_FLAG_OVERLAPPED,
- NULL);
- if (xbee->tty == INVALID_HANDLE_VALUE) {
- xbee_logS("Invalid file handle...");
- xbee_logE("Is the XBee plugged in and avaliable on the correct port?");
- xbee_mutex_destroy(xbee->conmutex);
- xbee_mutex_destroy(xbee->pktmutex);
- xbee_mutex_destroy(xbee->sendmutex);
- Xfree(xbee->path);
- return -1;
- }
-
- GetCommState(xbee->tty, &tc);
- tc.BaudRate = baudrate;
- tc.fBinary = TRUE;
- tc.fParity = FALSE;
- tc.fOutxCtsFlow = FALSE;
- tc.fOutxDsrFlow = FALSE;
- tc.fDtrControl = DTR_CONTROL_DISABLE;
- tc.fDsrSensitivity = FALSE;
- tc.fTXContinueOnXoff = FALSE;
- tc.fOutX = FALSE;
- tc.fInX = FALSE;
- tc.fErrorChar = FALSE;
- tc.fNull = FALSE;
- tc.fRtsControl = RTS_CONTROL_DISABLE;
- tc.fAbortOnError = FALSE;
- tc.ByteSize = 8;
- tc.Parity = NOPARITY;
- tc.StopBits = ONESTOPBIT;
- SetCommState(xbee->tty, &tc);
-
- timeouts.ReadIntervalTimeout = MAXDWORD;
- timeouts.ReadTotalTimeoutMultiplier = 0;
- timeouts.ReadTotalTimeoutConstant = 0;
- timeouts.WriteTotalTimeoutMultiplier = 0;
- timeouts.WriteTotalTimeoutConstant = 0;
- SetCommTimeouts(xbee->tty, &timeouts);
-
- SetCommMask(xbee->tty, EV_RXCHAR);
-
- return 0;
-}
-
-/* a replacement for the linux select() function... for a serial port */
-static int xbee_select(xbee_hnd xbee, struct timeval *timeout) {
- int evtMask = 0;
- COMSTAT status;
- int ret;
-
- for (;;) {
- /* find out how many bytes are in the Rx buffer... */
- if (ClearCommError(xbee->tty,NULL,&status) && (status.cbInQue > 0)) {
- /* if there is data... return! */
- return 1; /*status.cbInQue;*/
- } else if (timeout && timeout->tv_sec == 0 && timeout->tv_usec == 0) {
- /* if the timeout was 0 (return immediately) then return! */
- return 0;
- }
-
- /* otherwise wait for an Rx event... */
- memset(&(xbee->ttyovrs),0,sizeof(OVERLAPPED));
- xbee->ttyovrs.hEvent = CreateEvent(NULL,TRUE,FALSE,NULL);
- if (!WaitCommEvent(xbee->tty,&evtMask,&(xbee->ttyovrs))) {
- if (GetLastError() == ERROR_IO_PENDING) {
- DWORD timeoutval;
- if (!timeout) {
- /* behave like the linux function... if the timeout pointer was NULL
- then wait indefinately */
- timeoutval = INFINITE;
- } else {
- /* Win32 doesn't give the luxury of microseconds and seconds... just miliseconds! */
- timeoutval = (timeout->tv_sec * 1000) + (timeout->tv_usec / 1000);
- }
- ret = WaitForSingleObject(xbee->ttyovrs.hEvent,timeoutval);
- if (ret == WAIT_TIMEOUT) {
- /* cause the WaitCommEvent() call to stop */
- SetCommMask(xbee->tty, EV_RXCHAR);
- /* if a timeout occured, then return 0 */
- CloseHandle(xbee->ttyovrs.hEvent);
- return 0;
- }
- } else {
- return -1;
- }
- }
- CloseHandle(xbee->ttyovrs.hEvent);
- }
-
- /* always return -1 (error) for now... */
- return -1;
-}
-
-/* this offers the same behavior as non-blocking I/O under linux */
-int xbee_write(xbee_hnd xbee, const void *ptr, size_t size) {
- xbee->ttyeof = FALSE;
- if (!WriteFile(xbee->tty, ptr, size, NULL, &(xbee->ttyovrw)) &&
- (GetLastError() != ERROR_IO_PENDING)) return 0;
- if (!GetOverlappedResult(xbee->tty, &(xbee->ttyovrw), &(xbee->ttyw), TRUE)) {
- if (GetLastError() == ERROR_HANDLE_EOF) xbee->ttyeof = TRUE;
- return 0;
- }
- return xbee->ttyw;
-}
-
-/* this offers the same behavior as non-blocking I/O under linux */
-int xbee_read(xbee_hnd xbee, void *ptr, size_t size) {
- xbee->ttyeof = FALSE;
- if (!ReadFile(xbee->tty, ptr, size, NULL, &(xbee->ttyovrr)) &&
- (GetLastError() != ERROR_IO_PENDING)) return 0;
- if (!GetOverlappedResult(xbee->tty, &(xbee->ttyovrr), &(xbee->ttyr), TRUE)) {
- if (GetLastError() == ERROR_HANDLE_EOF) xbee->ttyeof = TRUE;
- return 0;
- }
- return xbee->ttyr;
-}
-
-/* this is because Win32 has some weird memory management rules...
- - the thread that allocated the memory, MUST free it... */
-void xbee_free(void *ptr) {
- if (!ptr) return;
- free(ptr);
-}
-
-/* win32 equivalent of unix gettimeofday() */
-int gettimeofday(struct timeval *tv, struct timezone *tz) {
- if (tv) {
- struct _timeb timeb;
- _ftime(&timeb);
- tv->tv_sec = timeb.time;
- tv->tv_usec = timeb.millitm * 1000;
- }
- /* ignore tz for now */
- return 0;
-}
-
-/* ################################################################# */
-/* ### Helper Functions (Mainly for VB6 use) ####################### */
-/* ################################################################# */
-
-/* enable the debug output to a custom file or fallback to stderr */
-int xbee_setupDebugAPI(char *path, int baudrate, char *logfile, char cmdSeq, int cmdTime) {
- xbee_hnd xbee = NULL;
- int fd, ret;
- if ((fd = _open(logfile,_O_WRONLY | _O_CREAT | _O_TRUNC)) == -1) {
- fd = 2;
- }
- ret = xbee_setuplogAPI(path,baudrate,fd,cmdSeq,cmdTime);
- if (fd > 2) { /* close fd, as libxbee dup'ed it */
- //_close(fd);
- }
- if (!ret) { /* libxbee started correctly */
- xbee = default_xbee;
- if (fd == -1) {
- xbee_log("Error opening logfile '%s' (errno=%d)... using stderr instead!",logfile,errno);
- }
- }
- return ret;
-}
-int xbee_setupDebug(char *path, int baudrate, char *logfile) {
- return xbee_setupDebugAPI(path,baudrate,logfile,0,0);
-}
-
-/* These silly little functions are required for VB6
- - it freaks out when you call a function that uses va_args... */
-xbee_con *xbee_newcon_simple(unsigned char frameID, xbee_types type) {
- return xbee_newcon(frameID, type);
-}
-xbee_con *xbee_newcon_16bit(unsigned char frameID, xbee_types type, int addr) {
- return xbee_newcon(frameID, type, addr);
-}
-xbee_con *xbee_newcon_64bit(unsigned char frameID, xbee_types type, int addrL, int addrH) {
- return xbee_newcon(frameID, type, addrL, addrH);
-}
-
-void xbee_enableACKwait(xbee_con *con) {
- con->waitforACK = 1;
-}
-void xbee_disableACKwait(xbee_con *con) {
- con->waitforACK = 0;
-}
-
-void xbee_enableDestroySelf(xbee_con *con) {
- con->destroySelf = 1;
-}
-
-/* for vb6... it will send a message to the given hWnd which can in turn check for a packet */
-void xbee_callback(xbee_con *con, xbee_pkt *pkt) {
- xbee_hnd xbee = default_xbee;
-
- if (!win32_hWnd) {
- xbee_log("*** Cannot do callback! No hWnd set... ***");
- return;
- }
- if (!win32_MessageID) {
- xbee_log("*** Cannot do callback! No MessageID set... ***");
- return;
- }
-
- xbee_log("Callback message sent!");
- SendMessage(win32_hWnd, win32_MessageID, (int)con, (int)pkt);
-}
-
-/* very simple C function to provide more functionality to VB6 */
-int xbee_runCallback(int(*func)(xbee_con*,xbee_pkt*), xbee_con *con, xbee_pkt *pkt) {
- return func(con,pkt);
-}
-
-void xbee_enableCallbacks(HWND hWnd, UINT uMsg) {
- xbee_hnd xbee = default_xbee;
- if (!win32_MessageID || win32_MessageID != uMsg) {
- xbee_log("Configuring libxbee to use MessageID = 0x%08X", uMsg);
- win32_MessageID = uMsg;
- }
- if (!win32_hWnd || win32_hWnd != hWnd) {
- xbee_log("Configuring libxbee to use hWnd = 0x%08X", hWnd);
- win32_hWnd = hWnd;
- }
-}
-
-void xbee_attachCallback(xbee_con *con) {
- xbee_hnd xbee = default_xbee;
-
- /* setup the callback function */
- xbee_log("Setting callback for connection @ 0x%08X",con);
- con->callback = xbee_callback;
-}
-
-void xbee_detachCallback(xbee_con *con) {
- xbee_hnd xbee = default_xbee;
-
- /* un-setup the callback function */
- xbee_log("Unsetting callback for connection @ 0x%08X",con);
- con->callback = NULL;
-}
diff --git a/libs/thirdParty/libxbee/xsys/win32.def b/libs/thirdParty/libxbee/xsys/win32.def
deleted file mode 100644
index 888040ee38085c483632a80f083ba61390c36eb5..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xsys/win32.def
+++ /dev/null
@@ -1,71 +0,0 @@
-LIBRARY libxbee
-
-EXPORTS
- ver
- DllMain
- DllCanUnloadNow PRIVATE
- DllRegisterServer PRIVATE
- DllUnregisterServer PRIVATE
-
- xbee_free
-
- xbee_setup
- _xbee_setup
- xbee_setuplog
- _xbee_setuplog
- xbee_setupAPI
- _xbee_setupAPI
- xbee_setuplogAPI
- _xbee_setuplogAPI
- xbee_setupDebug
- xbee_setupDebugAPI
-
- xbee_end
- _xbee_end
- xbee_listen_stop
-
- xbee_newcon
- _xbee_newcon
- xbee_newcon_simple
- xbee_newcon_16bit
- xbee_newcon_64bit
-
- xbee_enableACKwait
- xbee_disableACKwait
- xbee_enableDestroySelf
-
- xbee_enableCallbacks
- xbee_attachCallback
- xbee_detachCallback
- xbee_runCallback
-
- xbee_endcon2
- _xbee_endcon2
- xbee_purgecon
- _xbee_purgecon
-
- xbee_senddata
- _xbee_senddata
- xbee_nsenddata
- _xbee_nsenddata
- xbee_vsenddata
- _xbee_vsenddata
-
- xbee_getpacket
- _xbee_getpacket
- xbee_getpacketwait
- _xbee_getpacketwait
-
- xbee_hasanalog
- xbee_getanalog
-
- xbee_hasdigital
- xbee_getdigital
-
- xbee_svn_version
- xbee_build_info
-
- xbee_logit
- _xbee_logit
- xbee_logitf
- _xbee_logitf
diff --git a/libs/thirdParty/libxbee/xsys/win32.dll.c b/libs/thirdParty/libxbee/xsys/win32.dll.c
deleted file mode 100644
index 1a9ebcaa8573d6b77f9af6cdc70d12eeaa6b308b..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xsys/win32.dll.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* ################################################################# */
-/* ### Win32 DLL Code ############################################## */
-/* ################################################################# */
-
-/* this file contains code that is used by Win32 ONLY */
-#ifndef _WIN32
-#error "This file should only be used on a Win32 system"
-#endif
-
-int ver(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow) {
- char t[256];
- sprintf(t,"libxbee.dll\n%s\n%s",xbee_svn_version(),xbee_build_info());
- MessageBox(NULL, t, "libxbee Win32 DLL", MB_OK);
- return 0;
-}
-
-void xbee_UNLOADALL(void) {
- while (default_xbee) {
- _xbee_end(default_xbee);
- }
-}
-
-/* this gets called when the dll is loaded and unloaded... */
-BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved) {
- if (dwReason == DLL_PROCESS_DETACH) {
- /* ensure that libxbee has been shut down nicely */
- xbee_UNLOADALL();
- } else if (dwReason == DLL_PROCESS_ATTACH || dwReason == DLL_THREAD_ATTACH) {
- if (!glob_hModule) {
- /* keep a handle on the module */
- glob_hModule = (HMODULE)hModule;
- }
- }
- return TRUE;
-}
-
-HRESULT DllCanUnloadNow(void) {
- if (default_xbee) return 0;
- return 1;
-}
-
-/* ################################################################# */
-/* ### Win32 DLL COM Code ########################################## */
-/* ################################################################# */
-
-/* this function is from this tutorial:
- http://www.codeguru.com/Cpp/COM-Tech/activex/tutorials/article.php/c5567 */
-BOOL RegWriteKey(HKEY roothk, const char *lpSubKey, LPCTSTR val_name,
- DWORD dwType, void *lpvData, DWORD dwDataSize) {
- /* roothk: HKEY_CLASSES_ROOT, HKEY_LOCAL_MACHINE, etc
- lpSubKey: the key relative to 'roothk'
- val_name: the key value name where the data will be written
- dwType: REG_SZ,REG_BINARY, etc.
- lpvData: a pointer to the data buffer
- dwDataSize: the size of the data pointed to by lpvData */
- HKEY hk;
- if (ERROR_SUCCESS != RegCreateKey(roothk,lpSubKey,&hk) ) return FALSE;
- if (ERROR_SUCCESS != RegSetValueEx(hk,val_name,0,dwType,(CONST BYTE *)lpvData,dwDataSize)) return FALSE;
- if (ERROR_SUCCESS != RegCloseKey(hk)) return FALSE;
- return TRUE;
-}
-
-/* this is used by the regsrv32 application */
-STDAPI DllRegisterServer(void) {
- char key[MAX_PATH];
- char value[MAX_PATH];
-
- wsprintf(key,"CLSID\\%s",dllGUID);
- wsprintf(value,"%s",dlldesc);
- RegWriteKey(HKEY_CLASSES_ROOT, key, NULL, REG_SZ, (void *)value, lstrlen(value));
-
- wsprintf(key,"CLSID\\%s\\InprocServer32",dllGUID);
- GetModuleFileName(glob_hModule,value,MAX_PATH);
- RegWriteKey(HKEY_CLASSES_ROOT, key, NULL, REG_SZ, (void *)value, lstrlen(value));
-
- wsprintf(key,"CLSID\\%s\\ProgId",dllGUID);
- lstrcpy(value,dllid);
- RegWriteKey(HKEY_CLASSES_ROOT, key, NULL, REG_SZ, (void *)value, lstrlen(value));
-
- lstrcpy(key,dllid);
- lstrcpy(value,dlldesc);
- RegWriteKey(HKEY_CLASSES_ROOT, key, NULL, REG_SZ, (void *)value, lstrlen(value));
-
- wsprintf(key,"%s\\CLSID",dllid);
- RegWriteKey(HKEY_CLASSES_ROOT, key, NULL, REG_SZ, (void *)dllGUID, lstrlen(dllGUID));
-
- return S_OK;
-}
-
-/* this is used by the regsrv32 application */
-STDAPI DllUnregisterServer(void) {
- char key[MAX_PATH];
- char value[MAX_PATH];
-
- wsprintf(key,"%s\\CLSID",dllid);
- RegDeleteKey(HKEY_CLASSES_ROOT,key);
-
- wsprintf(key,"%s",dllid);
- RegDeleteKey(HKEY_CLASSES_ROOT,key);
-
- wsprintf(key,"CLSID\\%s\\InprocServer32",dllGUID);
- RegDeleteKey(HKEY_CLASSES_ROOT,key);
-
- wsprintf(key,"CLSID\\%s\\ProgId",dllGUID);
- RegDeleteKey(HKEY_CLASSES_ROOT,key);
-
- wsprintf(key,"CLSID\\%s",dllGUID);
- RegDeleteKey(HKEY_CLASSES_ROOT,key);
-
- return S_OK;
-}
diff --git a/libs/thirdParty/libxbee/xsys/win32.h b/libs/thirdParty/libxbee/xsys/win32.h
deleted file mode 100644
index 65f19f805cb978899aa3e9a19cf3e9fd115185e4..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xsys/win32.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- libxbee - a C library to aid the use of Digi's Series 1 XBee modules
- running in API mode (AP=2).
-
- Copyright (C) 2009 Attie Grande (attie@attie.co.uk)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-/* this file contains code that is used by Win32 ONLY */
-#ifndef _WIN32
-#error "This file should only be used on a Win32 system"
-#endif
-
-/* ################################################################# */
-/* ### Win32 Code ################################################## */
-/* ################################################################# */
-
-#pragma comment(lib, "Advapi32.lib")
-#pragma comment(lib, "User32.lib")
-
-#define dllid "attie-co-uk.libxbee"
-#define dlldesc "libxbee - XBee API Library"
-/* libxbee's GUID is {7A6E25AA-ECB5-4370-87B5-A1D31840FE23} */
-#define dllGUID "{7A6E25AA-ECB5-4370-87B5-A1D31840FE23}"
-
-#define Win32Message() MessageBox(0,"Run xbee_setup() first!...","libxbee",MB_OK);
-
-HMODULE glob_hModule = NULL;
-
-/* this uses miliseconds not microseconds... */
-#define usleep(a) Sleep((a)/1000)
-
-#define xbee_thread_create(a,b,c) (((a) = CreateThread(NULL,0,(void *)(b),(void *)(c),0,NULL)) == NULL)
-#define xbee_thread_cancel(a,b) TerminateThread((a),(b))
-#define xbee_thread_join(a) WaitForSingleObject((a),INFINITE)
-#define xbee_thread_tryjoin(a) WaitForSingleObject((a),0)
-
-#define xbee_mutex_init(a) (((a) = CreateEvent(NULL,FALSE,TRUE,NULL)) == NULL)
-#define xbee_mutex_destroy(a) CloseHandle((a))
-#define xbee_mutex_lock(a) WaitForSingleObject((a),INFINITE)
-#define xbee_mutex_trylock(a) WaitForSingleObject((a),0)
-#define xbee_mutex_unlock(a) SetEvent((a))
-
-#define xbee_sem_init(a) (((a) = CreateEvent(NULL,FALSE,FALSE,NULL)) == NULL)
-#define xbee_sem_destroy(a) CloseHandle((a))
-#define xbee_sem_wait(a) WaitForSingleObject((a),INFINITE)
-#define xbee_sem_wait1sec(a) WaitForSingleObject((a),1000)
-#define xbee_sem_post(a) SetEvent((a))
-
-#define xbee_cond_init(a) InitializeConditionVariable(&(a))
-#define xbee_cond_destroy(a)
-#define xbee_cond_wait(a,b) SleepConditionVariableCS(&(a),&(b),INFINITE)
-#define xbee_cond_signal(a) WakeConditionVariable(&(a))
-#define xbee_cond_broadcast(a) WakeAllConditionVariable(&(a))
-
-#define xbee_feof(a) (xbee->ttyeof)
-#define xbee_ferror(a) (0)
-#define xbee_close(a) (((a)==xbee->log)?fclose((a)):CloseHandle((a)))
-
-HWND win32_hWnd = 0;
-UINT win32_MessageID = 0;
diff --git a/libs/thirdParty/libxbee/xsys/win32.rc b/libs/thirdParty/libxbee/xsys/win32.rc
deleted file mode 100644
index 80f7d33bc4d151193b3f12e5a59baf6c5b545405..0000000000000000000000000000000000000000
--- a/libs/thirdParty/libxbee/xsys/win32.rc
+++ /dev/null
@@ -1,47 +0,0 @@
-/* more info: http://msdn.microsoft.com/en-us/library/aa381058(v=vs.85).aspx */
-
-#define APSTUDIO_READONLY_SYMBOLS
-#include "winresrc.h"
-#undef APSTUDIO_READONLY_SYMBOLS
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
-
-#ifdef _WIN32
-/* Englush (UK) */
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
-#pragma code_page(1252)
-#endif //_WIN32
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,4,1,0
- FILEFLAGSMASK 0x00L
- FILEFLAGS 0x00L
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "Comments", "Provides a simple interface for XBee radios"
- VALUE "CompanyName", "attie.co.uk"
- VALUE "FileDescription", "Provides a simple interface for XBee radios"
- VALUE "InternalName", "libxbee"
- VALUE "LegalCopyright", "Copyright (C) 2009 onwards Attie Grande"
- VALUE "LegalTrademarks", ""
- VALUE "OriginalFilename", "libxbee.dll"
- VALUE "PrivateBuild", ""
- VALUE "ProductName", "libxbee - http://code.google.com/p/libxbee/"
- VALUE "ProductVersion", "v1.4.1"
- VALUE "SpecialBuild", ""
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x809, 1200
- END
-END
-
-
-#endif
diff --git a/qgcresources.qrc b/qgcresources.qrc
index 360b9c4111b1f6d943c68c3e3155919ee5bda887..ae67a275deadee15131f5a8449e588f4b3268f2c 100644
--- a/qgcresources.qrc
+++ b/qgcresources.qrc
@@ -46,6 +46,7 @@
src/AutoPilotPlugins/Common/Images/HelicopterCoaxial.svg
src/AutoPilotPlugins/Common/Images/wifi.svg
src/QmlControls/arrow-down.png
+ src/QmlControls/check.png
src/VehicleSetup/FirmwareUpgradeIcon.png
src/AutoPilotPlugins/PX4/Images/FlightModesComponentIcon.png
src/AutoPilotPlugins/PX4/Images/CameraTrigger.svg
@@ -54,10 +55,17 @@
src/AutoPilotPlugins/PX4/Images/DatalinkLossLight.svg
src/AutoPilotPlugins/PX4/Images/GeoFence.svg
src/AutoPilotPlugins/PX4/Images/GeoFenceLight.svg
- src/AnalyzeView/GeoTagIcon.png
+ src/AnalyzeView/GeoTagIcon.svg
src/AutoPilotPlugins/PX4/Images/LandMode.svg
src/AutoPilotPlugins/PX4/Images/LandModeCopter.svg
- src/AnalyzeView/LogDownloadIcon.png
+ src/AutoPilotPlugins/APM/Images/LightsComponentIcon.png
+ src/AutoPilotPlugins/APM/Images/SubFrameComponentIcon.png
+ src/AutoPilotPlugins/APM/Images/bluerov-frame.png
+ src/AutoPilotPlugins/APM/Images/vectored-frame.png
+ src/AutoPilotPlugins/APM/Images/vectored6dof-frame.png
+ src/AutoPilotPlugins/APM/Images/simple3-frame.png
+ src/AutoPilotPlugins/APM/Images/simple4-frame.png
+ src/AnalyzeView/LogDownloadIcon.svg
src/AutoPilotPlugins/PX4/Images/LowBattery.svg
src/AutoPilotPlugins/PX4/Images/LowBatteryLight.svg
src/AutoPilotPlugins/Common/Images/MotorComponentIcon.svg
@@ -93,9 +101,7 @@
src/FlightMap/Images/attitudeDial.svg
src/FlightMap/Images/attitudeInstrument.svg
src/FlightMap/Images/attitudePointer.svg
- src/FlightMap/Images/buttonHome.svg
- src/FlightMap/Images/buttonMore.svg
- src/FlightMap/Images/compassInstrumentAirplane.svg
+ src/FlightMap/Images/compassInstrumentArrow.svg
src/FlightMap/Images/compassInstrumentDial.svg
src/FlightMap/Images/crossHair.svg
src/FlightMap/Images/PiP.svg
@@ -105,11 +111,10 @@
src/FlightMap/Images/scale_end.png
src/FlightMap/Images/scaleLight.png
src/FlightMap/Images/scale_endLight.png
- src/FlightMap/Images/airplaneOutline.svg
- src/FlightMap/Images/airplaneOpaque.svg
+ src/FlightMap/Images/vehicleArrowOutline.svg
+ src/FlightMap/Images/vehicleArrowOpaque.svg
src/FlightMap/Images/ZoomPlus.svg
src/FlightMap/Images/ZoomMinus.svg
- src/FlightMap/Images/ArrowHead.svg
src/FlightMap/Images/Help.svg
src/FlightMap/Images/HelpBlack.svg
src/FlightMap/Images/MapAddMission.svg
@@ -146,12 +151,16 @@
src/ui/toolbar/Images/Signal100.svg
src/ui/toolbar/Images/TelemRSSI.svg
src/ui/toolbar/Images/Yield.svg
+ src/ui/toolbar/Images/CameraIcon.svg
src/MissionManager/CogWheel.svg
src/AutoPilotPlugins/Common/Images/StationMode.svg
src/AutoPilotPlugins/Common/Images/APMode.svg
src/AutoPilotPlugins/Common/Images/ArrowDirection.svg
src/AutoPilotPlugins/Common/Images/ArrowCW.svg
src/AutoPilotPlugins/Common/Images/ArrowCCW.svg
+ src/FirmwarePlugin/APM/APMBrandImage.png
+ src/FirmwarePlugin/APM/APMBrandImageSub.png
+ src/FirmwarePlugin/PX4/PX4BrandImage.png
resources/Antenna_RC.svg
@@ -177,6 +186,7 @@
resources/TrashDelete.svg
resources/XDelete.svg
resources/XDeleteBlack.svg
+ resources/waves.svg
resources/icons/qgroundcontrol.ico
@@ -239,17 +249,6 @@
resources/calibration/mode2/radioThrottleDown.png
resources/calibration/mode2/radioSwitchMinMax.png
-
- resources/calibration/joystick/joystickCenter.png
- resources/calibration/joystick/joystickRollLeft.png
- resources/calibration/joystick/joystickRollRight.png
- resources/calibration/joystick/joystickPitchUp.png
- resources/calibration/joystick/joystickPitchDown.png
- resources/calibration/joystick/joystickYawLeft.png
- resources/calibration/joystick/joystickYawRight.png
- resources/calibration/joystick/joystickThrottleUp.png
- resources/calibration/joystick/joystickThrottleDown.png
-
resources/SDL_GameControllerDB/gamecontrollerdb.txt
@@ -260,33 +259,51 @@
resources/audio/alert.wav
-
- src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
-
-
- src/AutoPilotPlugins/APM/APMAirframeFactMetaData.xml
+
+ resources/opengl/buglist.json
-
- src/FirmwarePlugin/APM/APMParameterFactMetaData.Plane.3.3.xml
- src/FirmwarePlugin/APM/APMParameterFactMetaData.Plane.3.5.xml
- src/FirmwarePlugin/APM/APMParameterFactMetaData.Copter.3.3.xml
- src/FirmwarePlugin/APM/APMParameterFactMetaData.Copter.3.4.xml
- src/FirmwarePlugin/APM/APMParameterFactMetaData.Rover.3.0.xml
- src/FirmwarePlugin/APM/APMParameterFactMetaData.Sub.3.4.xml
- src/FirmwarePlugin/APM/CopterGeoFenceEditor.qml
- src/FirmwarePlugin/APM/PlaneGeoFenceEditor.qml
- src/FirmwarePlugin/APM/Copter3.4.OfflineEditing.params
- src/FirmwarePlugin/APM/Plane3.7.OfflineEditing.params
+
+ resources/calibration/joystick/mode1/joystickCenter.png
+ resources/calibration/joystick/mode1/joystickPitchDown.png
+ resources/calibration/joystick/mode1/joystickPitchUp.png
+ resources/calibration/joystick/mode1/joystickRollLeft.png
+ resources/calibration/joystick/mode1/joystickRollRight.png
+ resources/calibration/joystick/mode1/joystickThrottleDown.png
+ resources/calibration/joystick/mode1/joystickThrottleUp.png
+ resources/calibration/joystick/mode1/joystickYawLeft.png
+ resources/calibration/joystick/mode1/joystickYawRight.png
-
- src/FirmwarePlugin/GeoFenceEditor.qml
+
+ resources/calibration/joystick/mode2/joystickCenter.png
+ resources/calibration/joystick/mode2/joystickPitchDown.png
+ resources/calibration/joystick/mode2/joystickPitchUp.png
+ resources/calibration/joystick/mode2/joystickRollLeft.png
+ resources/calibration/joystick/mode2/joystickRollRight.png
+ resources/calibration/joystick/mode2/joystickThrottleDown.png
+ resources/calibration/joystick/mode2/joystickThrottleUp.png
+ resources/calibration/joystick/mode2/joystickYawLeft.png
+ resources/calibration/joystick/mode2/joystickYawRight.png
-
- src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
- src/FirmwarePlugin/PX4/PX4GeoFenceEditor.qml
- src/FirmwarePlugin/PX4/V1.4.OfflineEditing.params
+
+ resources/calibration/joystick/mode3/joystickCenter.png
+ resources/calibration/joystick/mode3/joystickPitchDown.png
+ resources/calibration/joystick/mode3/joystickPitchUp.png
+ resources/calibration/joystick/mode3/joystickRollLeft.png
+ resources/calibration/joystick/mode3/joystickRollRight.png
+ resources/calibration/joystick/mode3/joystickThrottleDown.png
+ resources/calibration/joystick/mode3/joystickThrottleUp.png
+ resources/calibration/joystick/mode3/joystickYawLeft.png
+ resources/calibration/joystick/mode3/joystickYawRight.png
-
- resources/opengl/buglist.json
+
+ resources/calibration/joystick/mode4/joystickCenter.png
+ resources/calibration/joystick/mode4/joystickPitchDown.png
+ resources/calibration/joystick/mode4/joystickPitchUp.png
+ resources/calibration/joystick/mode4/joystickRollLeft.png
+ resources/calibration/joystick/mode4/joystickRollRight.png
+ resources/calibration/joystick/mode4/joystickThrottleDown.png
+ resources/calibration/joystick/mode4/joystickThrottleUp.png
+ resources/calibration/joystick/mode4/joystickYawLeft.png
+ resources/calibration/joystick/mode4/joystickYawRight.png
diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro
index 8ffad2796e7d360e9166acca868b11c2c3da1654..18bf01deacf5fe595e1905833e60c76f7ffaa24d 100644
--- a/qgroundcontrol.pro
+++ b/qgroundcontrol.pro
@@ -21,6 +21,7 @@ include(QGCCommon.pri)
TARGET = QGroundControl
TEMPLATE = app
+QGCROOT = $$PWD
DebugBuild {
DESTDIR = $${OUT_PWD}/debug
@@ -34,6 +35,69 @@ exists(user_config.pri):infile(user_config.pri, CONFIG) {
message($$sprintf("Using user-supplied additional config: '%1' specified in user_config.pri", $$fromfile(user_config.pri, CONFIG)))
}
+#
+# Custom Build
+#
+# QGC will create a "CUSTOMCLASS" object (exposed by your custom build
+# and derived from QGCCorePlugin).
+# This is the start of allowing custom Plugins, which will eventually use a
+# more defined runtime plugin architecture and not require a QGC project
+# file you would have to keep in sync with the upstream repo.
+#
+
+# This allows you to ignore the custom build even if the custom build
+# is present. It's useful to run "regular" builds to make sure you didn't
+# break anything.
+
+contains (CONFIG, QGC_DISABLE_CUSTOM_BUILD) {
+ message("Disable custom build override")
+} else {
+ exists($$PWD/custom/custom.pri) {
+ message("Found custom build")
+ CONFIG += CustomBuild
+ DEFINES += QGC_CUSTOM_BUILD
+ # custom.pri must define:
+ # CUSTOMCLASS = YourIQGCCorePluginDerivation
+ # CUSTOMHEADER = \"\\\"YourIQGCCorePluginDerivation.h\\\"\"
+ include($$PWD/custom/custom.pri)
+ }
+}
+
+#
+# Plugin configuration
+#
+# This allows you to build custom versions of QGC which only includes your
+# specific vehicle plugin. To remove support for a firmware type completely,
+# disable both the Plugin and PluginFactory entries. To include custom support
+# for an existing plugin type disable PluginFactory only. Then provide you own
+# implementation of FirmwarePluginFactory and use the FirmwarePlugin and
+# AutoPilotPlugin classes as the base clase for your derived plugin
+# implementation.
+
+contains (CONFIG, QGC_DISABLE_APM_PLUGIN) {
+ message("Disable APM Plugin")
+} else {
+ CONFIG += APMFirmwarePlugin
+}
+
+contains (CONFIG, QGC_DISABLE_APM_PLUGIN_FACTORY) {
+ message("Disable APM Plugin Factory")
+} else {
+ CONFIG += APMFirmwarePluginFactory
+}
+
+contains (CONFIG, QGC_DISABLE_PX4_PLUGIN) {
+ message("Disable PX4 Plugin")
+} else {
+ CONFIG += PX4FirmwarePlugin
+}
+
+contains (CONFIG, QGC_DISABLE_PX4_PLUGIN_FACTORY) {
+ message("Disable PX4 Plugin Factory")
+} else {
+ CONFIG += PX4FirmwarePluginFactory
+}
+
# Bluetooth
contains (DEFINES, QGC_DISABLE_BLUETOOTH) {
message("Skipping support for Bluetooth (manual override from command line)")
@@ -212,21 +276,28 @@ INCLUDEPATH += .
INCLUDEPATH += \
include/ui \
src \
+ src/api \
src/AnalyzeView \
- src/audio \
src/AutoPilotPlugins \
- src/comm \
src/FlightDisplay \
src/FlightMap \
src/FlightMap/Widgets \
- src/input \
- src/Joystick \
src/FollowMe \
src/GPS \
- src/lib/qmapcontrol \
+ src/Joystick \
src/MissionEditor \
src/MissionManager \
+ src/PositionManager \
src/QmlControls \
+ src/QtLocationPlugin \
+ src/QtLocationPlugin/QMLControl \
+ src/Settings \
+ src/VehicleSetup \
+ src/ViewWidgets \
+ src/audio \
+ src/comm \
+ src/input \
+ src/lib/qmapcontrol \
src/uas \
src/ui \
src/ui/linechart \
@@ -236,11 +307,6 @@ INCLUDEPATH += \
src/ui/px4_configuration \
src/ui/toolbar \
src/ui/uas \
- src/VehicleSetup \
- src/ViewWidgets \
- src/QtLocationPlugin \
- src/QtLocationPlugin/QMLControl \
- src/PositionManager \
FORMS += \
src/ui/MainWindow.ui \
@@ -248,50 +314,124 @@ FORMS += \
!MobileBuild {
FORMS += \
- src/ui/uas/QGCUnconnectedInfoWidget.ui \
- src/ui/uas/UASMessageView.ui \
src/ui/Linechart.ui \
src/ui/MultiVehicleDockWidget.ui \
- src/ui/QGCDataPlot2D.ui \
src/ui/QGCHilConfiguration.ui \
src/ui/QGCHilFlightGearConfiguration.ui \
src/ui/QGCHilJSBSimConfiguration.ui \
src/ui/QGCHilXPlaneConfiguration.ui \
- src/ui/QGCMapRCToParamDialog.ui \
src/ui/QGCMAVLinkInspector.ui \
src/ui/QGCMAVLinkLogPlayer.ui \
+ src/ui/QGCMapRCToParamDialog.ui \
src/ui/QGCTabbedInfoView.ui \
src/ui/QGCUASFileView.ui \
src/ui/QGCUASFileViewMulti.ui \
+ src/ui/uas/QGCUnconnectedInfoWidget.ui \
+ src/ui/uas/UASMessageView.ui \
src/ui/uas/UASQuickView.ui \
src/ui/uas/UASQuickViewItemSelect.ui \
}
+#
+# Plugin API
+#
+
HEADERS += \
- src/audio/QGCAudioWorker.h \
+ src/api/QGCCorePlugin.h \
+ src/api/QGCOptions.h \
+ src/api/QGCSettings.h \
+
+SOURCES += \
+ src/api/QGCCorePlugin.cc \
+ src/api/QGCOptions.cc \
+ src/api/QGCSettings.cc \
+
+#
+# Unit Test specific configuration goes here (requires full debug build with all plugins)
+#
+
+DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin { APMFirmwarePluginFactory { !MobileBuild {
+ DEFINES += UNITTEST_BUILD
+
+ INCLUDEPATH += \
+ src/qgcunittest
+
+ HEADERS += \
+ src/AnalyzeView/LogDownloadTest.h \
+ src/FactSystem/FactSystemTestBase.h \
+ src/FactSystem/FactSystemTestGeneric.h \
+ src/FactSystem/FactSystemTestPX4.h \
+ src/FactSystem/ParameterManagerTest.h \
+ src/MissionManager/ComplexMissionItemTest.h \
+ src/MissionManager/MissionCommandTreeTest.h \
+ src/MissionManager/MissionControllerManagerTest.h \
+ src/MissionManager/MissionControllerTest.h \
+ src/MissionManager/MissionItemTest.h \
+ src/MissionManager/MissionManagerTest.h \
+ src/MissionManager/SimpleMissionItemTest.h \
+ src/qgcunittest/FileDialogTest.h \
+ src/qgcunittest/FileManagerTest.h \
+ src/qgcunittest/FlightGearTest.h \
+ src/qgcunittest/GeoTest.h \
+ src/qgcunittest/LinkManagerTest.h \
+ src/qgcunittest/MainWindowTest.h \
+ src/qgcunittest/MavlinkLogTest.h \
+ src/qgcunittest/MessageBoxTest.h \
+ src/qgcunittest/MultiSignalSpy.h \
+ src/qgcunittest/RadioConfigTest.h \
+ src/qgcunittest/TCPLinkTest.h \
+ src/qgcunittest/TCPLoopBackServer.h \
+ src/qgcunittest/UnitTest.h \
+ src/Vehicle/SendMavCommandTest.h \
+
+ SOURCES += \
+ src/AnalyzeView/LogDownloadTest.cc \
+ src/FactSystem/FactSystemTestBase.cc \
+ src/FactSystem/FactSystemTestGeneric.cc \
+ src/FactSystem/FactSystemTestPX4.cc \
+ src/FactSystem/ParameterManagerTest.cc \
+ src/MissionManager/ComplexMissionItemTest.cc \
+ src/MissionManager/MissionCommandTreeTest.cc \
+ src/MissionManager/MissionControllerManagerTest.cc \
+ src/MissionManager/MissionControllerTest.cc \
+ src/MissionManager/MissionItemTest.cc \
+ src/MissionManager/MissionManagerTest.cc \
+ src/MissionManager/SimpleMissionItemTest.cc \
+ src/qgcunittest/FileDialogTest.cc \
+ src/qgcunittest/FileManagerTest.cc \
+ src/qgcunittest/FlightGearTest.cc \
+ src/qgcunittest/GeoTest.cc \
+ src/qgcunittest/LinkManagerTest.cc \
+ src/qgcunittest/MainWindowTest.cc \
+ src/qgcunittest/MavlinkLogTest.cc \
+ src/qgcunittest/MessageBoxTest.cc \
+ src/qgcunittest/MultiSignalSpy.cc \
+ src/qgcunittest/RadioConfigTest.cc \
+ src/qgcunittest/TCPLinkTest.cc \
+ src/qgcunittest/TCPLoopBackServer.cc \
+ src/qgcunittest/UnitTest.cc \
+ src/qgcunittest/UnitTestList.cc \
+ src/Vehicle/SendMavCommandTest.cc \
+} } } } } }
+
+# Main QGC Headers and Source files
+
+HEADERS += \
+ src/AnalyzeView/ExifParser.h \
src/CmdLineOptParser.h \
- src/comm/LinkConfiguration.h \
- src/comm/LinkInterface.h \
- src/comm/LinkManager.h \
- src/comm/MAVLinkProtocol.h \
- src/comm/ProtocolInterface.h \
- src/comm/QGCMAVLink.h \
- src/comm/TCPLink.h \
- src/comm/UDPLink.h \
+ src/FirmwarePlugin/PX4/px4_custom_mode.h \
src/FlightDisplay/VideoManager.h \
src/FlightMap/FlightMapSettings.h \
src/FlightMap/Widgets/ValuesWidgetController.h \
+ src/FollowMe/FollowMe.h \
src/GAudioOutput.h \
- src/HomePositionManager.h \
src/Joystick/Joystick.h \
src/Joystick/JoystickManager.h \
- src/VehicleSetup/JoystickConfigController.h \
- src/FollowMe/FollowMe.h \
- src/PositionManager/SimulatedPosition.h \
src/JsonHelper.h \
src/LogCompressor.h \
src/MG.h \
src/MissionManager/ComplexMissionItem.h \
+ src/MissionManager/FixedWingLandingComplexItem.h \
src/MissionManager/GeoFenceController.h \
src/MissionManager/GeoFenceManager.h \
src/MissionManager/MissionCommandList.h \
@@ -308,6 +448,8 @@ HEADERS += \
src/MissionManager/SimpleMissionItem.h \
src/MissionManager/SurveyMissionItem.h \
src/MissionManager/VisualMissionItem.h \
+ src/PositionManager/PositionManager.h \
+ src/PositionManager/SimulatedPosition.h \
src/QGC.h \
src/QGCApplication.h \
src/QGCComboBox.h \
@@ -327,19 +469,32 @@ HEADERS += \
src/QmlControls/CoordinateVector.h \
src/QmlControls/MavlinkQmlSingleton.h \
src/QmlControls/ParameterEditorController.h \
- src/QmlControls/RCChannelMonitorController.h \
- src/QmlControls/ScreenToolsController.h \
+ src/QmlControls/QGCImageProvider.h \
src/QmlControls/QGroundControlQmlGlobal.h \
src/QmlControls/QmlObjectListModel.h \
+ src/QmlControls/RCChannelMonitorController.h \
+ src/QmlControls/ScreenToolsController.h \
+ src/QtLocationPlugin/QMLControl/QGCMapEngineManager.h \
+ src/Settings/AppSettings.h \
+ src/Settings/AutoConnectSettings.h \
+ src/Settings/SettingsGroup.h \
+ src/Settings/SettingsManager.h \
+ src/Settings/UnitsSettings.h \
+ src/Settings/VideoSettings.h \
+ src/Vehicle/MAVLinkLogManager.h \
+ src/VehicleSetup/JoystickConfigController.h \
+ src/audio/QGCAudioWorker.h \
+ src/comm/LinkConfiguration.h \
+ src/comm/LinkInterface.h \
+ src/comm/LinkManager.h \
+ src/comm/MAVLinkProtocol.h \
+ src/comm/ProtocolInterface.h \
+ src/comm/QGCMAVLink.h \
+ src/comm/TCPLink.h \
+ src/comm/UDPLink.h \
src/uas/UAS.h \
src/uas/UASInterface.h \
src/uas/UASMessageHandler.h \
- src/ui/toolbar/MainToolBarController.h \
- src/AutoPilotPlugins/PX4/PX4AirframeLoader.h \
- src/AutoPilotPlugins/APM/APMAirframeLoader.h \
- src/QmlControls/QGCImageProvider.h \
- src/QtLocationPlugin/QMLControl/QGCMapEngineManager.h \
- src/PositionManager/PositionManager.h
AndroidBuild {
HEADERS += \
@@ -365,7 +520,7 @@ contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
src/comm/BluetoothLink.h \
}
-!iOSBuild {
+!NoSerialBuild {
HEADERS += \
src/comm/QGCSerialPortInfo.h \
src/comm/SerialLink.h \
@@ -375,56 +530,56 @@ HEADERS += \
HEADERS += \
src/AnalyzeView/GeoTagController.h \
src/AnalyzeView/LogDownloadController.h \
+ src/GPS/Drivers/src/gps_helper.h \
+ src/GPS/Drivers/src/ubx.h \
+ src/GPS/GPSManager.h \
+ src/GPS/GPSPositionMessage.h \
+ src/GPS/GPSProvider.h \
+ src/GPS/RTCM/RTCMMavlink.h \
+ src/GPS/definitions.h \
+ src/GPS/satellite_info.h \
+ src/GPS/vehicle_gps_position.h \
+ src/Joystick/JoystickSDL.h \
+ src/QGCFileDialog.h \
+ src/QGCMessageBox.h \
+ src/RunGuard.h \
+ src/ViewWidgets/CustomCommandWidget.h \
+ src/ViewWidgets/CustomCommandWidgetController.h \
+ src/ViewWidgets/ViewWidgetController.h \
src/comm/LogReplayLink.h \
src/comm/QGCFlightGearLink.h \
src/comm/QGCHilLink.h \
src/comm/QGCJSBSimLink.h \
src/comm/QGCXPlaneLink.h \
- src/Joystick/JoystickSDL.h \
- src/QGCFileDialog.h \
- src/QGCMessageBox.h \
src/uas/FileManager.h \
src/ui/HILDockWidget.h \
- src/ui/linechart/ChartPlot.h \
- src/ui/linechart/IncrementalPlot.h \
- src/ui/linechart/LinechartPlot.h \
- src/ui/linechart/Linecharts.h \
- src/ui/linechart/LinechartWidget.h \
- src/ui/linechart/Scrollbar.h \
- src/ui/linechart/ScrollZoomer.h \
- src/ui/MainWindow.h \
src/ui/MAVLinkDecoder.h \
+ src/ui/MainWindow.h \
src/ui/MultiVehicleDockWidget.h \
- src/ui/QGCMAVLinkLogPlayer.h \
- src/ui/QGCMapRCToParamDialog.h \
- src/ui/uas/UASMessageView.h \
- src/ui/uas/QGCUnconnectedInfoWidget.h \
- src/ui/QGCDataPlot2D.h \
src/ui/QGCHilConfiguration.h \
src/ui/QGCHilFlightGearConfiguration.h \
src/ui/QGCHilJSBSimConfiguration.h \
src/ui/QGCHilXPlaneConfiguration.h \
src/ui/QGCMAVLinkInspector.h \
+ src/ui/QGCMAVLinkLogPlayer.h \
+ src/ui/QGCMapRCToParamDialog.h \
src/ui/QGCTabbedInfoView.h \
src/ui/QGCUASFileView.h \
src/ui/QGCUASFileViewMulti.h \
+ src/ui/linechart/ChartPlot.h \
+ src/ui/linechart/IncrementalPlot.h \
+ src/ui/linechart/LinechartPlot.h \
+ src/ui/linechart/LinechartWidget.h \
+ src/ui/linechart/Linecharts.h \
+ src/ui/linechart/ScrollZoomer.h \
+ src/ui/linechart/Scrollbar.h \
+ src/ui/uas/QGCUnconnectedInfoWidget.h \
+ src/ui/uas/UASMessageView.h \
src/ui/uas/UASQuickView.h \
src/ui/uas/UASQuickViewGaugeItem.h \
src/ui/uas/UASQuickViewItem.h \
src/ui/uas/UASQuickViewItemSelect.h \
src/ui/uas/UASQuickViewTextItem.h \
- src/GPS/Drivers/src/gps_helper.h \
- src/GPS/Drivers/src/ubx.h \
- src/GPS/definitions.h \
- src/GPS/vehicle_gps_position.h \
- src/GPS/satellite_info.h \
- src/GPS/RTCM/RTCMMavlink.h \
- src/GPS/GPSManager.h \
- src/GPS/GPSPositionMessage.h \
- src/GPS/GPSProvider.h \
- src/ViewWidgets/CustomCommandWidget.h \
- src/ViewWidgets/CustomCommandWidgetController.h \
- src/ViewWidgets/ViewWidgetController.h \
}
iOSBuild {
@@ -438,29 +593,20 @@ AndroidBuild {
src/Joystick/JoystickAndroid.cc \
}
-
SOURCES += \
- src/audio/QGCAudioWorker.cpp \
+ src/AnalyzeView/ExifParser.cc \
src/CmdLineOptParser.cc \
- src/comm/LinkConfiguration.cc \
- src/comm/LinkManager.cc \
- src/comm/MAVLinkProtocol.cc \
- src/comm/QGCMAVLink.cc \
- src/comm/TCPLink.cc \
- src/comm/UDPLink.cc \
src/FlightDisplay/VideoManager.cc \
src/FlightMap/FlightMapSettings.cc \
src/FlightMap/Widgets/ValuesWidgetController.cc \
+ src/FollowMe/FollowMe.cc \
src/GAudioOutput.cc \
- src/HomePositionManager.cc \
src/Joystick/Joystick.cc \
src/Joystick/JoystickManager.cc \
- src/VehicleSetup/JoystickConfigController.cc \
src/JsonHelper.cc \
- src/FollowMe/FollowMe.cc \
src/LogCompressor.cc \
- src/main.cc \
src/MissionManager/ComplexMissionItem.cc \
+ src/MissionManager/FixedWingLandingComplexItem.cc \
src/MissionManager/GeoFenceController.cc \
src/MissionManager/GeoFenceManager.cc \
src/MissionManager/MissionCommandList.cc \
@@ -477,36 +623,50 @@ SOURCES += \
src/MissionManager/SimpleMissionItem.cc \
src/MissionManager/SurveyMissionItem.cc \
src/MissionManager/VisualMissionItem.cc \
+ src/PositionManager/PositionManager.cpp \
+ src/PositionManager/SimulatedPosition.cc \
src/QGC.cc \
src/QGCApplication.cc \
src/QGCComboBox.cc \
src/QGCDockWidget.cc \
src/QGCFileDownload.cc \
+ src/QGCGeo.cc \
src/QGCLoggingCategory.cc \
src/QGCMapPalette.cc \
src/QGCMobileFileDialogController.cc \
src/QGCPalette.cc \
- src/QGCQuickWidget.cc \
src/QGCQmlWidgetHolder.cpp \
+ src/QGCQuickWidget.cc \
src/QGCTemporaryFile.cc \
src/QGCToolbox.cc \
- src/QGCGeo.cc \
src/QmlControls/AppMessages.cc \
src/QmlControls/CoordinateVector.cc \
src/QmlControls/ParameterEditorController.cc \
- src/QmlControls/RCChannelMonitorController.cc \
- src/QmlControls/ScreenToolsController.cc \
+ src/QmlControls/QGCImageProvider.cc \
src/QmlControls/QGroundControlQmlGlobal.cc \
src/QmlControls/QmlObjectListModel.cc \
+ src/QmlControls/RCChannelMonitorController.cc \
+ src/QmlControls/ScreenToolsController.cc \
+ src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc \
+ src/Settings/AppSettings.cc \
+ src/Settings/AutoConnectSettings.cc \
+ src/Settings/SettingsGroup.cc \
+ src/Settings/SettingsManager.cc \
+ src/Settings/UnitsSettings.cc \
+ src/Settings/VideoSettings.cc \
+ src/Vehicle/MAVLinkLogManager.cc \
+ src/VehicleSetup/JoystickConfigController.cc \
+ src/audio/QGCAudioWorker.cpp \
+ src/comm/LinkConfiguration.cc \
+ src/comm/LinkInterface.cc \
+ src/comm/LinkManager.cc \
+ src/comm/MAVLinkProtocol.cc \
+ src/comm/QGCMAVLink.cc \
+ src/comm/TCPLink.cc \
+ src/comm/UDPLink.cc \
+ src/main.cc \
src/uas/UAS.cc \
src/uas/UASMessageHandler.cc \
- src/ui/toolbar/MainToolBarController.cc \
- src/AutoPilotPlugins/PX4/PX4AirframeLoader.cc \
- src/AutoPilotPlugins/APM/APMAirframeLoader.cc \
- src/QmlControls/QGCImageProvider.cc \
- src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc \
- src/PositionManager/SimulatedPosition.cc \
- src/PositionManager/PositionManager.cpp
DebugBuild {
SOURCES += \
@@ -515,7 +675,7 @@ SOURCES += \
src/comm/MockLinkMissionItemHandler.cc \
}
-!iOSBuild {
+!NoSerialBuild {
SOURCES += \
src/comm/QGCSerialPortInfo.cc \
src/comm/SerialLink.cc \
@@ -530,262 +690,236 @@ contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
SOURCES += \
src/AnalyzeView/GeoTagController.cc \
src/AnalyzeView/LogDownloadController.cc \
- src/ui/uas/UASMessageView.cc \
- src/uas/FileManager.cc \
- src/ui/uas/QGCUnconnectedInfoWidget.cc \
- src/ui/MAVLinkDecoder.cc \
- src/ui/QGCMapRCToParamDialog.cpp \
- src/comm/LogReplayLink.cc \
+ src/GPS/Drivers/src/gps_helper.cpp \
+ src/GPS/Drivers/src/ubx.cpp \
+ src/GPS/GPSManager.cc \
+ src/GPS/GPSProvider.cc \
+ src/GPS/RTCM/RTCMMavlink.cc \
+ src/Joystick/JoystickSDL.cc \
src/QGCFileDialog.cc \
- src/ui/QGCMAVLinkLogPlayer.cc \
+ src/RunGuard.cc \
+ src/ViewWidgets/CustomCommandWidget.cc \
+ src/ViewWidgets/CustomCommandWidgetController.cc \
+ src/ViewWidgets/ViewWidgetController.cc \
+ src/comm/LogReplayLink.cc \
src/comm/QGCFlightGearLink.cc \
src/comm/QGCJSBSimLink.cc \
src/comm/QGCXPlaneLink.cc \
- src/Joystick/JoystickSDL.cc \
+ src/uas/FileManager.cc \
src/ui/HILDockWidget.cc \
- src/ui/linechart/ChartPlot.cc \
- src/ui/linechart/IncrementalPlot.cc \
- src/ui/linechart/LinechartPlot.cc \
- src/ui/linechart/Linecharts.cc \
- src/ui/linechart/LinechartWidget.cc \
- src/ui/linechart/Scrollbar.cc \
- src/ui/linechart/ScrollZoomer.cc \
+ src/ui/MAVLinkDecoder.cc \
src/ui/MainWindow.cc \
src/ui/MultiVehicleDockWidget.cc \
- src/ui/QGCDataPlot2D.cc \
src/ui/QGCHilConfiguration.cc \
src/ui/QGCHilFlightGearConfiguration.cc \
src/ui/QGCHilJSBSimConfiguration.cc \
src/ui/QGCHilXPlaneConfiguration.cc \
src/ui/QGCMAVLinkInspector.cc \
+ src/ui/QGCMAVLinkLogPlayer.cc \
+ src/ui/QGCMapRCToParamDialog.cpp \
src/ui/QGCTabbedInfoView.cpp \
src/ui/QGCUASFileView.cc \
src/ui/QGCUASFileViewMulti.cc \
+ src/ui/linechart/ChartPlot.cc \
+ src/ui/linechart/IncrementalPlot.cc \
+ src/ui/linechart/LinechartPlot.cc \
+ src/ui/linechart/LinechartWidget.cc \
+ src/ui/linechart/Linecharts.cc \
+ src/ui/linechart/ScrollZoomer.cc \
+ src/ui/linechart/Scrollbar.cc \
+ src/ui/uas/QGCUnconnectedInfoWidget.cc \
+ src/ui/uas/UASMessageView.cc \
src/ui/uas/UASQuickView.cc \
src/ui/uas/UASQuickViewGaugeItem.cc \
src/ui/uas/UASQuickViewItem.cc \
src/ui/uas/UASQuickViewItemSelect.cc \
src/ui/uas/UASQuickViewTextItem.cc \
- src/GPS/Drivers/src/gps_helper.cpp \
- src/GPS/Drivers/src/ubx.cpp \
- src/GPS/RTCM/RTCMMavlink.cc \
- src/GPS/GPSManager.cc \
- src/GPS/GPSProvider.cc \
- src/ViewWidgets/CustomCommandWidget.cc \
- src/ViewWidgets/CustomCommandWidgetController.cc \
- src/ViewWidgets/ViewWidgetController.cc
}
-#
-# Unit Test specific configuration goes here
-#
-
+# Palette test widget in debug builds
DebugBuild {
-
-HEADERS += src/QmlControls/QmlTestWidget.h
-SOURCES += src/QmlControls/QmlTestWidget.cc
-
-!MobileBuild {
-
-INCLUDEPATH += \
- src/qgcunittest
-
-HEADERS += \
- src/AnalyzeView/LogDownloadTest.h \
- src/FactSystem/FactSystemTestBase.h \
- src/FactSystem/FactSystemTestGeneric.h \
- src/FactSystem/FactSystemTestPX4.h \
- src/FactSystem/ParameterManagerTest.h \
- src/MissionManager/ComplexMissionItemTest.h \
- src/MissionManager/MissionCommandTreeTest.h \
- src/MissionManager/MissionControllerTest.h \
- src/MissionManager/MissionControllerManagerTest.h \
- src/MissionManager/MissionItemTest.h \
- src/MissionManager/MissionManagerTest.h \
- src/MissionManager/SimpleMissionItemTest.h \
- src/qgcunittest/GeoTest.h \
- src/qgcunittest/FileDialogTest.h \
- src/qgcunittest/FileManagerTest.h \
- src/qgcunittest/FlightGearTest.h \
- src/qgcunittest/LinkManagerTest.h \
- src/qgcunittest/MainWindowTest.h \
- src/qgcunittest/MavlinkLogTest.h \
- src/qgcunittest/MessageBoxTest.h \
- src/qgcunittest/MultiSignalSpy.h \
- src/qgcunittest/RadioConfigTest.h \
- src/qgcunittest/TCPLinkTest.h \
- src/qgcunittest/TCPLoopBackServer.h \
- src/qgcunittest/UnitTest.h \
-
-SOURCES += \
- src/AnalyzeView/LogDownloadTest.cc \
- src/FactSystem/FactSystemTestBase.cc \
- src/FactSystem/FactSystemTestGeneric.cc \
- src/FactSystem/FactSystemTestPX4.cc \
- src/FactSystem/ParameterManagerTest.cc \
- src/MissionManager/ComplexMissionItemTest.cc \
- src/MissionManager/MissionCommandTreeTest.cc \
- src/MissionManager/MissionControllerTest.cc \
- src/MissionManager/MissionControllerManagerTest.cc \
- src/MissionManager/MissionItemTest.cc \
- src/MissionManager/MissionManagerTest.cc \
- src/MissionManager/SimpleMissionItemTest.cc \
- src/qgcunittest/GeoTest.cc \
- src/qgcunittest/FileDialogTest.cc \
- src/qgcunittest/FileManagerTest.cc \
- src/qgcunittest/FlightGearTest.cc \
- src/qgcunittest/LinkManagerTest.cc \
- src/qgcunittest/MainWindowTest.cc \
- src/qgcunittest/MavlinkLogTest.cc \
- src/qgcunittest/MessageBoxTest.cc \
- src/qgcunittest/MultiSignalSpy.cc \
- src/qgcunittest/RadioConfigTest.cc \
- src/qgcunittest/TCPLinkTest.cc \
- src/qgcunittest/TCPLoopBackServer.cc \
- src/qgcunittest/UnitTest.cc \
- src/qgcunittest/UnitTestList.cc \
-} # !MobileBuild
-} # DebugBuild
+ HEADERS += src/QmlControls/QmlTestWidget.h
+ SOURCES += src/QmlControls/QmlTestWidget.cc
+}
#
# Firmware Plugin Support
#
INCLUDEPATH += \
- src/AutoPilotPlugins/APM \
src/AutoPilotPlugins/Common \
- src/AutoPilotPlugins/PX4 \
src/FirmwarePlugin \
- src/FirmwarePlugin/APM \
- src/FirmwarePlugin/PX4 \
src/Vehicle \
src/VehicleSetup \
HEADERS+= \
src/AutoPilotPlugins/AutoPilotPlugin.h \
- src/AutoPilotPlugins/AutoPilotPluginManager.h \
- src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h \
- src/AutoPilotPlugins/APM/APMAirframeComponent.h \
- src/AutoPilotPlugins/APM/APMAirframeComponentController.h \
- src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.h \
- src/AutoPilotPlugins/APM/APMCameraComponent.h \
- src/AutoPilotPlugins/APM/APMCompassCal.h \
- src/AutoPilotPlugins/APM/APMFlightModesComponent.h \
- src/AutoPilotPlugins/APM/APMFlightModesComponentController.h \
- src/AutoPilotPlugins/APM/APMPowerComponent.h \
- src/AutoPilotPlugins/APM/APMRadioComponent.h \
- src/AutoPilotPlugins/APM/APMSafetyComponent.h \
- src/AutoPilotPlugins/APM/APMSensorsComponent.h \
- src/AutoPilotPlugins/APM/APMSensorsComponentController.h \
- src/AutoPilotPlugins/APM/APMTuningComponent.h \
+ src/AutoPilotPlugins/Common/ESP8266Component.h \
+ src/AutoPilotPlugins/Common/ESP8266ComponentController.h \
+ src/AutoPilotPlugins/Common/MixersComponent.h \
src/AutoPilotPlugins/Common/MotorComponent.h \
src/AutoPilotPlugins/Common/RadioComponentController.h \
- src/AutoPilotPlugins/Common/ESP8266ComponentController.h \
- src/AutoPilotPlugins/Common/ESP8266Component.h \
src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.h \
- src/AutoPilotPlugins/PX4/AirframeComponent.h \
- src/AutoPilotPlugins/PX4/AirframeComponentAirframes.h \
- src/AutoPilotPlugins/PX4/AirframeComponentController.h \
- src/AutoPilotPlugins/PX4/FlightModesComponent.h \
- src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.h \
- src/AutoPilotPlugins/PX4/PX4SimpleFlightModesController.h \
- src/AutoPilotPlugins/PX4/PowerComponent.h \
- src/AutoPilotPlugins/PX4/PowerComponentController.h \
- src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h \
- src/AutoPilotPlugins/PX4/PX4RadioComponent.h \
- src/AutoPilotPlugins/PX4/CameraComponent.h \
- src/AutoPilotPlugins/PX4/SafetyComponent.h \
- src/AutoPilotPlugins/PX4/SensorsComponent.h \
- src/AutoPilotPlugins/PX4/SensorsComponentController.h \
- src/AutoPilotPlugins/PX4/PX4TuningComponent.h \
- src/FirmwarePlugin/FirmwarePluginManager.h \
src/FirmwarePlugin/FirmwarePlugin.h \
- src/FirmwarePlugin/APM/APMFirmwarePlugin.h \
- src/FirmwarePlugin/APM/APMGeoFenceManager.h \
- src/FirmwarePlugin/APM/APMParameterMetaData.h \
- src/FirmwarePlugin/APM/APMRallyPointManager.h \
- src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h \
- src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.h \
- src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h \
- src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h \
- src/FirmwarePlugin/PX4/px4_custom_mode.h \
- src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h \
- src/FirmwarePlugin/PX4/PX4GeoFenceManager.h \
- src/FirmwarePlugin/PX4/PX4ParameterMetaData.h \
+ src/FirmwarePlugin/FirmwarePluginManager.h \
src/Vehicle/MultiVehicleManager.h \
src/Vehicle/Vehicle.h \
src/VehicleSetup/VehicleComponent.h \
!MobileBuild {
-HEADERS += \
- src/VehicleSetup/FirmwareUpgradeController.h \
- src/VehicleSetup/Bootloader.h \
- src/VehicleSetup/PX4FirmwareUpgradeThread.h \
- src/VehicleSetup/FirmwareImage.h \
-
+ HEADERS += \
+ src/VehicleSetup/Bootloader.h \
+ src/VehicleSetup/FirmwareImage.h \
+ src/VehicleSetup/FirmwareUpgradeController.h \
+ src/VehicleSetup/PX4FirmwareUpgradeThread.h \
}
SOURCES += \
src/AutoPilotPlugins/AutoPilotPlugin.cc \
- src/AutoPilotPlugins/AutoPilotPluginManager.cc \
- src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc \
- src/AutoPilotPlugins/APM/APMAirframeComponent.cc \
- src/AutoPilotPlugins/APM/APMAirframeComponentController.cc \
- src/AutoPilotPlugins/APM/APMCameraComponent.cc \
- src/AutoPilotPlugins/APM/APMCompassCal.cc \
- src/AutoPilotPlugins/APM/APMFlightModesComponent.cc \
- src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc \
- src/AutoPilotPlugins/APM/APMPowerComponent.cc \
- src/AutoPilotPlugins/APM/APMRadioComponent.cc \
- src/AutoPilotPlugins/APM/APMSafetyComponent.cc \
- src/AutoPilotPlugins/APM/APMSensorsComponent.cc \
- src/AutoPilotPlugins/APM/APMSensorsComponentController.cc \
- src/AutoPilotPlugins/APM/APMTuningComponent.cc \
+ src/AutoPilotPlugins/Common/ESP8266Component.cc \
+ src/AutoPilotPlugins/Common/ESP8266ComponentController.cc \
+ src/AutoPilotPlugins/Common/MixersComponent.cc \
src/AutoPilotPlugins/Common/MotorComponent.cc \
src/AutoPilotPlugins/Common/RadioComponentController.cc \
- src/AutoPilotPlugins/Common/ESP8266ComponentController.cc \
- src/AutoPilotPlugins/Common/ESP8266Component.cc \
- src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.cc \
src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.cc \
- src/AutoPilotPlugins/PX4/AirframeComponent.cc \
- src/AutoPilotPlugins/PX4/AirframeComponentAirframes.cc \
- src/AutoPilotPlugins/PX4/AirframeComponentController.cc \
- src/AutoPilotPlugins/PX4/FlightModesComponent.cc \
- src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc \
- src/AutoPilotPlugins/PX4/PX4SimpleFlightModesController.cc \
- src/AutoPilotPlugins/PX4/PowerComponent.cc \
- src/AutoPilotPlugins/PX4/PowerComponentController.cc \
- src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc \
- src/AutoPilotPlugins/PX4/PX4RadioComponent.cc \
- src/AutoPilotPlugins/PX4/CameraComponent.cc \
- src/AutoPilotPlugins/PX4/SafetyComponent.cc \
- src/AutoPilotPlugins/PX4/SensorsComponent.cc \
- src/AutoPilotPlugins/PX4/SensorsComponentController.cc \
- src/AutoPilotPlugins/PX4/PX4TuningComponent.cc \
- src/FirmwarePlugin/APM/APMFirmwarePlugin.cc \
- src/FirmwarePlugin/APM/APMGeoFenceManager.cc \
- src/FirmwarePlugin/APM/APMParameterMetaData.cc \
- src/FirmwarePlugin/APM/APMRallyPointManager.cc \
- src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc \
- src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.cc \
- src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc \
- src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc \
src/FirmwarePlugin/FirmwarePlugin.cc \
src/FirmwarePlugin/FirmwarePluginManager.cc \
- src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc \
- src/FirmwarePlugin/PX4/PX4GeoFenceManager.cc \
- src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc \
src/Vehicle/MultiVehicleManager.cc \
src/Vehicle/Vehicle.cc \
src/VehicleSetup/VehicleComponent.cc \
!MobileBuild {
-SOURCES += \
- src/VehicleSetup/FirmwareUpgradeController.cc \
- src/VehicleSetup/Bootloader.cc \
- src/VehicleSetup/PX4FirmwareUpgradeThread.cc \
- src/VehicleSetup/FirmwareImage.cc \
+ SOURCES += \
+ src/VehicleSetup/Bootloader.cc \
+ src/VehicleSetup/FirmwareImage.cc \
+ src/VehicleSetup/FirmwareUpgradeController.cc \
+ src/VehicleSetup/PX4FirmwareUpgradeThread.cc \
+}
+
+# ArduPilot FirmwarePlugin
+
+APMFirmwarePlugin {
+ RESOURCES *= src/FirmwarePlugin/APM/APMResources.qrc
+ INCLUDEPATH += \
+ src/AutoPilotPlugins/APM \
+ src/FirmwarePlugin/APM \
+
+ HEADERS += \
+ src/AutoPilotPlugins/APM/APMAirframeComponent.h \
+ src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.h \
+ src/AutoPilotPlugins/APM/APMAirframeComponentController.h \
+ src/AutoPilotPlugins/APM/APMAirframeLoader.h \
+ src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h \
+ src/AutoPilotPlugins/APM/APMCameraComponent.h \
+ src/AutoPilotPlugins/APM/APMCompassCal.h \
+ src/AutoPilotPlugins/APM/APMFlightModesComponent.h \
+ src/AutoPilotPlugins/APM/APMFlightModesComponentController.h \
+ src/AutoPilotPlugins/APM/APMLightsComponent.h \
+ src/AutoPilotPlugins/APM/APMSubFrameComponent.h \
+ src/AutoPilotPlugins/APM/APMPowerComponent.h \
+ src/AutoPilotPlugins/APM/APMRadioComponent.h \
+ src/AutoPilotPlugins/APM/APMSafetyComponent.h \
+ src/AutoPilotPlugins/APM/APMSensorsComponent.h \
+ src/AutoPilotPlugins/APM/APMSensorsComponentController.h \
+ src/AutoPilotPlugins/APM/APMTuningComponent.h \
+ src/FirmwarePlugin/APM/APMFirmwarePlugin.h \
+ src/FirmwarePlugin/APM/APMGeoFenceManager.h \
+ src/FirmwarePlugin/APM/APMParameterMetaData.h \
+ src/FirmwarePlugin/APM/APMRallyPointManager.h \
+ src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h \
+ src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.h \
+ src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h \
+ src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h \
+
+ SOURCES += \
+ src/AutoPilotPlugins/APM/APMAirframeComponent.cc \
+ src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.cc \
+ src/AutoPilotPlugins/APM/APMAirframeComponentController.cc \
+ src/AutoPilotPlugins/APM/APMAirframeLoader.cc \
+ src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc \
+ src/AutoPilotPlugins/APM/APMCameraComponent.cc \
+ src/AutoPilotPlugins/APM/APMCompassCal.cc \
+ src/AutoPilotPlugins/APM/APMFlightModesComponent.cc \
+ src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc \
+ src/AutoPilotPlugins/APM/APMLightsComponent.cc \
+ src/AutoPilotPlugins/APM/APMSubFrameComponent.cc \
+ src/AutoPilotPlugins/APM/APMPowerComponent.cc \
+ src/AutoPilotPlugins/APM/APMRadioComponent.cc \
+ src/AutoPilotPlugins/APM/APMSafetyComponent.cc \
+ src/AutoPilotPlugins/APM/APMSensorsComponent.cc \
+ src/AutoPilotPlugins/APM/APMSensorsComponentController.cc \
+ src/AutoPilotPlugins/APM/APMTuningComponent.cc \
+ src/FirmwarePlugin/APM/APMFirmwarePlugin.cc \
+ src/FirmwarePlugin/APM/APMGeoFenceManager.cc \
+ src/FirmwarePlugin/APM/APMParameterMetaData.cc \
+ src/FirmwarePlugin/APM/APMRallyPointManager.cc \
+ src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc \
+ src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.cc \
+ src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc \
+ src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc \
+}
+
+APMFirmwarePluginFactory {
+ HEADERS += src/FirmwarePlugin/APM/APMFirmwarePluginFactory.h
+ SOURCES += src/FirmwarePlugin/APM/APMFirmwarePluginFactory.cc
+}
+
+# PX4 FirmwarePlugin
+
+PX4FirmwarePlugin {
+ RESOURCES *= src/FirmwarePlugin/PX4/PX4Resources.qrc
+
+ INCLUDEPATH += \
+ src/AutoPilotPlugins/PX4 \
+ src/FirmwarePlugin/PX4 \
+
+ HEADERS+= \
+ src/AutoPilotPlugins/PX4/AirframeComponent.h \
+ src/AutoPilotPlugins/PX4/AirframeComponentAirframes.h \
+ src/AutoPilotPlugins/PX4/AirframeComponentController.h \
+ src/AutoPilotPlugins/PX4/CameraComponent.h \
+ src/AutoPilotPlugins/PX4/FlightModesComponent.h \
+ src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.h \
+ src/AutoPilotPlugins/PX4/PX4AirframeLoader.h \
+ src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h \
+ src/AutoPilotPlugins/PX4/PX4RadioComponent.h \
+ src/AutoPilotPlugins/PX4/PX4SimpleFlightModesController.h \
+ src/AutoPilotPlugins/PX4/PX4TuningComponent.h \
+ src/AutoPilotPlugins/PX4/PowerComponent.h \
+ src/AutoPilotPlugins/PX4/PowerComponentController.h \
+ src/AutoPilotPlugins/PX4/SafetyComponent.h \
+ src/AutoPilotPlugins/PX4/SensorsComponent.h \
+ src/AutoPilotPlugins/PX4/SensorsComponentController.h \
+ src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h \
+ src/FirmwarePlugin/PX4/PX4GeoFenceManager.h \
+ src/FirmwarePlugin/PX4/PX4ParameterMetaData.h \
+
+ SOURCES += \
+ src/AutoPilotPlugins/PX4/AirframeComponent.cc \
+ src/AutoPilotPlugins/PX4/AirframeComponentAirframes.cc \
+ src/AutoPilotPlugins/PX4/AirframeComponentController.cc \
+ src/AutoPilotPlugins/PX4/CameraComponent.cc \
+ src/AutoPilotPlugins/PX4/FlightModesComponent.cc \
+ src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc \
+ src/AutoPilotPlugins/PX4/PX4AirframeLoader.cc \
+ src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc \
+ src/AutoPilotPlugins/PX4/PX4RadioComponent.cc \
+ src/AutoPilotPlugins/PX4/PX4SimpleFlightModesController.cc \
+ src/AutoPilotPlugins/PX4/PX4TuningComponent.cc \
+ src/AutoPilotPlugins/PX4/PowerComponent.cc \
+ src/AutoPilotPlugins/PX4/PowerComponentController.cc \
+ src/AutoPilotPlugins/PX4/SafetyComponent.cc \
+ src/AutoPilotPlugins/PX4/SensorsComponent.cc \
+ src/AutoPilotPlugins/PX4/SensorsComponentController.cc \
+ src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc \
+ src/FirmwarePlugin/PX4/PX4GeoFenceManager.cc \
+ src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc \
+}
+
+PX4FirmwarePluginFactory {
+ HEADERS += src/FirmwarePlugin/PX4/PX4FirmwarePluginFactory.h
+ SOURCES += src/FirmwarePlugin/PX4/PX4FirmwarePluginFactory.cc
}
# Fact System code
@@ -796,8 +930,8 @@ INCLUDEPATH += \
HEADERS += \
src/FactSystem/Fact.h \
- src/FactSystem/FactGroup.h \
src/FactSystem/FactControls/FactPanelController.h \
+ src/FactSystem/FactGroup.h \
src/FactSystem/FactMetaData.h \
src/FactSystem/FactSystem.h \
src/FactSystem/FactValidator.h \
@@ -806,8 +940,8 @@ HEADERS += \
SOURCES += \
src/FactSystem/Fact.cc \
- src/FactSystem/FactGroup.cc \
src/FactSystem/FactControls/FactPanelController.cc \
+ src/FactSystem/FactGroup.cc \
src/FactSystem/FactMetaData.cc \
src/FactSystem/FactSystem.cc \
src/FactSystem/FactValidator.cc \
@@ -846,32 +980,11 @@ contains (CONFIG, DISABLE_VIDEOSTREAMING) {
# Android
AndroidBuild {
- include($$PWD/libs/qtandroidserialport/src/qtandroidserialport.pri)
- message("Adding Serial Java Classes")
- QT += androidextras
- ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
- OTHER_FILES += \
- $$PWD/android/AndroidManifest.xml \
- $$PWD/android/res/xml/device_filter.xml \
- $$PWD/android/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java \
- $$PWD/android/src/com/hoho/android/usbserial/driver/CommonUsbSerialDriver.java \
- $$PWD/android/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java \
- $$PWD/android/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java \
- $$PWD/android/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java \
- $$PWD/android/src/com/hoho/android/usbserial/driver/UsbId.java \
- $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialDriver.java \
- $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialProber.java \
- $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \
- $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java \
- $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbIoManager.java
-
- DISTFILES += \
- android/gradle/wrapper/gradle-wrapper.jar \
- android/gradlew \
- android/res/values/libs.xml \
- android/build.gradle \
- android/gradle/wrapper/gradle-wrapper.properties \
- android/gradlew.bat
+ contains (CONFIG, DISABLE_BUILTIN_ANDROID) {
+ message("Skipping builtin support for Android")
+ } else {
+ include(android.pri)
+ }
}
#-------------------------------------------------------------------------------------
diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index 5a9a2a37e3a81eb4ccf3236464164bd3c9fb4732..231e970ce2f8811f42ea392dea4a57fcc6d4efcb 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -1,79 +1,90 @@
- src/comm/PX4MockLink.params
- src/comm/APMArduCopterMockLink.params
- src/comm/APMArduPlaneMockLink.params
- src/comm/APMArduSubMockLink.params
src/FactSystem/FactSystemTest.qml
+
+ src/ui/toolbar/BatteryIndicator.qml
+ src/ui/toolbar/GPSIndicator.qml
+ src/ui/toolbar/MessageIndicator.qml
+ src/ui/toolbar/ModeIndicator.qml
+ src/ui/toolbar/RCRSSIIndicator.qml
+ src/ui/toolbar/TelemetryRSSIIndicator.qml
+
src/AutoPilotPlugins/PX4/AirframeComponent.qml
src/AutoPilotPlugins/PX4/AirframeComponentSummary.qml
- src/AutoPilotPlugins/APM/APMAirframeComponent.qml
- src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
+ src/AnalyzeView/AnalyzeView.qml
+ src/ui/AppSettings.qml
+ src/ui/preferences/BluetoothSettings.qml
+ src/AutoPilotPlugins/PX4/CameraComponent.qml
+ src/AutoPilotPlugins/PX4/CameraComponentSummary.qml
src/ViewWidgets/CustomCommandWidget.qml
+ src/ui/preferences/DebugWindow.qml
+ src/AutoPilotPlugins/Common/ESP8266Component.qml
+ src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
src/VehicleSetup/FirmwareUpgrade.qml
- src/FlightDisplay/FlightDisplayView.qml
- src/FlightDisplay/FlightDisplayViewUVC.qml
src/FlightDisplay/FlightDisplayViewDummy.qml
- src/AutoPilotPlugins/PX4/PX4FlightModes.qml
- src/AutoPilotPlugins/PX4/PX4AdvancedFlightModes.qml
- src/AutoPilotPlugins/PX4/PX4SimpleFlightModes.qml
+ src/FlightDisplay/FlightDisplayViewUVC.qml
src/AutoPilotPlugins/PX4/FlightModesComponentSummary.qml
- src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
- src/AutoPilotPlugins/APM/APMFlightModesComponentSummary.qml
- src/ui/preferences/BluetoothSettings.qml
- src/ui/preferences/DebugWindow.qml
src/ui/preferences/GeneralSettings.qml
+ src/MissionEditor/GeoFenceEditor.qml
+ src/AnalyzeView/GeoTagPage.qml
+ src/VehicleSetup/JoystickConfig.qml
src/ui/preferences/LinkSettings.qml
+ src/AnalyzeView/LogDownloadPage.qml
src/ui/preferences/LogReplaySettings.qml
- src/ui/preferences/MavlinkSettings.qml
- src/ui/preferences/MockLink.qml
- src/ui/preferences/MockLinkSettings.qml
- src/QtLocationPlugin/QMLControl/OfflineMap.qml
- src/ui/preferences/SerialSettings.qml
- src/ui/preferences/TcpSettings.qml
- src/ui/preferences/UdpSettings.qml
- src/VehicleSetup/JoystickConfig.qml
- src/ui/toolbar/MainToolBar.qml
src/ui/MainWindowHybrid.qml
src/ui/MainWindowInner.qml
src/ui/MainWindowNative.qml
- src/ui/AppSettings.qml
+ src/ui/preferences/MavlinkSettings.qml
src/MissionEditor/MissionEditor.qml
+ src/MissionEditor/MissionSettingsEditor.qml
+ src/AutoPilotPlugins/Common/MixersComponent.qml
+ src/ui/preferences/MockLink.qml
+ src/ui/preferences/MockLinkSettings.qml
+ src/MultiVehicle/MultiVehicleView.qml
src/AutoPilotPlugins/Common/MotorComponent.qml
+ src/QtLocationPlugin/QMLControl/OfflineMap.qml
src/AutoPilotPlugins/PX4/PowerComponent.qml
src/AutoPilotPlugins/PX4/PowerComponentSummary.qml
src/VehicleSetup/PX4FlowSensor.qml
- src/QmlControls/QGroundControl.Controls.qmldir
src/AnalyzeView/AnalyzePage.qml
+ src/QmlControls/AppMessages.qml
+ src/MissionEditor/ComplexMissionItem.qml
src/QmlControls/ClickableColor.qml
src/QmlControls/DropButton.qml
src/QmlControls/ExclusiveGroupItem.qml
src/QmlControls/FactSliderPanel.qml
+ src/QmlControls/FlightModeDropdown.qml
+ src/QmlControls/FlightModeMenu.qml
+ src/MissionEditor/FWLandingPatternMapVisual.qml
+ src/QmlControls/GuidedBar.qml
src/QmlControls/IndicatorButton.qml
src/QmlControls/JoystickThumbPad.qml
src/ui/toolbar/MainToolBar.qml
src/ui/toolbar/MainToolBarIndicators.qml
+ src/QmlControls/MissionCommandDialog.qml
src/MissionEditor/MissionItemEditor.qml
src/QmlControls/MissionItemIndexLabel.qml
src/MissionEditor/MissionItemStatus.qml
- src/QmlControls/MissionCommandDialog.qml
- src/QmlControls/MultiRotorMotorDisplay.qml
src/QmlControls/ModeSwitchDisplay.qml
+ src/QmlControls/MultiRotorMotorDisplay.qml
+ src/QmlControls/OfflineMapButton.qml
src/QmlControls/ParameterEditor.qml
src/QmlControls/ParameterEditorDialog.qml
- src/MissionEditor/RallyPointItemEditor.qml
- src/QmlControls/RCChannelMonitor.qml
src/QmlControls/QGCButton.qml
src/QmlControls/QGCCheckBox.qml
src/QmlControls/QGCColoredImage.qml
src/QmlControls/QGCComboBox.qml
src/QmlControls/QGCFlickable.qml
- src/QmlControls/QGCFlickableVerticalIndicator.qml
src/QmlControls/QGCFlickableHorizontalIndicator.qml
+ src/QmlControls/QGCFlickableVerticalIndicator.qml
+ src/QmlControls/QGCGroupBox.qml
src/QmlControls/QGCLabel.qml
- src/QmlControls/QGCMobileFileDialog.qml
+ src/QmlControls/QGCListView.qml
+ src/QmlControls/QGCMapLabel.qml
+ src/QmlControls/QGCMobileFileOpenDialog.qml
+ src/QmlControls/QGCMobileFileSaveDialog.qml
src/QmlControls/QGCMovableItem.qml
src/QmlControls/QGCPipable.qml
src/QmlControls/QGCRadioButton.qml
@@ -84,19 +95,21 @@
src/QmlControls/QGCViewDialog.qml
src/QmlControls/QGCViewMessage.qml
src/QmlControls/QGCViewPanel.qml
+ src/QmlControls/QGroundControl.Controls.qmldir
src/MissionEditor/RallyPointEditorHeader.qml
+ src/MissionEditor/RallyPointItemEditor.qml
+ src/QmlControls/RCChannelMonitor.qml
src/QmlControls/RoundButton.qml
src/AutoPilotPlugins/Common/SetupPage.qml
src/ui/toolbar/SignalStrength.qml
src/QmlControls/SliderSwitch.qml
src/QmlControls/SubMenuButton.qml
+ src/MissionEditor/SurveyComplexItem.qml
src/QmlControls/VehicleRotationCal.qml
src/QmlControls/VehicleSummaryRow.qml
- src/QmlControls/AppMessages.qml
+ src/QmlControls/ToolStrip.qml
+ src/QmlControls/DropPanel.qml
src/ViewWidgets/ViewWidget.qml
- src/MissionEditor/SimpleItemEditor.qml
- src/MissionEditor/SurveyItemEditor.qml
- src/MissionEditor/GeoFenceEditor.qml
src/FactSystem/FactControls/FactBitmask.qml
src/FactSystem/FactControls/FactCheckBox.qml
src/FactSystem/FactControls/FactComboBox.qml
@@ -106,15 +119,17 @@
src/FactSystem/FactControls/FactTextFieldGrid.qml
src/FactSystem/FactControls/FactTextFieldRow.qml
src/FactSystem/FactControls/qmldir
- src/FlightDisplay/qmldir
src/FlightDisplay/FlightDisplayView.qml
src/FlightDisplay/FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewVideo.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
- src/FlightDisplay/VirtualJoystick.qml
- src/FlightMap/qmldir
+ src/FlightDisplay/MultiVehicleList.qml
+ src/FlightDisplay/qmldir
+ src/FlightMap/Widgets/CenterMapDropButton.qml
+ src/FlightMap/Widgets/CenterMapDropPanel.qml
+ src/FlightMap/Widgets/MapFitFunctions.qml
src/FlightMap/FlightMap.qml
- src/MissionEditor/QGCMapPolygonControls.qml
+ src/FlightMap/Widgets/InstrumentSwipeView.qml
src/FlightMap/MapScale.qml
src/FlightMap/MapItems/MissionItemIndicator.qml
src/FlightMap/MapItems/MissionItemView.qml
@@ -123,54 +138,37 @@
src/FlightMap/Widgets/QGCAttitudeHUD.qml
src/FlightMap/Widgets/QGCAttitudeWidget.qml
src/FlightMap/Widgets/QGCCompassWidget.qml
- src/FlightMap/Widgets/QGCInstrumentWidget.qml
- src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
+ src/FlightMap/Widgets/QGCInstrumentWidget.qml
+ src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
+ src/MissionEditor/QGCMapPolygonControls.qml
src/FlightMap/Widgets/QGCPitchIndicator.qml
src/FlightMap/QGCVideoBackground.qml
+ src/FlightMap/qmldir
+ src/FlightMap/Widgets/CameraWidget.qml
src/FlightMap/Widgets/ValuesWidget.qml
- src/FlightMap/Widgets/VibrationWidget.qml
+ src/FlightMap/Widgets/VehicleHealthWidget.qml
src/FlightMap/MapItems/VehicleMapItem.qml
- src/FlightMap/Widgets/InstrumentSwipeView.qml
+ src/FlightMap/Widgets/VibrationWidget.qml
src/QmlControls/QGroundControl.ScreenTools.qmldir
src/QmlControls/ScreenTools.qml
src/QmlControls/QmlTest.qml
src/AutoPilotPlugins/Common/RadioComponent.qml
- src/AutoPilotPlugins/Common/ESP8266Component.qml
- src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml
- src/AutoPilotPlugins/PX4/PX4RadioComponentSummary.qml
- src/AutoPilotPlugins/PX4/PX4TuningComponentCopter.qml
- src/AutoPilotPlugins/PX4/PX4TuningComponentPlane.qml
- src/AutoPilotPlugins/APM/APMNotSupported.qml
- src/AutoPilotPlugins/APM/APMCameraComponent.qml
- src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml
- src/AutoPilotPlugins/APM/APMPowerComponent.qml
- src/AutoPilotPlugins/APM/APMPowerComponentSummary.qml
- src/AutoPilotPlugins/APM/APMRadioComponentSummary.qml
- src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
- src/AutoPilotPlugins/APM/APMSafetyComponentPlane.qml
- src/AutoPilotPlugins/APM/APMSafetyComponentRover.qml
- src/AutoPilotPlugins/APM/APMSafetyComponentSummaryCopter.qml
- src/AutoPilotPlugins/APM/APMSafetyComponentSummaryPlane.qml
- src/AutoPilotPlugins/APM/APMSafetyComponentSummaryRover.qml
- src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
- src/AutoPilotPlugins/PX4/CameraComponent.qml
- src/AutoPilotPlugins/PX4/CameraComponentSummary.qml
src/AutoPilotPlugins/PX4/SafetyComponent.qml
src/AutoPilotPlugins/PX4/SafetyComponentSummary.qml
src/AutoPilotPlugins/PX4/SensorsComponent.qml
src/AutoPilotPlugins/PX4/SensorsComponentSummary.qml
src/AutoPilotPlugins/PX4/SensorsComponentSummaryFixedWing.qml
- src/AutoPilotPlugins/APM/APMSensorsComponent.qml
- src/AutoPilotPlugins/APM/APMSensorsComponentSummary.qml
+ src/ui/preferences/SerialSettings.qml
src/VehicleSetup/SetupParameterEditor.qml
src/VehicleSetup/SetupView.qml
+ src/MissionEditor/SimpleItemEditor.qml
+ src/MissionEditor/SurveyItemEditor.qml
+ src/MissionEditor/FWLandingPatternEditor.qml
+ src/ui/preferences/TcpSettings.qml
src/test.qml
+ src/ui/preferences/UdpSettings.qml
src/VehicleSetup/VehicleSummary.qml
- src/QmlControls/OfflineMapButton.qml
- src/AutoPilotPlugins/PX4/PX4TuningComponentVTOL.qml
- src/AnalyzeView/AnalyzeView.qml
- src/AnalyzeView/GeoTagPage.qml
- src/AnalyzeView/LogDownloadPage.qml
+ src/FlightDisplay/VirtualJoystick.qml
src/MissionManager/MavCmdInfoCommon.json
@@ -179,25 +177,28 @@
src/MissionManager/MavCmdInfoRover.json
src/MissionManager/MavCmdInfoSub.json
src/MissionManager/MavCmdInfoVTOL.json
- src/FirmwarePlugin/APM/MavCmdInfoCommon.json
- src/FirmwarePlugin/APM/MavCmdInfoFixedWing.json
- src/FirmwarePlugin/APM/MavCmdInfoMultiRotor.json
- src/FirmwarePlugin/APM/MavCmdInfoRover.json
- src/FirmwarePlugin/APM/MavCmdInfoSub.json
- src/FirmwarePlugin/APM/MavCmdInfoVTOL.json
- src/FirmwarePlugin/PX4/MavCmdInfoCommon.json
- src/FirmwarePlugin/PX4/MavCmdInfoFixedWing.json
- src/FirmwarePlugin/PX4/MavCmdInfoMultiRotor.json
- src/FirmwarePlugin/PX4/MavCmdInfoRover.json
- src/FirmwarePlugin/PX4/MavCmdInfoSub.json
- src/FirmwarePlugin/PX4/MavCmdInfoVTOL.json
src/Vehicle/VehicleFact.json
src/Vehicle/BatteryFact.json
src/Vehicle/GPSFact.json
src/Vehicle/WindFact.json
src/Vehicle/VibrationFact.json
- src/QmlControls/QGroundControlQmlGlobal.json
+ src/Settings/App.SettingsGroup.json
+ src/Settings/AutoConnect.SettingsGroup.json
+ src/Settings/Units.SettingsGroup.json
+ src/Settings/Video.SettingsGroup.json
src/MissionManager/RallyPoint.FactMetaData.json
+ src/MissionManager/FWLandingPattern.FactMetaData.json
src/MissionManager/Survey.FactMetaData.json
+ src/comm/USBBoardInfo.json
+ src/Vehicle/TemperatureFact.json
+
+
+ src/comm/APMArduCopterMockLink.params
+ src/comm/APMArduPlaneMockLink.params
+ src/comm/APMArduSubMockLink.params
+ src/comm/PX4MockLink.params
+
+
+ src/FirmwarePlugin/NoGeoFenceEditor.qml
diff --git a/resources/calibration/joystick/joystickCenter.png b/resources/calibration/joystick/mode1/joystickCenter.png
similarity index 100%
rename from resources/calibration/joystick/joystickCenter.png
rename to resources/calibration/joystick/mode1/joystickCenter.png
diff --git a/resources/calibration/joystick/joystickThrottleDown.png b/resources/calibration/joystick/mode1/joystickPitchDown.png
similarity index 100%
rename from resources/calibration/joystick/joystickThrottleDown.png
rename to resources/calibration/joystick/mode1/joystickPitchDown.png
diff --git a/resources/calibration/joystick/joystickThrottleUp.png b/resources/calibration/joystick/mode1/joystickPitchUp.png
similarity index 100%
rename from resources/calibration/joystick/joystickThrottleUp.png
rename to resources/calibration/joystick/mode1/joystickPitchUp.png
diff --git a/resources/calibration/joystick/joystickRollLeft.png b/resources/calibration/joystick/mode1/joystickRollLeft.png
similarity index 100%
rename from resources/calibration/joystick/joystickRollLeft.png
rename to resources/calibration/joystick/mode1/joystickRollLeft.png
diff --git a/resources/calibration/joystick/joystickRollRight.png b/resources/calibration/joystick/mode1/joystickRollRight.png
similarity index 100%
rename from resources/calibration/joystick/joystickRollRight.png
rename to resources/calibration/joystick/mode1/joystickRollRight.png
diff --git a/resources/calibration/joystick/joystickPitchDown.png b/resources/calibration/joystick/mode1/joystickThrottleDown.png
similarity index 100%
rename from resources/calibration/joystick/joystickPitchDown.png
rename to resources/calibration/joystick/mode1/joystickThrottleDown.png
diff --git a/resources/calibration/joystick/joystickPitchUp.png b/resources/calibration/joystick/mode1/joystickThrottleUp.png
similarity index 100%
rename from resources/calibration/joystick/joystickPitchUp.png
rename to resources/calibration/joystick/mode1/joystickThrottleUp.png
diff --git a/resources/calibration/joystick/joystickYawLeft.png b/resources/calibration/joystick/mode1/joystickYawLeft.png
similarity index 100%
rename from resources/calibration/joystick/joystickYawLeft.png
rename to resources/calibration/joystick/mode1/joystickYawLeft.png
diff --git a/resources/calibration/joystick/joystickYawRight.png b/resources/calibration/joystick/mode1/joystickYawRight.png
similarity index 100%
rename from resources/calibration/joystick/joystickYawRight.png
rename to resources/calibration/joystick/mode1/joystickYawRight.png
diff --git a/resources/calibration/joystick/mode2/joystickCenter.png b/resources/calibration/joystick/mode2/joystickCenter.png
new file mode 100644
index 0000000000000000000000000000000000000000..556321ec4b1c3142dc40acaf8068b4fb57e923a5
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickCenter.png differ
diff --git a/resources/calibration/joystick/mode2/joystickPitchDown.png b/resources/calibration/joystick/mode2/joystickPitchDown.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e895b1a5a50dac35d977dd496a830cd26b1a5d8
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickPitchDown.png differ
diff --git a/resources/calibration/joystick/mode2/joystickPitchUp.png b/resources/calibration/joystick/mode2/joystickPitchUp.png
new file mode 100644
index 0000000000000000000000000000000000000000..ad9d7c03fa5dc49d5889eedf2551f900381c11fc
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickPitchUp.png differ
diff --git a/resources/calibration/joystick/mode2/joystickRollLeft.png b/resources/calibration/joystick/mode2/joystickRollLeft.png
new file mode 100644
index 0000000000000000000000000000000000000000..fddc7dfb4217051af0ca1b51897f82ef7cd2c810
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickRollLeft.png differ
diff --git a/resources/calibration/joystick/mode2/joystickRollRight.png b/resources/calibration/joystick/mode2/joystickRollRight.png
new file mode 100644
index 0000000000000000000000000000000000000000..9556eed1e7e62df8c0ffe5e0206ad03db6c6f943
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickRollRight.png differ
diff --git a/resources/calibration/joystick/mode2/joystickThrottleDown.png b/resources/calibration/joystick/mode2/joystickThrottleDown.png
new file mode 100644
index 0000000000000000000000000000000000000000..7436477b0acd29f42758d77df5978cb955785d6a
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickThrottleDown.png differ
diff --git a/resources/calibration/joystick/mode2/joystickThrottleUp.png b/resources/calibration/joystick/mode2/joystickThrottleUp.png
new file mode 100644
index 0000000000000000000000000000000000000000..223199991fc90272b1fae1ba6f28799b31681ca2
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickThrottleUp.png differ
diff --git a/resources/calibration/joystick/mode2/joystickYawLeft.png b/resources/calibration/joystick/mode2/joystickYawLeft.png
new file mode 100644
index 0000000000000000000000000000000000000000..788a09c0b8c504db6f6c1068dd408cf8f39d7554
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickYawLeft.png differ
diff --git a/resources/calibration/joystick/mode2/joystickYawRight.png b/resources/calibration/joystick/mode2/joystickYawRight.png
new file mode 100644
index 0000000000000000000000000000000000000000..381108825e10adacbbc729dd9ea1ea22b8665f87
Binary files /dev/null and b/resources/calibration/joystick/mode2/joystickYawRight.png differ
diff --git a/resources/calibration/joystick/mode3/joystickCenter.png b/resources/calibration/joystick/mode3/joystickCenter.png
new file mode 100644
index 0000000000000000000000000000000000000000..556321ec4b1c3142dc40acaf8068b4fb57e923a5
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickCenter.png differ
diff --git a/resources/calibration/joystick/mode3/joystickPitchDown.png b/resources/calibration/joystick/mode3/joystickPitchDown.png
new file mode 100644
index 0000000000000000000000000000000000000000..7436477b0acd29f42758d77df5978cb955785d6a
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickPitchDown.png differ
diff --git a/resources/calibration/joystick/mode3/joystickPitchUp.png b/resources/calibration/joystick/mode3/joystickPitchUp.png
new file mode 100644
index 0000000000000000000000000000000000000000..223199991fc90272b1fae1ba6f28799b31681ca2
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickPitchUp.png differ
diff --git a/resources/calibration/joystick/mode3/joystickRollLeft.png b/resources/calibration/joystick/mode3/joystickRollLeft.png
new file mode 100644
index 0000000000000000000000000000000000000000..788a09c0b8c504db6f6c1068dd408cf8f39d7554
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickRollLeft.png differ
diff --git a/resources/calibration/joystick/mode3/joystickRollRight.png b/resources/calibration/joystick/mode3/joystickRollRight.png
new file mode 100644
index 0000000000000000000000000000000000000000..381108825e10adacbbc729dd9ea1ea22b8665f87
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickRollRight.png differ
diff --git a/resources/calibration/joystick/mode3/joystickThrottleDown.png b/resources/calibration/joystick/mode3/joystickThrottleDown.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e895b1a5a50dac35d977dd496a830cd26b1a5d8
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickThrottleDown.png differ
diff --git a/resources/calibration/joystick/mode3/joystickThrottleUp.png b/resources/calibration/joystick/mode3/joystickThrottleUp.png
new file mode 100644
index 0000000000000000000000000000000000000000..ad9d7c03fa5dc49d5889eedf2551f900381c11fc
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickThrottleUp.png differ
diff --git a/resources/calibration/joystick/mode3/joystickYawLeft.png b/resources/calibration/joystick/mode3/joystickYawLeft.png
new file mode 100644
index 0000000000000000000000000000000000000000..fddc7dfb4217051af0ca1b51897f82ef7cd2c810
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickYawLeft.png differ
diff --git a/resources/calibration/joystick/mode3/joystickYawRight.png b/resources/calibration/joystick/mode3/joystickYawRight.png
new file mode 100644
index 0000000000000000000000000000000000000000..9556eed1e7e62df8c0ffe5e0206ad03db6c6f943
Binary files /dev/null and b/resources/calibration/joystick/mode3/joystickYawRight.png differ
diff --git a/resources/calibration/joystick/mode4/joystickCenter.png b/resources/calibration/joystick/mode4/joystickCenter.png
new file mode 100644
index 0000000000000000000000000000000000000000..556321ec4b1c3142dc40acaf8068b4fb57e923a5
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickCenter.png differ
diff --git a/resources/calibration/joystick/mode4/joystickPitchDown.png b/resources/calibration/joystick/mode4/joystickPitchDown.png
new file mode 100644
index 0000000000000000000000000000000000000000..6e895b1a5a50dac35d977dd496a830cd26b1a5d8
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickPitchDown.png differ
diff --git a/resources/calibration/joystick/mode4/joystickPitchUp.png b/resources/calibration/joystick/mode4/joystickPitchUp.png
new file mode 100644
index 0000000000000000000000000000000000000000..ad9d7c03fa5dc49d5889eedf2551f900381c11fc
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickPitchUp.png differ
diff --git a/resources/calibration/joystick/mode4/joystickRollLeft.png b/resources/calibration/joystick/mode4/joystickRollLeft.png
new file mode 100644
index 0000000000000000000000000000000000000000..788a09c0b8c504db6f6c1068dd408cf8f39d7554
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickRollLeft.png differ
diff --git a/resources/calibration/joystick/mode4/joystickRollRight.png b/resources/calibration/joystick/mode4/joystickRollRight.png
new file mode 100644
index 0000000000000000000000000000000000000000..381108825e10adacbbc729dd9ea1ea22b8665f87
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickRollRight.png differ
diff --git a/resources/calibration/joystick/mode4/joystickThrottleDown.png b/resources/calibration/joystick/mode4/joystickThrottleDown.png
new file mode 100644
index 0000000000000000000000000000000000000000..7436477b0acd29f42758d77df5978cb955785d6a
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickThrottleDown.png differ
diff --git a/resources/calibration/joystick/mode4/joystickThrottleUp.png b/resources/calibration/joystick/mode4/joystickThrottleUp.png
new file mode 100644
index 0000000000000000000000000000000000000000..223199991fc90272b1fae1ba6f28799b31681ca2
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickThrottleUp.png differ
diff --git a/resources/calibration/joystick/mode4/joystickYawLeft.png b/resources/calibration/joystick/mode4/joystickYawLeft.png
new file mode 100644
index 0000000000000000000000000000000000000000..fddc7dfb4217051af0ca1b51897f82ef7cd2c810
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickYawLeft.png differ
diff --git a/resources/calibration/joystick/mode4/joystickYawRight.png b/resources/calibration/joystick/mode4/joystickYawRight.png
new file mode 100644
index 0000000000000000000000000000000000000000..9556eed1e7e62df8c0ffe5e0206ad03db6c6f943
Binary files /dev/null and b/resources/calibration/joystick/mode4/joystickYawRight.png differ
diff --git a/resources/waves.svg b/resources/waves.svg
new file mode 100644
index 0000000000000000000000000000000000000000..fbca7c7819fd882452ada1c52c56db7ddb0f2afa
--- /dev/null
+++ b/resources/waves.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
diff --git a/src/AnalyzeView/AnalyzeView.qml b/src/AnalyzeView/AnalyzeView.qml
index 33545d0f97c0afb42e10e37e120dd6617b9f1975..cd910754a9c1f1fbf2f890b1e2cece19d6ad94bf 100644
--- a/src/AnalyzeView/AnalyzeView.qml
+++ b/src/AnalyzeView/AnalyzeView.qml
@@ -58,8 +58,8 @@ Rectangle {
// I don't know why this does not work
Connections {
- target: QGroundControl
- onBaseFontPointSizeChanged: buttonColumn.reflowWidths()
+ target: QGroundControl.settingsManager.appSettings.appFontPointSize
+ onValueChanged: buttonColumn.reflowWidths()
}
function reflowWidths() {
@@ -86,25 +86,25 @@ Rectangle {
model: ListModel {
ListElement {
- buttonImage: "/qmlimages/LogDownloadIcon"
- buttonText: qsTr("Log Download")
- pageSource: "LogDownloadPage.qml"
+ buttonImage: "/qmlimages/LogDownloadIcon"
+ buttonText: qsTr("Log Download")
+ pageSource: "LogDownloadPage.qml"
}
ListElement {
- buttonImage: "/qmlimages/GeoTagIcon"
- buttonText: qsTr("GeoTag Images")
- pageSource: "GeoTagPage.qml"
+ buttonImage: "/qmlimages/GeoTagIcon"
+ buttonText: qsTr("GeoTag Images")
+ pageSource: "GeoTagPage.qml"
}
}
Component.onCompleted: itemAt(0).checked = true
SubMenuButton {
- imageResource: buttonImage
- setupIndicator: false
- exclusiveGroup: setupButtonGroup
- text: buttonText
- onClicked: panelLoader.source = pageSource
+ imageResource: buttonImage
+ setupIndicator: false
+ exclusiveGroup: setupButtonGroup
+ text: buttonText
+ onClicked: panelLoader.source = pageSource
}
}
}
diff --git a/src/AnalyzeView/ExifParser.cc b/src/AnalyzeView/ExifParser.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2b4ccf0639efdc652067f26af996473aea34163f
--- /dev/null
+++ b/src/AnalyzeView/ExifParser.cc
@@ -0,0 +1,224 @@
+#include "ExifParser.h"
+#include
+#include
+#include
+
+ExifParser::ExifParser()
+{
+
+}
+
+ExifParser::~ExifParser()
+{
+
+}
+
+double ExifParser::readTime(QByteArray& buf)
+{
+ QByteArray tiffHeader("\x49\x49\x2A", 3);
+ QByteArray createDateHeader("\x04\x90\x02", 3);
+
+ // find header position
+ uint32_t tiffHeaderIndex = buf.indexOf(tiffHeader);
+
+ // find creation date header index
+ uint32_t createDateHeaderIndex = buf.indexOf(createDateHeader);
+
+ // extract size of date-time string, -1 accounting for null-termination
+ uint32_t* sizeString = reinterpret_cast(buf.mid(createDateHeaderIndex + 4, 4).data());
+ uint32_t createDateStringSize = qFromLittleEndian(*sizeString) - 1;
+
+ // extract location of date-time string
+ uint32_t* dataIndex = reinterpret_cast(buf.mid(createDateHeaderIndex + 8, 4).data());
+ uint32_t createDateStringDataIndex = qFromLittleEndian(*dataIndex) + tiffHeaderIndex;
+
+ // read out data of create date-time field
+ QString createDate = buf.mid(createDateStringDataIndex, createDateStringSize);
+
+ QStringList createDateList = createDate.split(' ');
+ if (createDateList.count() < 2) {
+ qWarning() << "Could not decode creation time and date: " << createDateList;
+ return -1.0;
+ }
+ QStringList dateList = createDateList[0].split(':');
+ if (dateList.count() < 3) {
+ qWarning() << "Could not decode creation date: " << dateList;
+ return -1.0;
+ }
+ QStringList timeList = createDateList[1].split(':');
+ if (timeList.count() < 3) {
+ qWarning() << "Could not decode creation time: " << timeList;
+ return -1.0;
+ }
+ QDate date(dateList[0].toInt(), dateList[1].toInt(), dateList[2].toInt());
+ QTime time(timeList[0].toInt(), timeList[1].toInt(), timeList[2].toInt());
+ QDateTime tagTime(date, time);
+ return tagTime.toMSecsSinceEpoch()/1000.0;
+}
+
+bool ExifParser::write(QByteArray &buf, QGeoCoordinate coordinate)
+{
+ QByteArray app1Header("\xff\xe1", 2);
+ uint32_t app1HeaderInd = buf.indexOf(app1Header);
+ uint16_t *conversionPointer = reinterpret_cast(buf.mid(app1HeaderInd + 2, 2).data());
+ uint16_t app1Size = *conversionPointer;
+ uint16_t app1SizeEndian = qFromBigEndian(app1Size) + 0xa5; // change wrong endian
+ QByteArray tiffHeader("\x49\x49\x2A", 3);
+ uint32_t tiffHeaderInd = buf.indexOf(tiffHeader);
+ conversionPointer = reinterpret_cast(buf.mid(tiffHeaderInd + 8, 2).data());
+ uint16_t numberOfTiffFields = *conversionPointer;
+ uint32_t nextIfdOffsetInd = tiffHeaderInd + 10 + 12 * (numberOfTiffFields);
+ conversionPointer = reinterpret_cast(buf.mid(nextIfdOffsetInd, 2).data());
+ uint16_t nextIfdOffset = *conversionPointer;
+
+ // Definition of usefull unions and structs
+ union char2uint32_u {
+ char c[4];
+ uint32_t i;
+ };
+ union char2uint16_u {
+ char c[2];
+ uint16_t i;
+ };
+ // This struct describes a standart field used in exif files
+ struct field_s {
+ uint16_t tagID; // Describes which information is added here, e.g. GPS Lat
+ uint16_t type; // Describes the data type, e.g. string, uint8_t,...
+ uint32_t size; // Describes the size
+ uint32_t content; // Either contains the information, or the offset to the exif header where the information is stored (if 32 bits is not enough)
+ };
+ // This struct contains all the fields that we want to add to the image
+ struct fields_s {
+ field_s gpsVersion;
+ field_s gpsLatRef;
+ field_s gpsLat;
+ field_s gpsLonRef;
+ field_s gpsLon;
+ field_s gpsAltRef;
+ field_s gpsAlt;
+ field_s gpsMapDatum;
+ uint32_t finishedDataField;
+ };
+ // These are the additional information that can not be put into a single uin32_t
+ struct extended_s {
+ uint32_t gpsLat[6];
+ uint32_t gpsLon[6];
+ uint32_t gpsAlt[2];
+ char mapDatum[7];// = {0x57,0x47,0x53,0x2D,0x38,0x34,0x00};
+ };
+ // This struct contains all the information we want to add to the image
+ struct readable_s {
+ fields_s fields;
+ extended_s extendedData;
+ };
+
+ // This union is used because for writing the information we have to use a char array, but we still want the information to be available in a more descriptive way
+ union {
+ char c[0xa3];
+ readable_s readable;
+ } gpsData;
+
+
+ char2uint32_u gpsIFDInd;
+ gpsIFDInd.i = nextIfdOffset;
+
+ // this will stay constant
+ QByteArray gpsInfo("\x25\x88\x04\x00\x01\x00\x00\x00", 8);
+ gpsInfo.append(gpsIFDInd.c[0]);
+ gpsInfo.append(gpsIFDInd.c[1]);
+ gpsInfo.append(gpsIFDInd.c[2]);
+ gpsInfo.append(gpsIFDInd.c[3]);
+
+ // filling values to gpsData
+ uint32_t gpsDataExtInd = gpsIFDInd.i + 2 + sizeof(fields_s);
+
+ // Filling up the fields with the corresponding values
+ gpsData.readable.fields.gpsVersion.tagID = 0;
+ gpsData.readable.fields.gpsVersion.type = 1;
+ gpsData.readable.fields.gpsVersion.size = 4;
+ gpsData.readable.fields.gpsVersion.content = 2;
+
+ gpsData.readable.fields.gpsLatRef.tagID = 1;
+ gpsData.readable.fields.gpsLatRef.type = 2;
+ gpsData.readable.fields.gpsLatRef.size = 2;
+ gpsData.readable.fields.gpsLatRef.content = coordinate.latitude() > 0 ? 'N' : 'S';
+
+ gpsData.readable.fields.gpsLat.tagID = 2;
+ gpsData.readable.fields.gpsLat.type = 5;
+ gpsData.readable.fields.gpsLat.size = 3;
+ gpsData.readable.fields.gpsLat.content = gpsDataExtInd;
+
+ gpsData.readable.fields.gpsLonRef.tagID = 3;
+ gpsData.readable.fields.gpsLonRef.type = 2;
+ gpsData.readable.fields.gpsLonRef.size = 2;
+ gpsData.readable.fields.gpsLonRef.content = coordinate.longitude() > 0 ? 'E' : 'W';
+
+ gpsData.readable.fields.gpsLon.tagID = 4;
+ gpsData.readable.fields.gpsLon.type = 5;
+ gpsData.readable.fields.gpsLon.size = 3;
+ gpsData.readable.fields.gpsLon.content = gpsDataExtInd + 6 * 4;
+
+ gpsData.readable.fields.gpsAltRef.tagID = 5;
+ gpsData.readable.fields.gpsAltRef.type = 2;
+ gpsData.readable.fields.gpsAltRef.size = 2;
+ gpsData.readable.fields.gpsAltRef.content = 0x00;
+
+ gpsData.readable.fields.gpsAlt.tagID = 6;
+ gpsData.readable.fields.gpsAlt.type = 5;
+ gpsData.readable.fields.gpsAlt.size = 1;
+ gpsData.readable.fields.gpsAlt.content = gpsDataExtInd + 6 * 4 * 2;
+
+ gpsData.readable.fields.gpsMapDatum.tagID = 18;
+ gpsData.readable.fields.gpsMapDatum.type = 2;
+ gpsData.readable.fields.gpsMapDatum.size = 7;
+ gpsData.readable.fields.gpsMapDatum.content = gpsDataExtInd + 6 * 4 * 2 + 2 * 4;
+
+ gpsData.readable.fields.finishedDataField = 0;
+
+ // Filling up the additional information that does not fit into the fields
+ gpsData.readable.extendedData.gpsLat[0] = abs(static_cast(coordinate.latitude()));
+ gpsData.readable.extendedData.gpsLat[1] = 1;
+ gpsData.readable.extendedData.gpsLat[2] = static_cast((fabs(coordinate.latitude()) - floor(fabs(coordinate.latitude()))) * 60.0);
+ gpsData.readable.extendedData.gpsLat[3] = 1;
+ gpsData.readable.extendedData.gpsLat[4] = static_cast((fabs(coordinate.latitude()) * 60.0 - floor(fabs(coordinate.latitude()) * 60.0)) * 60000.0);
+ gpsData.readable.extendedData.gpsLat[5] = 1000;
+
+ gpsData.readable.extendedData.gpsLon[0] = abs(static_cast(coordinate.longitude()));
+ gpsData.readable.extendedData.gpsLon[1] = 1;
+ gpsData.readable.extendedData.gpsLon[2] = static_cast((fabs(coordinate.longitude()) - floor(fabs(coordinate.longitude()))) * 60.0);
+ gpsData.readable.extendedData.gpsLon[3] = 1;
+ gpsData.readable.extendedData.gpsLon[4] = static_cast((fabs(coordinate.longitude()) * 60.0 - floor(fabs(coordinate.longitude()) * 60.0)) * 60000.0);
+ gpsData.readable.extendedData.gpsLon[5] = 1000;
+
+ gpsData.readable.extendedData.gpsAlt[0] = coordinate.altitude() * 100;
+ gpsData.readable.extendedData.gpsAlt[1] = 100;
+ gpsData.readable.extendedData.mapDatum[0] = 'W';
+ gpsData.readable.extendedData.mapDatum[1] = 'G';
+ gpsData.readable.extendedData.mapDatum[2] = 'S';
+ gpsData.readable.extendedData.mapDatum[3] = '-';
+ gpsData.readable.extendedData.mapDatum[4] = '8';
+ gpsData.readable.extendedData.mapDatum[5] = '4';
+ gpsData.readable.extendedData.mapDatum[6] = 0x00;
+
+ // remove 12 spaces from image description, as otherwise we need to loop through every field and correct the new address values
+ buf.remove(nextIfdOffsetInd + 4, 12);
+ // TODO correct size in image description
+ // insert Gps Info to image file
+ buf.insert(nextIfdOffsetInd, gpsInfo, 12);
+ char numberOfFields[2] = {0x08, 0x00};
+ // insert number of gps specific fields that we want to add
+ buf.insert(gpsIFDInd.i + tiffHeaderInd, numberOfFields, 2);
+ // insert the gps data
+ buf.insert(gpsIFDInd.i + 2 + tiffHeaderInd, gpsData.c, 0xa3);
+
+ // update the new file size and exif offsets
+ char2uint16_u converter;
+ converter.i = qToBigEndian(app1SizeEndian);
+ buf.replace(app1HeaderInd + 2, 2, converter.c, 2);
+ converter.i = nextIfdOffset + 12 + 0xa5;
+ buf.replace(nextIfdOffsetInd + 12, 2, converter.c, 2);
+
+ converter.i = (numberOfTiffFields) + 1;
+ buf.replace(tiffHeaderInd + 8, 2, converter.c, 2);
+ return true;
+}
diff --git a/src/AnalyzeView/ExifParser.h b/src/AnalyzeView/ExifParser.h
new file mode 100644
index 0000000000000000000000000000000000000000..9a29da3806d0132373df90e900c235efcba681a6
--- /dev/null
+++ b/src/AnalyzeView/ExifParser.h
@@ -0,0 +1,16 @@
+#ifndef EXIFPARSER_H
+#define EXIFPARSER_H
+
+#include
+#include
+
+class ExifParser
+{
+public:
+ ExifParser();
+ ~ExifParser();
+ double readTime(QByteArray& buf);
+ bool write(QByteArray& data, QGeoCoordinate coordinate);
+};
+
+#endif // EXIFPARSER_H
diff --git a/src/AnalyzeView/GeoTagController.cc b/src/AnalyzeView/GeoTagController.cc
index f9314c31eb352b4e863c9f3645cd355a0cacd69c..9c49c4f596d2b3c14fa3271aea1ed24b0a4cb4f1 100644
--- a/src/AnalyzeView/GeoTagController.cc
+++ b/src/AnalyzeView/GeoTagController.cc
@@ -8,7 +8,15 @@
****************************************************************************/
#include "GeoTagController.h"
+#include "ExifParser.h"
#include "QGCFileDialog.h"
+#include "QGCLoggingCategory.h"
+#include "MainWindow.h"
+#include
+#include
+#include
+#include
+#include
GeoTagController::GeoTagController(void)
: _progress(0)
@@ -27,7 +35,7 @@ GeoTagController::~GeoTagController()
void GeoTagController::pickLogFile(void)
{
- QString filename = QGCFileDialog::getOpenFileName(NULL, "Select log file load", QString(), "PX4 log file (*.px4log);;All Files (*.*)");
+ QString filename = QGCFileDialog::getOpenFileName(MainWindow::instance(), "Select log file load", QString(), "PX4 log file (*.px4log);;All Files (*.*)");
if (!filename.isEmpty()) {
_worker.setLogFile(filename);
emit logFileChanged(filename);
@@ -36,17 +44,88 @@ void GeoTagController::pickLogFile(void)
void GeoTagController::pickImageDirectory(void)
{
- QString dir = QGCFileDialog::getExistingDirectory(NULL, "Select image directory");
+ QString dir = QGCFileDialog::getExistingDirectory(MainWindow::instance(), "Select image directory");
if (!dir.isEmpty()) {
_worker.setImageDirectory(dir);
emit imageDirectoryChanged(dir);
}
}
+void GeoTagController::pickSaveDirectory(void)
+{
+ QString dir = QGCFileDialog::getExistingDirectory(MainWindow::instance(), "Select save directory");
+ if (!dir.isEmpty()) {
+ _worker.setSaveDirectory(dir);
+ emit saveDirectoryChanged(dir);
+ }
+}
+
void GeoTagController::startTagging(void)
{
_errorMessage.clear();
emit errorMessageChanged(_errorMessage);
+
+ QDir imageDirectory = QDir(_worker.imageDirectory());
+ if(!imageDirectory.exists()) {
+ _errorMessage = tr("Cannot find the image directory");
+ emit errorMessageChanged(_errorMessage);
+ return;
+ }
+ if(_worker.saveDirectory() == "") {
+ if(!imageDirectory.mkdir(_worker.imageDirectory() + "/TAGGED")) {
+ QMessageBox msgBox(QMessageBox::Question,
+ tr("Images have alreay been tagged."),
+ tr("The images have already been tagged. Do you want to replace the previously tagged images?"),
+ QMessageBox::Cancel);
+ msgBox.setWindowModality(Qt::ApplicationModal);
+ msgBox.addButton(tr("Replace"), QMessageBox::ActionRole);
+ if (msgBox.exec() == QMessageBox::Cancel) {
+ _errorMessage = tr("Images have already been tagged");
+ emit errorMessageChanged(_errorMessage);
+ return;
+ }
+ QDir oldTaggedFolder = QDir(_worker.imageDirectory() + "/TAGGED");
+ oldTaggedFolder.removeRecursively();
+ if(!imageDirectory.mkdir(_worker.imageDirectory() + "/TAGGED")) {
+ _errorMessage = tr("Couldn't replace the previously tagged images");
+ emit errorMessageChanged(_errorMessage);
+ return;
+ }
+ }
+ } else {
+ QDir saveDirectory = QDir(_worker.saveDirectory());
+ if(!saveDirectory.exists()) {
+ _errorMessage = tr("Cannot find the save directory");
+ emit errorMessageChanged(_errorMessage);
+ return;
+ }
+ saveDirectory.setFilter(QDir::Files | QDir::Readable | QDir::NoSymLinks | QDir::Writable);
+ QStringList nameFilters;
+ nameFilters << "*.jpg" << "*.JPG";
+ saveDirectory.setNameFilters(nameFilters);
+ QStringList imageList = saveDirectory.entryList();
+ if(!imageList.isEmpty()) {
+ QMessageBox msgBox(QMessageBox::Question,
+ tr("Save folder not empty."),
+ tr("The save folder already contains images. Do you want to replace them?"),
+ QMessageBox::Cancel);
+ msgBox.setWindowModality(Qt::ApplicationModal);
+ msgBox.addButton(tr("Replace"), QMessageBox::ActionRole);
+ if (msgBox.exec() == QMessageBox::Cancel) {
+ _errorMessage = tr("Save folder not empty");
+ emit errorMessageChanged(_errorMessage);
+ return;
+ }
+ foreach(QString dirFile, imageList)
+ {
+ if(!saveDirectory.remove(dirFile)) {
+ _errorMessage = tr("Couldn't replace the existing images");
+ emit errorMessageChanged(_errorMessage);
+ return;
+ }
+ }
+ }
+ }
_worker.start();
}
@@ -64,6 +143,9 @@ void GeoTagController::_workerError(QString errorMessage)
GeoTagWorker::GeoTagWorker(void)
: _cancel(false)
+ , _logFile("")
+ , _imageDirectory("")
+ , _saveDirectory("")
{
}
@@ -71,17 +153,237 @@ GeoTagWorker::GeoTagWorker(void)
void GeoTagWorker::run(void)
{
_cancel = false;
- emit progressChanged(0);
+ emit progressChanged(1);
+ double nSteps = 5;
+
+ // Load Images
+ _imageList.clear();
+ QDir imageDirectory = QDir(_imageDirectory);
+ imageDirectory.setFilter(QDir::Files | QDir::Readable | QDir::NoSymLinks | QDir::Writable);
+ imageDirectory.setSorting(QDir::Name);
+ QStringList nameFilters;
+ nameFilters << "*.jpg" << "*.JPG";
+ imageDirectory.setNameFilters(nameFilters);
+ _imageList = imageDirectory.entryInfoList();
+ if(_imageList.isEmpty()) {
+ emit error(tr("The image directory doesn't contain images, make sure your images are of the JPG format"));
+ return;
+ }
+ emit progressChanged((100/nSteps));
+
+ // Parse EXIF
+ ExifParser exifParser;
+ _tagTime.clear();
+ for (int i = 0; i < _imageList.size(); ++i) {
+ QFile file(_imageList.at(i).absoluteFilePath());
+ if (!file.open(QIODevice::ReadOnly)) {
+ emit error(tr("Geotagging failed. Couldn't open an image."));
+ return;
+ }
+ QByteArray imageBuffer = file.readAll();
+ file.close();
+
+ _tagTime.append(exifParser.readTime(imageBuffer));
+
+ emit progressChanged((100/nSteps) + ((100/nSteps) / _imageList.size())*i);
+
+ if (_cancel) {
+ qCDebug(GeotaggingLog) << "Tagging cancelled";
+ emit error(tr("Tagging cancelled"));
+ return;
+ }
+ }
+
+ // Load PX4 log
+ _geoRef.clear();
+ _triggerTime.clear();
+ if (!parsePX4Log()) {
+ if (_cancel) {
+ qCDebug(GeotaggingLog) << "Tagging cancelled";
+ emit error(tr("Tagging cancelled"));
+ return;
+ } else {
+ qCDebug(GeotaggingLog) << "Log parsing failed";
+ emit error(tr("Log parsing failed - tagging cancelled"));
+ return;
+ }
+ }
+ emit progressChanged(3*(100/nSteps));
+
+ qCDebug(GeotaggingLog) << "Found " << _geoRef.count() << " trigger logs.";
+
+ if (_cancel) {
+ qCDebug(GeotaggingLog) << "Tagging cancelled";
+ emit error(tr("Tagging cancelled"));
+ return;
+ }
+
+ // Filter Trigger
+ if (!triggerFiltering()) {
+ qCDebug(GeotaggingLog) << "Geotagging failed in trigger filtering";
+ emit error(tr("Geotagging failed in trigger filtering"));
+ return;
+ }
+ emit progressChanged(4*(100/nSteps));
+
+ if (_cancel) {
+ qCDebug(GeotaggingLog) << "Tagging cancelled";
+ emit error(tr("Tagging cancelled"));
+ return;
+ }
+
+ // Tag images
+ int maxIndex = std::min(_imageIndices.count(), _triggerIndices.count());
+ maxIndex = std::min(maxIndex, _imageList.count());
+ for(int i = 0; i < maxIndex; i++) {
+ QFile fileRead(_imageList.at(_imageIndices[i]).absoluteFilePath());
+ if (!fileRead.open(QIODevice::ReadOnly)) {
+ emit error(tr("Geotagging failed. Couldn't open an image."));
+ return;
+ }
+ QByteArray imageBuffer = fileRead.readAll();
+ fileRead.close();
+
+ if (!exifParser.write(imageBuffer, _geoRef[_triggerIndices[i]])) {
+ emit error(tr("Geotagging failed. Couldn't write to image."));
+ return;
+ } else {
+ QFile fileWrite;
+ if(_saveDirectory == "") {
+ fileWrite.setFileName(_imageDirectory + "/TAGGED/" + _imageList.at(_imageIndices[i]).fileName());
+ } else {
+ fileWrite.setFileName(_saveDirectory + "/" + _imageList.at(_imageIndices[i]).fileName());
+ }
+ if (!fileWrite.open(QFile::WriteOnly)) {
+ emit error(tr("Geotagging failed. Couldn't write to an image."));
+ return;
+ }
+ fileWrite.write(imageBuffer);
+ fileWrite.close();
+ }
+ emit progressChanged(4*(100/nSteps) + ((100/nSteps) / maxIndex)*i);
- for (int i=0; i<10;i++) {
if (_cancel) {
+ qCDebug(GeotaggingLog) << "Tagging cancelled";
emit error(tr("Tagging cancelled"));
return;
}
- emit progressChanged(i*10);
- sleep(1);
+ }
+
+ if (_cancel) {
+ qCDebug(GeotaggingLog) << "Tagging cancelled";
+ emit error(tr("Tagging cancelled"));
+ return;
}
emit progressChanged(100);
- emit taggingComplete();
+}
+
+bool GeoTagWorker::parsePX4Log()
+{
+ // general message header
+ char header[] = {(char)0xA3, (char)0x95, (char)0x00};
+ // header for GPOS message header
+ char gposHeaderHeader[] = {(char)0xA3, (char)0x95, (char)0x80, (char)0x10, (char)0x00};
+ int gposHeaderOffset;
+ // header for GPOS message
+ char gposHeader[] = {(char)0xA3, (char)0x95, (char)0x10, (char)0x00};
+ int gposOffsets[3] = {3, 7, 11};
+ int gposLengths[3] = {4, 4, 4};
+ // header for trigger message header
+ char triggerHeaderHeader[] = {(char)0xA3, (char)0x95, (char)0x80, (char)0x37, (char)0x00};
+ int triggerHeaderOffset;
+ // header for trigger message
+ char triggerHeader[] = {(char)0xA3, (char)0x95, (char)0x37, (char)0x00};
+ int triggerOffsets[2] = {3, 11};
+ int triggerLengths[2] = {8, 4};
+
+ // load log
+ QFile file(_logFile);
+ if (!file.open(QIODevice::ReadOnly)) {
+ qCDebug(GeotaggingLog) << "Could not open log file " << _logFile;
+ return false;
+ }
+ QByteArray log = file.readAll();
+ file.close();
+
+ // extract header information: message lengths
+ uint8_t* iptr = reinterpret_cast(log.mid(log.indexOf(gposHeaderHeader) + 4, 1).data());
+ gposHeaderOffset = static_cast(qFromLittleEndian(*iptr));
+ iptr = reinterpret_cast(log.mid(log.indexOf(triggerHeaderHeader) + 4, 1).data());
+ triggerHeaderOffset = static_cast(qFromLittleEndian(*iptr));
+
+ // extract trigger data
+ int index = 1;
+ int sequence = -1;
+ QGeoCoordinate lastCoordinate;
+ while(index < log.count() - 1) {
+
+ if (_cancel) {
+ return false;
+ }
+
+ // first extract trigger
+ index = log.indexOf(triggerHeader, index + 1);
+ // check for whether last entry has been passed
+ if (index < 0) {
+ break;
+ }
+
+ if (log.indexOf(header, index + 1) != index + triggerHeaderOffset) {
+ continue;
+ }
+ uint64_t* time = reinterpret_cast(log.mid(index + triggerOffsets[0], triggerLengths[0]).data());
+ double timeDouble = static_cast(qFromLittleEndian(*time)) / 1.0e6;
+ uint32_t* seq = reinterpret_cast(log.mid(index + triggerOffsets[1], triggerLengths[1]).data());
+ int seqInt = static_cast(qFromLittleEndian(*seq));
+ if (sequence >= seqInt || sequence + 20 < seqInt) { // assume that logging has not skipped more than 20 triggers. this prevents wrong header detection
+ continue;
+ }
+ _triggerTime.append(timeDouble);
+ sequence = seqInt;
+
+ // second extract position
+ bool lookForGpos = true;
+ while (lookForGpos) {
+
+ if (_cancel) {
+ return false;
+ }
+
+ int gposIndex = log.indexOf(gposHeader, index + 1);
+ if (gposIndex < 0) {
+ _geoRef.append(lastCoordinate);
+ break;
+ }
+ index = gposIndex;
+ // verify that at an offset of gposHeaderOffset the next log message starts
+ if (gposIndex + gposHeaderOffset == log.indexOf(header, gposIndex + 1)) {
+ int32_t* lat = reinterpret_cast(log.mid(gposIndex + gposOffsets[0], gposLengths[0]).data());
+ double latitude = static_cast(qFromLittleEndian(*lat))/1.0e7;
+ lastCoordinate.setLatitude(latitude);
+ int32_t* lon = reinterpret_cast(log.mid(gposIndex + gposOffsets[1], gposLengths[1]).data());
+ double longitude = static_cast(qFromLittleEndian(*lon))/1.0e7;
+ longitude = fmod(180.0 + longitude, 360.0) - 180.0;
+ lastCoordinate.setLongitude(longitude);
+ float* alt = reinterpret_cast(log.mid(gposIndex + gposOffsets[2], gposLengths[2]).data());
+ lastCoordinate.setAltitude(qFromLittleEndian(*alt));
+ _geoRef.append(lastCoordinate);
+ break;
+ }
+ }
+ }
+ return true;
+}
+
+bool GeoTagWorker::triggerFiltering()
+{
+ _imageIndices.clear();
+ _triggerIndices.clear();
+ for(int i = 0; i < _tagTime.count() && i < _triggerTime.count(); i++) {
+ _imageIndices.append(i);
+ _triggerIndices.append(i);
+ }
+
+ return true;
}
diff --git a/src/AnalyzeView/GeoTagController.h b/src/AnalyzeView/GeoTagController.h
index a2820fa35fc697bdc1c2587d0d535c7222bd7a32..a9c67f68cc110cda6c22fd271c1684386d77cd9e 100644
--- a/src/AnalyzeView/GeoTagController.h
+++ b/src/AnalyzeView/GeoTagController.h
@@ -10,9 +10,16 @@
#ifndef GeoTagController_H
#define GeoTagController_H
+#include "QmlObjectListModel.h"
+#include "Fact.h"
+#include "FactMetaData.h"
#include
#include
#include
+#include
+#include
+#include
+#include
class GeoTagWorker : public QThread
{
@@ -21,26 +28,38 @@ class GeoTagWorker : public QThread
public:
GeoTagWorker(void);
- QString logFile(void) const { return _logFile; }
- QString imageDirectory(void) const { return _imageDirectory; }
+ void setLogFile (const QString& logFile) { _logFile = logFile; }
+ void setImageDirectory (const QString& imageDirectory) { _imageDirectory = imageDirectory; }
+ void setSaveDirectory (const QString& saveDirectory) { _saveDirectory = saveDirectory; }
- void setLogFile(const QString& logFile) { _logFile = logFile; }
- void setImageDirectory(const QString& imageDirectory) { _imageDirectory = imageDirectory; }
+ QString logFile (void) const { return _logFile; }
+ QString imageDirectory (void) const { return _imageDirectory; }
+ QString saveDirectory (void) const { return _saveDirectory; }
- void cancellTagging(void) { _cancel = true; }
+ void cancelTagging (void) { _cancel = true; }
protected:
void run(void) final;
signals:
- void error(QString errorMsg);
- void taggingComplete(void);
- void progressChanged(double progress);
+ void error (QString errorMsg);
+ void taggingComplete (void);
+ void progressChanged (double progress);
private:
- bool _cancel;
- QString _logFile;
- QString _imageDirectory;
+ bool parsePX4Log();
+ bool triggerFiltering();
+
+ bool _cancel;
+ QString _logFile;
+ QString _imageDirectory;
+ QString _saveDirectory;
+ QFileInfoList _imageList;
+ QList _tagTime;
+ QList _geoRef;
+ QList _triggerTime;
+ QList _imageIndices;
+ QList _triggerIndices;
};
/// Controller for GeoTagPage.qml. Supports geotagging images based on logfile camera tags.
@@ -54,6 +73,7 @@ public:
Q_PROPERTY(QString logFile READ logFile NOTIFY logFileChanged)
Q_PROPERTY(QString imageDirectory READ imageDirectory NOTIFY imageDirectoryChanged)
+ Q_PROPERTY(QString saveDirectory READ saveDirectory NOTIFY saveDirectoryChanged)
/// Set to an error message is geotagging fails
Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorMessageChanged)
@@ -66,32 +86,35 @@ public:
Q_INVOKABLE void pickLogFile(void);
Q_INVOKABLE void pickImageDirectory(void);
+ Q_INVOKABLE void pickSaveDirectory(void);
Q_INVOKABLE void startTagging(void);
- Q_INVOKABLE void cancelTagging(void) { _worker.cancellTagging(); }
+ Q_INVOKABLE void cancelTagging(void) { _worker.cancelTagging(); }
- QString logFile (void) const { return _worker.logFile(); }
- QString imageDirectory (void) const { return _worker.imageDirectory(); }
- double progress (void) const { return _progress; }
- bool inProgress (void) const { return _worker.isRunning(); }
- QString errorMessage (void) const { return _errorMessage; }
+ QString logFile (void) const { return _worker.logFile(); }
+ QString imageDirectory (void) const { return _worker.imageDirectory(); }
+ QString saveDirectory (void) const { return _worker.saveDirectory(); }
+ double progress (void) const { return _progress; }
+ bool inProgress (void) const { return _worker.isRunning(); }
+ QString errorMessage (void) const { return _errorMessage; }
signals:
- void logFileChanged(QString logFile);
- void imageDirectoryChanged(QString imageDirectory);
- void progressChanged(double progress);
- void inProgressChanged(void);
- void errorMessageChanged(QString errorMessage);
+ void logFileChanged (QString logFile);
+ void imageDirectoryChanged (QString imageDirectory);
+ void saveDirectoryChanged (QString saveDirectory);
+ void progressChanged (double progress);
+ void inProgressChanged (void);
+ void errorMessageChanged (QString errorMessage);
private slots:
void _workerProgressChanged(double progress);
void _workerError(QString errorMsg);
private:
- QString _errorMessage;
- double _progress;
- bool _inProgress;
+ QString _errorMessage;
+ double _progress;
+ bool _inProgress;
- GeoTagWorker _worker;
+ GeoTagWorker _worker;
};
#endif
diff --git a/src/AnalyzeView/GeoTagIcon.png b/src/AnalyzeView/GeoTagIcon.png
deleted file mode 100644
index 6aa8343a341df18048e0c9feeeb9491e2c63aaa8..0000000000000000000000000000000000000000
Binary files a/src/AnalyzeView/GeoTagIcon.png and /dev/null differ
diff --git a/src/AnalyzeView/GeoTagIcon.svg b/src/AnalyzeView/GeoTagIcon.svg
new file mode 100644
index 0000000000000000000000000000000000000000..ba15cb0ad2c5bc4bc62aa661950ccef7661f5a16
--- /dev/null
+++ b/src/AnalyzeView/GeoTagIcon.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/AnalyzeView/GeoTagPage.qml b/src/AnalyzeView/GeoTagPage.qml
index a7d84071082f4bb91ade83f6e2bafbecc1aaf425..a4881a7f8bbb36433a770ca87ea600a66b16165b 100644
--- a/src/AnalyzeView/GeoTagPage.qml
+++ b/src/AnalyzeView/GeoTagPage.qml
@@ -11,7 +11,10 @@ import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
+import QGroundControl 1.0
import QGroundControl.Palette 1.0
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controllers 1.0
@@ -19,17 +22,17 @@ import QGroundControl.Controllers 1.0
AnalyzePage {
id: geoTagPage
pageComponent: pageComponent
- pageName: qsTr("GeoTag Images (WIP)")
- pageDescription: qsTr("GetTag Images is used to tag a set of images from a survey mission with gps coordinates. You must provide the binary log from the flight as well as the directory which contains the images to tag.")
+ pageName: qsTr("GeoTag Images")
+ pageDescription: qsTr("GeoTag Images is used to tag a set of images from a survey mission with gps coordinates. You must provide the binary log from the flight as well as the directory which contains the images to tag.")
- property real _margin: ScreenTools.defaultFontPixelWidth
+ property real _margin: ScreenTools.defaultFontPixelWidth * 2
GeoTagController {
id: controller
}
Component {
- id: pageComponent
+ id: pageComponent
Column {
id: mainColumn
@@ -37,67 +40,104 @@ AnalyzePage {
spacing: _margin
Row {
- spacing: _margin
+ spacing: ScreenTools.defaultFontPixelWidth * 2
- QGCLabel {
- text: "Log file:"
+ ProgressBar {
+ id: progressBar
+ width: qgcView.width -_margin * 5
+ maximumValue: 100
+ value: controller.progress
}
- QGCLabel {
- text: controller.logFile
+ BusyIndicator {
+ running: controller.progress > 0 && controller.progress < 100 && controller.errorMessage === ""
+ width: progressBar.height
+ height: progressBar.height
}
+ }
+
+ QGCLabel {
+ text: controller.errorMessage
+ font.bold: true
+ font.pointSize: ScreenTools.largeFontPointSize
+ color: "red"
+ }
+
+ // Horizontal spacer line
+ Rectangle {
+ height: 1
+ width: qgcView.width * 1.0
+ color: qgcPal.windowShadeDark
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ Row {
+ spacing: _margin
QGCButton {
text: qsTr("Select log file")
+ width: ScreenTools.defaultFontPixelWidth * 30
onClicked: controller.pickLogFile()
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ QGCLabel {
+ text: controller.logFile
+ anchors.verticalCenter: parent.verticalCenter
}
}
Row {
spacing: _margin
- QGCLabel {
- text: "Image directory:"
+ QGCButton {
+ text: qsTr("Select image directory")
+ width: ScreenTools.defaultFontPixelWidth * 30
+ onClicked: controller.pickImageDirectory()
+ anchors.verticalCenter: parent.verticalCenter
}
QGCLabel {
text: controller.imageDirectory
+ anchors.verticalCenter: parent.verticalCenter
}
+ }
+
+ Row {
+ spacing: _margin
QGCButton {
- text: qsTr("Select image directory")
- onClicked: controller.pickImageDirectory()
+ text: qsTr("(Optionally) Select save directory")
+ width: ScreenTools.defaultFontPixelWidth * 30
+ onClicked: controller.pickSaveDirectory()
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ QGCLabel {
+ text: controller.saveDirectory != "" ? controller.saveDirectory : "/TAGGED folder in your image folder"
+ anchors.verticalCenter: parent.verticalCenter
}
}
- QGCLabel { text: "NYI - Simulated only" }
+ // Horizontal spacer line
+ Rectangle {
+ height: 1
+ width: qgcView.width * 1.0
+ color: qgcPal.windowShadeDark
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
QGCButton {
text: controller.inProgress ? qsTr("Cancel Tagging") : qsTr("Start Tagging")
-
+ width: ScreenTools.defaultFontPixelWidth * 30
onClicked: {
if (controller.inProgress) {
controller.cancelTagging()
} else {
- if (controller.logFile == "" || controller.imageDirectory == "") {
- geoTagPage.showMessage(qsTr("Error"), qsTr("You must select a log file and image directory before you can start tagging."), StandardButton.Ok)
- return
- }
controller.startTagging()
}
}
}
-
- QGCLabel {
- text: controller.errorMessage
- }
-
- ProgressBar {
- anchors.left: parent.left
- anchors.right: parent.right
- maximumValue: 100
- value: controller.progress
- }
} // Column
} // Component
} // AnalyzePage
diff --git a/src/AnalyzeView/LogDownloadController.cc b/src/AnalyzeView/LogDownloadController.cc
index 38cf2c4b85a3fde05d20f87349a5d3eab275cc00..a63f3ba8879c5ba83c5f09d50208349889001091 100644
--- a/src/AnalyzeView/LogDownloadController.cc
+++ b/src/AnalyzeView/LogDownloadController.cc
@@ -16,6 +16,7 @@
#include "QGCApplication.h"
#include "QGCToolbox.h"
#include "QGCMapEngine.h"
+#include "ParameterManager.h"
#include "Vehicle.h"
#include "MainWindow.h"
@@ -583,8 +584,14 @@ LogDownloadController::_prepareLogDownload()
}
_downloadData = new LogDownloadData(entry);
_downloadData->filename = QString("log_") + QString::number(entry->id()) + "_" + ftime;
- if(_vehicle->firmwareType() == MAV_AUTOPILOT_PX4) {
- _downloadData->filename += ".px4log";
+ if (_vehicle->firmwareType() == MAV_AUTOPILOT_PX4) {
+
+ // This is a stopgap and should be removed once log file types are properly supported by the log download protocol
+ if (_vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, "SYS_LOGGER")->rawValue().toInt() == 0) {
+ _downloadData->filename += ".px4log";
+ } else {
+ _downloadData->filename += ".ulg";
+ }
} else {
_downloadData->filename += ".bin";
}
diff --git a/src/AnalyzeView/LogDownloadIcon.png b/src/AnalyzeView/LogDownloadIcon.png
deleted file mode 100644
index 6aa8343a341df18048e0c9feeeb9491e2c63aaa8..0000000000000000000000000000000000000000
Binary files a/src/AnalyzeView/LogDownloadIcon.png and /dev/null differ
diff --git a/src/AnalyzeView/LogDownloadIcon.svg b/src/AnalyzeView/LogDownloadIcon.svg
new file mode 100644
index 0000000000000000000000000000000000000000..a8d9b0b7a13af86ff4f58a5f0b6a84aec01bb400
--- /dev/null
+++ b/src/AnalyzeView/LogDownloadIcon.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AutoPilotPlugins/APM/APMAirframeComponent.cc b/src/AutoPilotPlugins/APM/APMAirframeComponent.cc
index ccbb3ee0c22135e1008187d8f70c76ee82d2a6cd..0c60172567052abf977159238145eca656d2e0ce 100644
--- a/src/AutoPilotPlugins/APM/APMAirframeComponent.cc
+++ b/src/AutoPilotPlugins/APM/APMAirframeComponent.cc
@@ -11,16 +11,27 @@
#include "ArduCopterFirmwarePlugin.h"
#include "ParameterManager.h"
+const char* APMAirframeComponent::_oldFrameParam = "FRAME";
+const char* APMAirframeComponent::_newFrameParam = "FRAME_CLASS";
+
APMAirframeComponent::APMAirframeComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent)
: VehicleComponent(vehicle, autopilot, parent)
, _requiresFrameSetup(false)
, _name("Airframe")
{
if (qobject_cast(_vehicle->firmwarePlugin()) != NULL) {
+ ParameterManager* paramMgr = _vehicle->parameterManager();
_requiresFrameSetup = true;
- MAV_TYPE vehicleType = vehicle->vehicleType();
- if (vehicleType == MAV_TYPE_TRICOPTER || vehicleType == MAV_TYPE_HELICOPTER) {
- _requiresFrameSetup = false;
+ if (paramMgr->parameterExists(FactSystem::defaultComponentId, _oldFrameParam)) {
+ _useNewFrameParam = false;
+ _frameParamFact = paramMgr->getParameter(FactSystem::defaultComponentId, _oldFrameParam);
+ MAV_TYPE vehicleType = vehicle->vehicleType();
+ if (vehicleType == MAV_TYPE_TRICOPTER || vehicleType == MAV_TYPE_HELICOPTER) {
+ _requiresFrameSetup = false;
+ }
+ } else {
+ _useNewFrameParam = true;
+ _frameParamFact = paramMgr->getParameter(FactSystem::defaultComponentId, _newFrameParam);
}
}
}
@@ -32,8 +43,8 @@ QString APMAirframeComponent::name(void) const
QString APMAirframeComponent::description(void) const
{
- return tr("The Airframe Component is used to select the airframe which matches your vehicle. "
- "This will in turn set up the various tuning values for flight parameters.");
+ return tr("Airframe Setup is used to select the airframe which matches your vehicle. "
+ "You can also the load default parameter values associated with known vehicle types.");
}
QString APMAirframeComponent::iconResource(void) const
@@ -49,7 +60,11 @@ bool APMAirframeComponent::requiresSetup(void) const
bool APMAirframeComponent::setupComplete(void) const
{
if (_requiresFrameSetup) {
- return _vehicle->parameterManager()->getParameter(FactSystem::defaultComponentId, QStringLiteral("FRAME"))->rawValue().toInt() >= 0;
+ if (_useNewFrameParam) {
+ return _frameParamFact->rawValue().toInt() > 0;
+ } else {
+ return _frameParamFact->rawValue().toInt() >= 0;
+ }
} else {
return true;
}
@@ -60,7 +75,7 @@ QStringList APMAirframeComponent::setupCompleteChangedTriggerList(void) const
QStringList list;
if (_requiresFrameSetup) {
- list << QStringLiteral("FRAME");
+ list << (_useNewFrameParam ? _newFrameParam : _oldFrameParam);
}
return list;
diff --git a/src/AutoPilotPlugins/APM/APMAirframeComponent.h b/src/AutoPilotPlugins/APM/APMAirframeComponent.h
index 5a707b52d6bf9bae7fe6a4aeb96b18db9cb55f13..0b7c6be183a12e2185171dad52669258767c43c0 100644
--- a/src/AutoPilotPlugins/APM/APMAirframeComponent.h
+++ b/src/AutoPilotPlugins/APM/APMAirframeComponent.h
@@ -36,6 +36,11 @@ public:
private:
bool _requiresFrameSetup; ///< true: FRAME parameter must be set
const QString _name;
+ Fact* _frameParamFact;
+ bool _useNewFrameParam;
+
+ static const char* _oldFrameParam;
+ static const char* _newFrameParam;
};
#endif
diff --git a/src/AutoPilotPlugins/APM/APMAirframeComponent.qml b/src/AutoPilotPlugins/APM/APMAirframeComponent.qml
index 62ae84b3e65f5839c9569a06e6b2f10c40bdd58d..bcf4cef9085790bf234830d25874c4f9cbfbe6ab 100644
--- a/src/AutoPilotPlugins/APM/APMAirframeComponent.qml
+++ b/src/AutoPilotPlugins/APM/APMAirframeComponent.qml
@@ -11,6 +11,7 @@
import QtQuick 2.5
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.2
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
@@ -19,18 +20,86 @@ import QGroundControl.Controls 1.0
import QGroundControl.Controllers 1.0
import QGroundControl.ScreenTools 1.0
-QGCView {
- id: qgcView
- viewPanel: panel
+SetupPage {
+ id: airframePage
+ pageComponent: _useOldFrameParam ? oldFramePageComponent: newFramePageComponent
- QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }
+ property real _margins: ScreenTools.defaultFontPixelWidth
+ property bool _useOldFrameParam: controller.parameterExists(-1, "FRAME")
+ property Fact _oldFrameParam: controller.getParameterFact(-1, "FRAME", false)
+ property Fact _newFrameParam: controller.getParameterFact(-1, "FRAME_CLASS", false)
+ property Fact _frameTypeParam: controller.getParameterFact(-1, "FRAME_TYPE", false)
+ property var _flatParamList: ListModel {
+ ListElement {
+ name: "3DR Aero M"
+ file: "3DR_AERO_M.param"
+ }
+ ListElement {
+ name: "3DR Aero RTF"
+ file: "3DR_Aero_RTF.param"
+ }
+ ListElement {
+ name: "3DR Rover"
+ file: "3DR_Rover.param"
+ }
+ ListElement {
+ name: "3DR Tarot"
+ file: "3DR_Tarot.bgsc"
+ }
+ ListElement {
+ name: "Parrot Bebop"
+ file: "Parrot_Bebop.param"
+ }
+ ListElement {
+ name: "Storm32"
+ file: "SToRM32-MAVLink.param"
+ }
+ ListElement {
+ name: "3DR X8-M RTF"
+ file: "3DR_X8-M_RTF.param"
+ }
+ ListElement {
+ name: "3DR Y6A"
+ file: "3DR_Y6A_RTF.param"
+ }
+ ListElement {
+ name: "3DR X8+ RTF"
+ file: "3DR_X8+_RTF.param"
+ }
+ ListElement {
+ name: "3DR QUAD X4 RTF"
+ file: "3DR_QUAD_X4_RTF.param"
+ }
+ ListElement {
+ name: "3DR X8"
+ file: "3DR_X8_RTF.param"
+ }
+ ListElement {
+ name: "Iris with GoPro"
+ file: "Iris with Front Mount Go Pro.param"
+ }
+ ListElement {
+ name: "Iris with Tarot"
+ file: "Iris with Tarot Gimbal.param"
+ }
+ ListElement {
+ name: "3DR Iris+"
+ file: "3DR_Iris+.param"
+ }
+ ListElement {
+ name: "Iris"
+ file: "Iris.param"
+ }
+ ListElement {
+ name: "3DR Y6B"
+ file: "3DR_Y6B_RTF.param"
+ }
+ }
- property real _margins: ScreenTools.defaultFontPixelWidth
- property Fact _frame: controller.getParameterFact(-1, "FRAME")
APMAirframeComponentController {
id: controller
- factPanel: panel
+ factPanel: airframePage.viewPanel
}
ExclusiveGroup {
@@ -89,73 +158,125 @@ QGCView {
}
}
- QGCViewPanel {
- id: panel
- anchors.fill: parent
-
- Item {
- id: helpApplyRow
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- height: Math.max(helpText.contentHeight, applyButton.height)
+ Component {
+ id: selectParamFileDialogComponent
+ QGCViewDialog {
QGCLabel {
- id: helpText
- anchors.rightMargin: _margins
- anchors.left: parent.left
- anchors.right: applyButton.right
- text: qsTr("Please select your airframe type")
- font.pointSize: ScreenTools.mediumFontPointSize
- wrapMode: Text.WordWrap
+ id: applyParamsText
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.margins: _margins
+ wrapMode: Text.WordWrap
+ text: qsTr("Select your drone to load the default parameters for it. ")
}
- QGCButton {
- id: applyButton
- anchors.right: parent.right
- text: qsTr("Load common parameters")
- onClicked: showDialog(applyRestartDialogComponent, qsTr("Load common parameters"), qgcView.showDialogDefaultWidth, StandardButton.Close)
+ Flow {
+ anchors.margins: _margins
+ anchors.top: applyParamsText.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ spacing : _margins
+ layoutDirection: Qt.Vertical;
+
+ Repeater {
+ id: airframePicker
+ model: _flatParamList
+
+ delegate: QGCButton {
+ width: parent.width / 2.1
+ height: (ScreenTools.defaultFontPixelHeight * 14) / 5
+ text: name
+
+ onClicked : {
+ controller.loadParameters(file)
+ hideDialog()
+ }
+ }
+ }
}
}
+ }
- Item {
- id: helpSpacer
- anchors.top: helpApplyRow.bottom
- height: parent.spacerHeight
- width: 10
- }
+ Component {
+ id: oldFramePageComponent
- QGCFlickable {
- id: scroll
- anchors.top: helpSpacer.bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- contentHeight: frameColumn.height
- contentWidth: frameColumn.width
+ Column {
+ width: availableWidth
+ height: 1000
+ spacing: _margins
+ RowLayout {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: _margins
+ QGCLabel {
+ font.pointSize: ScreenTools.mediumFontPointSize
+ wrapMode: Text.WordWrap
+ text: qsTr("Please select your airframe type")
+ Layout.fillWidth: true
+ }
- Column {
- id: frameColumn
- spacing: _margins
+ QGCButton {
+ text: qsTr("Load common parameters")
+ onClicked: showDialog(applyRestartDialogComponent, qsTr("Load common parameters"), qgcView.showDialogDefaultWidth, StandardButton.Close)
+ }
+ }
- Repeater {
- model: controller.airframeTypesModel
+ Repeater {
+ model: controller.airframeTypesModel
- QGCRadioButton {
- text: object.name
- checked: controller.currentAirframeType == object
- exclusiveGroup: airframeTypeExclusive
+ QGCRadioButton {
+ text: object.name
+ checked: controller.currentAirframeType == object
+ exclusiveGroup: airframeTypeExclusive
- onCheckedChanged: {
- if (checked) {
- controller.currentAirframeType = object
- }
+ onCheckedChanged: {
+ if (checked) {
+ controller.currentAirframeType = object
}
}
}
}
+ } // Column
+ } // Component - oldFramePageComponent
+
+ Component {
+ id: newFramePageComponent
+
+ Grid {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: _margins
+ columns: 2
+
+ QGCLabel {
+ text: qsTr("Frame Class:")
+ }
+
+ FactComboBox {
+ fact: _newFrameParam
+ indexModel: false
+ width: ScreenTools.defaultFontPixelWidth * 15
+ }
+
+ QGCLabel {
+ text: qsTr("Frame Type:")
+ }
+
+ FactComboBox {
+ fact: _frameTypeParam
+ indexModel: false
+ width: ScreenTools.defaultFontPixelWidth * 15
+ }
+
+ QGCButton {
+ text: qsTr("Load common parameters")
+ onClicked: showDialog(selectParamFileDialogComponent, qsTr("Load common parameters"), qgcView.showDialogDefaultWidth, StandardButton.Close)
+ }
}
- } // QGCViewPanel
-} // QGCView
+ }
+} // SetupPage
diff --git a/src/AutoPilotPlugins/APM/APMAirframeComponentController.cc b/src/AutoPilotPlugins/APM/APMAirframeComponentController.cc
index 3f488f217154cdf1e333c226891139aae50aa718..670005397999eda03d4c4cc74c1302c51fad5937 100644
--- a/src/AutoPilotPlugins/APM/APMAirframeComponentController.cc
+++ b/src/AutoPilotPlugins/APM/APMAirframeComponentController.cc
@@ -15,7 +15,6 @@
#include "APMAirframeComponentAirframes.h"
#include "QGCMAVLink.h"
#include "MultiVehicleManager.h"
-#include "AutoPilotPluginManager.h"
#include "QGCApplication.h"
#include "QGCFileDownload.h"
#include "ParameterManager.h"
@@ -29,18 +28,25 @@
bool APMAirframeComponentController::_typesRegistered = false;
+const char* APMAirframeComponentController::_oldFrameParam = "FRAME";
+const char* APMAirframeComponentController::_newFrameParam = "FRAME_CLASS";
+
APMAirframeComponentController::APMAirframeComponentController(void) :
_airframeTypesModel(new QmlObjectListModel(this))
{
if (!_typesRegistered) {
_typesRegistered = true;
- qmlRegisterUncreatableType("QGroundControl.Controllers", 1, 0, "APMAiframeType", QStringLiteral("Can only reference APMAirframeType"));
- qmlRegisterUncreatableType("QGroundControl.Controllers", 1, 0, "APMAiframe", QStringLiteral("Can only reference APMAirframe"));
+ qmlRegisterUncreatableType("QGroundControl.Controllers", 1, 0, "APMAirframeType", QStringLiteral("Can only reference APMAirframeType"));
}
_fillAirFrames();
- Fact *frame = getParameterFact(FactSystem::defaultComponentId, QStringLiteral("FRAME"));
- connect(frame, &Fact::vehicleUpdated, this, &APMAirframeComponentController::_factFrameChanged);
+ Fact* frame;
+ if (parameterExists(FactSystem::defaultComponentId, _oldFrameParam)) {
+ frame = getParameterFact(FactSystem::defaultComponentId, _oldFrameParam);
+ } else {
+ frame = getParameterFact(FactSystem::defaultComponentId, _newFrameParam);
+ }
+ connect(frame, &Fact::rawValueChanged, this, &APMAirframeComponentController::_factFrameChanged);
_factFrameChanged(frame->rawValue());
}
diff --git a/src/AutoPilotPlugins/APM/APMAirframeComponentController.h b/src/AutoPilotPlugins/APM/APMAirframeComponentController.h
index 936cd96ee338a3c8a1d5920bd5ecec82eb811b9d..47e383529350de8185461883500d2f45fb8e9c57 100644
--- a/src/AutoPilotPlugins/APM/APMAirframeComponentController.h
+++ b/src/AutoPilotPlugins/APM/APMAirframeComponentController.h
@@ -71,9 +71,12 @@ private slots:
private:
void _loadParametersFromDownloadFile(const QString& downloadedParamFile);
- static bool _typesRegistered;
APMAirframeType *_currentAirframeType;
QmlObjectListModel *_airframeTypesModel;
+
+ static bool _typesRegistered;
+ static const char* _oldFrameParam;
+ static const char* _newFrameParam;
};
class APMAirframe : public QObject
diff --git a/src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml b/src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
index 9097ce44f6ff6c93002afa9e6783f6ad219bace7..8ba3da326c658806d04e1d21185ce1a1a56cc649 100644
--- a/src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
+++ b/src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
@@ -18,18 +18,31 @@ FactPanel {
factPanel: panel
}
- property Fact sysIdFact: controller.getParameterFact(-1, "FRAME")
+ property bool _useOldFrameParam: controller.parameterExists(-1, "FRAME")
+ property Fact _oldFrameParam: controller.getParameterFact(-1, "FRAME", false)
+ property Fact _newFrameParam: controller.getParameterFact(-1, "FRAME_CLASS", false)
+ property Fact _frameTypeParam: controller.getParameterFact(-1, "FRAME_TYPE", false)
Column {
anchors.fill: parent
+
+ VehicleSummaryRow {
+ labelText: qsTr("Frame Type:")
+ valueText: controller.currentAirframeTypeName() + " " + _oldFrameParam.enumStringValue
+ visible: _useOldFrameParam
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("Frame Class:")
+ valueText: _newFrameParam.enumStringValue
+ visible: !_useOldFrameParam
+
+ }
+
VehicleSummaryRow {
- id: nameRow;
- labelText: qsTr("Frame Type:")
- valueText: controller.currentAirframeTypeName() + " " + (sysIdFact.valueString === "0" ? "Plus"
- : sysIdFact.valueString === "1" ? "X"
- : sysIdFact.valueString === "2" ? "V"
- : sysIdFact.valueString == "3" ? "H"
- : /* Fact.value == 10 */ "New Y6");
+ labelText: qsTr("Frame Type:")
+ valueText: _frameTypeParam.enumStringValue
+ visible: !_useOldFrameParam
}
diff --git a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
index ece082b9707e7c73286777c1c49576be6f8ce4ef..c8bf2d92f89ffe290f881af57acf8e1a0ac6857e 100644
--- a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
+++ b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
@@ -9,7 +9,6 @@
#include "APMAutoPilotPlugin.h"
-#include "AutoPilotPluginManager.h"
#include "UAS.h"
#include "FirmwarePlugin/APM/APMParameterMetaData.h" // FIXME: Hack
#include "FirmwarePlugin/APM/APMFirmwarePlugin.h" // FIXME: Hack
@@ -17,7 +16,6 @@
#include "VehicleComponent.h"
#include "APMAirframeComponent.h"
#include "APMAirframeComponentAirframes.h"
-#include "APMAirframeComponentController.h"
#include "APMAirframeLoader.h"
#include "APMFlightModesComponent.h"
#include "APMRadioComponent.h"
@@ -27,7 +25,10 @@
#include "APMPowerComponent.h"
#include "MotorComponent.h"
#include "APMCameraComponent.h"
+#include "APMLightsComponent.h"
+#include "APMSubFrameComponent.h"
#include "ESP8266Component.h"
+#include "MixersComponent.h"
/// This is the AutoPilotPlugin implementatin for the MAV_AUTOPILOT_ARDUPILOT type.
APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent)
@@ -35,6 +36,8 @@ APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent)
, _incorrectParameterVersion(false)
, _airframeComponent(NULL)
, _cameraComponent(NULL)
+ , _lightsComponent(NULL)
+ , _subFrameComponent(NULL)
, _flightModesComponent(NULL)
, _powerComponent(NULL)
#if 0
@@ -47,6 +50,7 @@ APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent)
, _tuningComponent(NULL)
, _airframeFacts(new APMAirframeLoader(this, vehicle->uas(), this))
, _esp8266Component(NULL)
+ , _mixersComponent(NULL)
{
APMAirframeLoader::loadAirframeFactMetaData();
}
@@ -100,10 +104,26 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void)
_tuningComponent->setupTriggerSignals();
_components.append(QVariant::fromValue((VehicleComponent*)_tuningComponent));
+ _mixersComponent = new MixersComponent(_vehicle, this);
+ _mixersComponent->setupTriggerSignals();
+ _components.append(QVariant::fromValue((VehicleComponent*)_mixersComponent));
+
_cameraComponent = new APMCameraComponent(_vehicle, this);
_cameraComponent->setupTriggerSignals();
_components.append(QVariant::fromValue((VehicleComponent*)_cameraComponent));
+ if (_vehicle->sub()) {
+ _lightsComponent = new APMLightsComponent(_vehicle, this);
+ _lightsComponent->setupTriggerSignals();
+ _components.append(QVariant::fromValue((VehicleComponent*)_lightsComponent));
+
+ if(_vehicle->firmwareMajorVersion() > 3 || (_vehicle->firmwareMajorVersion() == 3 && _vehicle->firmwareMinorVersion() >= 5)) {
+ _subFrameComponent = new APMSubFrameComponent(_vehicle, this);
+ _subFrameComponent->setupTriggerSignals();
+ _components.append(QVariant::fromValue((VehicleComponent*)_subFrameComponent));
+ }
+ }
+
//-- Is there an ESP8266 Connected?
if(_vehicle->parameterManager()->parameterExists(MAV_COMP_ID_UDP_BRIDGE, "SW_VER")) {
_esp8266Component = new ESP8266Component(_vehicle, this);
diff --git a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
index 62ffbdf061b0e5279c3c9ac3496d1ff12df257c3..838bbe39396fb81b6da0cecf3ce0fc7c9ad87296 100644
--- a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
+++ b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
@@ -24,7 +24,10 @@ class APMSensorsComponent;
class APMPowerComponent;
class MotorComponent;
class APMCameraComponent;
+class APMLightsComponent;
+class APMSubFrameComponent;
class ESP8266Component;
+class MixersComponent;
/// This is the APM specific implementation of the AutoPilot class.
class APMAutoPilotPlugin : public AutoPilotPlugin
@@ -40,6 +43,8 @@ public:
APMAirframeComponent* airframeComponent (void) const { return _airframeComponent; }
APMCameraComponent* cameraComponent (void) const { return _cameraComponent; }
+ APMLightsComponent* lightsComponent (void) const { return _lightsComponent; }
+ APMSubFrameComponent* subFrameComponent (void) const { return _subFrameComponent; }
APMFlightModesComponent* flightModesComponent(void) const { return _flightModesComponent; }
APMPowerComponent* powerComponent (void) const { return _powerComponent; }
#if 0
@@ -51,6 +56,7 @@ public:
APMSensorsComponent* sensorsComponent (void) const { return _sensorsComponent; }
APMTuningComponent* tuningComponent (void) const { return _tuningComponent; }
ESP8266Component* esp8266Component (void) const { return _esp8266Component; }
+ MixersComponent* mixersComponent (void) { return _mixersComponent; }
private:
bool _incorrectParameterVersion; ///< true: parameter version incorrect, setup not allowed
@@ -58,6 +64,8 @@ private:
APMAirframeComponent* _airframeComponent;
APMCameraComponent* _cameraComponent;
+ APMLightsComponent* _lightsComponent;
+ APMSubFrameComponent* _subFrameComponent;
APMFlightModesComponent* _flightModesComponent;
APMPowerComponent* _powerComponent;
#if 0
@@ -70,6 +78,7 @@ private:
APMTuningComponent* _tuningComponent;
APMAirframeLoader* _airframeFacts;
ESP8266Component* _esp8266Component;
+ MixersComponent* _mixersComponent;
};
#endif
diff --git a/src/AutoPilotPlugins/APM/APMCameraComponent.cc b/src/AutoPilotPlugins/APM/APMCameraComponent.cc
index 8a850bb3c9ae1ef1e44ed2bc32bf0c7345125dd1..5d597b5e8daab302fd4fb57b935e8d24b310babf 100644
--- a/src/AutoPilotPlugins/APM/APMCameraComponent.cc
+++ b/src/AutoPilotPlugins/APM/APMCameraComponent.cc
@@ -29,7 +29,7 @@ QString APMCameraComponent::name(void) const
QString APMCameraComponent::description(void) const
{
- return tr("The Camera Component is used to setup camera and gimbal settings.");
+ return tr("Camera setup is used to adjust camera and gimbal settings.");
}
QString APMCameraComponent::iconResource(void) const
diff --git a/src/AutoPilotPlugins/APM/APMCameraComponent.qml b/src/AutoPilotPlugins/APM/APMCameraComponent.qml
index 1e7699f477c8229ae25b64e888081dd23a7ef9eb..0eafaade9402fde0f18b24d767affde9cdb32c1e 100644
--- a/src/AutoPilotPlugins/APM/APMCameraComponent.qml
+++ b/src/AutoPilotPlugins/APM/APMCameraComponent.qml
@@ -17,440 +17,448 @@ import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
-QGCView {
- id: _cameraView
- viewPanel: panel
- anchors.fill: parent
-
- FactPanelController { id: controller; factPanel: panel }
-
- QGCPalette { id: palette; colorGroupEnabled: enabled }
-
- property Fact _mountRetractX: controller.getParameterFact(-1, "MNT_RETRACT_X")
- property Fact _mountRetractY: controller.getParameterFact(-1, "MNT_RETRACT_Y")
- property Fact _mountRetractZ: controller.getParameterFact(-1, "MNT_RETRACT_Z")
-
- property Fact _mountNeutralX: controller.getParameterFact(-1, "MNT_NEUTRAL_X")
- property Fact _mountNeutralY: controller.getParameterFact(-1, "MNT_NEUTRAL_Y")
- property Fact _mountNeutralZ: controller.getParameterFact(-1, "MNT_NEUTRAL_Z")
-
- property Fact _mountRCInTilt: controller.getParameterFact(-1, "MNT_RC_IN_TILT")
- property Fact _mountStabTilt: controller.getParameterFact(-1, "MNT_STAB_TILT")
- property Fact _mountAngMinTilt: controller.getParameterFact(-1, "MNT_ANGMIN_TIL")
- property Fact _mountAngMaxTilt: controller.getParameterFact(-1, "MNT_ANGMAX_TIL")
-
- property Fact _mountRCInRoll: controller.getParameterFact(-1, "MNT_RC_IN_ROLL")
- property Fact _mountStabRoll: controller.getParameterFact(-1, "MNT_STAB_ROLL")
- property Fact _mountAngMinRoll: controller.getParameterFact(-1, "MNT_ANGMIN_ROL")
- property Fact _mountAngMaxRoll: controller.getParameterFact(-1, "MNT_ANGMAX_ROL")
-
- property Fact _mountRCInPan: controller.getParameterFact(-1, "MNT_RC_IN_PAN")
- property Fact _mountStabPan: controller.getParameterFact(-1, "MNT_STAB_PAN")
- property Fact _mountAngMinPan: controller.getParameterFact(-1, "MNT_ANGMIN_PAN")
- property Fact _mountAngMaxPan: controller.getParameterFact(-1, "MNT_ANGMAX_PAN")
-
- property Fact _rc5Function: controller.getParameterFact(-1, "RC5_FUNCTION")
- property Fact _rc6Function: controller.getParameterFact(-1, "RC6_FUNCTION")
- property Fact _rc7Function: controller.getParameterFact(-1, "RC7_FUNCTION")
- property Fact _rc8Function: controller.getParameterFact(-1, "RC8_FUNCTION")
- property Fact _rc9Function: controller.getParameterFact(-1, "RC9_FUNCTION")
- property Fact _rc10Function: controller.getParameterFact(-1, "RC10_FUNCTION")
- property Fact _rc11Function: controller.getParameterFact(-1, "RC11_FUNCTION")
- property Fact _rc12Function: controller.getParameterFact(-1, "RC12_FUNCTION")
- property Fact _rc13Function: controller.getParameterFact(-1, "RC13_FUNCTION")
- property Fact _rc14Function: controller.getParameterFact(-1, "RC14_FUNCTION")
-
- property bool _tiltEnabled: false
- property bool _panEnabled: false
- property bool _rollEnabled: false
-
- // Gimbal Settings not available on older firmware
- property bool _showGimbaLSettings: controller.parameterExists(-1, "MNT_DEFLT_MODE")
-
- readonly property real _margins: ScreenTools.defaultFontPixelHeight
- readonly property int _rcFunctionDisabled: 0
- readonly property int _rcFunctionMountPan: 6
- readonly property int _rcFunctionMountTilt: 7
- readonly property int _rcFunctionMountRoll: 8
- readonly property int _firstGimbalOutChannel: 5
- readonly property int _lastGimbalOutChannel: 14
- readonly property int _mountDefaultModeRCTargetting: 3
-
- Component.onCompleted: {
- if (_showGimbaLSettings) {
- gimbalSettingsLoader.sourceComponent = gimbalSettings
- }
- calcGimbalOutValues()
- }
-
- function setGimbalSettingsServoInfo(loader, channel) {
- var rcPrefix = "RC" + channel + "_"
-
- loader.gimbalOutIndex = channel - 4
- loader.servoPWMMinFact = controller.getParameterFact(-1, rcPrefix + "MIN")
- loader.servoPWMMaxFact = controller.getParameterFact(-1, rcPrefix + "MAX")
- loader.servoReverseFact = controller.getParameterFact(-1, rcPrefix + "REV")
- }
-
- /// Gimbal output channels are stored in RC#_FUNCTION parameters. We need to loop through those
- /// to find them and setup the ui accordindly.
- function calcGimbalOutValues() {
- gimbalDirectionTiltLoader.gimbalOutIndex = 0
- gimbalDirectionPanLoader.gimbalOutIndex = 0
- gimbalDirectionRollLoader.gimbalOutIndex = 0
- _tiltEnabled = false
- _panEnabled = false
- _rollEnabled = false
- for (var channel=_firstGimbalOutChannel; channel<=_lastGimbalOutChannel; channel++) {
- var functionFact = controller.getParameterFact(-1, "RC" + channel + "_FUNCTION")
- if (functionFact.value == _rcFunctionMountTilt) {
- _tiltEnabled = true
- setGimbalSettingsServoInfo(gimbalDirectionTiltLoader, channel)
- } else if (functionFact.value == _rcFunctionMountPan) {
- _panEnabled = true
- setGimbalSettingsServoInfo(gimbalDirectionPanLoader, channel)
- } else if (functionFact.value == _rcFunctionMountRoll) {
- _rollEnabled = true
- setGimbalSettingsServoInfo(gimbalDirectionRollLoader, channel)
- }
- }
- }
-
- function setRCFunction(channel, rcFunction) {
- // First clear any previous settings for this function
- for (var index=_firstGimbalOutChannel; index<=_lastGimbalOutChannel; index++) {
- var functionFact = controller.getParameterFact(-1, "RC" + index + "_FUNCTION")
- if (functionFact.value != _rcFunctionDisabled && functionFact.value == rcFunction) {
- functionFact.value = _rcFunctionDisabled
- }
- }
-
- // Now set the function into the new channel
- if (channel != 0) {
- var functionFact = controller.getParameterFact(-1, "RC" + channel + "_FUNCTION")
- functionFact.value = rcFunction
- }
- }
-
- // Whenever any RC#_FUNCTION parameters chagnes we need to go looking for gimbal output channels again
- Connections { target: _rc5Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc6Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc7Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc8Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc9Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc10Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc11Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc12Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc13Function; onValueChanged: calcGimbalOutValues() }
- Connections { target: _rc14Function; onValueChanged: calcGimbalOutValues() }
-
- // Whenever an MNT_RC_IN_* setting is changed make sure to turn on RC targeting
- Connections {
- target: _mountRCInPan
- onValueChanged: _mountDefaultMode.value = _mountDefaultModeRCTargetting
- }
-
- Connections {
- target: _mountRCInRoll
- onValueChanged: _mountDefaultMode.value = _mountDefaultModeRCTargetting
- }
-
- Connections {
- target: _mountRCInTilt
- onValueChanged: _mountDefaultMode.value = _mountDefaultModeRCTargetting
- }
-
- ListModel {
- id: gimbalOutModel
- ListElement { text: qsTr("Disabled"); value: 0 }
- ListElement { text: qsTr("Channel 5"); value: 5 }
- ListElement { text: qsTr("Channel 6"); value: 6 }
- ListElement { text: qsTr("Channel 7"); value: 7 }
- ListElement { text: qsTr("Channel 8"); value: 8 }
- ListElement { text: qsTr("Channel 9"); value: 9 }
- ListElement { text: qsTr("Channel 10"); value: 10 }
- ListElement { text: qsTr("Channel 11"); value: 11 }
- ListElement { text: qsTr("Channel 12"); value: 12 }
- ListElement { text: qsTr("Channel 13"); value: 13 }
- ListElement { text: qsTr("Channel 14"); value: 14 }
- }
+SetupPage {
+ id: cameraPage
+ pageComponent: cameraPageComponent
Component {
- id: gimbalDirectionSettings
-
- // The following properties must be set in the Loader
- // property string directionTitle
- // property bool directionEnabled
- // property int gimbalOutIndex
- // property Fact mountRcInFact
- // property Fact mountStabFact
- // property Fact mountAngMinFact
- // property Fact mountAngMaxFact
- // property Fact servoPWMMinFact
- // property Fact servoPWMMaxFact
- // property Fact servoReverseFact
- // property int rcFunction
-
- Item {
- width: rectangle.x + rectangle.width
- height: rectangle.y + rectangle.height
-
- QGCLabel {
- id: directionLabel
- text: qsTr("Gimbal ") + directionTitle
- font.family: ScreenTools.demiboldFontFamily
- }
-
- Rectangle {
- id: rectangle
- anchors.topMargin: _margins / 2
- anchors.left: parent.left
- anchors.top: directionLabel.bottom
- width: mountAngMaxField.x + mountAngMaxField.width + _margins
- height: servoPWMMaxField.y + servoPWMMaxField.height + _margins
- color: palette.windowShade
-
- FactCheckBox {
- id: mountStabCheckBox
- anchors.topMargin: _margins
- anchors.left: servoReverseCheckBox.left
- anchors.top: parent.top
- text: qsTr("Stabilize")
- fact: mountStabFact
- checkedValue: 1
- uncheckedValue: 0
- enabled: directionEnabled
- }
-
- FactCheckBox {
- id: servoReverseCheckBox
- anchors.margins: _margins
- anchors.top: mountStabCheckBox.bottom
- anchors.right: parent.right
- text: qsTr("Servo reverse")
- checkedValue: 1
- uncheckedValue: 0
- fact: servoReverseFact
- enabled: directionEnabled
- }
-
- QGCLabel {
- id: gimbalOutLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: gimbalOutCombo.baseline
- text: qsTr("Output channel:")
- }
-
- QGCComboBox {
- id: gimbalOutCombo
- anchors.margins: _margins
- anchors.top: parent.top
- anchors.left: gimbalOutLabel.right
- width: mountAngMinField.width
- model: gimbalOutModel
- currentIndex: gimbalOutIndex
-
- onActivated: setRCFunction(gimbalOutModel.get(index).value, rcFunction)
- }
-
- QGCLabel {
- id: mountRcInLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: mountRcInCombo.baseline
- text: qsTr("Input channel:")
- enabled: directionEnabled
- }
-
- FactComboBox {
- id: mountRcInCombo
- anchors.topMargin: _margins / 2
- anchors.top: gimbalOutCombo.bottom
- anchors.left: gimbalOutCombo.left
- width: mountAngMinField.width
- fact: mountRcInFact
- indexModel: false
- enabled: directionEnabled
- }
-
- QGCLabel {
- id: mountAngLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: mountAngMinField.baseline
- text: qsTr("Gimbal angle limits:")
- enabled: directionEnabled
- }
-
- QGCLabel {
- id: mountAngMinLabel
- anchors.margins: _margins
- anchors.left: mountAngLabel.right
- anchors.baseline: mountAngMinField.baseline
- text: qsTr("min")
- enabled: directionEnabled
- }
-
- FactTextField {
- id: mountAngMinField
- anchors.margins: _margins
- anchors.top: mountRcInCombo.bottom
- anchors.left: mountAngMinLabel.right
- fact: mountAngMinFact
- enabled: directionEnabled
- }
-
- QGCLabel {
- id: mountAngMaxLabel
- anchors.margins: _margins
- anchors.left: mountAngMinField.right
- anchors.baseline: mountAngMinField.baseline
- text: qsTr("max")
- enabled: directionEnabled
- }
-
- FactTextField {
- id: mountAngMaxField
- anchors.leftMargin: _margins
- anchors.top: mountAngMinField.top
- anchors.left: mountAngMaxLabel.right
- fact: mountAngMaxFact
- enabled: directionEnabled
- }
-
- QGCLabel {
- id: servoPWMLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: servoPWMMinField.baseline
- text: qsTr("Servo PWM limits:")
- enabled: directionEnabled
- }
-
- QGCLabel {
- id: servoPWMMinLabel
- anchors.left: mountAngMinLabel.left
- anchors.baseline: servoPWMMinField.baseline
- text: qsTr("min")
- enabled: directionEnabled
+ id: cameraPageComponent
+
+ Column {
+ spacing: _margins
+ width: availableWidth
+
+ FactPanelController { id: controller; factPanel: cameraPage.viewPanel }
+
+ QGCPalette { id: palette; colorGroupEnabled: true }
+
+ property Fact _mountRetractX: controller.getParameterFact(-1, "MNT_RETRACT_X")
+ property Fact _mountRetractY: controller.getParameterFact(-1, "MNT_RETRACT_Y")
+ property Fact _mountRetractZ: controller.getParameterFact(-1, "MNT_RETRACT_Z")
+
+ property Fact _mountNeutralX: controller.getParameterFact(-1, "MNT_NEUTRAL_X")
+ property Fact _mountNeutralY: controller.getParameterFact(-1, "MNT_NEUTRAL_Y")
+ property Fact _mountNeutralZ: controller.getParameterFact(-1, "MNT_NEUTRAL_Z")
+
+ property Fact _mountRCInTilt: controller.getParameterFact(-1, "MNT_RC_IN_TILT")
+ property Fact _mountStabTilt: controller.getParameterFact(-1, "MNT_STAB_TILT")
+ property Fact _mountAngMinTilt: controller.getParameterFact(-1, "MNT_ANGMIN_TIL")
+ property Fact _mountAngMaxTilt: controller.getParameterFact(-1, "MNT_ANGMAX_TIL")
+
+ property Fact _mountRCInRoll: controller.getParameterFact(-1, "MNT_RC_IN_ROLL")
+ property Fact _mountStabRoll: controller.getParameterFact(-1, "MNT_STAB_ROLL")
+ property Fact _mountAngMinRoll: controller.getParameterFact(-1, "MNT_ANGMIN_ROL")
+ property Fact _mountAngMaxRoll: controller.getParameterFact(-1, "MNT_ANGMAX_ROL")
+
+ property Fact _mountRCInPan: controller.getParameterFact(-1, "MNT_RC_IN_PAN")
+ property Fact _mountStabPan: controller.getParameterFact(-1, "MNT_STAB_PAN")
+ property Fact _mountAngMinPan: controller.getParameterFact(-1, "MNT_ANGMIN_PAN")
+ property Fact _mountAngMaxPan: controller.getParameterFact(-1, "MNT_ANGMAX_PAN")
+
+ property Fact _rc5Function: controller.getParameterFact(-1, "r.SERVO5_FUNCTION")
+ property Fact _rc6Function: controller.getParameterFact(-1, "r.SERVO6_FUNCTION")
+ property Fact _rc7Function: controller.getParameterFact(-1, "r.SERVO7_FUNCTION")
+ property Fact _rc8Function: controller.getParameterFact(-1, "r.SERVO8_FUNCTION")
+ property Fact _rc9Function: controller.getParameterFact(-1, "r.SERVO9_FUNCTION")
+ property Fact _rc10Function: controller.getParameterFact(-1, "r.SERVO10_FUNCTION")
+ property Fact _rc11Function: controller.getParameterFact(-1, "r.SERVO11_FUNCTION")
+ property Fact _rc12Function: controller.getParameterFact(-1, "r.SERVO12_FUNCTION")
+ property Fact _rc13Function: controller.getParameterFact(-1, "r.SERVO13_FUNCTION")
+ property Fact _rc14Function: controller.getParameterFact(-1, "r.SERVO14_FUNCTION")
+
+ property bool _tiltEnabled: false
+ property bool _panEnabled: false
+ property bool _rollEnabled: false
+
+ property bool _servoReverseIsBool: controller.parameterExists(-1, "RC5_REVERSED")
+
+ // Gimbal Settings not available on older firmware
+ property bool _showGimbaLSettings: controller.parameterExists(-1, "MNT_DEFLT_MODE")
+
+ readonly property real _margins: ScreenTools.defaultFontPixelHeight
+ readonly property int _rcFunctionDisabled: 0
+ readonly property int _rcFunctionMountPan: 6
+ readonly property int _rcFunctionMountTilt: 7
+ readonly property int _rcFunctionMountRoll: 8
+ readonly property int _firstGimbalOutChannel: 5
+ readonly property int _lastGimbalOutChannel: 14
+ readonly property int _mountDefaultModeRCTargetting: 3
+
+ Component.onCompleted: {
+ if (_showGimbaLSettings) {
+ gimbalSettingsLoader.sourceComponent = gimbalSettings
}
+ calcGimbalOutValues()
+ }
- FactTextField {
- id: servoPWMMinField
- anchors.topMargin: _margins / 2
- anchors.leftMargin: _margins
- anchors.top: mountAngMaxField.bottom
- anchors.left: servoPWMMinLabel.right
- fact: servoPWMMinFact
- enabled: directionEnabled
+ function setGimbalSettingsServoInfo(loader, channel) {
+ var rcPrefix = "RC" + channel + "_"
+
+ loader.gimbalOutIndex = channel - 4
+ loader.servoPWMMinFact = controller.getParameterFact(-1, rcPrefix + "MIN")
+ loader.servoPWMMaxFact = controller.getParameterFact(-1, rcPrefix + "MAX")
+ if (controller.parameterExists(-1, "RC5_REVERSED")) {
+ // Newer firmware parameter
+ loader.servoReverseFact = controller.getParameterFact(-1, rcPrefix + "REVERSED")
+ } else {
+ // Older firmware parameter
+ loader.servoReverseFact = controller.getParameterFact(-1, rcPrefix + "REV")
}
- QGCLabel {
- id: servoPWMMaxLabel
- anchors.margins: _margins
- anchors.left: servoPWMMinField.right
- anchors.baseline: servoPWMMinField.baseline
- text: qsTr("max")
- enabled: directionEnabled
- }
+ }
- FactTextField {
- id: servoPWMMaxField
- anchors.leftMargin: _margins
- anchors.top: servoPWMMinField.top
- anchors.left: servoPWMMaxLabel.right
- fact: servoPWMMaxFact
- enabled: directionEnabled
+ /// Gimbal output channels are stored in SERVO#_FUNCTION parameters. We need to loop through those
+ /// to find them and setup the ui accordindly.
+ function calcGimbalOutValues() {
+ gimbalDirectionTiltLoader.gimbalOutIndex = 0
+ gimbalDirectionPanLoader.gimbalOutIndex = 0
+ gimbalDirectionRollLoader.gimbalOutIndex = 0
+ _tiltEnabled = false
+ _panEnabled = false
+ _rollEnabled = false
+ for (var channel=_firstGimbalOutChannel; channel<=_lastGimbalOutChannel; channel++) {
+ var functionFact = controller.getParameterFact(-1, "r.SERVO" + channel + "_FUNCTION")
+ if (functionFact.value == _rcFunctionMountTilt) {
+ _tiltEnabled = true
+ setGimbalSettingsServoInfo(gimbalDirectionTiltLoader, channel)
+ } else if (functionFact.value == _rcFunctionMountPan) {
+ _panEnabled = true
+ setGimbalSettingsServoInfo(gimbalDirectionPanLoader, channel)
+ } else if (functionFact.value == _rcFunctionMountRoll) {
+ _rollEnabled = true
+ setGimbalSettingsServoInfo(gimbalDirectionRollLoader, channel)
+ }
}
- } // Rectangle
- } // Item
- } // Component - gimbalDirectionSettings
-
- Component {
- id: gimbalSettings
-
- Item {
- width: rectangle.x + rectangle.width
- height: rectangle.y + rectangle.height
-
- property Fact _mountDefaultMode: controller.getParameterFact(-1, "MNT_DEFLT_MODE")
- property Fact _mountType: controller.getParameterFact(-1, "MNT_TYPE")
-
- QGCLabel {
- id: settingsLabel
- text: qsTr("Gimbal Settings")
- font.family: ScreenTools.demiboldFontFamily
}
- Rectangle {
- id: rectangle
- anchors.topMargin: _margins / 2
- anchors.top: settingsLabel.bottom
- width: gimbalModeCombo.x + gimbalModeCombo.width + _margins
- height: gimbalModeCombo.y + gimbalModeCombo.height + _margins
- color: palette.windowShade
-
- QGCLabel {
- id: gimbalTypeLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: gimbalTypeCombo.baseline
- text: qsTr("Type:")
+ function setRCFunction(channel, rcFunction) {
+ // First clear any previous settings for this function
+ for (var index=_firstGimbalOutChannel; index<=_lastGimbalOutChannel; index++) {
+ var functionFact = controller.getParameterFact(-1, "r.SERVO" + index + "_FUNCTION")
+ if (functionFact.value != _rcFunctionDisabled && functionFact.value == rcFunction) {
+ functionFact.value = _rcFunctionDisabled
+ }
}
- FactComboBox {
- id: gimbalTypeCombo
- anchors.topMargin: _margins
- anchors.top: parent.top
- anchors.left: gimbalModeCombo.left
- width: gimbalModeCombo.width
- fact: _mountType
- indexModel: false
+ // Now set the function into the new channel
+ if (channel != 0) {
+ var functionFact = controller.getParameterFact(-1, "r.SERVO" + channel + "_FUNCTION")
+ functionFact.value = rcFunction
}
+ }
- QGCLabel {
- id: rebootLabel
- anchors.topMargin: _margins / 2
- anchors.leftMargin: _margins
- anchors.rightMargin: _margins
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: gimbalTypeCombo.bottom
- wrapMode: Text.WordWrap
- text: qsTr("Gimbal Type changes takes affect next reboot of autopilot")
- }
+ // Whenever any SERVO#_FUNCTION parameters changes we need to go looking for gimbal output channels again
+ Connections { target: _rc5Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc6Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc7Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc8Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc9Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc10Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc11Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc12Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc13Function; onValueChanged: calcGimbalOutValues() }
+ Connections { target: _rc14Function; onValueChanged: calcGimbalOutValues() }
+
+ // Whenever an MNT_RC_IN_* setting is changed make sure to turn on RC targeting
+ Connections {
+ target: _mountRCInPan
+ onValueChanged: _mountDefaultMode.value = _mountDefaultModeRCTargetting
+ }
- QGCLabel {
- id: gimbalModeLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: gimbalModeCombo.baseline
- text: qsTr("Default Mode:")
- }
+ Connections {
+ target: _mountRCInRoll
+ onValueChanged: _mountDefaultMode.value = _mountDefaultModeRCTargetting
+ }
- FactComboBox {
- id: gimbalModeCombo
- anchors.margins: _margins
- anchors.top: rebootLabel.bottom
- anchors.left: gimbalModeLabel.right
- width: ScreenTools.defaultFontPixelWidth * 15
- fact: _mountDefaultMode
- indexModel: false
- }
- } // Rectangle
- } // Item
- } // Component - gimbalSettings
+ Connections {
+ target: _mountRCInTilt
+ onValueChanged: _mountDefaultMode.value = _mountDefaultModeRCTargetting
+ }
- QGCViewPanel {
- id: panel
- anchors.fill: parent
+ ListModel {
+ id: gimbalOutModel
+ ListElement { text: qsTr("Disabled"); value: 0 }
+ ListElement { text: qsTr("Channel 5"); value: 5 }
+ ListElement { text: qsTr("Channel 6"); value: 6 }
+ ListElement { text: qsTr("Channel 7"); value: 7 }
+ ListElement { text: qsTr("Channel 8"); value: 8 }
+ ListElement { text: qsTr("Channel 9"); value: 9 }
+ ListElement { text: qsTr("Channel 10"); value: 10 }
+ ListElement { text: qsTr("Channel 11"); value: 11 }
+ ListElement { text: qsTr("Channel 12"); value: 12 }
+ ListElement { text: qsTr("Channel 13"); value: 13 }
+ ListElement { text: qsTr("Channel 14"); value: 14 }
+ }
- QGCFlickable {
- clip: true
- anchors.fill: parent
- contentWidth: gimbalDirectionTiltLoader.x + gimbalDirectionTiltLoader.width
- contentHeight: _showGimbaLSettings ? gimbalSettingsLoader.y + gimbalSettingsLoader.height : gimbalDirectionPanLoader.y + gimbalDirectionPanLoader.height
+ Component {
+ id: gimbalDirectionSettings
+
+ // The following properties must be set in the Loader
+ // property string directionTitle
+ // property bool directionEnabled
+ // property int gimbalOutIndex
+ // property Fact mountRcInFact
+ // property Fact mountStabFact
+ // property Fact mountAngMinFact
+ // property Fact mountAngMaxFact
+ // property Fact servoPWMMinFact
+ // property Fact servoPWMMaxFact
+ // property Fact servoReverseFact
+ // property bool servoReverseIsBool
+ // property int rcFunction
+
+ Item {
+ width: rectangle.x + rectangle.width
+ height: rectangle.y + rectangle.height
+
+ QGCLabel {
+ id: directionLabel
+ text: qsTr("Gimbal ") + directionTitle
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: rectangle
+ anchors.topMargin: _margins / 2
+ anchors.left: parent.left
+ anchors.top: directionLabel.bottom
+ width: mountAngMaxField.x + mountAngMaxField.width + _margins
+ height: servoPWMMaxField.y + servoPWMMaxField.height + _margins
+ color: palette.windowShade
+
+ FactCheckBox {
+ id: mountStabCheckBox
+ anchors.topMargin: _margins
+ anchors.left: servoReverseCheckBox.left
+ anchors.top: parent.top
+ text: qsTr("Stabilize")
+ fact: mountStabFact
+ checkedValue: 1
+ uncheckedValue: 0
+ enabled: directionEnabled
+ }
+
+ FactCheckBox {
+ id: servoReverseCheckBox
+ anchors.margins: _margins
+ anchors.top: mountStabCheckBox.bottom
+ anchors.right: parent.right
+ text: qsTr("Servo reverse")
+ checkedValue: _servoReverseIsBool ? 1 : -1
+ uncheckedValue: _servoReverseIsBool ? 0 : 1
+ fact: servoReverseFact
+ enabled: directionEnabled
+
+ property bool _servoReverseIsBool: servoReverseIsBool
+ }
+
+ QGCLabel {
+ id: gimbalOutLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: gimbalOutCombo.baseline
+ text: qsTr("Output channel:")
+ }
+
+ QGCComboBox {
+ id: gimbalOutCombo
+ anchors.margins: _margins
+ anchors.top: parent.top
+ anchors.left: gimbalOutLabel.right
+ width: mountAngMinField.width
+ model: gimbalOutModel
+ currentIndex: gimbalOutIndex
+
+ onActivated: setRCFunction(gimbalOutModel.get(index).value, rcFunction)
+ }
+
+ QGCLabel {
+ id: mountRcInLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: mountRcInCombo.baseline
+ text: qsTr("Input channel:")
+ enabled: directionEnabled
+ }
+
+ FactComboBox {
+ id: mountRcInCombo
+ anchors.topMargin: _margins / 2
+ anchors.top: gimbalOutCombo.bottom
+ anchors.left: gimbalOutCombo.left
+ width: mountAngMinField.width
+ fact: mountRcInFact
+ indexModel: false
+ enabled: directionEnabled
+ }
+
+ QGCLabel {
+ id: mountAngLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: mountAngMinField.baseline
+ text: qsTr("Gimbal angle limits:")
+ enabled: directionEnabled
+ }
+
+ QGCLabel {
+ id: mountAngMinLabel
+ anchors.margins: _margins
+ anchors.left: mountAngLabel.right
+ anchors.baseline: mountAngMinField.baseline
+ text: qsTr("min")
+ enabled: directionEnabled
+ }
+
+ FactTextField {
+ id: mountAngMinField
+ anchors.margins: _margins
+ anchors.top: mountRcInCombo.bottom
+ anchors.left: mountAngMinLabel.right
+ fact: mountAngMinFact
+ enabled: directionEnabled
+ }
+
+ QGCLabel {
+ id: mountAngMaxLabel
+ anchors.margins: _margins
+ anchors.left: mountAngMinField.right
+ anchors.baseline: mountAngMinField.baseline
+ text: qsTr("max")
+ enabled: directionEnabled
+ }
+
+ FactTextField {
+ id: mountAngMaxField
+ anchors.leftMargin: _margins
+ anchors.top: mountAngMinField.top
+ anchors.left: mountAngMaxLabel.right
+ fact: mountAngMaxFact
+ enabled: directionEnabled
+ }
+
+ QGCLabel {
+ id: servoPWMLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: servoPWMMinField.baseline
+ text: qsTr("Servo PWM limits:")
+ enabled: directionEnabled
+ }
+
+ QGCLabel {
+ id: servoPWMMinLabel
+ anchors.left: mountAngMinLabel.left
+ anchors.baseline: servoPWMMinField.baseline
+ text: qsTr("min")
+ enabled: directionEnabled
+ }
+
+ FactTextField {
+ id: servoPWMMinField
+ anchors.topMargin: _margins / 2
+ anchors.leftMargin: _margins
+ anchors.top: mountAngMaxField.bottom
+ anchors.left: servoPWMMinLabel.right
+ fact: servoPWMMinFact
+ enabled: directionEnabled
+ }
+
+ QGCLabel {
+ id: servoPWMMaxLabel
+ anchors.margins: _margins
+ anchors.left: servoPWMMinField.right
+ anchors.baseline: servoPWMMinField.baseline
+ text: qsTr("max")
+ enabled: directionEnabled
+ }
+
+ FactTextField {
+ id: servoPWMMaxField
+ anchors.leftMargin: _margins
+ anchors.top: servoPWMMinField.top
+ anchors.left: servoPWMMaxLabel.right
+ fact: servoPWMMaxFact
+ enabled: directionEnabled
+ }
+ } // Rectangle
+ } // Item
+ } // Component - gimbalDirectionSettings
+
+ Component {
+ id: gimbalSettings
+
+ Item {
+ width: rectangle.x + rectangle.width
+ height: rectangle.y + rectangle.height
+
+ property Fact _mountDefaultMode: controller.getParameterFact(-1, "MNT_DEFLT_MODE")
+ property Fact _mountType: controller.getParameterFact(-1, "MNT_TYPE")
+
+ QGCLabel {
+ id: settingsLabel
+ text: qsTr("Gimbal Settings")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: rectangle
+ anchors.topMargin: _margins / 2
+ anchors.top: settingsLabel.bottom
+ width: gimbalModeCombo.x + gimbalModeCombo.width + _margins
+ height: gimbalModeCombo.y + gimbalModeCombo.height + _margins
+ color: palette.windowShade
+
+ QGCLabel {
+ id: gimbalTypeLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: gimbalTypeCombo.baseline
+ text: qsTr("Type:")
+ }
+
+ FactComboBox {
+ id: gimbalTypeCombo
+ anchors.topMargin: _margins
+ anchors.top: parent.top
+ anchors.left: gimbalModeCombo.left
+ width: gimbalModeCombo.width
+ fact: _mountType
+ indexModel: false
+ }
+
+ QGCLabel {
+ id: rebootLabel
+ anchors.topMargin: _margins / 2
+ anchors.leftMargin: _margins
+ anchors.rightMargin: _margins
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: gimbalTypeCombo.bottom
+ wrapMode: Text.WordWrap
+ text: qsTr("Gimbal Type changes takes affect next reboot of autopilot")
+ }
+
+ QGCLabel {
+ id: gimbalModeLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: gimbalModeCombo.baseline
+ text: qsTr("Default Mode:")
+ }
+
+ FactComboBox {
+ id: gimbalModeCombo
+ anchors.margins: _margins
+ anchors.top: rebootLabel.bottom
+ anchors.left: gimbalModeLabel.right
+ width: ScreenTools.defaultFontPixelWidth * 15
+ fact: _mountDefaultMode
+ indexModel: false
+ }
+ } // Rectangle
+ } // Item
+ } // Component - gimbalSettings
Loader {
id: gimbalDirectionTiltLoader
@@ -466,13 +474,12 @@ QGCView {
property Fact servoPWMMinFact: Fact { }
property Fact servoPWMMaxFact: Fact { }
property Fact servoReverseFact: Fact { }
+ property bool servoReverseIsBool: _servoReverseIsBool
property int rcFunction: _rcFunctionMountTilt
}
Loader {
id: gimbalDirectionRollLoader
- anchors.margins: _margins
- anchors.top: gimbalDirectionTiltLoader.bottom
sourceComponent: gimbalDirectionSettings
property string directionTitle: qsTr("Roll")
@@ -485,13 +492,12 @@ QGCView {
property Fact servoPWMMinFact: Fact { }
property Fact servoPWMMaxFact: Fact { }
property Fact servoReverseFact: Fact { }
+ property bool servoReverseIsBool: _servoReverseIsBool
property int rcFunction: _rcFunctionMountRoll
}
Loader {
id: gimbalDirectionPanLoader
- anchors.margins: _margins
- anchors.top: gimbalDirectionRollLoader.bottom
sourceComponent: gimbalDirectionSettings
property string directionTitle: qsTr("Pan")
@@ -504,14 +510,13 @@ QGCView {
property Fact servoPWMMinFact: Fact { }
property Fact servoPWMMaxFact: Fact { }
property Fact servoReverseFact: Fact { }
+ property bool servoReverseIsBool: _servoReverseIsBool
property int rcFunction: _rcFunctionMountPan
}
Loader {
- id: gimbalSettingsLoader
- anchors.margins: _margins
- anchors.top: gimbalDirectionPanLoader.bottom
+ id: gimbalSettingsLoader
}
- } // Flickable
- } // QGCViewPanel
-} // QGCView
+ } // Column
+ } // Component
+} // SetupPage
diff --git a/src/AutoPilotPlugins/APM/APMCompassCal.cc b/src/AutoPilotPlugins/APM/APMCompassCal.cc
index 42939faee2efd62c90d5943c9b255637d60a11e7..88dd8a67bebfbf641cbbaf8933449453511a00fb 100644
--- a/src/AutoPilotPlugins/APM/APMCompassCal.cc
+++ b/src/AutoPilotPlugins/APM/APMCompassCal.cc
@@ -145,7 +145,10 @@ CalWorkerThread::calibrate_return CalWorkerThread::calibrate(void)
sensorId = 6.0f;
}
if (sensorId != 0.0f) {
- _vehicle->doCommandLong(_vehicle->defaultComponentId(), MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS, sensorId, -sphere_x[cur_mag], -sphere_y[cur_mag], -sphere_z[cur_mag]);
+ _vehicle->sendMavCommand(_vehicle->defaultComponentId(),
+ MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS,
+ true, /* showErrors */
+ sensorId, -sphere_x[cur_mag], -sphere_y[cur_mag], -sphere_z[cur_mag]);
}
}
}
diff --git a/src/AutoPilotPlugins/APM/APMFlightModesComponent.cc b/src/AutoPilotPlugins/APM/APMFlightModesComponent.cc
index 7229a8ad9b8bcce2c975f054c4d7fa43c414c60f..6a2babe08130cdec1778db342810532e205ae12d 100644
--- a/src/AutoPilotPlugins/APM/APMFlightModesComponent.cc
+++ b/src/AutoPilotPlugins/APM/APMFlightModesComponent.cc
@@ -26,7 +26,7 @@ QString APMFlightModesComponent::name(void) const
QString APMFlightModesComponent::description(void) const
{
- return QStringLiteral("The Flight Modes Component is used to assign FLight Modes to Channel 5.");
+ return tr("Flight Modes Setup is used to configure the transmitter switches associated with Flight Modes.");
}
QString APMFlightModesComponent::iconResource(void) const
diff --git a/src/AutoPilotPlugins/APM/APMFlightModesComponent.qml b/src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
index f958c3c231d77e6fd4c7add02a0353828bd14857..623be09030f195daaa3c7ec4b20d05bc86f576c0 100644
--- a/src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
+++ b/src/AutoPilotPlugins/APM/APMFlightModesComponent.qml
@@ -18,9 +18,9 @@ import QGroundControl.Controls 1.0
import QGroundControl.Controllers 1.0
import QGroundControl.ScreenTools 1.0
-QGCView {
- id: rootQGCView
- viewPanel: panel
+SetupPage {
+ id: flightModePage
+ pageComponent: flightModePageComponent
readonly property string _modeChannelParam: controller.modeChannelParam
readonly property string _modeParamPrefix: controller.modeParamPrefix
@@ -33,26 +33,19 @@ QGCView {
property bool _fltmodeChExists: controller.parameterExists(-1, _modeChannelParam)
property Fact _fltmodeCh: _fltmodeChExists ? controller.getParameterFact(-1, _modeChannelParam) : _nullFact
- QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }
+ QGCPalette { id: qgcPal; colorGroupEnabled: true }
APMFlightModesComponentController {
id: controller
- factPanel: panel
+ factPanel: flightModePage.viewPanel
}
- QGCViewPanel {
- id: panel
- anchors.fill: parent
-
- QGCFlickable {
- anchors.fill: parent
- clip: true
- contentHeight: flowLayout.height
- contentWidth: flowLayout.width
+ Component {
+ id: flightModePageComponent
Flow {
id: flowLayout
- width: panel.width // parent.width doesn't work here for some reason!
+ width: availableWidth
spacing: _margins
Column {
@@ -181,6 +174,5 @@ QGCView {
} // Rectangle - Channel options
} // Column - Channel options
} // Flow
- } // QGCFlickable
- } // QGCViewPanel
-} // QGCView
+ } // Component - flightModePageComponent
+} // SetupPage
diff --git a/src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc b/src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc
index 970d9fced458bb49a7f39f6ce16c48dac2248753..58410af7722867003ec677298f5e76feff76be61 100644
--- a/src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc
+++ b/src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc
@@ -10,7 +10,6 @@
#include "APMFlightModesComponentController.h"
#include "QGCMAVLink.h"
-#include "AutoPilotPluginManager.h"
#include
#include
diff --git a/src/AutoPilotPlugins/APM/APMLightsComponent.cc b/src/AutoPilotPlugins/APM/APMLightsComponent.cc
new file mode 100644
index 0000000000000000000000000000000000000000..46d7bdbd74c8dc2f3755bf3578e8aa06b640841f
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMLightsComponent.cc
@@ -0,0 +1,69 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+
+/// @file
+/// @author Don Gagne
+/// @author Rustom Jehangir
+
+#include "APMLightsComponent.h"
+#include "QGCQmlWidgetHolder.h"
+#include "APMAutoPilotPlugin.h"
+#include "APMAirframeComponent.h"
+
+APMLightsComponent::APMLightsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent)
+ : VehicleComponent(vehicle, autopilot, parent)
+ , _name(tr("Lights"))
+{
+}
+
+QString APMLightsComponent::name(void) const
+{
+ return _name;
+}
+
+QString APMLightsComponent::description(void) const
+{
+ return tr("Lights setup is used to adjust light output channels.");
+}
+
+QString APMLightsComponent::iconResource(void) const
+{
+ return QStringLiteral("/qmlimages/LightsComponentIcon.png");
+}
+
+bool APMLightsComponent::requiresSetup(void) const
+{
+ return false;
+}
+
+bool APMLightsComponent::setupComplete(void) const
+{
+ return true;
+}
+
+QStringList APMLightsComponent::setupCompleteChangedTriggerList(void) const
+{
+ return QStringList();
+}
+
+QUrl APMLightsComponent::setupSource(void) const
+{
+ return QUrl::fromUserInput(QStringLiteral("qrc:/qml/APMLightsComponent.qml"));
+}
+
+QUrl APMLightsComponent::summaryQmlSource(void) const
+{
+ return QUrl::fromUserInput(QStringLiteral("qrc:/qml/APMLightsComponentSummary.qml"));
+}
+
+QString APMLightsComponent::prerequisiteSetup(void) const
+{
+ return QString();
+}
diff --git a/src/AutoPilotPlugins/APM/APMLightsComponent.h b/src/AutoPilotPlugins/APM/APMLightsComponent.h
new file mode 100644
index 0000000000000000000000000000000000000000..0369aae877c02de8823759c950c444d72d6774f6
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMLightsComponent.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+
+#ifndef APMLightsComponent_H
+#define APMLightsComponent_H
+
+#include "VehicleComponent.h"
+
+class APMLightsComponent : public VehicleComponent
+{
+ Q_OBJECT
+
+public:
+ APMLightsComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
+
+ // Virtuals from VehicleComponent
+ QStringList setupCompleteChangedTriggerList(void) const final;
+
+ // Virtuals from VehicleComponent
+ QString name(void) const final;
+ QString description(void) const final;
+ QString iconResource(void) const final;
+ bool requiresSetup(void) const final;
+ bool setupComplete(void) const final;
+ QUrl setupSource(void) const final;
+ QUrl summaryQmlSource(void) const final;
+ QString prerequisiteSetup(void) const final;
+
+private:
+ const QString _name;
+};
+
+#endif
diff --git a/src/AutoPilotPlugins/APM/APMLightsComponent.qml b/src/AutoPilotPlugins/APM/APMLightsComponent.qml
new file mode 100644
index 0000000000000000000000000000000000000000..b2eac54bb67e2dc320ed73e56c2a91e59881e4cd
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMLightsComponent.qml
@@ -0,0 +1,232 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+
+import QtQuick 2.5
+import QtQuick.Controls 1.2
+
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
+import QGroundControl.Palette 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.ScreenTools 1.0
+
+SetupPage {
+ id: lightsPage
+ pageComponent: lightsPageComponent
+
+ Component {
+ id: lightsPageComponent
+
+ Column {
+ spacing: _margins
+ width: availableWidth
+
+ FactPanelController { id: controller; factPanel: lightsPage.viewPanel }
+
+ QGCPalette { id: palette; colorGroupEnabled: true }
+
+ property Fact _rc5Function: controller.getParameterFact(-1, "r.SERVO5_FUNCTION")
+ property Fact _rc6Function: controller.getParameterFact(-1, "r.SERVO6_FUNCTION")
+ property Fact _rc7Function: controller.getParameterFact(-1, "r.SERVO7_FUNCTION")
+ property Fact _rc8Function: controller.getParameterFact(-1, "r.SERVO8_FUNCTION")
+ property Fact _rc9Function: controller.getParameterFact(-1, "r.SERVO9_FUNCTION")
+ property Fact _rc10Function: controller.getParameterFact(-1, "r.SERVO10_FUNCTION")
+ property Fact _rc11Function: controller.getParameterFact(-1, "r.SERVO11_FUNCTION")
+ property Fact _rc12Function: controller.getParameterFact(-1, "r.SERVO12_FUNCTION")
+ property Fact _rc13Function: controller.getParameterFact(-1, "r.SERVO13_FUNCTION")
+ property Fact _rc14Function: controller.getParameterFact(-1, "r.SERVO14_FUNCTION")
+ property Fact _stepSize: controller.getParameterFact(-1, "JS_LIGHTS_STEP")
+
+ readonly property real _margins: ScreenTools.defaultFontPixelHeight
+ readonly property int _rcFunctionDisabled: 0
+ readonly property int _rcFunctionRCIN9: 59
+ readonly property int _rcFunctionRCIN10: 60
+ readonly property int _firstLightsOutChannel: 5
+ readonly property int _lastLightsOutChannel: 14
+
+ Component.onCompleted: {
+ calcLightOutValues()
+ calcCurrentStep()
+ }
+
+ /// Light output channels are stored in SERVO#_FUNCTION parameters. We need to loop through those
+ /// to find them and setup the ui accordindly.
+ function calcLightOutValues() {
+ lightsLoader.lights1OutIndex = 0
+ lightsLoader.lights2OutIndex = 0
+ for (var channel=_firstLightsOutChannel; channel<=_lastLightsOutChannel; channel++) {
+ var functionFact = controller.getParameterFact(-1, "r.SERVO" + channel + "_FUNCTION")
+ if (functionFact.value == _rcFunctionRCIN9) {
+ lightsLoader.lights1OutIndex = channel - 4
+ } else if (functionFact.value == _rcFunctionRCIN10) {
+ lightsLoader.lights2OutIndex = channel - 4
+ }
+ }
+ }
+
+ function setRCFunction(channel, rcFunction) {
+ // First clear any previous settings for this function
+ for (var index=_firstLightsOutChannel; index<=_lastLightsOutChannel; index++) {
+ var functionFact = controller.getParameterFact(-1, "r.SERVO" + index + "_FUNCTION")
+ if (functionFact.value != _rcFunctionDisabled && functionFact.value == rcFunction) {
+ functionFact.value = _rcFunctionDisabled
+ }
+ }
+
+ // Now set the function into the new channel
+ if (channel != 0) {
+ var functionFact = controller.getParameterFact(-1, "r.SERVO" + channel + "_FUNCTION")
+ functionFact.value = rcFunction
+ }
+ }
+
+ function calcCurrentStep() {
+ var i = 1
+ for(i; i <= 10; i++) {
+ var stepSize = (1900-1100)/i
+ if(_stepSize.value >= stepSize) {
+ _stepSize.value = stepSize;
+ break;
+ }
+ }
+ if (_stepSize.value < 80) {
+ _stepSize.value = 80;
+ }
+ lightsLoader.lightsSteps = i
+ }
+
+ function calcStepSize(steps) {
+ _stepSize.value = (1900-1100)/steps
+ }
+
+ // Whenever any SERVO#_FUNCTION parameters chagnes we need to go looking for light output channels again
+ Connections { target: _rc5Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc6Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc7Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc8Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc9Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc10Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc11Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc12Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc13Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc14Function; onValueChanged: calcLightOutValues() }
+
+ ListModel {
+ id: lightsOutModel
+ ListElement { text: qsTr("Disabled"); value: 0 }
+ ListElement { text: qsTr("Channel 5"); value: 5 }
+ ListElement { text: qsTr("Channel 6"); value: 6 }
+ ListElement { text: qsTr("Channel 7"); value: 7 }
+ ListElement { text: qsTr("Channel 8"); value: 8 }
+ ListElement { text: qsTr("Channel 9"); value: 9 }
+ ListElement { text: qsTr("Channel 10"); value: 10 }
+ ListElement { text: qsTr("Channel 11"); value: 11 }
+ ListElement { text: qsTr("Channel 12"); value: 12 }
+ ListElement { text: qsTr("Channel 13"); value: 13 }
+ ListElement { text: qsTr("Channel 14"); value: 14 }
+ }
+
+ Component {
+ id: lightSettings
+
+ Item {
+ width: rectangle.x + rectangle.width
+ height: rectangle.y + rectangle.height
+
+ QGCLabel {
+ id: settingsLabel
+ text: qsTr("Light Output Channels")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: rectangle
+ anchors.topMargin: _margins / 2
+ anchors.top: settingsLabel.bottom
+ width: lights1Combo.x + lights1Combo.width + lightsStepCombo.width + _margins
+ height: lights2Combo.y + lights2Combo.height + lightsStepCombo.height + 2*_margins
+ color: palette.windowShade
+
+ QGCLabel {
+ id: lights1Label
+ anchors.margins: _margins
+ anchors.right: lights1Combo.left
+ anchors.baseline: lights1Combo.baseline
+ text: qsTr("Lights 1:")
+ }
+
+ QGCComboBox {
+ id: lights1Combo
+ anchors.margins: _margins
+ anchors.top: parent.top
+ anchors.left: lightsStepLabel.right
+ width: ScreenTools.defaultFontPixelWidth * 15
+ model: lightsOutModel
+ currentIndex: lights1OutIndex
+
+ onActivated: setRCFunction(lightsOutModel.get(index).value, lights1Function)
+ }
+
+ QGCLabel {
+ id: lights2Label
+ anchors.margins: _margins
+ anchors.right: lights2Combo.left
+ anchors.baseline: lights2Combo.baseline
+ text: qsTr("Lights 2:")
+ }
+
+ QGCComboBox {
+ id: lights2Combo
+ anchors.margins: _margins
+ anchors.top: lights1Combo.bottom
+ anchors.left: lightsStepLabel.right
+ width: lights1Combo.width
+ model: lightsOutModel
+ currentIndex: lights2OutIndex
+
+ onActivated: setRCFunction(lightsOutModel.get(index).value, lights2Function)
+ }
+
+ QGCLabel {
+ id: lightsStepLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: lightsStepCombo.baseline
+ text: qsTr("Brightness Steps:")
+ }
+
+ QGCComboBox {
+ id: lightsStepCombo
+ anchors.margins: _margins
+ anchors.top: lights2Combo.bottom
+ anchors.left: lightsStepLabel.right
+ width: lights2Combo.width
+ model: [1,2,3,4,5,6,7,8,9,10]
+ currentIndex: lightsSteps-1
+
+ onActivated: calcStepSize(index+1)
+ }
+ } // Rectangle
+ } // Item
+ } // Component - lightSettings
+
+ Loader {
+ id: lightsLoader
+ sourceComponent: lightSettings
+
+ property int lights1OutIndex: 0
+ property int lights2OutIndex: 0
+ property int lights1Function: _rcFunctionRCIN9
+ property int lights2Function: _rcFunctionRCIN10
+ property int lightsSteps: 1
+ }
+ } // Column
+ } // Component
+} // SetupPage
diff --git a/src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml b/src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml
new file mode 100644
index 0000000000000000000000000000000000000000..7712df99c7169cfafd95b0a2fed9107b075cda50
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml
@@ -0,0 +1,101 @@
+import QtQuick 2.5
+import QtQuick.Controls 1.2
+
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.Palette 1.0
+
+FactPanel {
+ id: panel
+ anchors.fill: parent
+ color: qgcPal.windowShadeDark
+
+ QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
+ FactPanelController { id: controller; factPanel: panel }
+
+ property Fact _rc5Function: controller.getParameterFact(-1, "r.SERVO5_FUNCTION")
+ property Fact _rc6Function: controller.getParameterFact(-1, "r.SERVO6_FUNCTION")
+ property Fact _rc7Function: controller.getParameterFact(-1, "r.SERVO7_FUNCTION")
+ property Fact _rc8Function: controller.getParameterFact(-1, "r.SERVO8_FUNCTION")
+ property Fact _rc9Function: controller.getParameterFact(-1, "r.SERVO9_FUNCTION")
+ property Fact _rc10Function: controller.getParameterFact(-1, "r.SERVO10_FUNCTION")
+ property Fact _rc11Function: controller.getParameterFact(-1, "r.SERVO11_FUNCTION")
+ property Fact _rc12Function: controller.getParameterFact(-1, "r.SERVO12_FUNCTION")
+ property Fact _rc13Function: controller.getParameterFact(-1, "r.SERVO13_FUNCTION")
+ property Fact _rc14Function: controller.getParameterFact(-1, "r.SERVO14_FUNCTION")
+
+ readonly property int _rcFunctionRCIN9: 59
+ readonly property int _rcFunctionRCIN10: 60
+ readonly property int _firstLightsOutChannel: 5
+ readonly property int _lastLightsOutChannel: 14
+
+ Component.onCompleted: {
+ calcLightOutValues()
+ }
+
+ /// Light output channels are stored in SERVO#_FUNCTION parameters. We need to loop through those
+ /// to find them and setup the ui accordindly.
+ function calcLightOutValues() {
+ lightsLoader.lights1OutIndex = 0
+ lightsLoader.lights2OutIndex = 0
+ for (var channel=_firstLightsOutChannel; channel<=_lastLightsOutChannel; channel++) {
+ var functionFact = controller.getParameterFact(-1, "r.SERVO" + channel + "_FUNCTION")
+ if (functionFact.value == _rcFunctionRCIN9) {
+ lightsLoader.lights1OutIndex = channel - 4
+ } else if (functionFact.value == _rcFunctionRCIN10) {
+ lightsLoader.lights2OutIndex = channel - 4
+ }
+ }
+ }
+
+ // Whenever any SERVO#_FUNCTION parameters chagnes we need to go looking for light output channels again
+ Connections { target: _rc5Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc6Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc7Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc8Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc9Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc10Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc11Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc12Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc13Function; onValueChanged: calcLightOutValues() }
+ Connections { target: _rc14Function; onValueChanged: calcLightOutValues() }
+
+ ListModel {
+ id: lightsOutModel
+ ListElement { text: qsTr("Disabled"); value: 0 }
+ ListElement { text: qsTr("Channel 5"); value: 5 }
+ ListElement { text: qsTr("Channel 6"); value: 6 }
+ ListElement { text: qsTr("Channel 7"); value: 7 }
+ ListElement { text: qsTr("Channel 8"); value: 8 }
+ ListElement { text: qsTr("Channel 9"); value: 9 }
+ ListElement { text: qsTr("Channel 10"); value: 10 }
+ ListElement { text: qsTr("Channel 11"); value: 11 }
+ ListElement { text: qsTr("Channel 12"); value: 12 }
+ ListElement { text: qsTr("Channel 13"); value: 13 }
+ ListElement { text: qsTr("Channel 14"); value: 14 }
+ }
+
+ Loader {
+ id: lightsLoader
+
+ property int lights1OutIndex: 0
+ property int lights2OutIndex: 0
+ property int lights1Function: _rcFunctionRCIN9
+ property int lights2Function: _rcFunctionRCIN10
+ }
+
+ Column {
+ anchors.fill: parent
+
+ VehicleSummaryRow {
+ labelText: qsTr("Lights Output 1:")
+ valueText: lightsOutModel.get(lightsLoader.lights1OutIndex).text
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("Lights Output 2:")
+ valueText: lightsOutModel.get(lightsLoader.lights2OutIndex).text
+ }
+ }
+}
diff --git a/src/AutoPilotPlugins/APM/APMPowerComponent.qml b/src/AutoPilotPlugins/APM/APMPowerComponent.qml
index 410945bf72cc780507470f2ea1be7c8c96eaa862..7cb5437a1d0a5f67c83b9e17f2195dff1055c894 100644
--- a/src/AutoPilotPlugins/APM/APMPowerComponent.qml
+++ b/src/AutoPilotPlugins/APM/APMPowerComponent.qml
@@ -11,6 +11,7 @@
import QtQuick 2.5
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.2
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
@@ -18,384 +19,327 @@ import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
-QGCView {
- id: rootQGCView
- viewPanel: panel
-
- property Fact battAmpPerVolt: controller.getParameterFact(-1, "BATT_AMP_PERVOLT")
- property Fact battCapacity: controller.getParameterFact(-1, "BATT_CAPACITY")
- property Fact battCurrPin: controller.getParameterFact(-1, "BATT_CURR_PIN")
- property Fact battMonitor: controller.getParameterFact(-1, "BATT_MONITOR")
- property Fact battVoltMult: controller.getParameterFact(-1, "BATT_VOLT_MULT")
- property Fact battVoltPin: controller.getParameterFact(-1, "BATT_VOLT_PIN")
-
- property real _margins: ScreenTools.defaultFontPixelHeight
- property bool _showAdvanced: sensorCombo.currentIndex == sensorModel.count - 1
-
- Component.onCompleted: calcSensor()
-
- function calcSensor() {
- for (var i=0; i 0) {
+ battVoltMult.value = newVoltageMultiplier
+ }
+ }
+ }
+ } // Column
+ } // QGCFlickable
+ } // QGCViewDialog
+ } // Component - calcVoltageMultiplierDlgComponent
+
+ Component {
+ id: calcAmpsPerVoltDlgComponent
+
+ QGCViewDialog {
+ id: calcAmpsPerVoltDlg
+
+ QGCFlickable {
+ anchors.fill: parent
+ contentHeight: column.height
+ contentWidth: column.width
+
+ Column {
+ id: column
+ width: calcAmpsPerVoltDlg.width
+ spacing: ScreenTools.defaultFontPixelHeight
+
+ QGCLabel {
+ width: parent.width
+ wrapMode: Text.WordWrap
+ text: "Measure current draw using an external current meter and enter the value below. Click Calculate to set the new amps per volt value."
+ }
- QGCLabel { text: "Vehicle current:" }
- QGCLabel { text: controller.vehicle.battery.current.valueString }
+ Grid {
+ columns: 2
+ spacing: ScreenTools.defaultFontPixelHeight / 2
+ verticalItemAlignment: Grid.AlignVCenter
- QGCLabel { text: "Amps per volt:" }
- FactLabel { fact: battAmpPerVolt }
- }
+ QGCLabel {
+ text: "Measured current:"
+ }
+ QGCTextField { id: measuredCurrent }
- QGCButton {
- text: "Calculate"
+ QGCLabel { text: "Vehicle current:" }
+ QGCLabel { text: controller.vehicle.battery.current.valueString }
- onClicked: {
- var measuredCurrentValue = parseFloat(measuredCurrent.text)
- if (measuredCurrentValue == 0) {
- return
+ QGCLabel { text: "Amps per volt:" }
+ FactLabel { fact: battAmpPerVolt }
}
- var newAmpsPerVolt = (measuredCurrentValue * battAmpPerVolt.value) / controller.vehicle.battery.current.value
- if (newAmpsPerVolt != 0) {
- battAmpPerVolt.value = newAmpsPerVolt
+
+ QGCButton {
+ text: "Calculate"
+
+ onClicked: {
+ var measuredCurrentValue = parseFloat(measuredCurrent.text)
+ if (measuredCurrentValue == 0) {
+ return
+ }
+ var newAmpsPerVolt = (measuredCurrentValue * battAmpPerVolt.value) / controller.vehicle.battery.current.value
+ if (newAmpsPerVolt != 0) {
+ battAmpPerVolt.value = newAmpsPerVolt
+ }
+ }
}
- }
- }
- } // Column
- } // QGCFlickable
- } // QGCViewDialog
- } // Component - calcAmpsPerVoltDlgComponent
-
- QGCViewPanel {
- id: panel
- anchors.fill: parent
-
- QGCFlickable {
- anchors.fill: parent
- clip: true
- contentWidth: capacityField.x + capacityField.width + _margins
- contentHeight: (_showAdvanced ? ampPerVoltHelp.y + ampPerVoltHelp.height : sensorCombo.y + sensorCombo.height) + _margins
-
- QGCLabel {
- id: monitorLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: monitorCombo.baseline
- text: qsTr("Battery monitor:")
- }
+ } // Column
+ } // QGCFlickable
+ } // QGCViewDialog
+ } // Component - calcAmpsPerVoltDlgComponent
+
+ GridLayout {
+ columns: 3
+ rowSpacing: _margins
+ columnSpacing: _margins
+
+ QGCLabel { text: qsTr("Battery monitor:") }
+
+ FactComboBox {
+ id: monitorCombo
+ Layout.minimumWidth: _fieldWidth
+ fact: battMonitor
+ indexModel: false
+ }
- FactComboBox {
- id: monitorCombo
- anchors.topMargin: _margins
- anchors.top: parent.top
- anchors.left: capacityField.left
- width: capacityField.width
- fact: battMonitor
- indexModel: false
- }
+ QGCLabel {
+ Layout.row: 1
+ Layout.column: 0
+ text: qsTr("Battery capacity:")
+ }
- QGCLabel {
- id: capacityLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: capacityField.baseline
- text: qsTr("Battery capacity:")
- }
+ FactTextField {
+ id: capacityField
+ width: _fieldWidth
+ fact: battCapacity
+ }
- FactTextField {
- id: capacityField
- anchors.leftMargin: _margins
- anchors.topMargin: _margins / 2
- anchors.top: monitorCombo.bottom
- anchors.left: capacityLabel.right
- width: ScreenTools.defaultFontPixelWidth * 25
- fact: battCapacity
- }
+ QGCLabel {
+ Layout.row: 2
+ Layout.column: 0
+ text: qsTr("Power sensor:")
+ }
- QGCLabel {
- id: sensorLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: sensorCombo.baseline
- text: qsTr("Power sensor:")
- }
+ QGCComboBox {
+ id: sensorCombo
+ Layout.minimumWidth: _fieldWidth
+ model: sensorModel
- QGCComboBox {
- id: sensorCombo
- anchors.topMargin: _margins
- anchors.top: capacityField.bottom
- anchors.left: capacityField.left
- width: capacityField.width
- model: sensorModel
-
- onActivated: {
- if (index < sensorModel.count - 1) {
- battVoltPin.value = sensorModel.get(index).voltPin
- battCurrPin.value = sensorModel.get(index).currPin
- battVoltMult.value = sensorModel.get(index).voltMult
- battAmpPerVolt.value = sensorModel.get(index).ampPerVolt
- } else {
+ onActivated: {
+ if (index < sensorModel.count - 1) {
+ battVoltPin.value = sensorModel.get(index).voltPin
+ battCurrPin.value = sensorModel.get(index).currPin
+ battVoltMult.value = sensorModel.get(index).voltMult
+ battAmpPerVolt.value = sensorModel.get(index).ampPerVolt
+ } else {
+ }
}
}
- }
- QGCLabel {
- id: currPinLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: currPinCombo.baseline
- text: qsTr("Current pin:")
- visible: _showAdvanced
- }
+ QGCLabel {
+ Layout.row: 3
+ Layout.column: 0
+ text: qsTr("Current pin:")
+ visible: _showAdvanced
+ }
- FactComboBox {
- id: currPinCombo
- anchors.topMargin: _margins
- anchors.top: sensorCombo.bottom
- anchors.left: capacityField.left
- width: capacityField.width
- fact: battCurrPin
- indexModel: false
- visible: _showAdvanced
- }
+ FactComboBox {
+ Layout.minimumWidth: _fieldWidth
+ fact: battCurrPin
+ visible: _showAdvanced
+ }
- QGCLabel {
- id: voltPinLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: voltPinCombo.baseline
- text: qsTr("Voltage pin:")
- visible: _showAdvanced
- }
+ QGCLabel {
+ Layout.row: 4
+ Layout.column: 0
+ text: qsTr("Voltage pin:")
+ visible: _showAdvanced
+ }
- FactComboBox {
- id: voltPinCombo
- anchors.topMargin: _margins / 2
- anchors.top: currPinCombo.bottom
- anchors.left: capacityField.left
- width: capacityField.width
- fact: battVoltPin
- indexModel: false
- visible: _showAdvanced
- }
+ FactComboBox {
+ Layout.minimumWidth: _fieldWidth
+ fact: battVoltPin
+ indexModel: false
+ visible: _showAdvanced
+ }
- QGCLabel {
- id: voltMultLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: voltMultField.baseline
- text: qsTr("Voltage multiplier:")
- visible: _showAdvanced
- }
+ QGCLabel {
+ Layout.row: 5
+ Layout.column: 0
+ text: qsTr("Voltage multiplier:")
+ visible: _showAdvanced
+ }
- FactTextField {
- id: voltMultField
- anchors.topMargin: _margins
- anchors.top: voltPinCombo.bottom
- anchors.left: capacityField.left
- width: capacityField.width
- fact: battVoltMult
- visible: _showAdvanced
- }
+ FactTextField {
+ width: _fieldWidth
+ fact: battVoltMult
+ visible: _showAdvanced
+ }
- QGCButton {
- id: voltMultCalculateButton
- anchors.margins: _margins
- anchors.left: voltMultField.right
- anchors.baseline: voltMultField.baseline
- text: "Calculate"
- visible: _showAdvanced
- onClicked: showDialog(calcVoltageMultiplierDlgComponent, qsTr("Calculate Voltage Multiplier"), qgcView.showDialogDefaultWidth, StandardButton.Close)
- }
+ QGCButton {
+ text: qsTr("Calculate")
+ onClicked: showDialog(calcVoltageMultiplierDlgComponent, qsTr("Calculate Voltage Multiplier"), qgcView.showDialogDefaultWidth, StandardButton.Close)
+ visible: _showAdvanced
+ }
- QGCLabel {
- id: voltMultHelp
- anchors.left: voltMultLabel.left
- anchors.right: voltMultCalculateButton.right
- anchors.topMargin: _margins / 2
- anchors.top: voltMultField.bottom
- font.pointSize: ScreenTools.smallFontPointSize
- wrapMode: Text.WordWrap
- text: "If the battery voltage reported by the vehicle is largely different than the voltage read externally using a voltmeter you can adjust the voltage multiplier value to correct this. " +
- "Click the Calculate button for help with calculating a new value."
- visible: _showAdvanced
- }
+ QGCLabel {
+ Layout.columnSpan: 3
+ Layout.fillWidth: true
+ font.pointSize: ScreenTools.smallFontPointSize
+ wrapMode: Text.WordWrap
+ text: qsTr("If the battery voltage reported by the vehicle is largely different than the voltage read externally using a voltmeter you can adjust the voltage multiplier value to correct this. Click the Calculate button for help with calculating a new value.")
+ visible: _showAdvanced
+ }
- QGCLabel {
- id: ampPerVoltLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: ampPerVoltField.baseline
- text: qsTr("Amps per volt:")
- visible: _showAdvanced
- }
+ QGCLabel {
+ text: qsTr("Amps per volt:")
+ visible: _showAdvanced
+ }
- FactTextField {
- id: ampPerVoltField
- anchors.topMargin: _margins
- anchors.top: voltMultHelp.bottom
- anchors.left: capacityField.left
- width: capacityField.width
- fact: battAmpPerVolt
- visible: _showAdvanced
- }
+ FactTextField {
+ width: _fieldWidth
+ fact: battAmpPerVolt
+ visible: _showAdvanced
+ }
- QGCButton {
- id: ampPerVoltCalculateButton
- anchors.margins: _margins
- anchors.left: ampPerVoltField.right
- anchors.baseline: ampPerVoltField.baseline
- text: "Calculate"
- visible: _showAdvanced
- onClicked: showDialog(calcAmpsPerVoltDlgComponent, qsTr("Calculate Amps per Volt"), qgcView.showDialogDefaultWidth, StandardButton.Close)
- }
+ QGCButton {
+ text: qsTr("Calculate")
+ onClicked: showDialog(calcAmpsPerVoltDlgComponent, qsTr("Calculate Amps per Volt"), qgcView.showDialogDefaultWidth, StandardButton.Close)
+ visible: _showAdvanced
+ }
- QGCLabel {
- id: ampPerVoltHelp
- anchors.left: ampPerVoltLabel.left
- anchors.right: ampPerVoltCalculateButton.right
- anchors.topMargin: _margins / 2
- anchors.top: ampPerVoltField.bottom
- font.pointSize: ScreenTools.smallFontPointSize
- wrapMode: Text.WordWrap
- text: "If the current draw reported by the vehicle is largely different than the current read externally using a current meter you can adjust the amps per volt value to correct this. " +
- "Click the Calculate button for help with calculating a new value."
- visible: _showAdvanced
- }
- } // QGCFlickable
- } // QGCViewPanel
-} // QGCView
+ QGCLabel {
+ Layout.columnSpan: 3
+ Layout.fillWidth: true
+ font.pointSize: ScreenTools.smallFontPointSize
+ wrapMode: Text.WordWrap
+ text: qsTr("If the current draw reported by the vehicle is largely different than the current read externally using a current meter you can adjust the amps per volt value to correct this. Click the Calculate button for help with calculating a new value.")
+ visible: _showAdvanced
+ }
+ } // GridLayout
+ } // Column
+ } // Component
+} // SetupPage
diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponent.cc b/src/AutoPilotPlugins/APM/APMSafetyComponent.cc
index b5067b86d6d40582bb3024924ecbaf3c1c129909..02da238fbed897efb5ceab24a185de0384ff99d8 100644
--- a/src/AutoPilotPlugins/APM/APMSafetyComponent.cc
+++ b/src/AutoPilotPlugins/APM/APMSafetyComponent.cc
@@ -29,7 +29,22 @@ QString APMSafetyComponent::name(void) const
QString APMSafetyComponent::description(void) const
{
- return tr("The Safety Component is used to setup triggers for Return to Land as well as the settings for Return to Land itself.");
+ switch (_vehicle->vehicleType()) {
+ case MAV_TYPE_SUBMARINE:
+ return tr("Safety Setup is used to setup failsafe actions, geofence limits, leak detection, and arming checks.");
+ break;
+ case MAV_TYPE_GROUND_ROVER:
+ case MAV_TYPE_FIXED_WING:
+ case MAV_TYPE_QUADROTOR:
+ case MAV_TYPE_COAXIAL:
+ case MAV_TYPE_HELICOPTER:
+ case MAV_TYPE_HEXAROTOR:
+ case MAV_TYPE_OCTOROTOR:
+ case MAV_TYPE_TRICOPTER:
+ default:
+ return tr("Safety Setup is used to setup triggers for Return to Land as well as the settings for Return to Land itself.");
+ break;
+ }
}
QString APMSafetyComponent::iconResource(void) const
@@ -69,6 +84,9 @@ QUrl APMSafetyComponent::setupSource(void) const
case MAV_TYPE_TRICOPTER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentCopter.qml");
break;
+ case MAV_TYPE_SUBMARINE:
+ qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSub.qml");
+ break;
case MAV_TYPE_GROUND_ROVER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentRover.qml");
break;
@@ -96,6 +114,9 @@ QUrl APMSafetyComponent::summaryQmlSource(void) const
case MAV_TYPE_TRICOPTER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummaryCopter.qml");
break;
+ case MAV_TYPE_SUBMARINE:
+ qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummarySub.qml");
+ break;
case MAV_TYPE_GROUND_ROVER:
qmlFile = QStringLiteral("qrc:/qml/APMSafetyComponentSummaryRover.qml");
break;
diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml b/src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
index 3d245c1aa12ed179b6e0e261e158e3eaadff22cd..3d2495395d2f5b054195af3cea3f4a7147b2cdf8 100644
--- a/src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
+++ b/src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
@@ -18,491 +18,482 @@ import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
-QGCView {
- id: _safetyView
- viewPanel: panel
- anchors.fill: parent
+SetupPage {
+ id: safetyPage
+ pageComponent: safetyPageComponent
- FactPanelController { id: controller; factPanel: panel }
+ Component {
+ id: safetyPageComponent
- QGCPalette { id: ggcPal; colorGroupEnabled: enabled }
+ Flow {
+ id: flowLayout
+ width: availableWidth
+ spacing: _margins
- property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
- property Fact _failsafeBattEnable: controller.getParameterFact(-1, "FS_BATT_ENABLE")
- property Fact _failsafeBattMah: controller.getParameterFact(-1, "FS_BATT_MAH")
- property Fact _failsafeBattVoltage: controller.getParameterFact(-1, "FS_BATT_VOLTAGE")
- property Fact _failsafeThrEnable: controller.getParameterFact(-1, "FS_THR_ENABLE")
- property Fact _failsafeThrValue: controller.getParameterFact(-1, "FS_THR_VALUE")
+ FactPanelController { id: controller; factPanel: safetyPage.viewPanel }
- property Fact _fenceAction: controller.getParameterFact(-1, "FENCE_ACTION")
- property Fact _fenceAltMax: controller.getParameterFact(-1, "FENCE_ALT_MAX")
- property Fact _fenceEnable: controller.getParameterFact(-1, "FENCE_ENABLE")
- property Fact _fenceMargin: controller.getParameterFact(-1, "FENCE_MARGIN")
- property Fact _fenceRadius: controller.getParameterFact(-1, "FENCE_RADIUS")
- property Fact _fenceType: controller.getParameterFact(-1, "FENCE_TYPE")
+ QGCPalette { id: ggcPal; colorGroupEnabled: true }
- property Fact _landSpeedFact: controller.getParameterFact(-1, "LAND_SPEED")
- property Fact _rtlAltFact: controller.getParameterFact(-1, "RTL_ALT")
- property Fact _rtlLoitTimeFact: controller.getParameterFact(-1, "RTL_LOIT_TIME")
- property Fact _rtlAltFinalFact: controller.getParameterFact(-1, "RTL_ALT_FINAL")
+ property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
+ property Fact _failsafeBattEnable: controller.getParameterFact(-1, "FS_BATT_ENABLE")
+ property Fact _failsafeBattMah: controller.getParameterFact(-1, "FS_BATT_MAH")
+ property Fact _failsafeBattVoltage: controller.getParameterFact(-1, "FS_BATT_VOLTAGE")
+ property Fact _failsafeThrEnable: controller.getParameterFact(-1, "FS_THR_ENABLE")
+ property Fact _failsafeThrValue: controller.getParameterFact(-1, "FS_THR_VALUE")
- property Fact _armingCheck: controller.getParameterFact(-1, "ARMING_CHECK")
+ property Fact _fenceAction: controller.getParameterFact(-1, "FENCE_ACTION")
+ property Fact _fenceAltMax: controller.getParameterFact(-1, "FENCE_ALT_MAX")
+ property Fact _fenceEnable: controller.getParameterFact(-1, "FENCE_ENABLE")
+ property Fact _fenceMargin: controller.getParameterFact(-1, "FENCE_MARGIN")
+ property Fact _fenceRadius: controller.getParameterFact(-1, "FENCE_RADIUS")
+ property Fact _fenceType: controller.getParameterFact(-1, "FENCE_TYPE")
- property real _margins: ScreenTools.defaultFontPixelHeight
- property bool _showIcon: !ScreenTools.isTinyScreen
+ property Fact _landSpeedFact: controller.getParameterFact(-1, "LAND_SPEED")
+ property Fact _rtlAltFact: controller.getParameterFact(-1, "RTL_ALT")
+ property Fact _rtlLoitTimeFact: controller.getParameterFact(-1, "RTL_LOIT_TIME")
+ property Fact _rtlAltFinalFact: controller.getParameterFact(-1, "RTL_ALT_FINAL")
- ExclusiveGroup { id: fenceActionRadioGroup }
- ExclusiveGroup { id: landLoiterRadioGroup }
- ExclusiveGroup { id: returnAltRadioGroup }
+ property Fact _armingCheck: controller.getParameterFact(-1, "ARMING_CHECK")
- QGCViewPanel {
- id: panel
- anchors.fill: parent
+ property real _margins: ScreenTools.defaultFontPixelHeight
+ property bool _showIcon: !ScreenTools.isTinyScreen
- QGCFlickable {
- clip: true
- anchors.fill: parent
- contentHeight: flowLayout.height
- contentWidth: flowLayout.width
+ ExclusiveGroup { id: fenceActionRadioGroup }
+ ExclusiveGroup { id: landLoiterRadioGroup }
+ ExclusiveGroup { id: returnAltRadioGroup }
- Flow {
- id: flowLayout
- width: panel.width // parent.width doesn't work for some reason
- spacing: _margins
+ Column {
+ spacing: _margins / 2
- Column {
- spacing: _margins / 2
+ QGCLabel {
+ id: failsafeLabel
+ text: qsTr("Failsafe Triggers")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: failsafeSettings
+ width: throttleEnableCombo.x + throttleEnableCombo.width + _margins
+ height: mahField.y + mahField.height + _margins
+ color: ggcPal.windowShade
QGCLabel {
- id: failsafeLabel
- text: qsTr("Failsafe Triggers")
- font.family: ScreenTools.demiboldFontFamily
+ id: gcsEnableLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: gcsEnableCombo.baseline
+ text: qsTr("Ground Station failsafe:")
}
- Rectangle {
- id: failsafeSettings
- width: throttleEnableCombo.x + throttleEnableCombo.width + _margins
- height: mahField.y + mahField.height + _margins
- color: ggcPal.windowShade
-
- QGCLabel {
- id: gcsEnableLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: gcsEnableCombo.baseline
- text: qsTr("Ground Station failsafe:")
- }
-
- FactComboBox {
- id: gcsEnableCombo
- anchors.topMargin: _margins
- anchors.leftMargin: _margins
- anchors.left: gcsEnableLabel.right
- anchors.top: parent.top
- width: voltageField.width
- fact: _failsafeGCSEnable
- indexModel: false
- }
-
- QGCLabel {
- id: throttleEnableLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: throttleEnableCombo.baseline
- text: qsTr("Throttle failsafe:")
- }
-
- QGCComboBox {
- id: throttleEnableCombo
- anchors.topMargin: _margins
- anchors.left: gcsEnableCombo.left
- anchors.top: gcsEnableCombo.bottom
- width: voltageField.width
- model: [qsTr("Disabled"), qsTr("Always RTL"),
- qsTr("Continue with Mission in Auto Mode"), qsTr("Always Land")]
- currentIndex: _failsafeThrEnable.value
-
- onActivated: _failsafeThrEnable.value = index
- }
-
- QGCLabel {
- id: throttlePWMLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: throttlePWMField.baseline
- text: qsTr("PWM threshold:")
- }
+ FactComboBox {
+ id: gcsEnableCombo
+ anchors.topMargin: _margins
+ anchors.leftMargin: _margins
+ anchors.left: gcsEnableLabel.right
+ anchors.top: parent.top
+ width: voltageField.width
+ fact: _failsafeGCSEnable
+ indexModel: false
+ }
- FactTextField {
- id: throttlePWMField
- anchors.topMargin: _margins / 2
- anchors.left: gcsEnableCombo.left
- anchors.top: throttleEnableCombo.bottom
- fact: _failsafeThrValue
- showUnits: true
- }
+ QGCLabel {
+ id: throttleEnableLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: throttleEnableCombo.baseline
+ text: qsTr("Throttle failsafe:")
+ }
- QGCLabel {
- id: batteryEnableLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: batteryEnableCombo.baseline
- text: qsTr("Battery failsafe:")
- }
+ QGCComboBox {
+ id: throttleEnableCombo
+ anchors.topMargin: _margins
+ anchors.left: gcsEnableCombo.left
+ anchors.top: gcsEnableCombo.bottom
+ width: voltageField.width
+ model: [qsTr("Disabled"), qsTr("Always RTL"),
+ qsTr("Continue with Mission in Auto Mode"), qsTr("Always Land")]
+ currentIndex: _failsafeThrEnable.value
+
+ onActivated: _failsafeThrEnable.value = index
+ }
- QGCComboBox {
- id: batteryEnableCombo
- anchors.topMargin: _margins
- anchors.left: gcsEnableCombo.left
- anchors.top: throttlePWMField.bottom
- width: voltageField.width
- model: [qsTr("Disabled"), qsTr("Land"), qsTr("Return to Launch")]
- currentIndex: _failsafeBattEnable.value
+ QGCLabel {
+ id: throttlePWMLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: throttlePWMField.baseline
+ text: qsTr("PWM threshold:")
+ }
- onActivated: _failsafeBattEnable.value = index
- }
+ FactTextField {
+ id: throttlePWMField
+ anchors.topMargin: _margins / 2
+ anchors.left: gcsEnableCombo.left
+ anchors.top: throttleEnableCombo.bottom
+ fact: _failsafeThrValue
+ showUnits: true
+ }
- QGCCheckBox {
- id: voltageLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: voltageField.baseline
- text: qsTr("Voltage threshold:")
- checked: _failsafeBattVoltage.value != 0
+ QGCLabel {
+ id: batteryEnableLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: batteryEnableCombo.baseline
+ text: qsTr("Battery failsafe:")
+ }
- onClicked: _failsafeBattVoltage.value = checked ? 10.5 : 0
- }
+ QGCComboBox {
+ id: batteryEnableCombo
+ anchors.topMargin: _margins
+ anchors.left: gcsEnableCombo.left
+ anchors.top: throttlePWMField.bottom
+ width: voltageField.width
+ model: [qsTr("Disabled"), qsTr("Land"), qsTr("Return to Launch")]
+ currentIndex: _failsafeBattEnable.value
- FactTextField {
- id: voltageField
- anchors.topMargin: _margins / 2
- anchors.left: gcsEnableCombo.left
- anchors.top: batteryEnableCombo.bottom
- fact: _failsafeBattVoltage
- showUnits: true
- }
+ onActivated: _failsafeBattEnable.value = index
+ }
- QGCCheckBox {
- id: mahLabel
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: mahField.baseline
- text: qsTr("MAH threshold:")
- checked: _failsafeBattMah.value != 0
+ QGCCheckBox {
+ id: voltageLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: voltageField.baseline
+ text: qsTr("Voltage threshold:")
+ checked: _failsafeBattVoltage.value != 0
- onClicked: _failsafeBattMah.value = checked ? 600 : 0
- }
+ onClicked: _failsafeBattVoltage.value = checked ? 10.5 : 0
+ }
- FactTextField {
- id: mahField
- anchors.topMargin: _margins / 2
- anchors.left: gcsEnableCombo.left
- anchors.top: voltageField.bottom
- fact: _failsafeBattMah
- showUnits: true
- }
- } // Rectangle - Failsafe Settings
- } // Column - Failsafe Settings
+ FactTextField {
+ id: voltageField
+ anchors.topMargin: _margins / 2
+ anchors.left: gcsEnableCombo.left
+ anchors.top: batteryEnableCombo.bottom
+ fact: _failsafeBattVoltage
+ showUnits: true
+ }
- Column {
- spacing: _margins / 2
+ QGCCheckBox {
+ id: mahLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: mahField.baseline
+ text: qsTr("MAH threshold:")
+ checked: _failsafeBattMah.value != 0
- QGCLabel {
- id: geoFenceLabel
- text: qsTr("GeoFence")
- font.family: ScreenTools.demiboldFontFamily
+ onClicked: _failsafeBattMah.value = checked ? 600 : 0
}
- Rectangle {
- id: geoFenceSettings
- width: fenceAltMaxField.x + fenceAltMaxField.width + _margins
- height: fenceAltMaxField.y + fenceAltMaxField.height + _margins
- color: ggcPal.windowShade
-
- QGCCheckBox {
- id: circleGeo
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.top: parent.top
- text: qsTr("Circle GeoFence enabled")
- checked: _fenceEnable.value != 0 && _fenceType.value & 2
-
- onClicked: {
- if (checked) {
- if (_fenceEnable.value == 1) {
- _fenceType.value |= 2
- } else {
- _fenceEnable.value = 1
- _fenceType.value = 2
- }
- } else if (altitudeGeo.checked) {
- _fenceType.value &= ~2
+ FactTextField {
+ id: mahField
+ anchors.topMargin: _margins / 2
+ anchors.left: gcsEnableCombo.left
+ anchors.top: voltageField.bottom
+ fact: _failsafeBattMah
+ showUnits: true
+ }
+ } // Rectangle - Failsafe Settings
+ } // Column - Failsafe Settings
+
+ Column {
+ spacing: _margins / 2
+
+ QGCLabel {
+ id: geoFenceLabel
+ text: qsTr("GeoFence")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: geoFenceSettings
+ width: fenceAltMaxField.x + fenceAltMaxField.width + _margins
+ height: fenceAltMaxField.y + fenceAltMaxField.height + _margins
+ color: ggcPal.windowShade
+
+ QGCCheckBox {
+ id: circleGeo
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.top: parent.top
+ text: qsTr("Circle GeoFence enabled")
+ checked: _fenceEnable.value != 0 && _fenceType.value & 2
+
+ onClicked: {
+ if (checked) {
+ if (_fenceEnable.value == 1) {
+ _fenceType.value |= 2
} else {
- _fenceEnable.value = 0
- _fenceType.value = 0
+ _fenceEnable.value = 1
+ _fenceType.value = 2
}
+ } else if (altitudeGeo.checked) {
+ _fenceType.value &= ~2
+ } else {
+ _fenceEnable.value = 0
+ _fenceType.value = 0
}
}
+ }
- QGCCheckBox {
- id: altitudeGeo
- anchors.topMargin: _margins / 2
- anchors.left: circleGeo.left
- anchors.top: circleGeo.bottom
- text: qsTr("Altitude GeoFence enabled")
- checked: _fenceEnable.value != 0 && _fenceType.value & 1
-
- onClicked: {
- if (checked) {
- if (_fenceEnable.value == 1) {
- _fenceType.value |= 1
- } else {
- _fenceEnable.value = 1
- _fenceType.value = 1
- }
- } else if (circleGeo.checked) {
- _fenceType.value &= ~1
+ QGCCheckBox {
+ id: altitudeGeo
+ anchors.topMargin: _margins / 2
+ anchors.left: circleGeo.left
+ anchors.top: circleGeo.bottom
+ text: qsTr("Altitude GeoFence enabled")
+ checked: _fenceEnable.value != 0 && _fenceType.value & 1
+
+ onClicked: {
+ if (checked) {
+ if (_fenceEnable.value == 1) {
+ _fenceType.value |= 1
} else {
- _fenceEnable.value = 0
- _fenceType.value = 0
+ _fenceEnable.value = 1
+ _fenceType.value = 1
}
+ } else if (circleGeo.checked) {
+ _fenceType.value &= ~1
+ } else {
+ _fenceEnable.value = 0
+ _fenceType.value = 0
}
}
+ }
- QGCRadioButton {
- id: geoReportRadio
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.top: altitudeGeo.bottom
- text: qsTr("Report only")
- exclusiveGroup: fenceActionRadioGroup
- checked: _fenceAction.value == 0
-
- onClicked: _fenceAction.value = 0
- }
-
- QGCRadioButton {
- id: geoRTLRadio
- anchors.topMargin: _margins / 2
- anchors.left: circleGeo.left
- anchors.top: geoReportRadio.bottom
- text: qsTr("RTL or Land")
- exclusiveGroup: fenceActionRadioGroup
- checked: _fenceAction.value == 1
-
- onClicked: _fenceAction.value = 1
- }
-
- QGCLabel {
- id: fenceRadiusLabel
- anchors.left: circleGeo.left
- anchors.baseline: fenceRadiusField.baseline
- text: qsTr("Max radius:")
- }
-
- FactTextField {
- id: fenceRadiusField
- anchors.topMargin: _margins
- anchors.left: fenceAltMaxField.left
- anchors.top: geoRTLRadio.bottom
- fact: _fenceRadius
- showUnits: true
- }
+ QGCRadioButton {
+ id: geoReportRadio
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.top: altitudeGeo.bottom
+ text: qsTr("Report only")
+ exclusiveGroup: fenceActionRadioGroup
+ checked: _fenceAction.value == 0
- QGCLabel {
- id: fenceAltMaxLabel
- anchors.left: circleGeo.left
- anchors.baseline: fenceAltMaxField.baseline
- text: qsTr("Max altitude:")
- }
+ onClicked: _fenceAction.value = 0
+ }
- FactTextField {
- id: fenceAltMaxField
- anchors.topMargin: _margins / 2
- anchors.leftMargin: _margin
- anchors.left: fenceAltMaxLabel.right
- anchors.top: fenceRadiusField.bottom
- fact: _fenceAltMax
- showUnits: true
- }
- } // Rectangle - GeoFence Settings
- } // Column - GeoFence Settings
+ QGCRadioButton {
+ id: geoRTLRadio
+ anchors.topMargin: _margins / 2
+ anchors.left: circleGeo.left
+ anchors.top: geoReportRadio.bottom
+ text: qsTr("RTL or Land")
+ exclusiveGroup: fenceActionRadioGroup
+ checked: _fenceAction.value == 1
- Column {
- spacing: _margins / 2
+ onClicked: _fenceAction.value = 1
+ }
QGCLabel {
- id: rtlLabel
- text: qsTr("Return to Launch")
- font.family: ScreenTools.demiboldFontFamily
+ id: fenceRadiusLabel
+ anchors.left: circleGeo.left
+ anchors.baseline: fenceRadiusField.baseline
+ text: qsTr("Max radius:")
}
- Rectangle {
- id: rtlSettings
- width: rltAltFinalField.x + rltAltFinalField.width + _margins
- height: rltAltFinalField.y + rltAltFinalField.height + _margins
- color: ggcPal.windowShade
-
- Image {
- id: icon
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.top: parent.top
- height: ScreenTools.defaultFontPixelWidth * 20
- width: ScreenTools.defaultFontPixelWidth * 20
- sourceSize.width: width
- mipmap: true
- fillMode: Image.PreserveAspectFit
- visible: false
- source: "/qmlimages/ReturnToHomeAltitude.svg"
- }
-
- ColorOverlay {
- anchors.fill: icon
- source: icon
- color: ggcPal.text
- visible: _showIcon
- }
+ FactTextField {
+ id: fenceRadiusField
+ anchors.topMargin: _margins
+ anchors.left: fenceAltMaxField.left
+ anchors.top: geoRTLRadio.bottom
+ fact: _fenceRadius
+ showUnits: true
+ }
- QGCRadioButton {
- id: returnAtCurrentRadio
- anchors.margins: _margins
- anchors.left: _showIcon ? icon.right : parent.left
- anchors.top: parent.top
- text: qsTr("Return at current altitude")
- checked: _rtlAltFact.value == 0
- exclusiveGroup: returnAltRadioGroup
+ QGCLabel {
+ id: fenceAltMaxLabel
+ anchors.left: circleGeo.left
+ anchors.baseline: fenceAltMaxField.baseline
+ text: qsTr("Max altitude:")
+ }
- onClicked: _rtlAltFact.value = 0
- }
+ FactTextField {
+ id: fenceAltMaxField
+ anchors.topMargin: _margins / 2
+ anchors.leftMargin: _margins
+ anchors.left: fenceAltMaxLabel.right
+ anchors.top: fenceRadiusField.bottom
+ fact: _fenceAltMax
+ showUnits: true
+ }
+ } // Rectangle - GeoFence Settings
+ } // Column - GeoFence Settings
+
+ Column {
+ spacing: _margins / 2
+
+ QGCLabel {
+ id: rtlLabel
+ text: qsTr("Return to Launch")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: rtlSettings
+ width: rltAltFinalField.x + rltAltFinalField.width + _margins
+ height: rltAltFinalField.y + rltAltFinalField.height + _margins
+ color: ggcPal.windowShade
+
+ Image {
+ id: icon
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.top: parent.top
+ height: ScreenTools.defaultFontPixelWidth * 20
+ width: ScreenTools.defaultFontPixelWidth * 20
+ sourceSize.width: width
+ mipmap: true
+ fillMode: Image.PreserveAspectFit
+ visible: false
+ source: "/qmlimages/ReturnToHomeAltitude.svg"
+ }
- QGCRadioButton {
- id: returnAltRadio
- anchors.topMargin: _margins
- anchors.left: returnAtCurrentRadio.left
- anchors.top: returnAtCurrentRadio.bottom
- text: qsTr("Return at specified altitude:")
- exclusiveGroup: returnAltRadioGroup
- checked: _rtlAltFact.value != 0
+ ColorOverlay {
+ anchors.fill: icon
+ source: icon
+ color: ggcPal.text
+ visible: _showIcon
+ }
- onClicked: _rtlAltFact.value = 1500
- }
+ QGCRadioButton {
+ id: returnAtCurrentRadio
+ anchors.margins: _margins
+ anchors.left: _showIcon ? icon.right : parent.left
+ anchors.top: parent.top
+ text: qsTr("Return at current altitude")
+ checked: _rtlAltFact.value == 0
+ exclusiveGroup: returnAltRadioGroup
- FactTextField {
- id: rltAltField
- anchors.leftMargin: _margins
- anchors.left: returnAltRadio.right
- anchors.baseline: returnAltRadio.baseline
- fact: _rtlAltFact
- showUnits: true
- enabled: returnAltRadio.checked
- }
+ onClicked: _rtlAltFact.value = 0
+ }
- QGCCheckBox {
- id: homeLoiterCheckbox
- anchors.left: returnAtCurrentRadio.left
- anchors.baseline: landDelayField.baseline
- checked: _rtlLoitTimeFact.value > 0
- text: qsTr("Loiter above Home for:")
+ QGCRadioButton {
+ id: returnAltRadio
+ anchors.topMargin: _margins
+ anchors.left: returnAtCurrentRadio.left
+ anchors.top: returnAtCurrentRadio.bottom
+ text: qsTr("Return at specified altitude:")
+ exclusiveGroup: returnAltRadioGroup
+ checked: _rtlAltFact.value != 0
- onClicked: _rtlLoitTimeFact.value = (checked ? 60 : 0)
- }
+ onClicked: _rtlAltFact.value = 1500
+ }
- FactTextField {
- id: landDelayField
- anchors.topMargin: _margins * 1.5
- anchors.left: rltAltField.left
- anchors.top: rltAltField.bottom
- fact: _rtlLoitTimeFact
- showUnits: true
- enabled: homeLoiterCheckbox.checked === true
- }
+ FactTextField {
+ id: rltAltField
+ anchors.leftMargin: _margins
+ anchors.left: returnAltRadio.right
+ anchors.baseline: returnAltRadio.baseline
+ fact: _rtlAltFact
+ showUnits: true
+ enabled: returnAltRadio.checked
+ }
- QGCRadioButton {
- id: landRadio
- anchors.left: returnAtCurrentRadio.left
- anchors.baseline: landSpeedField.baseline
- text: qsTr("Land with descent speed:")
- checked: _rtlAltFinalFact.value == 0
- exclusiveGroup: landLoiterRadioGroup
+ QGCCheckBox {
+ id: homeLoiterCheckbox
+ anchors.left: returnAtCurrentRadio.left
+ anchors.baseline: landDelayField.baseline
+ checked: _rtlLoitTimeFact.value > 0
+ text: qsTr("Loiter above Home for:")
- onClicked: _rtlAltFinalFact.value = 0
- }
+ onClicked: _rtlLoitTimeFact.value = (checked ? 60 : 0)
+ }
- FactTextField {
- id: landSpeedField
- anchors.topMargin: _margins * 1.5
- anchors.top: landDelayField.bottom
- anchors.left: rltAltField.left
- fact: _landSpeedFact
- showUnits: true
- enabled: landRadio.checked
- }
+ FactTextField {
+ id: landDelayField
+ anchors.topMargin: _margins * 1.5
+ anchors.left: rltAltField.left
+ anchors.top: rltAltField.bottom
+ fact: _rtlLoitTimeFact
+ showUnits: true
+ enabled: homeLoiterCheckbox.checked === true
+ }
- QGCRadioButton {
- id: finalLoiterRadio
- anchors.left: returnAtCurrentRadio.left
- anchors.baseline: rltAltFinalField.baseline
- text: qsTr("Final loiter altitude:")
- exclusiveGroup: landLoiterRadioGroup
+ QGCRadioButton {
+ id: landRadio
+ anchors.left: returnAtCurrentRadio.left
+ anchors.baseline: landSpeedField.baseline
+ text: qsTr("Land with descent speed:")
+ checked: _rtlAltFinalFact.value == 0
+ exclusiveGroup: landLoiterRadioGroup
- onClicked: _rtlAltFinalFact.value = _rtlAltFact.value
- }
+ onClicked: _rtlAltFinalFact.value = 0
+ }
- FactTextField {
- id: rltAltFinalField
- anchors.topMargin: _margins / 2
- anchors.left: rltAltField.left
- anchors.top: landSpeedField.bottom
- fact: _rtlAltFinalFact
- enabled: finalLoiterRadio.checked
- showUnits: true
- }
- } // Rectangle - RTL Settings
- } // Column - RTL Settings
+ FactTextField {
+ id: landSpeedField
+ anchors.topMargin: _margins * 1.5
+ anchors.top: landDelayField.bottom
+ anchors.left: rltAltField.left
+ fact: _landSpeedFact
+ showUnits: true
+ enabled: landRadio.checked
+ }
- Column {
- spacing: _margins / 2
+ QGCRadioButton {
+ id: finalLoiterRadio
+ anchors.left: returnAtCurrentRadio.left
+ anchors.baseline: rltAltFinalField.baseline
+ text: qsTr("Final loiter altitude:")
+ exclusiveGroup: landLoiterRadioGroup
- QGCLabel {
- text: qsTr("Arming Checks")
- font.family: ScreenTools.demiboldFontFamily
+ onClicked: _rtlAltFinalFact.value = _rtlAltFact.value
}
- Rectangle {
- width: flowLayout.width
- height: armingCheckInnerColumn.height + (_margins * 2)
- color: ggcPal.windowShade
-
- Column {
- id: armingCheckInnerColumn
- anchors.margins: _margins
- anchors.top: parent.top
+ FactTextField {
+ id: rltAltFinalField
+ anchors.topMargin: _margins / 2
+ anchors.left: rltAltField.left
+ anchors.top: landSpeedField.bottom
+ fact: _rtlAltFinalFact
+ enabled: finalLoiterRadio.checked
+ showUnits: true
+ }
+ } // Rectangle - RTL Settings
+ } // Column - RTL Settings
+
+ Column {
+ spacing: _margins / 2
+
+ QGCLabel {
+ text: qsTr("Arming Checks")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ width: flowLayout.width
+ height: armingCheckInnerColumn.height + (_margins * 2)
+ color: ggcPal.windowShade
+
+ Column {
+ id: armingCheckInnerColumn
+ anchors.margins: _margins
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: _margins
+
+ FactBitmask {
+ id: armingCheckBitmask
anchors.left: parent.left
anchors.right: parent.right
- spacing: _margins
-
- FactBitmask {
- id: armingCheckBitmask
- anchors.left: parent.left
- anchors.right: parent.right
- firstEntryIsAll: true
- fact: _armingCheck
- }
+ firstEntryIsAll: true
+ fact: _armingCheck
+ }
- QGCLabel {
- id: armingCheckWarning
- anchors.left: parent.left
- anchors.right: parent.right
- wrapMode: Text.WordWrap
- color: qgcPal.warningText
- text: qsTr("Warning: Turning off arming checks can lead to loss of Vehicle control.")
- visible: _armingCheck.value != 1
- }
+ QGCLabel {
+ id: armingCheckWarning
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode: Text.WordWrap
+ color: qgcPal.warningText
+ text: qsTr("Warning: Turning off arming checks can lead to loss of Vehicle control.")
+ visible: _armingCheck.value != 1
}
- } // Rectangle - Arming checks
- } // Column - Arming Checks
- } // Flow
- } // QGCFlickable
- } // QGCViewPanel
-} // QGCView
+ }
+ } // Rectangle - Arming checks
+ } // Column - Arming Checks
+ } // Flow
+ } // Component - safetyPageComponent
+} // SetupView
diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponentPlane.qml b/src/AutoPilotPlugins/APM/APMSafetyComponentPlane.qml
index d1934d3d18309d225f67375bdd076cfe918715cb..6b1515b38c4f01ce8bd07649c16a47aa5e5f0bde 100644
--- a/src/AutoPilotPlugins/APM/APMSafetyComponentPlane.qml
+++ b/src/AutoPilotPlugins/APM/APMSafetyComponentPlane.qml
@@ -18,180 +18,171 @@ import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
-QGCView {
- id: _safetyView
- viewPanel: panel
- anchors.fill: parent
+SetupPage {
+ id: safetyPage
+ pageComponent: safetyPageComponent
- FactPanelController { id: controller; factPanel: panel }
+ Component {
+ id: safetyPageComponent
- QGCPalette { id: palette; colorGroupEnabled: enabled }
+ Flow {
+ id: flowLayout
+ width: availableWidth
+ spacing: _margins
- property Fact _failsafeBattMah: controller.getParameterFact(-1, "FS_BATT_MAH")
- property Fact _failsafeBattVoltage: controller.getParameterFact(-1, "FS_BATT_VOLTAGE")
- property Fact _failsafeThrEnable: controller.getParameterFact(-1, "THR_FAILSAFE")
- property Fact _failsafeThrValue: controller.getParameterFact(-1, "THR_FS_VALUE")
- property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABL")
+ FactPanelController { id: controller; factPanel: safetyPage.viewPanel }
- property Fact _rtlAltFact: controller.getParameterFact(-1, "ALT_HOLD_RTL")
+ QGCPalette { id: palette; colorGroupEnabled: true }
- property real _margins: ScreenTools.defaultFontPixelHeight
+ property Fact _failsafeBattMah: controller.getParameterFact(-1, "FS_BATT_MAH")
+ property Fact _failsafeBattVoltage: controller.getParameterFact(-1, "FS_BATT_VOLTAGE")
+ property Fact _failsafeThrEnable: controller.getParameterFact(-1, "THR_FAILSAFE")
+ property Fact _failsafeThrValue: controller.getParameterFact(-1, "THR_FS_VALUE")
+ property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABL")
- ExclusiveGroup { id: returnAltRadioGroup }
+ property Fact _rtlAltFact: controller.getParameterFact(-1, "ALT_HOLD_RTL")
- QGCViewPanel {
- id: panel
- anchors.fill: parent
+ property real _margins: ScreenTools.defaultFontPixelHeight
- QGCFlickable {
- clip: true
- anchors.fill: parent
- contentWidth: flowLayout.width
- contentHeight: flowLayout.height
+ ExclusiveGroup { id: returnAltRadioGroup }
- Flow {
- id: flowLayout
- width: panel.width // parent.width doesn't work for some reason
- spacing: _margins
+ Column {
+ spacing: _margins / 2
- Column {
- spacing: _margins / 2
+ QGCLabel {
+ text: qsTr("Failsafe Triggers")
+ font.family: ScreenTools.demiboldFontFamily
+ }
- QGCLabel {
- text: qsTr("Failsafe Triggers")
- font.family: ScreenTools.demiboldFontFamily
+ Rectangle {
+ width: throttlePWMField.x + throttlePWMField.width + _margins
+ height: gcsCheckbox.y + gcsCheckbox.height + _margins
+ color: palette.windowShade
+
+ QGCCheckBox {
+ id: throttleEnableCheckBox
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: throttlePWMField.baseline
+ text: qsTr("Throttle PWM threshold:")
+ checked: _failsafeThrEnable.value == 1
+
+ onClicked: _failsafeThrEnable.value = (checked ? 1 : 0)
+ }
+
+ FactTextField {
+ id: throttlePWMField
+ anchors.margins: _margins
+ anchors.left: throttleEnableCheckBox.right
+ anchors.top: parent.top
+ fact: _failsafeThrValue
+ showUnits: true
+ enabled: throttleEnableCheckBox.checked
+ }
+
+ QGCCheckBox {
+ id: voltageCheckBox
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: voltageField.baseline
+ text: qsTr("Voltage threshold:")
+ checked: _failsafeBattVoltage.value != 0
+
+ onClicked: _failsafeBattVoltage.value = checked ? 10.5 : 0
+ }
+
+ FactTextField {
+ id: voltageField
+ anchors.topMargin: _margins
+ anchors.left: throttlePWMField.left
+ anchors.top: throttlePWMField.bottom
+ fact: _failsafeBattVoltage
+ showUnits: true
+ enabled: voltageCheckBox.checked
+ }
+
+ QGCCheckBox {
+ id: mahCheckBox
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: mahField.baseline
+ text: qsTr("MAH threshold:")
+ checked: _failsafeBattMah.value != 0
+
+ onClicked: _failsafeBattMah.value = checked ? 600 : 0
+ }
+
+ FactTextField {
+ id: mahField
+ anchors.topMargin: _margins / 2
+ anchors.left: throttlePWMField.left
+ anchors.top: voltageField.bottom
+ fact: _failsafeBattMah
+ showUnits: true
+ enabled: mahCheckBox.checked
+ }
+
+ QGCCheckBox {
+ id: gcsCheckbox
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.top: mahField.bottom
+ text: qsTr("GCS failsafe")
+ checked: _failsafeGCSEnable.value != 0
+
+ onClicked: _failsafeGCSEnable.value = checked ? 1 : 0
+ }
+ } // Rectangle - Failsafe trigger settings
+ } // Column - Failsafe trigger settings
+
+ Column {
+ spacing: _margins / 2
+
+ QGCLabel {
+ text: qsTr("Return to Launch")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ width: rltAltField.x + rltAltField.width + _margins
+ height: rltAltField.y + rltAltField.height + _margins
+ color: palette.windowShade
+
+ QGCRadioButton {
+ id: returnAtCurrentRadio
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.top: parent.top
+ text: qsTr("Return at current altitude")
+ checked: _rtlAltFact.value < 0
+ exclusiveGroup: returnAltRadioGroup
+
+ onClicked: _rtlAltFact.value = -1
}
- Rectangle {
- width: throttlePWMField.x + throttlePWMField.width + _margins
- height: gcsCheckbox.y + gcsCheckbox.height + _margins
- color: palette.windowShade
-
- QGCCheckBox {
- id: throttleEnableCheckBox
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: throttlePWMField.baseline
- text: qsTr("Throttle PWM threshold:")
- checked: _failsafeThrEnable.value == 1
-
- onClicked: _failsafeThrEnable.value = (checked ? 1 : 0)
- }
-
- FactTextField {
- id: throttlePWMField
- anchors.margins: _margins
- anchors.left: throttleEnableCheckBox.right
- anchors.top: parent.top
- fact: _failsafeThrValue
- showUnits: true
- enabled: throttleEnableCheckBox.checked
- }
-
- QGCCheckBox {
- id: voltageCheckBox
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: voltageField.baseline
- text: qsTr("Voltage threshold:")
- checked: _failsafeBattVoltage.value != 0
-
- onClicked: _failsafeBattVoltage.value = checked ? 10.5 : 0
- }
-
- FactTextField {
- id: voltageField
- anchors.topMargin: _margins
- anchors.left: throttlePWMField.left
- anchors.top: throttlePWMField.bottom
- fact: _failsafeBattVoltage
- showUnits: true
- enabled: voltageCheckBox.checked
- }
-
- QGCCheckBox {
- id: mahCheckBox
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.baseline: mahField.baseline
- text: qsTr("MAH threshold:")
- checked: _failsafeBattMah.value != 0
-
- onClicked: _failsafeBattMah.value = checked ? 600 : 0
- }
-
- FactTextField {
- id: mahField
- anchors.topMargin: _margins / 2
- anchors.left: throttlePWMField.left
- anchors.top: voltageField.bottom
- fact: _failsafeBattMah
- showUnits: true
- enabled: mahCheckBox.checked
- }
-
- QGCCheckBox {
- id: gcsCheckbox
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.top: mahField.bottom
- text: qsTr("GCS failsafe")
- checked: _failsafeGCSEnable.value != 0
-
- onClicked: _failsafeGCSEnable.value = checked ? 1 : 0
- }
- } // Rectangle - Failsafe trigger settings
- } // Column - Failsafe trigger settings
-
- Column {
- spacing: _margins / 2
-
- QGCLabel {
- text: qsTr("Return to Launch")
- font.family: ScreenTools.demiboldFontFamily
+ QGCRadioButton {
+ id: returnAltRadio
+ anchors.topMargin: _margins / 2
+ anchors.left: returnAtCurrentRadio.left
+ anchors.top: returnAtCurrentRadio.bottom
+ text: qsTr("Return at specified altitude:")
+ exclusiveGroup: returnAltRadioGroup
+ checked: _rtlAltFact.value >= 0
+
+ onClicked: _rtlAltFact.value = 10000
}
- Rectangle {
- width: rltAltField.x + rltAltField.width + _margins
- height: rltAltField.y + rltAltField.height + _margins
- color: palette.windowShade
-
- QGCRadioButton {
- id: returnAtCurrentRadio
- anchors.margins: _margins
- anchors.left: parent.left
- anchors.top: parent.top
- text: qsTr("Return at current altitude")
- checked: _rtlAltFact.value < 0
- exclusiveGroup: returnAltRadioGroup
-
- onClicked: _rtlAltFact.value = -1
- }
-
- QGCRadioButton {
- id: returnAltRadio
- anchors.topMargin: _margins / 2
- anchors.left: returnAtCurrentRadio.left
- anchors.top: returnAtCurrentRadio.bottom
- text: qsTr("Return at specified altitude:")
- exclusiveGroup: returnAltRadioGroup
- checked: _rtlAltFact.value >= 0
-
- onClicked: _rtlAltFact.value = 10000
- }
-
- FactTextField {
- id: rltAltField
- anchors.leftMargin: _margins
- anchors.left: returnAltRadio.right
- anchors.baseline: returnAltRadio.baseline
- fact: _rtlAltFact
- showUnits: true
- enabled: returnAltRadio.checked
- }
- } // Rectangle - RTL Settings
- } // Column - RTL Settings
- } // Flow
- } // QGCFlickable
- } // QGCViewPanel
-} // QGCView
+ FactTextField {
+ id: rltAltField
+ anchors.leftMargin: _margins
+ anchors.left: returnAltRadio.right
+ anchors.baseline: returnAltRadio.baseline
+ fact: _rtlAltFact
+ showUnits: true
+ enabled: returnAltRadio.checked
+ }
+ } // Rectangle - RTL Settings
+ } // Column - RTL Settings
+ } // Flow
+ } // Component
+} // SetupView
diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml b/src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml
new file mode 100644
index 0000000000000000000000000000000000000000..12f8103225e4ee7f7ca70071d036b6fce8368ba1
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml
@@ -0,0 +1,266 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+
+import QtQuick 2.5
+import QtQuick.Controls 1.2
+import QtGraphicalEffects 1.0
+
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
+import QGroundControl.Palette 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.ScreenTools 1.0
+
+SetupPage {
+ id: safetyPage
+ pageComponent: safetyPageComponent
+
+ Component {
+ id: safetyPageComponent
+
+ Flow {
+ id: flowLayout
+ width: availableWidth
+ spacing: _margins
+
+ FactPanelController { id: controller; factPanel: safetyPage.viewPanel }
+
+ QGCPalette { id: ggcPal; colorGroupEnabled: true }
+
+ property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
+ property Fact _failsafeLeakEnable: controller.getParameterFact(-1, "FS_LEAK_ENABLE")
+ property Fact _failsafePressureEnable: controller.getParameterFact(-1, "FS_PRESS_ENABLE")
+ property Fact _failsafePressureValue: controller.getParameterFact(-1, "FS_PRESS_MAX")
+ property Fact _failsafeTempEnable: controller.getParameterFact(-1, "FS_TEMP_ENABLE")
+ property Fact _failsafeTempValue: controller.getParameterFact(-1, "FS_TEMP_MAX")
+
+ property Fact _fenceAction: controller.getParameterFact(-1, "FENCE_ACTION")
+ property Fact _fenceAltMax: controller.getParameterFact(-1, "FENCE_ALT_MAX")
+ property Fact _fenceEnable: controller.getParameterFact(-1, "FENCE_ENABLE")
+ property Fact _fenceMargin: controller.getParameterFact(-1, "FENCE_MARGIN")
+ property Fact _fenceType: controller.getParameterFact(-1, "FENCE_TYPE")
+
+ property Fact _leakPin: controller.getParameterFact(-1, "LEAK1_PIN")
+ property Fact _leakLogic: controller.getParameterFact(-1, "LEAK1_LOGIC")
+
+ property Fact _armingCheck: controller.getParameterFact(-1, "ARMING_CHECK")
+
+ property real _margins: ScreenTools.defaultFontPixelHeight
+ property bool _showIcon: !ScreenTools.isTinyScreen
+
+ ExclusiveGroup { id: fenceActionRadioGroup }
+
+ Column {
+ spacing: _margins / 2
+
+ QGCLabel {
+ id: failsafeLabel
+ text: qsTr("Failsafe Actions")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: failsafeSettings
+ width: leakEnableCombo.x + leakEnableCombo.width + _margins
+ height: leakEnableCombo.y + leakEnableCombo.height + _margins
+ color: ggcPal.windowShade
+
+ QGCLabel {
+ id: gcsEnableLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: gcsEnableCombo.baseline
+ text: qsTr("Ground Station failsafe:")
+ }
+
+ FactComboBox {
+ id: gcsEnableCombo
+ anchors.margins: _margins
+ anchors.left: gcsEnableLabel.right
+ anchors.top: parent.top
+ width: ScreenTools.defaultFontPixelWidth*15
+ fact: _failsafeGCSEnable
+ indexModel: false
+ }
+
+ QGCLabel {
+ id: leakEnableLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.baseline: leakEnableCombo.baseline
+ text: qsTr("Leak failsafe:")
+ }
+
+ FactComboBox {
+ id: leakEnableCombo
+ anchors.topMargin: _margins
+ anchors.left: gcsEnableCombo.left
+ anchors.top: gcsEnableCombo.bottom
+ width: ScreenTools.defaultFontPixelWidth*15
+ fact: _failsafeLeakEnable
+ indexModel: false
+ }
+ } // Rectangle - Failsafe Settings
+ } // Column - Failsafe Settings
+
+ Column {
+ spacing: _margins / 2
+
+ QGCLabel {
+ id: geoFenceLabel
+ text: qsTr("GeoFence")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: geoFenceSettings
+ width: fenceAltMaxField.x + fenceAltMaxField.width + _margins
+ height: fenceAltMaxField.y + fenceAltMaxField.height + _margins
+ color: ggcPal.windowShade
+
+ QGCCheckBox {
+ id: altitudeGeo
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.top: parent.top
+ text: qsTr("Depth GeoFence enabled\n(report only)")
+ checked: _fenceEnable.value != 0 && _fenceType.value & 1
+
+ onClicked: {
+ if (checked) {
+ if (_fenceEnable.value == 1) {
+ _fenceType.value |= 1
+ } else {
+ _fenceEnable.value = 1
+ _fenceType.value = 1
+ }
+ } else {
+ _fenceEnable.value = 0
+ _fenceType.value = 0
+ }
+ }
+ }
+
+ QGCLabel {
+ id: fenceAltMaxLabel
+ anchors.left: altitudeGeo.left
+ anchors.baseline: fenceAltMaxField.baseline
+ text: qsTr("Max depth:")
+ }
+
+ FactTextField {
+ id: fenceAltMaxField
+ anchors.topMargin: _margins / 2
+ anchors.leftMargin: _margins
+ anchors.left: fenceAltMaxLabel.right
+ anchors.top: altitudeGeo.bottom
+ fact: _fenceAltMax
+ showUnits: true
+ }
+ } // Rectangle - GeoFence Settings
+ } // Column - GeoFence Settings
+
+ Column {
+ spacing: _margins / 2
+
+ QGCLabel {
+ id: leakDetectorLabel
+ text: qsTr("Leak Detector")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ id: leakDetectorSettings
+ width: leakLogicCombo.x + leakLogicCombo.width + _margins
+ height: leakLogicCombo.y + leakLogicCombo.height + _margins
+ color: ggcPal.windowShade
+
+ QGCLabel {
+ id: leakPinLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.top: parent.top
+ text: qsTr("Pin:")
+ }
+
+ FactComboBox {
+ id: leakPinCombo
+ anchors.margins: _margins
+ anchors.left: leakLogicLabel.right
+ anchors.baseline: leakPinLabel.baseline
+ width: ScreenTools.defaultFontPixelWidth*15
+ fact: _leakPin
+ indexModel: false
+ }
+
+ QGCLabel {
+ id: leakLogicLabel
+ anchors.margins: _margins
+ anchors.left: parent.left
+ anchors.top: leakPinLabel.bottom
+ text: qsTr("Logic (when dry):")
+ }
+
+ FactComboBox {
+ id: leakLogicCombo
+ anchors.margins: _margins
+ anchors.left: leakLogicLabel.right
+ anchors.baseline: leakLogicLabel.baseline
+ width: ScreenTools.defaultFontPixelWidth*15
+ fact: _leakLogic
+ indexModel: false
+ }
+ } // Rectangle - Leak Detector Settings
+ } // Column - Leak Detector Settings
+
+ Column {
+ spacing: _margins / 2
+
+ QGCLabel {
+ text: qsTr("Arming Checks")
+ font.family: ScreenTools.demiboldFontFamily
+ }
+
+ Rectangle {
+ width: flowLayout.width
+ height: armingCheckInnerColumn.height + (_margins * 2)
+ color: ggcPal.windowShade
+
+ Column {
+ id: armingCheckInnerColumn
+ anchors.margins: _margins
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: _margins
+
+ FactBitmask {
+ id: armingCheckBitmask
+ anchors.left: parent.left
+ anchors.right: parent.right
+ firstEntryIsAll: true
+ fact: _armingCheck
+ }
+
+ QGCLabel {
+ id: armingCheckWarning
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode: Text.WordWrap
+ color: qgcPal.warningText
+ text: qsTr("Warning: Turning off arming checks can lead to loss of Vehicle control.")
+ visible: _armingCheck.value != 1
+ }
+ }
+ } // Rectangle - Arming checks
+ } // Column - Arming Checks
+ } // Flow
+ } // Component - safetyPageComponent
+} // SetupView
diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml b/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml
new file mode 100644
index 0000000000000000000000000000000000000000..1ab63b7c4ce3df851f220f342f8c01c5ac40a10d
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml
@@ -0,0 +1,66 @@
+import QtQuick 2.2
+import QtQuick.Controls 1.2
+
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.Palette 1.0
+
+FactPanel {
+ id: panel
+ anchors.fill: parent
+ color: qgcPal.windowShadeDark
+
+ QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
+ FactPanelController { id: controller; factPanel: panel }
+
+ property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
+ property Fact _failsafeLeakEnable: controller.getParameterFact(-1, "FS_LEAK_ENABLE")
+
+ property Fact _fenceAction: controller.getParameterFact(-1, "FENCE_ACTION")
+ property Fact _fenceEnable: controller.getParameterFact(-1, "FENCE_ENABLE")
+ property Fact _fenceType: controller.getParameterFact(-1, "FENCE_TYPE")
+
+ property Fact _leakPin: controller.getParameterFact(-1, "LEAK1_PIN")
+
+ property Fact _armingCheck: controller.getParameterFact(-1, "ARMING_CHECK")
+
+ Column {
+ anchors.fill: parent
+
+ VehicleSummaryRow {
+ labelText: qsTr("Arming Checks:")
+ valueText: _armingCheck.value & 1 ? qsTr("Enabled") : qsTr("Some disabled")
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("GCS failsafe:")
+ valueText: _failsafeGCSEnable.enumOrValueString
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("Leak failsafe:")
+ valueText: _failsafeLeakEnable.enumOrValueString
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("Leak detector:")
+ valueText: _leakPin.enumOrValueString
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("GeoFence:")
+ valueText: _fenceEnable.value == 0 || _fenceType == 0 ?
+ qsTr("Disabled") :
+ (_fenceType.value == 1 ?
+ qsTr("Depth") :
+ (_fenceType.value == 2 ? qsTr("Circle") : qsTr("Depth,Circle")))
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("GeoFence:")
+ valueText: qsTr("Report only")
+ visible: _fenceEnable.value != 0
+ }
+ }
+}
diff --git a/src/AutoPilotPlugins/APM/APMSensorsComponent.cc b/src/AutoPilotPlugins/APM/APMSensorsComponent.cc
index 3f45eeca450d91b7fb00055f71be99845f133d86..0efdf4e6ac5ad2616693ae39f61b913c93b52502 100644
--- a/src/AutoPilotPlugins/APM/APMSensorsComponent.cc
+++ b/src/AutoPilotPlugins/APM/APMSensorsComponent.cc
@@ -30,8 +30,7 @@ QString APMSensorsComponent::name(void) const
QString APMSensorsComponent::description(void) const
{
- return tr("The Sensors Component allows you to calibrate the sensors within your vehicle. "
- "Prior to flight you must calibrate the Magnetometer, Gyroscope and Accelerometer.");
+ return tr("Sensors Setup is used to calibrate the sensors within your vehicle.");
}
QString APMSensorsComponent::iconResource(void) const
@@ -63,12 +62,6 @@ QStringList APMSensorsComponent::setupCompleteChangedTriggerList(void) const
// Accelerometer triggers
triggers << "INS_ACCOFFS_X" << "INS_ACCOFFS_Y" << "INS_ACCOFFS_Z";
- if (_vehicle->parameterManager()->parameterExists(FactSystem::defaultComponentId, QStringLiteral("INS_USE"))) {
- triggers << QStringLiteral("INS_USE") << QStringLiteral("INS_USE2") << QStringLiteral("INS_USE3");
- triggers << QStringLiteral("INS_ACC2OFFS_X") << QStringLiteral("INS_ACC2OFFS_Y") << QStringLiteral("INS_ACC2OFFS_Z");
- triggers << QStringLiteral("INS_ACC3OFFS_X") << QStringLiteral("INS_ACC3OFFS_Y") << QStringLiteral("INS_ACC3OFFS_Z");
- }
-
return triggers;
}
@@ -124,39 +117,18 @@ bool APMSensorsComponent::compassSetupNeeded(void) const
bool APMSensorsComponent::accelSetupNeeded(void) const
{
- QStringList rgUse;
- QStringList rgOffsets;
- QList rgAccels;
+ QStringList rgOffsets;
- // We always at a minimum test the first accel
+ // The best we can do is test the first accel which will always be there. We don't have enough information to know
+ // whether any of the other accels are available.
rgOffsets << QStringLiteral("INS_ACCOFFS_X") << QStringLiteral("INS_ACCOFFS_Y") << QStringLiteral("INS_ACCOFFS_Z");
- rgAccels << rgOffsets;
- rgOffsets.clear();
-
- // This parameter is not available in all firmware version. Specifically missing from older Solo firmware.
- if (_vehicle->parameterManager()->parameterExists(FactSystem::defaultComponentId, QStringLiteral("INS_USE"))) {
- rgUse << QStringLiteral("INS_USE") << QStringLiteral("INS_USE2") << QStringLiteral("INS_USE3");
-
- // We have usage information for the remaining accels, so we can test them sa well
- rgOffsets << QStringLiteral("INS_ACC2OFFS_X") << QStringLiteral("INS_ACC2OFFS_Y") << QStringLiteral("INS_ACC2OFFS_Z");
- rgAccels << rgOffsets;
- rgOffsets.clear();
-
- rgOffsets << QStringLiteral("INS_ACC3OFFS_X") << QStringLiteral("INS_ACC3OFFS_Y") << QStringLiteral("INS_ACC3OFFS_Z");
- rgAccels << rgOffsets;
- rgOffsets.clear();
- }
- for (int i=0; iparameterManager()->getParameter(FactSystem::defaultComponentId, rgUse[i])->rawValue().toInt() != 0) {
- for (int j=0; jparameterManager()->getParameter(FactSystem::defaultComponentId, rgAccels[i][j])->rawValue().toFloat() == 0.0f) {
- return true;
- }
- }
+ int zeroCount = 0;
+ for (int i=0; iparameterManager()->getParameter(FactSystem::defaultComponentId, rgOffsets[i])->rawValue().toFloat() == 0.0f) {
+ zeroCount++;
}
}
- return false;
+ return zeroCount == rgOffsets.count();
}
-
diff --git a/src/AutoPilotPlugins/APM/APMSensorsComponent.qml b/src/AutoPilotPlugins/APM/APMSensorsComponent.qml
index 533e0b143a68b8f5a12189e9a370f4b97bc4f889..1f328647edbdc01adb929a6255b9524e244c4351 100644
--- a/src/AutoPilotPlugins/APM/APMSensorsComponent.qml
+++ b/src/AutoPilotPlugins/APM/APMSensorsComponent.qml
@@ -8,624 +8,678 @@
****************************************************************************/
-import QtQuick 2.2
-import QtQuick.Controls 1.2
-import QtQuick.Controls.Styles 1.2
-import QtQuick.Dialogs 1.2
-
-import QGroundControl.FactSystem 1.0
-import QGroundControl.FactControls 1.0
-import QGroundControl.Palette 1.0
-import QGroundControl.Controls 1.0
-import QGroundControl.ScreenTools 1.0
-import QGroundControl.Controllers 1.0
-
-QGCView {
- id: qgcView
- viewPanel: panel
-
- // Help text which is shown both in the status text area prior to pressing a cal button and in the
- // pre-calibration dialog.
-
- readonly property string orientationHelpSet: "If the orientation is in the direction of flight, select None."
- readonly property string orientationHelpCal: "Before calibrating make sure orientation settings are correct. " + orientationHelpSet
- readonly property string compassRotationText: "If the compass or GPS module is mounted in flight direction, leave the default value (None)"
-
- readonly property string compassHelp: "For Compass calibration you will need to rotate your vehicle through a number of positions."
- readonly property string gyroHelp: "For Gyroscope calibration you will need to place your vehicle on a surface and leave it still."
- readonly property string accelHelp: "For Accelerometer calibration you will need to place your vehicle on all six sides on a perfectly level surface and hold it still in each orientation for a few seconds."
- readonly property string levelHelp: "To level the horizon you need to place the vehicle in its level flight position and press OK."
- readonly property string airspeedHelp: "For Airspeed calibration you will need to keep your airspeed sensor out of any wind and then blow across the sensor."
-
- readonly property string statusTextAreaDefaultText: "Start the individual calibration steps by clicking one of the buttons to the left."
-
- // Used to pass help text to the preCalibrationDialog dialog
- property string preCalibrationDialogHelp
-
- property string _postCalibrationDialogText
- property var _postCalibrationDialogParams
-
- readonly property string _badCompassCalText: "The calibration for Compass %1 appears to be poor. " +
- "Check the compass position within your vehicle and re-do the calibration."
-
- readonly property int sideBarH1PointSize: ScreenTools.mediumFontPointSize
- readonly property int mainTextH1PointSize: ScreenTools.mediumFontPointSize // Seems to be unused
-
- readonly property int rotationColumnWidth: 250
-
- property Fact compass1Id: controller.getParameterFact(-1, "COMPASS_DEV_ID")
- property Fact compass2Id: controller.getParameterFact(-1, "COMPASS_DEV_ID2")
- property Fact compass3Id: controller.getParameterFact(-1, "COMPASS_DEV_ID3")
- property Fact compass1ExternalFact: controller.getParameterFact(-1, "COMPASS_EXTERNAL")
- property Fact compass1Rot: controller.getParameterFact(-1, "COMPASS_ORIENT")
-
- property Fact boardRot: controller.getParameterFact(-1, "AHRS_ORIENTATION")
-
- property bool accelCalNeeded: controller.accelSetupNeeded
- property bool compassCalNeeded: controller.compassSetupNeeded
-
-
- // The following parameters are not available in olders firmwares
-
- property bool compass2ExternalParamAvailable: controller.parameterExists(-1, "COMPASS_EXTERN2")
- property bool compass3ExternalParamAvailable: controller.parameterExists(-1, "COMPASS_EXTERN3")
- property bool compass2RotParamAvailable: controller.parameterExists(-1, "COMPASS_ORIENT2")
- property bool compass3RotParamAvailable: controller.parameterExists(-1, "COMPASS_ORIENT3")
- property bool compass1UseParamAvailable: controller.parameterExists(-1, "COMPASS_USE")
- property bool compass2UseParamAvailable: controller.parameterExists(-1, "COMPASS_USE2")
- property bool compass3UseParamAvailable: controller.parameterExists(-1, "COMPASS_USE3")
-
- property Fact noFact: Fact { }
- property Fact compass2ExternalFact: compass2ExternalParamAvailable ? controller.getParameterFact(-1, "COMPASS_EXTERN2") : noFact
- property Fact compass3ExternalFact: compass3ExternalParamAvailable ? controller.getParameterFact(-1, "COMPASS_EXTERN3") : noFact
- property Fact compass2Rot: compass2RotParamAvailable ? controller.getParameterFact(-1, "COMPASS_ORIENT2") : noFact
- property Fact compass3Rot: compass3RotParamAvailable ? controller.getParameterFact(-1, "COMPASS_ORIENT3") : noFact
- property Fact compass1UseFact: compass1UseParamAvailable ? controller.getParameterFact(-1, "COMPASS_USE") : noFact
- property Fact compass2UseFact: compass2UseParamAvailable ? controller.getParameterFact(-1, "COMPASS_USE2") : noFact
- property Fact compass3UseFact: compass3UseParamAvailable ? controller.getParameterFact(-1, "COMPASS_USE3") : noFact
-
- // We track these values by binding through a separate property so we can handle missing params
- property bool compass1External: compass1ExternalFact.value
- property bool compass2External: compass2ExternalParamAvailable ? compass2ExternalFact.value : false // false: Simulate internal so we don't show rotation combos
- property bool compass3External: compass3ExternalParamAvailable ? compass3ExternalFact.value : false // false: Simulate internal so we don't show rotation combos
- property bool compass1Use: compass1UseParamAvailable ? compass1UseFact.value : true
- property bool compass2Use: compass2UseParamAvailable ? compass2UseFact.value : true
- property bool compass3Use: compass3UseParamAvailable ? compass3UseFact.value : true
-
- // Id > = signals compass available, rot < 0 signals internal compass
- property bool showCompass1: compass1Id.value > 0
- property bool showCompass2: compass2Id.value > 0
- property bool showCompass3: compass3Id.value > 0
-
- readonly property int _calTypeCompass: 1 ///< Calibrate compass
- readonly property int _calTypeAccel: 2 ///< Calibrate accel
- readonly property int _calTypeSet: 3 ///< Set orientations only
-
- property bool _orientationsDialogShowCompass: true
- property string _orientationDialogHelp: orientationHelpSet
- property int _orientationDialogCalType
-
- function validCompassOffsets(compassParamPrefix) {
- var ofsX = controller.getParameterFact(-1, compassParamPrefix + "X")
- var ofsY = controller.getParameterFact(-1, compassParamPrefix + "Y")
- var ofsZ = controller.getParameterFact(-1, compassParamPrefix + "Z")
- return Math.sqrt(ofsX.value^2 + ofsY.value^2 + ofsZ.value^2) < 600
- }
-
- function showOrientationsDialog(calType) {
- var dialogTitle
- var buttons = StandardButton.Ok
-
- _orientationDialogCalType = calType
- switch (calType) {
- case _calTypeCompass:
- _orientationsDialogShowCompass = true
- _orientationDialogHelp = orientationHelpCal
- dialogTitle = qsTr("Calibrate Compass")
- buttons |= StandardButton.Cancel
- break
- case _calTypeAccel:
- _orientationsDialogShowCompass = false
- _orientationDialogHelp = orientationHelpCal
- dialogTitle = qsTr("Calibrate Accelerometer")
- buttons |= StandardButton.Cancel
- break
- case _calTypeSet:
- _orientationsDialogShowCompass = true
- _orientationDialogHelp = orientationHelpSet
- dialogTitle = qsTr("Sensor Settings")
- break
- }
-
- showDialog(orientationsDialogComponent, dialogTitle, qgcView.showDialogDefaultWidth, buttons)
- }
-
- APMSensorsComponentController {
- id: controller
- factPanel: panel
- statusLog: statusTextArea
- progressBar: progressBar
- compassButton: compassButton
- accelButton: accelButton
- compassMotButton: motorInterferenceButton
- nextButton: nextButton
- cancelButton: cancelButton
- setOrientationsButton: setOrientationsButton
- orientationCalAreaHelpText: orientationCalAreaHelpText
-
- onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText
-
- onWaitingForCancelChanged: {
- if (controller.waitingForCancel) {
- showMessage(qsTr("Calibration Cancel"), qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds."), 0)
- } else {
- hideDialog()
+import QtQuick 2.2
+import QtQuick.Controls 1.2
+import QtQuick.Controls.Styles 1.2
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.2
+
+import QGroundControl 1.0
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
+import QGroundControl.Palette 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.ScreenTools 1.0
+import QGroundControl.Controllers 1.0
+import QGroundControl.ArduPilot 1.0
+
+SetupPage {
+ id: sensorsPage
+ pageComponent: sensorsPageComponent
+
+ Component {
+ id: sensorsPageComponent
+
+ RowLayout {
+ width: availableWidth
+ height: availableHeight
+ spacing: ScreenTools.defaultFontPixelWidth / 2
+
+ // Help text which is shown both in the status text area prior to pressing a cal button and in the
+ // pre-calibration dialog.
+
+ readonly property string orientationHelpSet: "If the orientation is in the direction of flight, select None."
+ readonly property string orientationHelpCal: "Before calibrating make sure orientation settings are correct. " + orientationHelpSet
+ readonly property string compassRotationText: "If the compass or GPS module is mounted in flight direction, leave the default value (None)"
+
+ readonly property string compassHelp: "For Compass calibration you will need to rotate your vehicle through a number of positions."
+ readonly property string gyroHelp: "For Gyroscope calibration you will need to place your vehicle on a surface and leave it still."
+ readonly property string accelHelp: "For Accelerometer calibration you will need to place your vehicle on all six sides on a perfectly level surface and hold it still in each orientation for a few seconds."
+ readonly property string levelHelp: "To level the horizon you need to place the vehicle in its level flight position and press OK."
+ readonly property string airspeedHelp: "For Airspeed calibration you will need to keep your airspeed sensor out of any wind and then blow across the sensor."
+
+ readonly property string statusTextAreaDefaultText: "Start the individual calibration steps by clicking one of the buttons to the left."
+
+ // Used to pass help text to the preCalibrationDialog dialog
+ property string preCalibrationDialogHelp
+
+ property string _postCalibrationDialogText
+ property var _postCalibrationDialogParams
+
+ readonly property string _badCompassCalText: "The calibration for Compass %1 appears to be poor. " +
+ "Check the compass position within your vehicle and re-do the calibration."
+
+ readonly property int sideBarH1PointSize: ScreenTools.mediumFontPointSize
+ readonly property int mainTextH1PointSize: ScreenTools.mediumFontPointSize // Seems to be unused
+
+ readonly property int rotationColumnWidth: 250
+
+ property Fact noFact: Fact { }
+
+ property bool accelCalNeeded: controller.accelSetupNeeded
+ property bool compassCalNeeded: controller.compassSetupNeeded
+
+ property Fact boardRot: controller.getParameterFact(-1, "AHRS_ORIENTATION")
+
+ readonly property int _calTypeCompass: 1 ///< Calibrate compass
+ readonly property int _calTypeAccel: 2 ///< Calibrate accel
+ readonly property int _calTypeSet: 3 ///< Set orientations only
+
+ property bool _orientationsDialogShowCompass: true
+ property string _orientationDialogHelp: orientationHelpSet
+ property int _orientationDialogCalType
+
+ function showOrientationsDialog(calType) {
+ var dialogTitle
+ var buttons = StandardButton.Ok
+
+ _orientationDialogCalType = calType
+ switch (calType) {
+ case _calTypeCompass:
+ _orientationsDialogShowCompass = true
+ _orientationDialogHelp = orientationHelpCal
+ dialogTitle = qsTr("Calibrate Compass")
+ buttons |= StandardButton.Cancel
+ break
+ case _calTypeAccel:
+ _orientationsDialogShowCompass = false
+ _orientationDialogHelp = orientationHelpCal
+ dialogTitle = qsTr("Calibrate Accelerometer")
+ buttons |= StandardButton.Cancel
+ break
+ case _calTypeSet:
+ _orientationsDialogShowCompass = true
+ _orientationDialogHelp = orientationHelpSet
+ dialogTitle = qsTr("Sensor Settings")
+ break
+ }
+
+ showDialog(orientationsDialogComponent, dialogTitle, qgcView.showDialogDefaultWidth, buttons)
+ }
+
+ APMSensorParams {
+ id: sensorParams
+ factPanelController: controller
}
- }
-
- onCalibrationComplete: {
- if (_orientationDialogCalType == _calTypeAccel) {
- _postCalibrationDialogText = qsTr("Accelerometer calibration complete.")
- _postCalibrationDialogParams = [ "INS_ACCSCAL_X", "INS_ACCSCAL_Y", "INS_ACCSCAL_Z",
- "INS_ACC2SCAL_X", "INS_ACC2SCAL_Y", "INS_ACC2SCAL_Z",
- "INS_ACC3SCAL_X", "INS_ACC3SCAL_Y", "INS_ACC3SCAL_Z",
- "INS_GYROFFS_X", "INS_GYROFFS_Y", "INS_GYROFFS_Z",
- "INS_GYR2OFFS_X", "INS_GYR2OFFS_Y", "INS_GYR2OFFS_Z",
- "INS_GYR3OFFS_X", "INS_GYR3OFFS_Y", "INS_GYR3OFFS_Z" ]
- showDialog(postCalibrationDialogComponent, qsTr("Calibration complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
- } else if (_orientationDialogCalType == _calTypeCompass) {
- _postCalibrationDialogText = qsTr("Compass calibration complete. ")
- _postCalibrationDialogParams = [];
- if (compass1Id.value > 0) {
- if (!validCompassOffsets("COMPASS_OFS_")) {
- _postCalibrationDialogText += _badCompassCalText.replace("%1", 1)
+
+ APMSensorsComponentController {
+ id: controller
+ factPanel: sensorsPage.viewPanel
+ statusLog: statusTextArea
+ progressBar: progressBar
+ compassButton: compassButton
+ accelButton: accelButton
+ compassMotButton: motorInterferenceButton
+ levelButton: levelHorizonButton
+ calibratePressureButton: calibratePressureButton
+ nextButton: nextButton
+ cancelButton: cancelButton
+ setOrientationsButton: setOrientationsButton
+ orientationCalAreaHelpText: orientationCalAreaHelpText
+
+ property var rgCompassCalFitness: [ controller.compass1CalFitness, controller.compass2CalFitness, controller.compass3CalFitness ]
+
+ onResetStatusTextArea: statusLog.text = statusTextAreaDefaultText
+
+ onWaitingForCancelChanged: {
+ if (controller.waitingForCancel) {
+ showMessage(qsTr("Calibration Cancel"), qsTr("Waiting for Vehicle to response to Cancel. This may take a few seconds."), 0)
+ } else {
+ hideDialog()
}
- _postCalibrationDialogParams.push("COMPASS_OFS_X")
- _postCalibrationDialogParams.push("COMPASS_OFS_Y")
- _postCalibrationDialogParams.push("COMPASS_OFS_Z")
}
- if (compass2Id.value > 0) {
- if (!validCompassOffsets("COMPASS_OFS_")) {
- _postCalibrationDialogText += _badCompassCalText.replace("%1", 2)
+
+ onCalibrationComplete: {
+ switch (calType) {
+ case APMSensorsComponentController.CalTypeAccel:
+ showMessage(qsTr("Calibration complete"), qsTr("Accelerometer calibration complete."), StandardButton.Ok)
+ break
+ case APMSensorsComponentController.CalTypeOffboardCompass:
+ showMessage(qsTr("Calibration complete"), qsTr("Compass calibration complete."), StandardButton.Ok)
+ break
+ case APMSensorsComponentController.CalTypeOnboardCompass:
+ showDialog(postOnboardCompassCalibrationComponent, qsTr("Calibration complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
+ break
}
- _postCalibrationDialogParams.push("COMPASS_OFS2_X")
- _postCalibrationDialogParams.push("COMPASS_OFS2_Y")
- _postCalibrationDialogParams.push("COMPASS_OFS2_Z")
}
- if (compass3Id.value > 0) {
- if (!validCompassOffsets("COMPASS_OFS_")) {
- _postCalibrationDialogText += _badCompassCalText.replace("%1", 3)
- }
- _postCalibrationDialogParams.push("COMPASS_OFS3_X")
- _postCalibrationDialogParams.push("COMPASS_OFS3_Y")
- _postCalibrationDialogParams.push("COMPASS_OFS3_Z")
+ }
+
+ Component.onCompleted: {
+ var usingUDP = controller.usingUDPLink()
+ if (usingUDP) {
+ showMessage("Sensor Calibration", "Performing sensor calibration over a WiFi connection can be unreliable. If you run into problems try using a direct USB connection instead.", StandardButton.Ok)
}
- showDialog(postCalibrationDialogComponent, qsTr("Calibration complete"), qgcView.showDialogDefaultWidth, StandardButton.Ok)
}
- }
- }
- Component.onCompleted: {
- var usingUDP = controller.usingUDPLink()
- if (usingUDP) {
- console.log("onUsingUDPLink")
- showMessage("Sensor Calibration", "Performing sensor calibration over a WiFi connection is known to be unreliable. You should disconnect and perform calibration using a direct USB connection instead.", StandardButton.Ok)
- }
- }
+ QGCPalette { id: qgcPal; colorGroupEnabled: true }
- QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }
+ Component {
+ id: singleCompassOnboardResultsComponent
- Component {
- id: postCalibrationDialogComponent
-
- QGCViewDialog {
- QGCLabel {
- id: textLabel
- anchors.left: parent.left
- anchors.right: parent.right
- wrapMode: Text.WordWrap
- text: _postCalibrationDialogText
- }
+ Column {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: Math.round(ScreenTools.defaultFontPixelHeight / 2)
+ visible: sensorParams.rgCompassAvailable[index]
- QGCCheckBox {
- id: showValues
- anchors.topMargin: ScreenTools.defaultFontPixelHeight
- anchors.top: textLabel.bottom
- text: qsTr("Show values")
- }
+ property real greenMaxThreshold: 8 * (sensorParams.rgCompassExternal[index] ? 1 : 2)
+ property real yellowMaxThreshold: 15 * (sensorParams.rgCompassExternal[index] ? 1 : 2)
+ property real fitnessRange: 25 * (sensorParams.rgCompassExternal[index] ? 1 : 2)
- QGCFlickable {
- anchors.topMargin: ScreenTools.defaultFontPixelHeight
- anchors.top: showValues.bottom
- anchors.bottom: parent.bottom
- contentHeight: valueColumn.height
- flickableDirection: Flickable.VerticalFlick
- visible: showValues.checked
+ Item {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: ScreenTools.defaultFontPixelHeight
- Column {
- id: valueColumn
+ Row {
+ id: fitnessRow
+ anchors.fill: parent
+
+ Rectangle {
+ width: parent.width * (greenMaxThreshold / fitnessRange)
+ height: parent.height
+ color: "green"
+ }
+ Rectangle {
+ width: parent.width * ((yellowMaxThreshold - greenMaxThreshold) / fitnessRange)
+ height: parent.height
+ color: "yellow"
+ }
+ Rectangle {
+ width: parent.width * ((fitnessRange - yellowMaxThreshold) / fitnessRange)
+ height: parent.height
+ color: "red"
+ }
+ }
- Repeater {
- model: _postCalibrationDialogParams
+ Rectangle {
+ height: fitnessRow.height * 0.66
+ width: height
+ anchors.verticalCenter: fitnessRow.verticalCenter
+ x: (fitnessRow.width * (Math.min(Math.max(controller.rgCompassCalFitness[index], 0.0), fitnessRange) / fitnessRange)) - (width / 2)
+ radius: height / 2
+ color: "white"
+ border.color: "black"
+ }
+ }
+
+ Column {
+ anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: Math.round(ScreenTools.defaultFontPixelHeight / 4)
QGCLabel {
- text: fact.name +": " + fact.valueString
+ text: "Compass " + (index+1) + " " +
+ (sensorParams.rgCompassPrimary[index] ? "(primary" : "(secondary") +
+ (sensorParams.rgCompassExternalParamAvailable[index] ?
+ (sensorParams.rgCompassExternal[index] ? ", external" : ", internal" ) :
+ "") +
+ ")"
+ }
- property Fact fact: controller.getParameterFact(-1, modelData)
+ FactCheckBox {
+ text: "Use Compass"
+ fact: sensorParams.rgCompassUseFact[index]
+ visible: sensorParams.rgCompassUseParamAvailable[index] && !sensorParams.rgCompassPrimary[index]
}
}
}
}
- }
- }
- Component {
- id: orientationsDialogComponent
+ Component {
+ id: postOnboardCompassCalibrationComponent
- QGCViewDialog {
- id: orientationsDialog
+ QGCViewDialog {
+ Column {
+ anchors.margins: ScreenTools.defaultFontPixelWidth
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: ScreenTools.defaultFontPixelHeight
- function accept() {
- if (_orientationDialogCalType == _calTypeAccel) {
- controller.calibrateAccel()
- } else if (_orientationDialogCalType == _calTypeCompass) {
- controller.calibrateCompass()
+ Repeater {
+ model: 3
+ delegate: singleCompassOnboardResultsComponent
+ }
+
+ QGCLabel {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode: Text.WordWrap
+ text: qsTr("Shown in the indicator bars is the quality of the calibration for each compass.\n\n") +
+ qsTr("- Green indicates a well functioning compass.\n") +
+ qsTr("- Yellow indicates a questionable compass or calibration.\n") +
+ qsTr("- Red indicates a compass which should not be used.\n\n") +
+ qsTr("YOU MUST REBOOT YOUR VEHICLE AFTER EACH CALIBRATION.")
+ }
+ }
}
- orientationsDialog.hideDialog()
}
- QGCFlickable {
- anchors.fill: parent
- contentHeight: columnLayout.height
- clip: true
+ Component {
+ id: singleCompassSettingsComponent
Column {
- id: columnLayout
- anchors.margins: ScreenTools.defaultFontPixelWidth
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- spacing: ScreenTools.defaultFontPixelHeight
+ spacing: Math.round(ScreenTools.defaultFontPixelHeight / 2)
+ visible: sensorParams.rgCompassAvailable[index]
QGCLabel {
- width: parent.width
- wrapMode: Text.WordWrap
- text: _orientationDialogHelp
+ text: "Compass " + (index+1) + " " +
+ (sensorParams.rgCompassPrimary[index] ? "(primary" : "(secondary") +
+ (sensorParams.rgCompassExternalParamAvailable[index] ?
+ (sensorParams.rgCompassExternal[index] ? ", external" : ", internal" ) :
+ "") +
+ ")"
}
Column {
- QGCLabel {
- text: qsTr("Autopilot Orientation:")
- }
-
- FactComboBox {
- width: rotationColumnWidth
- indexModel: false
- fact: boardRot
- }
- }
-
- Column {
- visible: _orientationsDialogShowCompass && showCompass1
+ anchors.margins: ScreenTools.defaultFontPixelWidth * 2
+ anchors.left: parent.left
+ spacing: Math.round(ScreenTools.defaultFontPixelHeight / 4)
FactCheckBox {
- text: "Use Compass 1"
- fact: compass1UseFact
+ text: "Use Compass"
+ fact: sensorParams.rgCompassUseFact[index]
+ visible: sensorParams.rgCompassUseParamAvailable[index] && !sensorParams.rgCompassPrimary[index]
}
Column {
- visible: showCompass1Rot
+ visible: sensorParams.rgCompassExternal[index] && sensorParams.rgCompassRotParamAvailable[index]
- QGCLabel {
- text: qsTr("Compass 1 Orientation:")
- }
+ QGCLabel { text: qsTr("Orientation:") }
FactComboBox {
width: rotationColumnWidth
indexModel: false
- fact: compass1Rot
+ fact: sensorParams.rgCompassRotFact[index]
}
}
}
+ }
+ }
- Column {
- visible: _orientationsDialogShowCompass && showCompass2
+ Component {
+ id: orientationsDialogComponent
- FactCheckBox {
- text: "Use Compass 2"
- fact: compass2UseFact
+ QGCViewDialog {
+ id: orientationsDialog
+
+ function accept() {
+ if (_orientationDialogCalType == _calTypeAccel) {
+ controller.calibrateAccel()
+ } else if (_orientationDialogCalType == _calTypeCompass) {
+ controller.calibrateCompass()
}
+ orientationsDialog.hideDialog()
+ }
+
+ QGCFlickable {
+ anchors.fill: parent
+ contentHeight: columnLayout.height
+ clip: true
Column {
- visible: showCompass1Rot
+ id: columnLayout
+ anchors.margins: ScreenTools.defaultFontPixelWidth
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
- text: qsTr("Compass 2 Orientation:")
+ width: parent.width
+ wrapMode: Text.WordWrap
+ text: _orientationDialogHelp
}
- FactComboBox {
- width: rotationColumnWidth
- indexModel: false
- fact: compass2Rot
+ Column {
+ QGCLabel { text: qsTr("Autopilot Orientation:") }
+
+ FactComboBox {
+ width: rotationColumnWidth
+ indexModel: false
+ fact: boardRot
+ }
}
- }
- }
- Column {
- visible: _orientationsDialogShowCompass && showCompass3
+ Repeater {
+ model: _orientationsDialogShowCompass ? 3 : 0
+ delegate: singleCompassSettingsComponent
+ }
+ } // Column
+ } // QGCFlickable
+ } // QGCViewDialog
+ } // Component - orientationsDialogComponent
- FactCheckBox {
- text: "Use Compass 3"
- fact: compass3UseFact
- }
+ Component {
+ id: compassMotDialogComponent
+
+ QGCViewDialog {
+ id: compassMotDialog
+
+ function accept() {
+ controller.calibrateMotorInterference()
+ compassMotDialog.hideDialog()
+ }
+
+ QGCFlickable {
+ anchors.fill: parent
+ contentHeight: columnLayout.height
+ clip: true
Column {
- visible: showCompass3Rot
+ id: columnLayout
+ anchors.margins: ScreenTools.defaultFontPixelWidth
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
- text: qsTr("Compass 3 Orientation:")
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode: Text.WordWrap
+ text: "This is recommended for vehicles that have only an internal compass and on vehicles where there is significant interference on the compass from the motors, power wires, etc. " +
+ "CompassMot only works well if you have a battery current monitor because the magnetic interference is linear with current drawn. " +
+ "It is technically possible to set-up CompassMot using throttle but this is not recommended."
}
- FactComboBox {
- width: rotationColumnWidth
- indexModel: false
- fact: compass3Rot
+ QGCLabel {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode: Text.WordWrap
+ text: "Disconnect your props, flip them over and rotate them one position around the frame. " +
+ "In this configuration they should push the copter down into the ground when the throttle is raised."
}
- }
- }
- } // Column
- } // QGCFlickable
- } // QGCViewDialog
- } // Component - orientationsDialogComponent
- Component {
- id: compassMotDialogComponent
+ QGCLabel {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode: Text.WordWrap
+ text: "Secure the copter (perhaps with tape) so that it does not move."
+ }
- QGCViewDialog {
- id: compassMotDialog
+ QGCLabel {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode: Text.WordWrap
+ text: "Turn on your transmitter and keep throttle at zero."
+ }
- function accept() {
- controller.calibrateMotorInterference()
- compassMotDialog.hideDialog()
- }
+ QGCLabel {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode: Text.WordWrap
+ text: "Click Ok to start CompassMot calibration."
+ }
+ } // Column
+ } // QGCFlickable
+ } // QGCViewDialog
+ } // Component - compassMotDialogComponent
- QGCFlickable {
- anchors.fill: parent
- contentHeight: columnLayout.height
- clip: true
+ Component {
+ id: levelHorizonDialogComponent
- Column {
- id: columnLayout
- anchors.margins: ScreenTools.defaultFontPixelWidth
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- spacing: ScreenTools.defaultFontPixelHeight
+ QGCViewDialog {
+ id: levelHorizonDialog
- QGCLabel {
- anchors.left: parent.left
- anchors.right: parent.right
- wrapMode: Text.WordWrap
- text: "This is recommended for vehicles that have only an internal compass and on vehicles where there is significant interference on the compass from the motors, power wires, etc. " +
- "CompassMot only works well if you have a battery current monitor because the magnetic interference is linear with current drawn. " +
- "It is technically possible to set-up CompassMot using throttle but this is not recommended."
+ function accept() {
+ controller.levelHorizon()
+ levelHorizonDialog.hideDialog()
}
QGCLabel {
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
- text: "Disconnect your props, flip them over and rotate them one position around the frame. " +
- "In this configuration they should push the copter down into the ground when the throttle is raised."
+ text: qsTr("To level the horizon you need to place the vehicle in its level flight position and press Ok.")
}
+ } // QGCViewDialog
+ } // Component - levelHorizonDialogComponent
- QGCLabel {
- anchors.left: parent.left
- anchors.right: parent.right
- wrapMode: Text.WordWrap
- text: "Secure the copter (perhaps with tape) so that it does not move."
- }
+ Component {
+ id: calibratePressureDialogComponent
- QGCLabel {
- anchors.left: parent.left
- anchors.right: parent.right
- wrapMode: Text.WordWrap
- text: "Turn on your transmitter and keep throttle at zero."
+ QGCViewDialog {
+ id: calibratePressureDialog
+
+ function accept() {
+ controller.calibratePressure()
+ calibratePressureDialog.hideDialog()
}
QGCLabel {
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
- text: "Click Ok to start CompassMot calibration."
+ text: qsTr("Pressure calibration will set the depth to zero at the current pressure reading.")
}
- } // Column
- } // QGCFlickable
- } // QGCViewDialog
- }
+ } // QGCViewDialog
+ } // Component - calibratePressureDialogComponent
- QGCViewPanel {
- id: panel
- anchors.fill: parent
+ /// Left button column
+ Column {
+ spacing: ScreenTools.defaultFontPixelHeight / 2
+ Layout.alignment: Qt.AlignLeft | Qt.AlignTop
- Column {
- id: buttonColumn
- spacing: ScreenTools.defaultFontPixelHeight / 2
+ readonly property int buttonWidth: ScreenTools.defaultFontPixelWidth * 15
- readonly property int buttonWidth: ScreenTools.defaultFontPixelWidth * 15
+ IndicatorButton {
+ id: accelButton
+ width: parent.buttonWidth
+ text: qsTr("Accelerometer")
+ indicatorGreen: !accelCalNeeded
- IndicatorButton {
- id: accelButton
- width: parent.buttonWidth
- text: qsTr("Accelerometer")
- indicatorGreen: !accelCalNeeded
+ onClicked: showOrientationsDialog(_calTypeAccel)
+ }
- onClicked: showOrientationsDialog(_calTypeAccel)
- }
+ IndicatorButton {
+ id: compassButton
+ width: parent.buttonWidth
+ text: qsTr("Compass")
+ indicatorGreen: !compassCalNeeded
+
+ onClicked: {
+ if (controller.accelSetupNeeded) {
+ showMessage(qsTr("Calibrate Compass"), qsTr("Accelerometer must be calibrated prior to Compass."), StandardButton.Ok)
+ } else {
+ showOrientationsDialog(_calTypeCompass)
+ }
+ }
+ }
- IndicatorButton {
- id: compassButton
- width: parent.buttonWidth
- text: qsTr("Compass")
- indicatorGreen: !compassCalNeeded
+ QGCButton {
+ id: levelHorizonButton
+ width: parent.buttonWidth
+ text: _levelHorizonText
- onClicked: {
- if (controller.accelSetupNeeded) {
- showMessage(qsTr("Calibrate Compass"), qsTr("Accelerometer must be calibrated prior to Compass."), StandardButton.Ok)
- } else {
- showOrientationsDialog(_calTypeCompass)
+ readonly property string _levelHorizonText: qsTr("Level Horizon")
+
+ onClicked: {
+ if (controller.accelSetupNeeded) {
+ showMessage(_levelHorizonText, qsTr("Accelerometer must be calibrated prior to Level Horizon."), StandardButton.Ok)
+ } else {
+ showDialog(levelHorizonDialogComponent, _levelHorizonText, qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
+ }
}
}
- }
- QGCButton {
- id: motorInterferenceButton
- width: parent.buttonWidth
- text: qsTr("CompassMot")
- onClicked: showDialog(compassMotDialogComponent, qsTr("CompassMot - Compass Motor Interference Calibration"), qgcView.showDialogFullWidth, StandardButton.Cancel | StandardButton.Ok)
- }
+ QGCButton {
+ id: calibratePressureButton
+ width: parent.buttonWidth
+ text: _calibratePressureText
+ visible: _activeVehicle ? _activeVehicle.supportsCalibratePressure : false
- QGCButton {
- id: nextButton
- width: parent.buttonWidth
- text: qsTr("Next")
- enabled: false
- onClicked: controller.nextClicked()
- }
+ readonly property string _calibratePressureText: qsTr("Calibrate Pressure")
+ property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
- QGCButton {
- id: cancelButton
- width: parent.buttonWidth
- text: qsTr("Cancel")
- enabled: false
- onClicked: controller.cancelCalibration()
- }
+ onClicked: {
+ showDialog(calibratePressureDialogComponent, _calibratePressureText, qgcView.showDialogDefaultWidth, StandardButton.Cancel | StandardButton.Ok)
+ }
+ }
- QGCButton {
- id: setOrientationsButton
- width: parent.buttonWidth
- text: qsTr("Sensor Settings")
- onClicked: showOrientationsDialog(_calTypeSet)
- }
- } // Column - Buttons
-
- Column {
- anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 2
- anchors.left: buttonColumn.right
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: parent.bottom
-
- ProgressBar {
- id: progressBar
- anchors.left: parent.left
- anchors.right: parent.right
- }
+ QGCButton {
+ id: motorInterferenceButton
+ width: parent.buttonWidth
+ text: qsTr("CompassMot")
+ visible: _activeVehicle ? _activeVehicle.supportsMotorInterference : false
- Item { height: ScreenTools.defaultFontPixelHeight; width: 10 } // spacer
+ property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
- Item {
- id: centerPanel
- width: parent.width
- height: parent.height - y
+ onClicked: showDialog(compassMotDialogComponent, qsTr("CompassMot - Compass Motor Interference Calibration"), qgcView.showDialogFullWidth, StandardButton.Cancel | StandardButton.Ok)
+ }
- TextArea {
- id: statusTextArea
- anchors.fill: parent
- readOnly: true
- frameVisible: false
- text: statusTextAreaDefaultText
+ QGCButton {
+ id: nextButton
+ width: parent.buttonWidth
+ text: qsTr("Next")
+ enabled: false
+ onClicked: controller.nextClicked()
+ }
- style: TextAreaStyle {
- textColor: qgcPal.text
- backgroundColor: qgcPal.windowShade
- }
+ QGCButton {
+ id: cancelButton
+ width: parent.buttonWidth
+ text: qsTr("Cancel")
+ enabled: false
+ onClicked: controller.cancelCalibration()
}
- Rectangle {
- id: orientationCalArea
- anchors.fill: parent
- visible: controller.showOrientationCalArea
- color: qgcPal.windowShade
+ QGCButton {
+ id: setOrientationsButton
+ width: parent.buttonWidth
+ text: qsTr("Sensor Settings")
+ onClicked: showOrientationsDialog(_calTypeSet)
+ }
+ } // Column - Buttons
- QGCLabel {
- id: orientationCalAreaHelpText
- anchors.margins: ScreenTools.defaultFontPixelWidth
- anchors.top: orientationCalArea.top
- anchors.left: orientationCalArea.left
- width: parent.width
- wrapMode: Text.WordWrap
- font.pointSize: ScreenTools.mediumFontPointSize
- }
+ /// Right column - cal area
+ Column {
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ Layout.fillWidth: true
- Flow {
- anchors.topMargin: ScreenTools.defaultFontPixelWidth
- anchors.top: orientationCalAreaHelpText.bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- spacing: ScreenTools.defaultFontPixelWidth
-
- property real indicatorWidth: (width / 3) - (spacing * 2)
- property real indicatorHeight: (height / 2) - spacing
-
- VehicleRotationCal {
- width: parent.indicatorWidth
- height: parent.indicatorHeight
- visible: controller.orientationCalDownSideVisible
- calValid: controller.orientationCalDownSideDone
- calInProgress: controller.orientationCalDownSideInProgress
- calInProgressText: controller.orientationCalDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
- imageSource: controller.orientationCalDownSideRotate ? "qrc:///qmlimages/VehicleDownRotate.png" : "qrc:///qmlimages/VehicleDown.png"
- }
- VehicleRotationCal {
- width: parent.indicatorWidth
- height: parent.indicatorHeight
- visible: controller.orientationCalUpsideDownSideVisible
- calValid: controller.orientationCalUpsideDownSideDone
- calInProgress: controller.orientationCalUpsideDownSideInProgress
- calInProgressText: controller.orientationCalUpsideDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
- imageSource: controller.orientationCalUpsideDownSideRotate ? "qrc:///qmlimages/VehicleUpsideDownRotate.png" : "qrc:///qmlimages/VehicleUpsideDown.png"
- }
- VehicleRotationCal {
- width: parent.indicatorWidth
- height: parent.indicatorHeight
- visible: controller.orientationCalNoseDownSideVisible
- calValid: controller.orientationCalNoseDownSideDone
- calInProgress: controller.orientationCalNoseDownSideInProgress
- calInProgressText: controller.orientationCalNoseDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
- imageSource: controller.orientationCalNoseDownSideRotate ? "qrc:///qmlimages/VehicleNoseDownRotate.png" : "qrc:///qmlimages/VehicleNoseDown.png"
- }
- VehicleRotationCal {
- width: parent.indicatorWidth
- height: parent.indicatorHeight
- visible: controller.orientationCalTailDownSideVisible
- calValid: controller.orientationCalTailDownSideDone
- calInProgress: controller.orientationCalTailDownSideInProgress
- calInProgressText: controller.orientationCalTailDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
- imageSource: controller.orientationCalTailDownSideRotate ? "qrc:///qmlimages/VehicleTailDownRotate.png" : "qrc:///qmlimages/VehicleTailDown.png"
+ ProgressBar {
+ id: progressBar
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+
+ Item { height: ScreenTools.defaultFontPixelHeight; width: 10 } // spacer
+
+ Item {
+ id: centerPanel
+ width: parent.width
+ height: parent.height - y
+
+ TextArea {
+ id: statusTextArea
+ anchors.fill: parent
+ readOnly: true
+ frameVisible: false
+ text: statusTextAreaDefaultText
+
+ style: TextAreaStyle {
+ textColor: qgcPal.text
+ backgroundColor: qgcPal.windowShade
}
- VehicleRotationCal {
- width: parent.indicatorWidth
- height: parent.indicatorHeight
- visible: controller.orientationCalLeftSideVisible
- calValid: controller.orientationCalLeftSideDone
- calInProgress: controller.orientationCalLeftSideInProgress
- calInProgressText: controller.orientationCalLeftSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
- imageSource: controller.orientationCalLeftSideRotate ? "qrc:///qmlimages/VehicleLeftRotate.png" : "qrc:///qmlimages/VehicleLeft.png"
+ }
+
+ Rectangle {
+ id: orientationCalArea
+ anchors.fill: parent
+ visible: controller.showOrientationCalArea
+ color: qgcPal.windowShade
+
+ QGCLabel {
+ id: orientationCalAreaHelpText
+ anchors.margins: ScreenTools.defaultFontPixelWidth
+ anchors.top: orientationCalArea.top
+ anchors.left: orientationCalArea.left
+ width: parent.width
+ wrapMode: Text.WordWrap
+ font.pointSize: ScreenTools.mediumFontPointSize
}
- VehicleRotationCal {
- width: parent.indicatorWidth
- height: parent.indicatorHeight
- visible: controller.orientationCalRightSideVisible
- calValid: controller.orientationCalRightSideDone
- calInProgress: controller.orientationCalRightSideInProgress
- calInProgressText: controller.orientationCalRightSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
- imageSource: controller.orientationCalRightSideRotate ? "qrc:///qmlimages/VehicleRightRotate.png" : "qrc:///qmlimages/VehicleRight.png"
+
+ Flow {
+ anchors.topMargin: ScreenTools.defaultFontPixelWidth
+ anchors.top: orientationCalAreaHelpText.bottom
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: ScreenTools.defaultFontPixelWidth
+
+ property real indicatorWidth: (width / 3) - (spacing * 2)
+ property real indicatorHeight: (height / 2) - spacing
+
+ VehicleRotationCal {
+ width: parent.indicatorWidth
+ height: parent.indicatorHeight
+ visible: controller.orientationCalDownSideVisible
+ calValid: controller.orientationCalDownSideDone
+ calInProgress: controller.orientationCalDownSideInProgress
+ calInProgressText: controller.orientationCalDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
+ imageSource: controller.orientationCalDownSideRotate ? "qrc:///qmlimages/VehicleDownRotate.png" : "qrc:///qmlimages/VehicleDown.png"
+ }
+ VehicleRotationCal {
+ width: parent.indicatorWidth
+ height: parent.indicatorHeight
+ visible: controller.orientationCalUpsideDownSideVisible
+ calValid: controller.orientationCalUpsideDownSideDone
+ calInProgress: controller.orientationCalUpsideDownSideInProgress
+ calInProgressText: controller.orientationCalUpsideDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
+ imageSource: controller.orientationCalUpsideDownSideRotate ? "qrc:///qmlimages/VehicleUpsideDownRotate.png" : "qrc:///qmlimages/VehicleUpsideDown.png"
+ }
+ VehicleRotationCal {
+ width: parent.indicatorWidth
+ height: parent.indicatorHeight
+ visible: controller.orientationCalNoseDownSideVisible
+ calValid: controller.orientationCalNoseDownSideDone
+ calInProgress: controller.orientationCalNoseDownSideInProgress
+ calInProgressText: controller.orientationCalNoseDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
+ imageSource: controller.orientationCalNoseDownSideRotate ? "qrc:///qmlimages/VehicleNoseDownRotate.png" : "qrc:///qmlimages/VehicleNoseDown.png"
+ }
+ VehicleRotationCal {
+ width: parent.indicatorWidth
+ height: parent.indicatorHeight
+ visible: controller.orientationCalTailDownSideVisible
+ calValid: controller.orientationCalTailDownSideDone
+ calInProgress: controller.orientationCalTailDownSideInProgress
+ calInProgressText: controller.orientationCalTailDownSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
+ imageSource: controller.orientationCalTailDownSideRotate ? "qrc:///qmlimages/VehicleTailDownRotate.png" : "qrc:///qmlimages/VehicleTailDown.png"
+ }
+ VehicleRotationCal {
+ width: parent.indicatorWidth
+ height: parent.indicatorHeight
+ visible: controller.orientationCalLeftSideVisible
+ calValid: controller.orientationCalLeftSideDone
+ calInProgress: controller.orientationCalLeftSideInProgress
+ calInProgressText: controller.orientationCalLeftSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
+ imageSource: controller.orientationCalLeftSideRotate ? "qrc:///qmlimages/VehicleLeftRotate.png" : "qrc:///qmlimages/VehicleLeft.png"
+ }
+ VehicleRotationCal {
+ width: parent.indicatorWidth
+ height: parent.indicatorHeight
+ visible: controller.orientationCalRightSideVisible
+ calValid: controller.orientationCalRightSideDone
+ calInProgress: controller.orientationCalRightSideInProgress
+ calInProgressText: controller.orientationCalRightSideRotate ? qsTr("Rotate") : qsTr("Hold Still")
+ imageSource: controller.orientationCalRightSideRotate ? "qrc:///qmlimages/VehicleRightRotate.png" : "qrc:///qmlimages/VehicleRight.png"
+ }
}
}
- }
- } // Item - Cal display area
- } // Column - cal display
- } // QGCViewPanel
-} // QGCView
+ } // Item - Cal display area
+ } // Column - cal display
+ } // Row
+ } // Component - sensorsPageComponent
+} // SetupPage
diff --git a/src/AutoPilotPlugins/APM/APMSensorsComponentController.cc b/src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
index c887663043e0d0d9d0dbf2c48abe3b350f0be06d..c951904a0fbc1a5a89cbb896dfb987fb63e78684 100644
--- a/src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
+++ b/src/AutoPilotPlugins/APM/APMSensorsComponentController.cc
@@ -19,45 +19,49 @@
#include
QGC_LOGGING_CATEGORY(APMSensorsComponentControllerLog, "APMSensorsComponentControllerLog")
-
-APMSensorsComponentController::APMSensorsComponentController(void) :
- _statusLog(NULL),
- _progressBar(NULL),
- _compassButton(NULL),
- _accelButton(NULL),
- _compassMotButton(NULL),
- _nextButton(NULL),
- _cancelButton(NULL),
- _setOrientationsButton(NULL),
- _showOrientationCalArea(false),
- _magCalInProgress(false),
- _accelCalInProgress(false),
- _compassMotCalInProgress(false),
- _orientationCalDownSideDone(false),
- _orientationCalUpsideDownSideDone(false),
- _orientationCalLeftSideDone(false),
- _orientationCalRightSideDone(false),
- _orientationCalNoseDownSideDone(false),
- _orientationCalTailDownSideDone(false),
- _orientationCalDownSideVisible(false),
- _orientationCalUpsideDownSideVisible(false),
- _orientationCalLeftSideVisible(false),
- _orientationCalRightSideVisible(false),
- _orientationCalNoseDownSideVisible(false),
- _orientationCalTailDownSideVisible(false),
- _orientationCalDownSideInProgress(false),
- _orientationCalUpsideDownSideInProgress(false),
- _orientationCalLeftSideInProgress(false),
- _orientationCalRightSideInProgress(false),
- _orientationCalNoseDownSideInProgress(false),
- _orientationCalTailDownSideInProgress(false),
- _orientationCalDownSideRotate(false),
- _orientationCalUpsideDownSideRotate(false),
- _orientationCalLeftSideRotate(false),
- _orientationCalRightSideRotate(false),
- _orientationCalNoseDownSideRotate(false),
- _orientationCalTailDownSideRotate(false),
- _waitingForCancel(false)
+QGC_LOGGING_CATEGORY(APMSensorsComponentControllerVerboseLog, "APMSensorsComponentControllerVerboseLog")
+
+const char* APMSensorsComponentController::_compassCalFitnessParam = "COMPASS_CAL_FIT";
+
+APMSensorsComponentController::APMSensorsComponentController(void)
+ : _statusLog(NULL)
+ , _progressBar(NULL)
+ , _compassButton(NULL)
+ , _accelButton(NULL)
+ , _compassMotButton(NULL)
+ , _levelButton(NULL)
+ , _calibratePressureButton(NULL)
+ , _nextButton(NULL)
+ , _cancelButton(NULL)
+ , _setOrientationsButton(NULL)
+ , _showOrientationCalArea(false)
+ , _calTypeInProgress(CalTypeNone)
+ , _orientationCalDownSideDone(false)
+ , _orientationCalUpsideDownSideDone(false)
+ , _orientationCalLeftSideDone(false)
+ , _orientationCalRightSideDone(false)
+ , _orientationCalNoseDownSideDone(false)
+ , _orientationCalTailDownSideDone(false)
+ , _orientationCalDownSideVisible(false)
+ , _orientationCalUpsideDownSideVisible(false)
+ , _orientationCalLeftSideVisible(false)
+ , _orientationCalRightSideVisible(false)
+ , _orientationCalNoseDownSideVisible(false)
+ , _orientationCalTailDownSideVisible(false)
+ , _orientationCalDownSideInProgress(false)
+ , _orientationCalUpsideDownSideInProgress(false)
+ , _orientationCalLeftSideInProgress(false)
+ , _orientationCalRightSideInProgress(false)
+ , _orientationCalNoseDownSideInProgress(false)
+ , _orientationCalTailDownSideInProgress(false)
+ , _orientationCalDownSideRotate(false)
+ , _orientationCalUpsideDownSideRotate(false)
+ , _orientationCalLeftSideRotate(false)
+ , _orientationCalRightSideRotate(false)
+ , _orientationCalNoseDownSideRotate(false)
+ , _orientationCalTailDownSideRotate(false)
+ , _waitingForCancel(false)
+ , _restoreCompassCalFitness(false)
{
_compassCal.setVehicle(_vehicle);
connect(&_compassCal, &APMCompassCal::vehicleTextMessage, this, &APMSensorsComponentController::_handleUASTextMessage);
@@ -66,6 +70,13 @@ APMSensorsComponentController::APMSensorsComponentController(void) :
_sensorsComponent = apmPlugin->sensorsComponent();
connect(_sensorsComponent, &VehicleComponent::setupCompleteChanged, this, &APMSensorsComponentController::setupNeededChanged);
+
+ connect(qgcApp()->toolbox()->mavlinkProtocol(), &MAVLinkProtocol::messageReceived, this, &APMSensorsComponentController::_mavlinkMessageReceived);
+}
+
+APMSensorsComponentController::~APMSensorsComponentController()
+{
+ _restorePreviousCompassCalFitness();
}
/// Appends the specified text to the status log area in the ui
@@ -90,11 +101,13 @@ void APMSensorsComponentController::_startLogCalibration(void)
_compassButton->setEnabled(false);
_accelButton->setEnabled(false);
_compassMotButton->setEnabled(false);
+ _levelButton->setEnabled(false);
+ _calibratePressureButton->setEnabled(false);
_setOrientationsButton->setEnabled(false);
- if (_accelCalInProgress || _compassMotCalInProgress) {
+ if (_calTypeInProgress == CalTypeAccel || _calTypeInProgress == CalTypeCompassMot) {
_nextButton->setEnabled(true);
}
- _cancelButton->setEnabled(false);
+ _cancelButton->setEnabled(_calTypeInProgress == CalTypeOnboardCompass);
}
void APMSensorsComponentController::_startVisualCalibration(void)
@@ -102,6 +115,8 @@ void APMSensorsComponentController::_startVisualCalibration(void)
_compassButton->setEnabled(false);
_accelButton->setEnabled(false);
_compassMotButton->setEnabled(false);
+ _levelButton->setEnabled(false);
+ _calibratePressureButton->setEnabled(false);
_setOrientationsButton->setEnabled(false);
_cancelButton->setEnabled(true);
@@ -145,13 +160,22 @@ void APMSensorsComponentController::_stopCalibration(APMSensorsComponentControll
_compassButton->setEnabled(true);
_accelButton->setEnabled(true);
_compassMotButton->setEnabled(true);
+ _levelButton->setEnabled(true);
+ _calibratePressureButton->setEnabled(true);
_setOrientationsButton->setEnabled(true);
_nextButton->setEnabled(false);
_cancelButton->setEnabled(false);
+ if (_calTypeInProgress == CalTypeOnboardCompass) {
+ _restorePreviousCompassCalFitness();
+ }
+
if (code == StopCalibrationSuccess) {
_resetInternalState();
_progressBar->setProperty("value", 1);
+ if (parameterExists(FactSystem::defaultComponentId, QStringLiteral("COMPASS_LEARN"))) {
+ getParameterFact(FactSystem::defaultComponentId, QStringLiteral("COMPASS_LEARN"))->setRawValue(0);
+ }
} else {
_progressBar->setProperty("value", 0);
}
@@ -165,7 +189,11 @@ void APMSensorsComponentController::_stopCalibration(APMSensorsComponentControll
case StopCalibrationSuccess:
_orientationCalAreaHelpText->setProperty("text", "Calibration complete");
emit resetStatusTextArea();
- emit calibrationComplete();
+ emit calibrationComplete(_calTypeInProgress);
+ break;
+
+ case StopCalibrationSuccessShowLog:
+ emit calibrationComplete(_calTypeInProgress);
break;
case StopCalibrationCancelled:
@@ -180,20 +208,95 @@ void APMSensorsComponentController::_stopCalibration(APMSensorsComponentControll
break;
}
- _magCalInProgress = false;
- _accelCalInProgress = false;
- _compassMotCalInProgress = false;
+ _calTypeInProgress = CalTypeNone;
+}
+
+void APMSensorsComponentController::_mavCommandResult(int vehicleId, int component, int command, int result, bool noReponseFromVehicle)
+{
+ Q_UNUSED(component);
+ Q_UNUSED(noReponseFromVehicle);
+
+ if (_vehicle->id() != vehicleId) {
+ return;
+ }
+
+ if (command == MAV_CMD_DO_CANCEL_MAG_CAL) {
+ disconnect(_vehicle, &Vehicle::mavCommandResult, this, &APMSensorsComponentController::_mavCommandResult);
+ if (result == MAV_RESULT_ACCEPTED) {
+ // Onboard mag cal is supported
+ _calTypeInProgress = CalTypeOnboardCompass;
+ _rgCompassCalProgress[0] = 0;
+ _rgCompassCalProgress[1] = 0;
+ _rgCompassCalProgress[2] = 0;
+ _rgCompassCalComplete[0] = false;
+ _rgCompassCalComplete[1] = false;
+ _rgCompassCalComplete[2] = false;
+
+ _startLogCalibration();
+ uint8_t compassBits = 0;
+ if (getParameterFact(FactSystem::defaultComponentId, "COMPASS_DEV_ID")->rawValue().toInt() > 0) {
+ compassBits |= 1 << 0;
+ qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 1";
+ } else {
+ _rgCompassCalComplete[0] = true;
+ _rgCompassCalSucceeded[0] = true;
+ _rgCompassCalFitness[0] = 0;
+ }
+ if (getParameterFact(FactSystem::defaultComponentId, "COMPASS_DEV_ID2")->rawValue().toInt() > 0) {
+ compassBits |= 1 << 1;
+ qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 2";
+ } else {
+ _rgCompassCalComplete[1] = true;
+ _rgCompassCalSucceeded[1] = true;
+ _rgCompassCalFitness[1] = 0;
+ }
+ if (getParameterFact(FactSystem::defaultComponentId, "COMPASS_DEV_ID3")->rawValue().toInt() > 0) {
+ compassBits |= 1 << 2;
+ qCDebug(APMSensorsComponentControllerLog) << "Performing onboard compass cal for compass 3";
+ } else {
+ _rgCompassCalComplete[2] = true;
+ _rgCompassCalSucceeded[2] = true;
+ _rgCompassCalFitness[2] = 0;
+ }
+
+ // We bump up the fitness value so calibration will always succeed
+ Fact* compassCalFitness = getParameterFact(FactSystem::defaultComponentId, _compassCalFitnessParam);
+ _restoreCompassCalFitness = true;
+ _previousCompassCalFitness = compassCalFitness->rawValue().toFloat();
+ getParameterFact(FactSystem::defaultComponentId, _compassCalFitnessParam)->setRawValue(100.0);
+
+ _appendStatusLog(tr("Rotate the vehicle randomly around all axes until the progress bar fills all the way to the right ."));
+ _vehicle->sendMavCommand(_vehicle->defaultComponentId(),
+ MAV_CMD_DO_START_MAG_CAL,
+ true, // showError
+ compassBits, // which compass(es) to calibrate
+ 0, // no retry on failure
+ 1, // save values after complete
+ 0, // no delayed start
+ 0); // no auto-reboot
+
+ } else {
+ // Onboard mag cal is not supported
+ _compassCal.startCalibration();
+ }
+ } else if (command == MAV_CMD_DO_START_MAG_CAL && result != MAV_RESULT_ACCEPTED) {
+ _restorePreviousCompassCalFitness();
+ }
}
void APMSensorsComponentController::calibrateCompass(void)
{
- _startLogCalibration();
- _compassCal.startCalibration();
+ // First we need to determine if the vehicle support onboard compass cal. There isn't an easy way to
+ // do this. A hack is to send the mag cancel command and see if it is accepted.
+ connect(_vehicle, &Vehicle::mavCommandResult, this, &APMSensorsComponentController::_mavCommandResult);
+ _vehicle->sendMavCommand(_vehicle->defaultComponentId(), MAV_CMD_DO_CANCEL_MAG_CAL, false /* showError */);
+
+ // Now we wait for the result to come back
}
void APMSensorsComponentController::calibrateAccel(void)
{
- _accelCalInProgress = true;
+ _calTypeInProgress = CalTypeAccel;
_vehicle->setConnectionLostEnabled(false);
_startLogCalibration();
_uas->startCalibration(UASInterface::StartCalibrationAccel);
@@ -201,7 +304,7 @@ void APMSensorsComponentController::calibrateAccel(void)
void APMSensorsComponentController::calibrateMotorInterference(void)
{
- _compassMotCalInProgress = true;
+ _calTypeInProgress = CalTypeCompassMot;
_vehicle->setConnectionLostEnabled(false);
_startLogCalibration();
_appendStatusLog(tr("Raise the throttle slowly to between 50% ~ 75% (the props will spin!) for 5 ~ 10 seconds."));
@@ -210,6 +313,24 @@ void APMSensorsComponentController::calibrateMotorInterference(void)
_uas->startCalibration(UASInterface::StartCalibrationCompassMot);
}
+void APMSensorsComponentController::levelHorizon(void)
+{
+ _calTypeInProgress = CalTypeLevelHorizon;
+ _vehicle->setConnectionLostEnabled(false);
+ _startLogCalibration();
+ _appendStatusLog(tr("Hold the vehicle in its level flight position."));
+ _uas->startCalibration(UASInterface::StartCalibrationLevel);
+}
+
+void APMSensorsComponentController::calibratePressure(void)
+{
+ _calTypeInProgress = CalTypePressure;
+ _vehicle->setConnectionLostEnabled(false);
+ _startLogCalibration();
+ _appendStatusLog(tr("Requesting pressure calibration..."));
+ _uas->startCalibration(UASInterface::StartCalibrationPressure);
+}
+
void APMSensorsComponentController::_handleUASTextMessage(int uasId, int compId, int severity, QString text)
{
Q_UNUSED(compId);
@@ -228,8 +349,7 @@ void APMSensorsComponentController::_handleUASTextMessage(int uasId, int compId,
QString percent = text.split("<").last().split(">").first();
bool ok;
int p = percent.toInt(&ok);
- if (ok) {
- Q_ASSERT(_progressBar);
+ if (ok && _progressBar) {
_progressBar->setProperty("value", (float)(p / 100.0));
}
return;
@@ -293,7 +413,7 @@ void APMSensorsComponentController::_handleUASTextMessage(int uasId, int compId,
_orientationCalAreaHelpText->setProperty("text", "Place your vehicle into one of the Incomplete orientations shown below and hold it still");
if (text == "accel") {
- _accelCalInProgress = true;
+ _calTypeInProgress = CalTypeAccel;
_orientationCalDownSideVisible = true;
_orientationCalUpsideDownSideVisible = true;
_orientationCalLeftSideVisible = true;
@@ -301,7 +421,7 @@ void APMSensorsComponentController::_handleUASTextMessage(int uasId, int compId,
_orientationCalTailDownSideVisible = true;
_orientationCalNoseDownSideVisible = true;
} else if (text == "mag") {
- _magCalInProgress = true;
+ _calTypeInProgress = CalTypeOffboardCompass;
_orientationCalDownSideVisible = true;
_orientationCalUpsideDownSideVisible = true;
_orientationCalLeftSideVisible = true;
@@ -325,37 +445,37 @@ void APMSensorsComponentController::_handleUASTextMessage(int uasId, int compId,
if (side == QLatin1Literal("down")) {
_orientationCalDownSideInProgress = true;
- if (_magCalInProgress) {
+ if (_calTypeInProgress == CalTypeOffboardCompass) {
_orientationCalDownSideRotate = true;
}
} else if (side == QLatin1Literal("up")) {
_orientationCalUpsideDownSideInProgress = true;
- if (_magCalInProgress) {
+ if (_calTypeInProgress == CalTypeOffboardCompass) {
_orientationCalUpsideDownSideRotate = true;
}
} else if (side == QLatin1Literal("left")) {
_orientationCalLeftSideInProgress = true;
- if (_magCalInProgress) {
+ if (_calTypeInProgress == CalTypeOffboardCompass) {
_orientationCalLeftSideRotate = true;
}
} else if (side == QLatin1Literal("right")) {
_orientationCalRightSideInProgress = true;
- if (_magCalInProgress) {
+ if (_calTypeInProgress == CalTypeOffboardCompass) {
_orientationCalRightSideRotate = true;
}
} else if (side == QLatin1Literal("front")) {
_orientationCalNoseDownSideInProgress = true;
- if (_magCalInProgress) {
+ if (_calTypeInProgress == CalTypeOffboardCompass) {
_orientationCalNoseDownSideRotate = true;
}
} else if (side == QLatin1Literal("back")) {
_orientationCalTailDownSideInProgress = true;
- if (_magCalInProgress) {
+ if (_calTypeInProgress == CalTypeOffboardCompass) {
_orientationCalTailDownSideRotate = true;
}
}
- if (_magCalInProgress) {
+ if (_calTypeInProgress == CalTypeOffboardCompass) {
_orientationCalAreaHelpText->setProperty("text", "Rotate the vehicle continuously as shown in the diagram until marked as Completed");
} else {
_orientationCalAreaHelpText->setProperty("text", "Hold still in the current orientation");
@@ -448,17 +568,23 @@ void APMSensorsComponentController::_hideAllCalAreas(void)
void APMSensorsComponentController::cancelCalibration(void)
{
- _waitingForCancel = true;
- emit waitingForCancelChanged();
_cancelButton->setEnabled(false);
- if (_magCalInProgress) {
+ if (_calTypeInProgress == CalTypeOffboardCompass) {
+ _waitingForCancel = true;
+ emit waitingForCancelChanged();
_compassCal.cancelCalibration();
+ } else if (_calTypeInProgress == CalTypeOnboardCompass) {
+ _vehicle->sendMavCommand(_vehicle->defaultComponentId(), MAV_CMD_DO_CANCEL_MAG_CAL, true /* showError */);
+ _stopCalibration(StopCalibrationCancelled);
} else {
+ _waitingForCancel = true;
+ emit waitingForCancelChanged();
// The firmware doesn't always allow us to cancel calibration. The best we can do is wait
// for it to timeout.
_uas->stopCalibration();
}
+
}
void APMSensorsComponentController::nextClicked(void)
@@ -476,7 +602,7 @@ void APMSensorsComponentController::nextClicked(void)
_vehicle->sendMessageOnLink(_vehicle->priorityLink(), msg);
- if (_compassMotCalInProgress) {
+ if (_calTypeInProgress == CalTypeCompassMot) {
_stopCalibration(StopCalibrationSuccess);
}
}
@@ -495,3 +621,147 @@ bool APMSensorsComponentController::usingUDPLink(void)
{
return _vehicle->priorityLink()->getLinkConfiguration()->type() == LinkConfiguration::TypeUdp;
}
+
+void APMSensorsComponentController::_handleCommandAck(mavlink_message_t& message)
+{
+ if (_calTypeInProgress == CalTypeLevelHorizon) {
+ mavlink_command_ack_t commandAck;
+ mavlink_msg_command_ack_decode(&message, &commandAck);
+
+ if (commandAck.command == MAV_CMD_PREFLIGHT_CALIBRATION) {
+ switch (commandAck.result) {
+ case MAV_RESULT_ACCEPTED:
+ _appendStatusLog(tr("Level horizon complete"));
+ _stopCalibration(StopCalibrationSuccessShowLog);
+ break;
+ default:
+ _appendStatusLog(tr("Level horizon failed"));
+ _stopCalibration(StopCalibrationFailed);
+ break;
+ }
+ }
+ }
+
+ if (_calTypeInProgress == CalTypePressure) {
+ mavlink_command_ack_t commandAck;
+ mavlink_msg_command_ack_decode(&message, &commandAck);
+
+ if (commandAck.command == MAV_CMD_PREFLIGHT_CALIBRATION) {
+ switch (commandAck.result) {
+ case MAV_RESULT_ACCEPTED:
+ _appendStatusLog(tr("Pressure calibration success"));
+ _stopCalibration(StopCalibrationSuccessShowLog);
+ break;
+ default:
+ _appendStatusLog(tr("Pressure calibration fail"));
+ _stopCalibration(StopCalibrationFailed);
+ break;
+ }
+ }
+ }
+}
+
+void APMSensorsComponentController::_handleMagCalProgress(mavlink_message_t& message)
+{
+ if (_calTypeInProgress == CalTypeOnboardCompass) {
+ mavlink_mag_cal_progress_t magCalProgress;
+ mavlink_msg_mag_cal_progress_decode(&message, &magCalProgress);
+
+ qCDebug(APMSensorsComponentControllerVerboseLog) << "_handleMagCalProgress id:mask:pct"
+ << magCalProgress.compass_id << magCalProgress.cal_mask << magCalProgress.completion_pct;
+
+ // How many compasses are we calibrating?
+ int compassCalCount = 0;
+ for (int i=0; i<3; i++) {
+ if (magCalProgress.cal_mask & (1 << i)) {
+ compassCalCount++;
+ }
+ }
+
+ if (magCalProgress.compass_id < 3) {
+ // Each compass gets a portion of the overall progress
+ _rgCompassCalProgress[magCalProgress.compass_id] = magCalProgress.completion_pct / compassCalCount;
+ }
+
+ if (_progressBar) {
+ _progressBar->setProperty("value", (float)(_rgCompassCalProgress[0] + _rgCompassCalProgress[1] + _rgCompassCalProgress[2]) / 100.0);
+ }
+ }
+}
+
+void APMSensorsComponentController::_handleMagCalReport(mavlink_message_t& message)
+{
+ if (_calTypeInProgress == CalTypeOnboardCompass) {
+ mavlink_mag_cal_report_t magCalReport;
+ mavlink_msg_mag_cal_report_decode(&message, &magCalReport);
+
+ qCDebug(APMSensorsComponentControllerVerboseLog) << "_handleMagCalReport id:mask:status:fitness"
+ << magCalReport.compass_id << magCalReport.cal_mask << magCalReport.cal_status << magCalReport.fitness;
+
+ bool additionalCompassCompleted = false;
+ if (magCalReport.compass_id < 3 && !_rgCompassCalComplete[magCalReport.compass_id]) {
+ if (magCalReport.cal_status == MAG_CAL_SUCCESS) {
+ _appendStatusLog(tr("Compass %1 calibration complete").arg(magCalReport.compass_id));
+ } else {
+ _appendStatusLog(tr("Compass %1 calibration below quality threshold").arg(magCalReport.compass_id));
+ }
+ _rgCompassCalComplete[magCalReport.compass_id] = true;
+ _rgCompassCalSucceeded[magCalReport.compass_id] = magCalReport.cal_status == MAG_CAL_SUCCESS;
+ _rgCompassCalFitness[magCalReport.compass_id] = magCalReport.fitness;
+ additionalCompassCompleted = true;
+ }
+
+ if (_rgCompassCalComplete[0] && _rgCompassCalComplete[1] &&_rgCompassCalComplete[2]) {
+ for (int i=0; i<3; i++) {
+ qCDebug(APMSensorsComponentControllerLog) << QString("Onboard compass call report #%1: succeed:fitness %2:%3").arg(i).arg(_rgCompassCalSucceeded[i]).arg(_rgCompassCalFitness[i]);
+ }
+ emit compass1CalFitnessChanged(_rgCompassCalFitness[0]);
+ emit compass2CalFitnessChanged(_rgCompassCalFitness[1]);
+ emit compass3CalFitnessChanged(_rgCompassCalFitness[2]);
+ emit compass1CalSucceededChanged(_rgCompassCalSucceeded[0]);
+ emit compass2CalSucceededChanged(_rgCompassCalSucceeded[1]);
+ emit compass3CalSucceededChanged(_rgCompassCalSucceeded[2]);
+ if (_rgCompassCalSucceeded[0] && _rgCompassCalSucceeded[1] && _rgCompassCalSucceeded[2]) {
+ _appendStatusLog(tr("All compasses calibrated successfully"));
+ _appendStatusLog(tr("YOU MUST REBOOT YOUR VEHICLE NOW FOR NEW SETTINGS TO TAKE AFFECT"));
+ _stopCalibration(StopCalibrationSuccessShowLog);
+ } else {
+ _appendStatusLog(tr("Compass calibration failed"));
+ _appendStatusLog(tr("YOU MUST REBOOT YOUR VEHICLE NOW AND RETRY COMPASS CALIBRATION PRIOR TO FLIGHT"));
+ _stopCalibration(StopCalibrationFailed);
+ }
+ } else if (additionalCompassCompleted) {
+ _appendStatusLog(tr("Continue rotating..."));
+ }
+
+ }
+}
+
+void APMSensorsComponentController::_mavlinkMessageReceived(LinkInterface* link, mavlink_message_t message)
+{
+ Q_UNUSED(link);
+
+ if (message.sysid != _vehicle->id()) {
+ return;
+ }
+
+ switch (message.msgid) {
+ case MAVLINK_MSG_ID_COMMAND_ACK:
+ _handleCommandAck(message);
+ break;
+ case MAVLINK_MSG_ID_MAG_CAL_PROGRESS:
+ _handleMagCalProgress(message);
+ break;
+ case MAVLINK_MSG_ID_MAG_CAL_REPORT:
+ _handleMagCalReport(message);
+ break;
+ }
+}
+
+void APMSensorsComponentController::_restorePreviousCompassCalFitness(void)
+{
+ if (_restoreCompassCalFitness) {
+ _restoreCompassCalFitness = false;
+ getParameterFact(FactSystem::defaultComponentId, _compassCalFitnessParam)->setRawValue(_previousCompassCalFitness);
+ }
+}
diff --git a/src/AutoPilotPlugins/APM/APMSensorsComponentController.h b/src/AutoPilotPlugins/APM/APMSensorsComponentController.h
index efd4d0338218386e00a6f3611e79ae902ce272dd..16e0fd23e48e06b08dc3157e05eec38e35876248 100644
--- a/src/AutoPilotPlugins/APM/APMSensorsComponentController.h
+++ b/src/AutoPilotPlugins/APM/APMSensorsComponentController.h
@@ -20,6 +20,7 @@
#include "APMCompassCal.h"
Q_DECLARE_LOGGING_CATEGORY(APMSensorsComponentControllerLog)
+Q_DECLARE_LOGGING_CATEGORY(APMSensorsComponentControllerVerboseLog)
/// Sensors Component MVC Controller for SensorsComponent.qml.
class APMSensorsComponentController : public FactPanelController
@@ -28,6 +29,7 @@ class APMSensorsComponentController : public FactPanelController
public:
APMSensorsComponentController(void);
+ ~APMSensorsComponentController();
Q_PROPERTY(QQuickItem* statusLog MEMBER _statusLog)
Q_PROPERTY(QQuickItem* progressBar MEMBER _progressBar)
@@ -35,6 +37,8 @@ public:
Q_PROPERTY(QQuickItem* compassButton MEMBER _compassButton)
Q_PROPERTY(QQuickItem* accelButton MEMBER _accelButton)
Q_PROPERTY(QQuickItem* compassMotButton MEMBER _compassMotButton)
+ Q_PROPERTY(QQuickItem* levelButton MEMBER _levelButton)
+ Q_PROPERTY(QQuickItem* calibratePressureButton MEMBER _calibratePressureButton)
Q_PROPERTY(QQuickItem* nextButton MEMBER _nextButton)
Q_PROPERTY(QQuickItem* cancelButton MEMBER _cancelButton)
Q_PROPERTY(QQuickItem* setOrientationsButton MEMBER _setOrientationsButton)
@@ -74,17 +78,46 @@ public:
Q_PROPERTY(bool orientationCalTailDownSideRotate MEMBER _orientationCalTailDownSideRotate NOTIFY orientationCalSidesRotateChanged)
Q_PROPERTY(bool waitingForCancel MEMBER _waitingForCancel NOTIFY waitingForCancelChanged)
-
+
+ Q_PROPERTY(bool compass1CalSucceeded READ compass1CalSucceeded NOTIFY compass1CalSucceededChanged)
+ Q_PROPERTY(bool compass2CalSucceeded READ compass2CalSucceeded NOTIFY compass2CalSucceededChanged)
+ Q_PROPERTY(bool compass3CalSucceeded READ compass3CalSucceeded NOTIFY compass3CalSucceededChanged)
+
+ Q_PROPERTY(double compass1CalFitness READ compass1CalFitness NOTIFY compass1CalFitnessChanged)
+ Q_PROPERTY(double compass2CalFitness READ compass2CalFitness NOTIFY compass2CalFitnessChanged)
+ Q_PROPERTY(double compass3CalFitness READ compass3CalFitness NOTIFY compass3CalFitnessChanged)
+
Q_INVOKABLE void calibrateCompass(void);
Q_INVOKABLE void calibrateAccel(void);
Q_INVOKABLE void calibrateMotorInterference(void);
+ Q_INVOKABLE void levelHorizon(void);
+ Q_INVOKABLE void calibratePressure(void);
Q_INVOKABLE void cancelCalibration(void);
Q_INVOKABLE void nextClicked(void);
Q_INVOKABLE bool usingUDPLink(void);
bool compassSetupNeeded(void) const;
bool accelSetupNeeded(void) const;
-
+
+ typedef enum {
+ CalTypeAccel,
+ CalTypeOnboardCompass,
+ CalTypeOffboardCompass,
+ CalTypeLevelHorizon,
+ CalTypeCompassMot,
+ CalTypePressure,
+ CalTypeNone
+ } CalType_t;
+ Q_ENUM(CalType_t)
+
+ bool compass1CalSucceeded(void) const { return _rgCompassCalSucceeded[0]; }
+ bool compass2CalSucceeded(void) const { return _rgCompassCalSucceeded[1]; }
+ bool compass3CalSucceeded(void) const { return _rgCompassCalSucceeded[2]; }
+
+ double compass1CalFitness(void) const { return _rgCompassCalFitness[0]; }
+ double compass2CalFitness(void) const { return _rgCompassCalFitness[1]; }
+ double compass3CalFitness(void) const { return _rgCompassCalFitness[2]; }
+
signals:
void showGyroCalAreaChanged(void);
void showOrientationCalAreaChanged(void);
@@ -95,11 +128,19 @@ signals:
void resetStatusTextArea(void);
void waitingForCancelChanged(void);
void setupNeededChanged(void);
- void calibrationComplete(void);
-
+ void calibrationComplete(CalType_t calType);
+ void compass1CalSucceededChanged(bool compass1CalSucceeded);
+ void compass2CalSucceededChanged(bool compass2CalSucceeded);
+ void compass3CalSucceededChanged(bool compass3CalSucceeded);
+ void compass1CalFitnessChanged(double compass1CalFitness);
+ void compass2CalFitnessChanged(double compass2CalFitness);
+ void compass3CalFitnessChanged(double compass3CalFitness);
+
private slots:
void _handleUASTextMessage(int uasId, int compId, int severity, QString text);
-
+ void _mavlinkMessageReceived(LinkInterface* link, mavlink_message_t message);
+ void _mavCommandResult(int vehicleId, int component, int command, int result, bool noReponseFromVehicle);
+
private:
void _startLogCalibration(void);
void _startVisualCalibration(void);
@@ -107,9 +148,14 @@ private:
void _refreshParams(void);
void _hideAllCalAreas(void);
void _resetInternalState(void);
-
+ void _handleCommandAck(mavlink_message_t& message);
+ void _handleMagCalProgress(mavlink_message_t& message);
+ void _handleMagCalReport(mavlink_message_t& message);
+ void _restorePreviousCompassCalFitness(void);
+
enum StopCalibrationCode {
StopCalibrationSuccess,
+ StopCalibrationSuccessShowLog,
StopCalibrationFailed,
StopCalibrationCancelled
};
@@ -125,6 +171,8 @@ private:
QQuickItem* _compassButton;
QQuickItem* _accelButton;
QQuickItem* _compassMotButton;
+ QQuickItem* _levelButton;
+ QQuickItem* _calibratePressureButton;
QQuickItem* _nextButton;
QQuickItem* _cancelButton;
QQuickItem* _setOrientationsButton;
@@ -132,10 +180,13 @@ private:
bool _showOrientationCalArea;
- bool _magCalInProgress;
- bool _accelCalInProgress;
- bool _compassMotCalInProgress;
-
+ CalType_t _calTypeInProgress;
+
+ uint8_t _rgCompassCalProgress[3];
+ bool _rgCompassCalComplete[3];
+ bool _rgCompassCalSucceeded[3];
+ float _rgCompassCalFitness[3];
+
bool _orientationCalDownSideDone;
bool _orientationCalUpsideDownSideDone;
bool _orientationCalLeftSideDone;
@@ -165,6 +216,10 @@ private:
bool _orientationCalTailDownSideRotate;
bool _waitingForCancel;
+
+ bool _restoreCompassCalFitness;
+ float _previousCompassCalFitness;
+ static const char* _compassCalFitnessParam;
static const int _supportedFirmwareCalVersion = 2;
};
diff --git a/src/AutoPilotPlugins/APM/APMSensorsComponentSummary.qml b/src/AutoPilotPlugins/APM/APMSensorsComponentSummary.qml
index 37d0738ff3921c893570360426a88bcff0eb1390..85bd337309c1de6fe8eedc6b0a8f8b6e27969869 100644
--- a/src/AutoPilotPlugins/APM/APMSensorsComponentSummary.qml
+++ b/src/AutoPilotPlugins/APM/APMSensorsComponentSummary.qml
@@ -7,6 +7,7 @@ import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controllers 1.0
+import QGroundControl.ArduPilot 1.0
/*
IMPORTANT NOTE: Any changes made here must also be made to SensorsComponentSummary.qml
@@ -18,55 +19,35 @@ FactPanel {
color: qgcPal.windowShadeDark
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
- APMSensorsComponentController { id: controller; factPanel: panel }
-
- property Fact compass1IdFact: controller.getParameterFact(-1, "COMPASS_DEV_ID")
- property Fact compass2IdFact: controller.getParameterFact(-1, "COMPASS_DEV_ID2")
- property Fact compass3IdFact: controller.getParameterFact(-1, "COMPASS_DEV_ID3")
-
- property Fact compass1OfsXFact: controller.getParameterFact(-1, "COMPASS_OFS_X")
- property Fact compass1OfsYFact: controller.getParameterFact(-1, "COMPASS_OFS_Y")
- property Fact compass1OfsZFact: controller.getParameterFact(-1, "COMPASS_OFS_Z")
- property Fact compass2OfsXFact: controller.getParameterFact(-1, "COMPASS_OFS2_X")
- property Fact compass2OfsYFact: controller.getParameterFact(-1, "COMPASS_OFS2_Y")
- property Fact compass2OfsZFact: controller.getParameterFact(-1, "COMPASS_OFS2_Z")
- property Fact compass3OfsXFact: controller.getParameterFact(-1, "COMPASS_OFS3_X")
- property Fact compass3OfsYFact: controller.getParameterFact(-1, "COMPASS_OFS3_Y")
- property Fact compass3OfsZFact: controller.getParameterFact(-1, "COMPASS_OFS3_Z")
-
- property bool compass1Available: compass1IdFact.value !== 0
- property bool compass2Available: compass2IdFact.value !== 0
- property bool compass3Available: compass3IdFact.value !== 0
- property bool compass1Calibrated: compass1Available ? compass1OfsXFact.value != 0.0 && compass1OfsYFact.value != 0.0 &&compass1OfsZFact.value != 0.0 : false
- property bool compass2Calibrated: compass2Available ? compass2OfsXFact.value != 0.0 && compass2OfsYFact.value != 0.0 &&compass2OfsZFact.value != 0.0 : false
- property bool compass3Calibrated: compass3Available ? compass3OfsXFact.value != 0.0 && compass3OfsYFact.value != 0.0 &&compass3OfsZFact.value != 0.0 : false
+ APMSensorsComponentController { id: controller; factPanel: panel }
- property bool compassCalNeeded: controller.compassSetupNeeded
+ APMSensorParams {
+ id: sensorParams
+ factPanelController: controller
+ }
Column {
anchors.fill: parent
- VehicleSummaryRow {
- labelText: qsTr("Compass 1:")
- visible: compass1Available
- valueText: compass1Calibrated ? qsTr("Ready") : qsTr("Setup required")
- }
-
- VehicleSummaryRow {
- labelText: qsTr("Compass 2:")
- visible: compass2Available
- valueText: compass2Calibrated ? qsTr("Ready") : qsTr("Setup required")
- }
-
- VehicleSummaryRow {
- labelText: qsTr("Compass 3:")
- visible: compass3Available
- valueText: compass3Calibrated ? qsTr("Ready") : qsTr("Setup required")
+ Repeater {
+ model: 3
+
+ VehicleSummaryRow {
+ labelText: qsTr("Compass ") + (index + 1) + ":"
+ valueText: sensorParams.rgCompassAvailable[index] ?
+ (sensorParams.rgCompassCalibrated[index] ?
+ (sensorParams.rgCompassPrimary[index] ? "Primary" : "Secondary") +
+ (sensorParams.rgCompassExternalParamAvailable[index] ?
+ (sensorParams.rgCompassExternal[index] ? ", External" : ", Internal" ) :
+ "") :
+ qsTr("Setup required")) :
+ qsTr("Not installed")
+ }
}
VehicleSummaryRow {
- labelText: qsTr("Accelerometer:")
+ labelText: qsTr("Accelerometer(s):")
valueText: controller.accelSetupNeeded ? qsTr("Setup required") : qsTr("Ready")
}
}
diff --git a/src/AutoPilotPlugins/APM/APMSubFrameComponent.cc b/src/AutoPilotPlugins/APM/APMSubFrameComponent.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9d88274446879f9136b74817f8e0426b035f7f37
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMSubFrameComponent.cc
@@ -0,0 +1,71 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+
+/// @file
+/// @author Don Gagne
+/// @author Jacob Walser
+
+#include "APMSubFrameComponent.h"
+#include "QGCQmlWidgetHolder.h"
+#include "APMAutoPilotPlugin.h"
+#include "APMAirframeComponent.h"
+
+APMSubFrameComponent::APMSubFrameComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent)
+ : VehicleComponent(vehicle, autopilot, parent)
+ , _name(tr("Frame"))
+{
+}
+
+QString APMSubFrameComponent::name(void) const
+{
+ return _name;
+}
+
+QString APMSubFrameComponent::description(void) const
+{
+ return tr("Frame setup allows you to choose your vehicle's motor configuration. Install clockwise" \
+ "\npropellers on the green thrusters and counter-clockwise propellers on the blue thrusters" \
+ "\n(or vice-versa). The flight controller will need to be rebooted to apply changes.");
+}
+
+QString APMSubFrameComponent::iconResource(void) const
+{
+ return QStringLiteral("/qmlimages/SubFrameComponentIcon.png");
+}
+
+bool APMSubFrameComponent::requiresSetup(void) const
+{
+ return false;
+}
+
+bool APMSubFrameComponent::setupComplete(void) const
+{
+ return true;
+}
+
+QStringList APMSubFrameComponent::setupCompleteChangedTriggerList(void) const
+{
+ return QStringList();
+}
+
+QUrl APMSubFrameComponent::setupSource(void) const
+{
+ return QUrl::fromUserInput(QStringLiteral("qrc:/qml/APMSubFrameComponent.qml"));
+}
+
+QUrl APMSubFrameComponent::summaryQmlSource(void) const
+{
+ return QUrl::fromUserInput(QStringLiteral("qrc:/qml/APMSubFrameComponentSummary.qml"));
+}
+
+QString APMSubFrameComponent::prerequisiteSetup(void) const
+{
+ return QString();
+}
diff --git a/src/AutoPilotPlugins/APM/APMSubFrameComponent.h b/src/AutoPilotPlugins/APM/APMSubFrameComponent.h
new file mode 100644
index 0000000000000000000000000000000000000000..68b3eabb1fa89605f2096aefbb57eedd61f3381f
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMSubFrameComponent.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+
+#ifndef APMSubFrameComponent_H
+#define APMSubFrameComponent_H
+
+#include "VehicleComponent.h"
+
+class APMSubFrameComponent : public VehicleComponent
+{
+ Q_OBJECT
+
+public:
+ APMSubFrameComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
+
+ // Virtuals from VehicleComponent
+ QStringList setupCompleteChangedTriggerList(void) const final;
+
+ // Virtuals from VehicleComponent
+ QString name(void) const final;
+ QString description(void) const final;
+ QString iconResource(void) const final;
+ bool requiresSetup(void) const final;
+ bool setupComplete(void) const final;
+ QUrl setupSource(void) const final;
+ QUrl summaryQmlSource(void) const final;
+ QString prerequisiteSetup(void) const final;
+
+private:
+ const QString _name;
+};
+
+#endif
diff --git a/src/AutoPilotPlugins/APM/APMSubFrameComponent.qml b/src/AutoPilotPlugins/APM/APMSubFrameComponent.qml
new file mode 100644
index 0000000000000000000000000000000000000000..df06fec69595a36fae33cd6ebc766a233748a4b3
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMSubFrameComponent.qml
@@ -0,0 +1,151 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+
+import QtQuick 2.5
+import QtQuick.Controls 1.2
+
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
+import QGroundControl.Palette 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.ScreenTools 1.0
+
+SetupPage {
+ id: subFramePage
+ pageComponent: subFramePageComponent
+
+ Component {
+ id: subFramePageComponent
+
+ Column {
+ id: mainColumn
+ width: availableWidth
+
+ FactPanelController { id: controller; factPanel: subFramePage.viewPanel }
+
+ QGCPalette { id: palette; colorGroupEnabled: true }
+
+ property Fact _frameConfig: controller.getParameterFact(-1, "FRAME_CONFIG")
+
+ function setFrameConfig(frame) {
+ _frameConfig.value = frame;
+ }
+
+ property real _minW: ScreenTools.defaultFontPixelWidth * 30
+ property real _boxWidth: _minW
+ property real _boxSpace: ScreenTools.defaultFontPixelWidth
+
+ onWidthChanged: {
+ computeDimensions()
+ }
+
+ Component.onCompleted: computeDimensions()
+
+ function computeDimensions() {
+ var sw = 0
+ var rw = 0
+ var idx = Math.floor(mainColumn.width / (_minW + ScreenTools.defaultFontPixelWidth))
+ if(idx < 1) {
+ _boxWidth = mainColumn.width
+ _boxSpace = 0
+ } else {
+ _boxSpace = 0
+ if(idx > 1) {
+ _boxSpace = ScreenTools.defaultFontPixelWidth
+ sw = _boxSpace * (idx - 1)
+ }
+ rw = mainColumn.width - sw
+ _boxWidth = rw / idx
+ }
+ }
+
+ ListModel {
+ id: subFrameModel
+
+ ListElement {
+ name: "BlueROV1"
+ resource: "qrc:///qmlimages/Frames/BlueROV1.png"
+ paramValue: 0
+ }
+
+ ListElement {
+ name: "BlueROV2/Vectored"
+ resource: "qrc:///qmlimages/Frames/Vectored.png"
+ paramValue: 1
+ }
+
+ ListElement {
+ name: "Vectored-6DOF"
+ resource: "qrc:///qmlimages/Frames/Vectored6DOF.png"
+ paramValue: 2
+ }
+
+ ListElement {
+ name: "SimpleROV-3"
+ resource: "qrc:///qmlimages/Frames/SimpleROV-3.png"
+ paramValue: 4
+ }
+
+ ListElement {
+ name: "SimpleROV-4"
+ resource: "qrc:///qmlimages/Frames/SimpleROV-4.png"
+ paramValue: 5
+ }
+ }
+
+ Flow {
+ id: flowView
+ width: parent.width
+ spacing: _boxSpace
+
+ Repeater {
+ model: subFrameModel
+
+ Rectangle {
+ width: _boxWidth
+ height: ScreenTools.defaultFontPixelHeight * 14
+ color: qgcPal.window
+
+ QGCLabel {
+ id: title
+ text: subFrameModel.get(index).name
+ }
+
+ Rectangle {
+ anchors.topMargin: ScreenTools.defaultFontPixelHeight / 2
+ anchors.top: title.bottom
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ color: subFrameModel.get(index).paramValue == _frameConfig.value ? qgcPal.buttonHighlight: qgcPal.windowShade
+
+ Image {
+ anchors.margins: ScreenTools.defaultFontPixelWidth
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ fillMode: Image.PreserveAspectFit
+ smooth: true
+ mipmap: true
+ source: subFrameModel.get(index).resource
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: setFrameConfig(subFrameModel.get(index).paramValue)
+ }
+ }
+ }
+ }// Repeater
+ }// Flow
+ } // Column
+ } // Component
+} // SetupPage
diff --git a/src/AutoPilotPlugins/APM/APMSubFrameComponentSummary.qml b/src/AutoPilotPlugins/APM/APMSubFrameComponentSummary.qml
new file mode 100644
index 0000000000000000000000000000000000000000..e2b33b2fa14f8724eedafd11a9167bfeaa24a7ff
--- /dev/null
+++ b/src/AutoPilotPlugins/APM/APMSubFrameComponentSummary.qml
@@ -0,0 +1,62 @@
+import QtQuick 2.2
+import QtQuick.Controls 1.2
+
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.Controllers 1.0
+import QGroundControl.Palette 1.0
+
+FactPanel {
+ id: panel
+ anchors.fill: parent
+ color: qgcPal.windowShadeDark
+
+ QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
+
+ FactPanelController { id: controller; factPanel: panel }
+
+ property Fact frameFact: controller.getParameterFact(-1, "FRAME_CONFIG")
+
+ function frameName() {
+ switch(frameFact.value) {
+ case 0:
+ return "BlueROV1"
+ case 1:
+ return "Vectored/BlueROV2"
+ case 2:
+ return "Vectored 6DOF"
+ case 3:
+ return "Vectored 6DOF 90Degree"
+ case 4:
+ return "SimpleROV-3"
+ case 5:
+ return "SimpleROV-4"
+ case 6:
+ return "SimpleROV-5"
+ case 7:
+ return "Custom"
+ default:
+ return "Unknown"
+ }
+ }
+
+ Column {
+ anchors.fill: parent
+ VehicleSummaryRow {
+ id: nameRow;
+ labelText: qsTr("Frame Type:")
+ valueText: frameName()
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("Firmware Version:")
+ valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + "-" + activeVehicle.firmwareVersionTypeString
+ }
+
+ VehicleSummaryRow {
+ labelText: qsTr("Git Revision:")
+ valueText: activeVehicle.gitHash == -1 ? qsTr("Unknown") : activeVehicle.gitHash
+ }
+ }
+}
diff --git a/src/AutoPilotPlugins/APM/APMTuningComponent.cc b/src/AutoPilotPlugins/APM/APMTuningComponent.cc
index 32bd528b9f619e3b89c661d39e7d3e11e9c443b1..980b576243fe628d809cbcafd078e2940a3eed6a 100644
--- a/src/AutoPilotPlugins/APM/APMTuningComponent.cc
+++ b/src/AutoPilotPlugins/APM/APMTuningComponent.cc
@@ -26,7 +26,7 @@ QString APMTuningComponent::name(void) const
QString APMTuningComponent::description(void) const
{
- return tr("The Tuning Component is used to tune the flight characteristics of the Vehicle.");
+ return tr("Tuning Setup is used to tune the flight characteristics of the Vehicle.");
}
QString APMTuningComponent::iconResource(void) const
diff --git a/src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml b/src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
index d1e70721e6a139217befe6accc8fe70d0595ff51..4547fbd3cf18c4be1efb3527e6c98cdf448d1139 100644
--- a/src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
+++ b/src/AutoPilotPlugins/APM/APMTuningComponentCopter.qml
@@ -17,113 +17,109 @@ import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
-QGCView {
- id: _safetyView
- viewPanel: panel
- anchors.fill: parent
-
- FactPanelController { id: controller; factPanel: panel }
-
- QGCPalette { id: palette; colorGroupEnabled: enabled }
-
- // Older firmwares use THR_MODE, newer use MOT_THST_HOVER
- property bool _throttleMidExists: controller.parameterExists(-1, "THR_MID")
- property Fact _hoverTuneParam: controller.getParameterFact(-1, _throttleMidExists ? "THR_MID" : "MOT_THST_HOVER")
- property real _hoverTuneMin: _throttleMidExists ? 200 : 0
- property real _hoverTuneMax: _throttleMidExists ? 800 : 1
- property real _hoverTuneStep: _throttleMidExists ? 10 : 0.01
-
- property Fact _rcFeel: controller.getParameterFact(-1, "RC_FEEL_RP")
- property Fact _rateRollP: controller.getParameterFact(-1, "r.ATC_RAT_RLL_P")
- property Fact _rateRollI: controller.getParameterFact(-1, "r.ATC_RAT_RLL_I")
- property Fact _ratePitchP: controller.getParameterFact(-1, "r.ATC_RAT_PIT_P")
- property Fact _ratePitchI: controller.getParameterFact(-1, "r.ATC_RAT_PIT_I")
- property Fact _rateClimbP: controller.getParameterFact(-1, "ACCEL_Z_P")
- property Fact _rateClimbI: controller.getParameterFact(-1, "ACCEL_Z_I")
-
- property Fact _ch7Opt: controller.getParameterFact(-1, "CH7_OPT")
- property Fact _ch8Opt: controller.getParameterFact(-1, "CH8_OPT")
- property Fact _ch9Opt: controller.getParameterFact(-1, "CH9_OPT")
- property Fact _ch10Opt: controller.getParameterFact(-1, "CH10_OPT")
- property Fact _ch11Opt: controller.getParameterFact(-1, "CH11_OPT")
- property Fact _ch12Opt: controller.getParameterFact(-1, "CH12_OPT")
-
- readonly property int _firstOptionChannel: 7
- readonly property int _lastOptionChannel: 12
-
- property Fact _autoTuneAxes: controller.getParameterFact(-1, "AUTOTUNE_AXES")
- property int _autoTuneSwitchChannelIndex: 0
- readonly property int _autoTuneOption: 17
-
- property real _margins: ScreenTools.defaultFontPixelHeight
-
- property bool _loadComplete: false
-
- ExclusiveGroup { id: fenceActionRadioGroup }
- ExclusiveGroup { id: landLoiterRadioGroup }
- ExclusiveGroup { id: returnAltRadioGroup }
-
- Component.onCompleted: {
- // Qml Sliders have a strange behavior in which they first set Slider::value to some internal
- // setting and then set Slider::value to the bound properties value. If you have an onValueChanged
- // handler which updates your property with the new value, this first value change will trash
- // your bound values. In order to work around this we don't set the values into the Sliders until
- // after Qml load is done. We also don't track value changes until Qml load completes.
- throttleHover.value = _hoverTuneParam.value
- rollPitch.value = _rateRollP.value
- climb.value = _rateClimbP.value
- rcFeel.value = _rcFeel.value
- _loadComplete = true
-
- calcAutoTuneChannel()
- }
-
- /// The AutoTune switch is stored in one of the RC#_FUNCTION parameters. We need to loop through those
- /// to find them and setup the ui accordindly.
- function calcAutoTuneChannel() {
- _autoTuneSwitchChannelIndex = 0
- for (var channel=_firstOptionChannel; channel<=_lastOptionChannel; channel++) {
- var optionFact = controller.getParameterFact(-1, "CH" + channel + "_OPT")
- if (optionFact.value == _autoTuneOption) {
- _autoTuneSwitchChannelIndex = channel - _firstOptionChannel + 1
- break
+SetupPage {
+ id: tuningPage
+ pageComponent: tuningPageComponent
+
+ Component {
+ id: tuningPageComponent
+
+ Column {
+ width: availableWidth
+ spacing: _margins
+
+ FactPanelController { id: controller; factPanel: tuningPage.viewPanel }
+
+ QGCPalette { id: palette; colorGroupEnabled: true }
+
+ // Older firmwares use THR_MODE, newer use MOT_THST_HOVER
+ property bool _throttleMidExists: controller.parameterExists(-1, "THR_MID")
+ property Fact _hoverTuneParam: controller.getParameterFact(-1, _throttleMidExists ? "THR_MID" : "MOT_THST_HOVER")
+ property real _hoverTuneMin: _throttleMidExists ? 200 : 0
+ property real _hoverTuneMax: _throttleMidExists ? 800 : 1
+ property real _hoverTuneStep: _throttleMidExists ? 10 : 0.01
+
+ property Fact _rcFeel: controller.getParameterFact(-1, "RC_FEEL_RP")
+ property Fact _rateRollP: controller.getParameterFact(-1, "r.ATC_RAT_RLL_P")
+ property Fact _rateRollI: controller.getParameterFact(-1, "r.ATC_RAT_RLL_I")
+ property Fact _ratePitchP: controller.getParameterFact(-1, "r.ATC_RAT_PIT_P")
+ property Fact _ratePitchI: controller.getParameterFact(-1, "r.ATC_RAT_PIT_I")
+ property Fact _rateClimbP: controller.getParameterFact(-1, "ACCEL_Z_P")
+ property Fact _rateClimbI: controller.getParameterFact(-1, "ACCEL_Z_I")
+
+ property Fact _ch7Opt: controller.getParameterFact(-1, "CH7_OPT")
+ property Fact _ch8Opt: controller.getParameterFact(-1, "CH8_OPT")
+ property Fact _ch9Opt: controller.getParameterFact(-1, "CH9_OPT")
+ property Fact _ch10Opt: controller.getParameterFact(-1, "CH10_OPT")
+ property Fact _ch11Opt: controller.getParameterFact(-1, "CH11_OPT")
+ property Fact _ch12Opt: controller.getParameterFact(-1, "CH12_OPT")
+
+ readonly property int _firstOptionChannel: 7
+ readonly property int _lastOptionChannel: 12
+
+ property Fact _autoTuneAxes: controller.getParameterFact(-1, "AUTOTUNE_AXES")
+ property int _autoTuneSwitchChannelIndex: 0
+ readonly property int _autoTuneOption: 17
+
+ property real _margins: ScreenTools.defaultFontPixelHeight
+
+ property bool _loadComplete: false
+
+ ExclusiveGroup { id: fenceActionRadioGroup }
+ ExclusiveGroup { id: landLoiterRadioGroup }
+ ExclusiveGroup { id: returnAltRadioGroup }
+
+ Component.onCompleted: {
+ // Qml Sliders have a strange behavior in which they first set Slider::value to some internal
+ // setting and then set Slider::value to the bound properties value. If you have an onValueChanged
+ // handler which updates your property with the new value, this first value change will trash
+ // your bound values. In order to work around this we don't set the values into the Sliders until
+ // after Qml load is done. We also don't track value changes until Qml load completes.
+ throttleHover.value = _hoverTuneParam.value
+ rollPitch.value = _rateRollP.value
+ climb.value = _rateClimbP.value
+ rcFeel.value = _rcFeel.value
+ _loadComplete = true
+
+ calcAutoTuneChannel()
}
- }
- }
-
- /// We need to clear AutoTune from any previous channel before setting it to a new one
- function setChannelAutoTuneOption(channel) {
- // First clear any previous settings for AutTune
- for (var optionChannel=_firstOptionChannel; optionChannel<=_lastOptionChannel; optionChannel++) {
- var optionFact = controller.getParameterFact(-1, "CH" + optionChannel + "_OPT")
- if (optionFact.value == _autoTuneOption) {
- optionFact.value = 0
+
+ /// The AutoTune switch is stored in one of the CH#_OPT parameters. We need to loop through those
+ /// to find them and setup the ui accordindly.
+ function calcAutoTuneChannel() {
+ _autoTuneSwitchChannelIndex = 0
+ for (var channel=_firstOptionChannel; channel<=_lastOptionChannel; channel++) {
+ var optionFact = controller.getParameterFact(-1, "CH" + channel + "_OPT")
+ if (optionFact.value == _autoTuneOption) {
+ _autoTuneSwitchChannelIndex = channel - _firstOptionChannel + 1
+ break
+ }
+ }
}
- }
-
- // Now set the function into the new channel
- if (channel != 0) {
- var optionFact = controller.getParameterFact(-1, "CH" + channel + "_OPT")
- optionFact.value = _autoTuneOption
- }
- }
-
- Connections { target: _ch7Opt; onValueChanged: calcAutoTuneChannel() }
- Connections { target: _ch8Opt; onValueChanged: calcAutoTuneChannel() }
- Connections { target: _ch9Opt; onValueChanged: calcAutoTuneChannel() }
- Connections { target: _ch10Opt; onValueChanged: calcAutoTuneChannel() }
- Connections { target: _ch11Opt; onValueChanged: calcAutoTuneChannel() }
- Connections { target: _ch12Opt; onValueChanged: calcAutoTuneChannel() }
-
- QGCViewPanel {
- id: panel
- anchors.fill: parent
-
- QGCFlickable {
- clip: true
- anchors.fill: parent
- contentHeight: autoTuneRect.y + autoTuneRect.height
- flickableDirection: Flickable.VerticalFlick
+
+ /// We need to clear AutoTune from any previous channel before setting it to a new one
+ function setChannelAutoTuneOption(channel) {
+ // First clear any previous settings for AutTune
+ for (var optionChannel=_firstOptionChannel; optionChannel<=_lastOptionChannel; optionChannel++) {
+ var optionFact = controller.getParameterFact(-1, "CH" + optionChannel + "_OPT")
+ if (optionFact.value == _autoTuneOption) {
+ optionFact.value = 0
+ }
+ }
+
+ // Now set the function into the new channel
+ if (channel != 0) {
+ var optionFact = controller.getParameterFact(-1, "CH" + channel + "_OPT")
+ optionFact.value = _autoTuneOption
+ }
+ }
+
+ Connections { target: _ch7Opt; onValueChanged: calcAutoTuneChannel() }
+ Connections { target: _ch8Opt; onValueChanged: calcAutoTuneChannel() }
+ Connections { target: _ch9Opt; onValueChanged: calcAutoTuneChannel() }
+ Connections { target: _ch10Opt; onValueChanged: calcAutoTuneChannel() }
+ Connections { target: _ch11Opt; onValueChanged: calcAutoTuneChannel() }
+ Connections { target: _ch12Opt; onValueChanged: calcAutoTuneChannel() }
QGCLabel {
id: basicLabel
@@ -133,10 +129,8 @@ QGCView {
Rectangle {
id: basicTuningRect
- anchors.topMargin: _margins / 2
anchors.left: parent.left
anchors.right: parent.right
- anchors.top: basicLabel.bottom
height: basicTuningColumn.y + basicTuningColumn.height + _margins
color: palette.windowShade
@@ -276,16 +270,15 @@ QGCView {
} // Rectangle - Basic tuning
Flow {
- id: flowLayout
- anchors.topMargin: _margins / 2
- width: panel.width // parent.width doesn't work here for some reason!
- anchors.top: basicTuningRect.bottom
- spacing: _margins
+ id: flowLayout
+ anchors.left: parent.left
+ anchors.right: parent.right
+ spacing: _margins
Rectangle {
- height: autoTuneLabel.height + autoTuneRect.height
- width: autoTuneRect.width
- color: palette.window
+ height: autoTuneLabel.height + autoTuneRect.height
+ width: autoTuneRect.width
+ color: palette.window
QGCLabel {
id: autoTuneLabel
@@ -294,11 +287,11 @@ QGCView {
}
Rectangle {
- id: autoTuneRect
- width: autoTuneColumn.x + autoTuneColumn.width + _margins
- height: autoTuneColumn.y + autoTuneColumn.height + _margins
- anchors.top: autoTuneLabel.bottom
- color: palette.windowShade
+ id: autoTuneRect
+ width: autoTuneColumn.x + autoTuneColumn.width + _margins
+ height: autoTuneColumn.y + autoTuneColumn.height + _margins
+ anchors.top: autoTuneLabel.bottom
+ color: palette.windowShade
Column {
id: autoTuneColumn
@@ -417,6 +410,6 @@ QGCView {
} // Rectangle - Channel 6 Tuning options
} // Rectangle - Channel 6 Tuning options wrap
} // Flow - Tune
- } // QGCFlickable
- } // QGCViewPanel
-} // QGCView
+ } // Column
+ } // Component
+} // SetupView
diff --git a/src/AutoPilotPlugins/APM/Images/LightsComponentIcon.png b/src/AutoPilotPlugins/APM/Images/LightsComponentIcon.png
new file mode 100644
index 0000000000000000000000000000000000000000..71c05680207280e505ba40c6b3c0b04a852a9c43
Binary files /dev/null and b/src/AutoPilotPlugins/APM/Images/LightsComponentIcon.png differ
diff --git a/src/AutoPilotPlugins/APM/Images/SubFrameComponentIcon.png b/src/AutoPilotPlugins/APM/Images/SubFrameComponentIcon.png
new file mode 100644
index 0000000000000000000000000000000000000000..6401e093c8591eb554f2dccb99a717d12124ae20
Binary files /dev/null and b/src/AutoPilotPlugins/APM/Images/SubFrameComponentIcon.png differ
diff --git a/src/AutoPilotPlugins/APM/Images/bluerov-frame.png b/src/AutoPilotPlugins/APM/Images/bluerov-frame.png
new file mode 100644
index 0000000000000000000000000000000000000000..5a5edaf360c11b6fa76cf2b54351f66f62ac0faf
Binary files /dev/null and b/src/AutoPilotPlugins/APM/Images/bluerov-frame.png differ
diff --git a/src/AutoPilotPlugins/APM/Images/simple3-frame.png b/src/AutoPilotPlugins/APM/Images/simple3-frame.png
new file mode 100644
index 0000000000000000000000000000000000000000..c7368a3e228044513282810f12bc45f1d13e60d0
Binary files /dev/null and b/src/AutoPilotPlugins/APM/Images/simple3-frame.png differ
diff --git a/src/AutoPilotPlugins/APM/Images/simple4-frame.png b/src/AutoPilotPlugins/APM/Images/simple4-frame.png
new file mode 100644
index 0000000000000000000000000000000000000000..793b36521c292297e622bae17728d69a83780a4f
Binary files /dev/null and b/src/AutoPilotPlugins/APM/Images/simple4-frame.png differ
diff --git a/src/AutoPilotPlugins/APM/Images/vectored-frame.png b/src/AutoPilotPlugins/APM/Images/vectored-frame.png
new file mode 100644
index 0000000000000000000000000000000000000000..aa1c3cf9edf75fbf4b1c18df39ae4a3aa8301fad
Binary files /dev/null and b/src/AutoPilotPlugins/APM/Images/vectored-frame.png differ
diff --git a/src/AutoPilotPlugins/APM/Images/vectored6dof-frame.png b/src/AutoPilotPlugins/APM/Images/vectored6dof-frame.png
new file mode 100644
index 0000000000000000000000000000000000000000..c690be96964d9ac4f8b2930f6b88cd7a69d5c2bd
Binary files /dev/null and b/src/AutoPilotPlugins/APM/Images/vectored6dof-frame.png differ
diff --git a/src/AutoPilotPlugins/AutoPilotPluginManager.cc b/src/AutoPilotPlugins/AutoPilotPluginManager.cc
deleted file mode 100644
index b45391758ef3f81abb691600cf5cce7d72c09228..0000000000000000000000000000000000000000
--- a/src/AutoPilotPlugins/AutoPilotPluginManager.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************************
- *
- * (c) 2009-2016 QGROUNDCONTROL PROJECT
- *
- * QGroundControl is licensed according to the terms in the file
- * COPYING.md in the root of the source code directory.
- *
- ****************************************************************************/
-
-
-/// @file
-/// @author Don Gagne
-
-#include "AutoPilotPluginManager.h"
-#include "PX4/PX4AutoPilotPlugin.h"
-#include "APM/APMAutoPilotPlugin.h"
-#include "Generic/GenericAutoPilotPlugin.h"
-
-AutoPilotPlugin* AutoPilotPluginManager::newAutopilotPluginForVehicle(Vehicle* vehicle)
-{
- switch (vehicle->firmwareType()) {
- case MAV_AUTOPILOT_PX4:
- return new PX4AutoPilotPlugin(vehicle, vehicle);
- case MAV_AUTOPILOT_ARDUPILOTMEGA:
- return new APMAutoPilotPlugin(vehicle, vehicle);
- default:
- return new GenericAutoPilotPlugin(vehicle, vehicle);
- }
-}
diff --git a/src/AutoPilotPlugins/AutoPilotPluginManager.h b/src/AutoPilotPlugins/AutoPilotPluginManager.h
deleted file mode 100644
index 4927cfbc216b6d5d6ebac930a12de4266dc850b7..0000000000000000000000000000000000000000
--- a/src/AutoPilotPlugins/AutoPilotPluginManager.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
- *
- * (c) 2009-2016 QGROUNDCONTROL PROJECT
- *
- * QGroundControl is licensed according to the terms in the file
- * COPYING.md in the root of the source code directory.
- *
- ****************************************************************************/
-
-
-/// @file
-/// @author Don Gagne
-
-#ifndef AUTOPILOTPLUGINMANAGER_H
-#define AUTOPILOTPLUGINMANAGER_H
-
-#include
-#include
-#include
-
-#include "AutoPilotPlugin.h"
-#include "Vehicle.h"
-#include "QGCToolbox.h"
-
-class QGCApplication;
-
-class AutoPilotPluginManager : public QGCTool
-{
- Q_OBJECT
-
-public:
- AutoPilotPluginManager(QGCApplication* app) : QGCTool(app) { }
-
- AutoPilotPlugin* newAutopilotPluginForVehicle(Vehicle* vehicle);
-};
-
-#endif
diff --git a/src/AutoPilotPlugins/Common/ESP8266ComponentController.cc b/src/AutoPilotPlugins/Common/ESP8266ComponentController.cc
index bfe76f3849af86ca781b737ae4358d2fe2cf96d6..1e7c937d148372ccd8b2a8b1d0b7ab15c338d8b9 100644
--- a/src/AutoPilotPlugins/Common/ESP8266ComponentController.cc
+++ b/src/AutoPilotPlugins/Common/ESP8266ComponentController.cc
@@ -13,7 +13,6 @@
/// @author Gus Grubba
#include "ESP8266ComponentController.h"
-#include "AutoPilotPluginManager.h"
#include "QGCApplication.h"
#include "UAS.h"
#include "ParameterManager.h"
@@ -38,8 +37,7 @@ ESP8266ComponentController::ESP8266ComponentController()
_baudRates.append("230400");
_baudRates.append("460800");
_baudRates.append("921600");
- connect(&_timer, &QTimer::timeout, this, &ESP8266ComponentController::_processTimeout);
- connect(_vehicle, &Vehicle::commandLongAck, this, &ESP8266ComponentController::_commandAck);
+ connect(_vehicle, &Vehicle::mavCommandResult, this, &ESP8266ComponentController::_mavCommandResult);
Fact* ssid = getParameterFact(MAV_COMP_ID_UDP_BRIDGE, "WIFI_SSID4");
connect(ssid, &Fact::valueChanged, this, &ESP8266ComponentController::_ssidChanged);
Fact* paswd = getParameterFact(MAV_COMP_ID_UDP_BRIDGE, "WIFI_PASSWORD4");
@@ -317,86 +315,36 @@ ESP8266ComponentController::restoreDefaults()
void
ESP8266ComponentController::_reboot()
{
- mavlink_message_t msg;
-
- mavlink_msg_command_long_pack_chan(
- qgcApp()->toolbox()->mavlinkProtocol()->getSystemId(),
- qgcApp()->toolbox()->mavlinkProtocol()->getComponentId(),
- _vehicle->priorityLink()->mavlinkChannel(),
- &msg,
- _vehicle->id(),
- MAV_COMP_ID_UDP_BRIDGE,
- MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN,
- 1.0f, // Confirmation
- 0.0f, // Param1
- 1.0f, // Param2
- 0.0f,0.0f,0.0f,0.0f,0.0f);
+ _vehicle->sendMavCommand(MAV_COMP_ID_UDP_BRIDGE, MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN, true /* showError */, 0.0f, 1.0f);
qCDebug(ESP8266ComponentControllerLog) << "_reboot()";
- _vehicle->sendMessageOnLink(_vehicle->priorityLink(), msg);
- _timer.start(1000);
}
//-----------------------------------------------------------------------------
void
ESP8266ComponentController::_restoreDefaults()
{
- mavlink_message_t msg;
- mavlink_msg_command_long_pack_chan(
- qgcApp()->toolbox()->mavlinkProtocol()->getSystemId(),
- qgcApp()->toolbox()->mavlinkProtocol()->getComponentId(),
- _vehicle->priorityLink()->mavlinkChannel(),
- &msg,
- _vehicle->id(),
- MAV_COMP_ID_UDP_BRIDGE,
- MAV_CMD_PREFLIGHT_STORAGE,
- 1.0f, // Confirmation
- 2.0f, // Param1
- 0.0f,0.0f,0.0f,0.0f,0.0f,0.0f);
+ _vehicle->sendMavCommand(MAV_COMP_ID_UDP_BRIDGE, MAV_CMD_PREFLIGHT_STORAGE, true /* showError */, 2.0f);
qCDebug(ESP8266ComponentControllerLog) << "_restoreDefaults()";
- _vehicle->sendMessageOnLink(_vehicle->priorityLink(), msg);
- _timer.start(1000);
}
//-----------------------------------------------------------------------------
void
-ESP8266ComponentController::_processTimeout()
+ESP8266ComponentController::_mavCommandResult(int vehicleId, int component, int command, int result, bool noReponseFromVehicle)
{
- if(!--_retries) {
- qCDebug(ESP8266ComponentControllerLog) << "_processTimeout Giving Up";
- _timer.stop();
- _waitType = WAIT_FOR_NOTHING;
- emit busyChanged();
- } else {
- switch(_waitType) {
- case WAIT_FOR_REBOOT:
- qCDebug(ESP8266ComponentControllerLog) << "_processTimeout for Reboot";
- _reboot();
- break;
- case WAIT_FOR_RESTORE:
- qCDebug(ESP8266ComponentControllerLog) << "_processTimeout for Restore Defaults";
- _restoreDefaults();
- break;
- }
- }
-}
+ Q_UNUSED(vehicleId);
+ Q_UNUSED(noReponseFromVehicle);
-//-----------------------------------------------------------------------------
-void
-ESP8266ComponentController::_commandAck(uint8_t compID, uint16_t command, uint8_t result)
-{
- if(compID == MAV_COMP_ID_UDP_BRIDGE) {
- if(result != MAV_RESULT_ACCEPTED) {
+ if (component == MAV_COMP_ID_UDP_BRIDGE) {
+ if (result != MAV_RESULT_ACCEPTED) {
qWarning() << "ESP8266ComponentController command" << command << "rejected.";
return;
}
- if((_waitType == WAIT_FOR_REBOOT && command == MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN) ||
- (_waitType == WAIT_FOR_RESTORE && command == MAV_CMD_PREFLIGHT_STORAGE))
- {
- _timer.stop();
+ if ((_waitType == WAIT_FOR_REBOOT && command == MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN) ||
+ (_waitType == WAIT_FOR_RESTORE && command == MAV_CMD_PREFLIGHT_STORAGE)) {
_waitType = WAIT_FOR_NOTHING;
emit busyChanged();
qCDebug(ESP8266ComponentControllerLog) << "_commandAck for" << command;
- if(command == MAV_CMD_PREFLIGHT_STORAGE) {
+ if (command == MAV_CMD_PREFLIGHT_STORAGE) {
_vehicle->parameterManager()->refreshAllParameters(MAV_COMP_ID_UDP_BRIDGE);
}
}
diff --git a/src/AutoPilotPlugins/Common/ESP8266ComponentController.h b/src/AutoPilotPlugins/Common/ESP8266ComponentController.h
index d0b82db400233543e9ef7c0cab684cab50bc57a8..1093eb2676f4600163b0a7237376e0c6666e2517 100644
--- a/src/AutoPilotPlugins/Common/ESP8266ComponentController.h
+++ b/src/AutoPilotPlugins/Common/ESP8266ComponentController.h
@@ -82,8 +82,7 @@ signals:
void busyChanged ();
private slots:
- void _processTimeout ();
- void _commandAck (uint8_t compID, uint16_t command, uint8_t result);
+ void _mavCommandResult(int vehicleId, int component, int command, int result, bool noReponseFromVehicle);
void _ssidChanged (QVariant value);
void _passwordChanged (QVariant value);
void _baudChanged (QVariant value);
@@ -94,7 +93,6 @@ private:
void _restoreDefaults ();
private:
- QTimer _timer;
QStringList _channels;
QStringList _baudRates;
QString _ipAddress;
diff --git a/src/AutoPilotPlugins/Common/MixersComponent.cc b/src/AutoPilotPlugins/Common/MixersComponent.cc
new file mode 100644
index 0000000000000000000000000000000000000000..efe440b97bf90832f067cf242465cef33a60562e
--- /dev/null
+++ b/src/AutoPilotPlugins/Common/MixersComponent.cc
@@ -0,0 +1,62 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+#include "MixersComponent.h"
+#include "ParameterManager.h"
+
+MixersComponent::MixersComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent)
+ : VehicleComponent(vehicle, autopilot, parent)
+ , _name(tr("Mixers"))
+{
+}
+
+QString MixersComponent::name(void) const
+{
+ return _name;
+}
+
+QString MixersComponent::description(void) const
+{
+ return tr("Mixers tuning is used to blah, blah, blah... [WIP]");
+}
+
+QString MixersComponent::iconResource(void) const
+{
+ return QStringLiteral("/qmlimages/TuningComponentIcon.png");
+}
+
+bool MixersComponent::requiresSetup(void) const
+{
+ return false;
+}
+
+bool MixersComponent::setupComplete(void) const
+{
+ return true;
+}
+
+QStringList MixersComponent::setupCompleteChangedTriggerList(void) const
+{
+ return QStringList();
+}
+
+QUrl MixersComponent::setupSource(void) const
+{
+ return QUrl::fromUserInput(QStringLiteral("qrc:/qml/MixersComponent.qml"));
+}
+
+QUrl MixersComponent::summaryQmlSource(void) const
+{
+ return QUrl();
+}
+
+QString MixersComponent::prerequisiteSetup(void) const
+{
+ return QString();
+}
diff --git a/src/AutoPilotPlugins/Common/MixersComponent.h b/src/AutoPilotPlugins/Common/MixersComponent.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a624d6f76b9ada0bde5f00f613cd6935787ca67
--- /dev/null
+++ b/src/AutoPilotPlugins/Common/MixersComponent.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+#ifndef MixersComponent_H
+#define MixersComponent_H
+
+#include "VehicleComponent.h"
+
+// Mixers Tuning vehicle component
+class MixersComponent : public VehicleComponent
+{
+ Q_OBJECT
+
+public:
+ MixersComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent = NULL);
+
+ // Virtuals from VehicleComponent
+ QStringList setupCompleteChangedTriggerList(void) const final;
+
+ // Virtuals from VehicleComponent
+ QString name(void) const final;
+ QString description(void) const final;
+ QString iconResource(void) const final;
+ bool requiresSetup(void) const final;
+ bool setupComplete(void) const final;
+ QUrl setupSource(void) const final;
+ QUrl summaryQmlSource(void) const final;
+ QString prerequisiteSetup(void) const final;
+ bool allowSetupWhileArmed(void) const final { return true; }
+
+private:
+ const QString _name;
+ QVariantList _summaryItems;
+};
+
+#endif
diff --git a/src/AutoPilotPlugins/Common/MixersComponent.qml b/src/AutoPilotPlugins/Common/MixersComponent.qml
new file mode 100644
index 0000000000000000000000000000000000000000..84034427b3faf0fc486eee7bde72c68ac090c98e
--- /dev/null
+++ b/src/AutoPilotPlugins/Common/MixersComponent.qml
@@ -0,0 +1,38 @@
+/****************************************************************************
+ *
+ * (c) 2009-2016 QGROUNDCONTROL PROJECT
+ *
+ * QGroundControl is licensed according to the terms in the file
+ * COPYING.md in the root of the source code directory.
+ *
+ ****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 1.4
+
+import QGroundControl.FactSystem 1.0
+import QGroundControl.FactControls 1.0
+import QGroundControl.Palette 1.0
+import QGroundControl.Controls 1.0
+import QGroundControl.ScreenTools 1.0
+
+// Mixer Tuning setup page
+SetupPage {
+ id: tuningPage
+ pageComponent: tuningPageComponent
+
+ Component {
+ id: tuningPageComponent
+
+ Column {
+ width: availableWidth
+ spacing: _margins
+
+ FactPanelController { id: controller; factPanel: tuningPage.viewPanel }
+
+ QGCPalette { id: palette; colorGroupEnabled: true }
+
+ QGCLabel { text: qsTr("Lot of Qml code goes here...") }
+ } // Column
+ } // Component
+} // SetupView
diff --git a/src/AutoPilotPlugins/Common/MotorComponent.cc b/src/AutoPilotPlugins/Common/MotorComponent.cc
index fe7b611d207cfcbdb49f378f2986ce5ca02e1b4e..972d243fff7a48e0bf219f50a0a69e3f38343578 100644
--- a/src/AutoPilotPlugins/Common/MotorComponent.cc
+++ b/src/AutoPilotPlugins/Common/MotorComponent.cc
@@ -7,10 +7,7 @@
*
****************************************************************************/
-
#include "MotorComponent.h"
-#include "APMAutoPilotPlugin.h"
-#include "APMAirframeComponent.h"
MotorComponent::MotorComponent(Vehicle* vehicle, AutoPilotPlugin* autopilot, QObject* parent) :
VehicleComponent(vehicle, autopilot, parent),
diff --git a/src/AutoPilotPlugins/Common/RadioComponent.qml b/src/AutoPilotPlugins/Common/RadioComponent.qml
index 75e038a5eea02b0de993f3aebcd285d7afff5a3e..2d4bd7fc6ddc7c344b1234052ab862dbe69fa849 100644
--- a/src/AutoPilotPlugins/Common/RadioComponent.qml
+++ b/src/AutoPilotPlugins/Common/RadioComponent.qml
@@ -423,7 +423,11 @@ SetupPage {
}
Repeater {
- model: QGroundControl.multiVehicleManager.activeVehicle.px4Firmware ? [ "RC_MAP_FLAPS", "RC_MAP_AUX1", "RC_MAP_AUX2", "RC_MAP_PARAM1", "RC_MAP_PARAM2", "RC_MAP_PARAM3"] : 0
+ model: QGroundControl.multiVehicleManager.activeVehicle.px4Firmware ?
+ (QGroundControl.multiVehicleManager.activeVehicle.multiRotor ?
+ [ "RC_MAP_AUX1", "RC_MAP_AUX2", "RC_MAP_PARAM1", "RC_MAP_PARAM2", "RC_MAP_PARAM3"] :
+ [ "RC_MAP_FLAPS", "RC_MAP_AUX1", "RC_MAP_AUX2", "RC_MAP_PARAM1", "RC_MAP_PARAM2", "RC_MAP_PARAM3"]) :
+ 0
Row {
spacing: ScreenTools.defaultFontPixelWidth
diff --git a/src/AutoPilotPlugins/Common/RadioComponentController.cc b/src/AutoPilotPlugins/Common/RadioComponentController.cc
index a6f69d44fe671dba5c9786dd73a6977f263b01bd..f64f29517c5a87ad5b7933c916e2434f672eb7d5 100644
--- a/src/AutoPilotPlugins/Common/RadioComponentController.cc
+++ b/src/AutoPilotPlugins/Common/RadioComponentController.cc
@@ -13,12 +13,12 @@
/// @author Don Gagne
QGC_LOGGING_CATEGORY(RadioComponentControllerLog, "RadioComponentControllerLog")
+QGC_LOGGING_CATEGORY(RadioComponentControllerVerboseLog, "RadioComponentControllerVerboseLog")
#ifdef UNITTEST_BUILD
// Nasty hack to expose controller to unit test code
@@ -27,78 +27,78 @@ RadioComponentController* RadioComponentController::_unitTestController = NULL;
const int RadioComponentController::_updateInterval = 150; ///< Interval for timer which updates radio channel widgets
const int RadioComponentController::_rcCalPWMCenterPoint = ((RadioComponentController::_rcCalPWMValidMaxValue - RadioComponentController::_rcCalPWMValidMinValue) / 2.0f) + RadioComponentController::_rcCalPWMValidMinValue;
-// FIXME: Double check these mins againt 150% throws
-const int RadioComponentController::_rcCalPWMValidMinValue = 1300; ///< Largest valid minimum PWM Min range value
-const int RadioComponentController::_rcCalPWMValidMaxValue = 1700; ///< Smallest valid maximum PWM Max range value
-const int RadioComponentController::_rcCalPWMDefaultMinValue = 1000; ///< Default value for Min if not set
-const int RadioComponentController::_rcCalPWMDefaultMaxValue = 2000; ///< Default value for Max if not set
-const int RadioComponentController::_rcCalRoughCenterDelta = 50; ///< Delta around center point which is considered to be roughly centered
-const int RadioComponentController::_rcCalMoveDelta = 300; ///< Amount of delta past center which is considered stick movement
-const int RadioComponentController::_rcCalSettleDelta = 20; ///< Amount of delta which is considered no stick movement
-const int RadioComponentController::_rcCalMinDelta = 100; ///< Amount of delta allowed around min value to consider channel at min
+const int RadioComponentController::_rcCalPWMValidMinValue = 1300; ///< Largest valid minimum PWM Min range value
+const int RadioComponentController::_rcCalPWMValidMaxValue = 1700; ///< Smallest valid maximum PWM Max range value
+const int RadioComponentController::_rcCalPWMDefaultMinValue = 1000; ///< Default value for Min if not set
+const int RadioComponentController::_rcCalPWMDefaultMaxValue = 2000; ///< Default value for Max if not set
+const int RadioComponentController::_rcCalRoughCenterDelta = 50; ///< Delta around center point which is considered to be roughly centered
+const int RadioComponentController::_rcCalMoveDelta = 300; ///< Amount of delta past center which is considered stick movement
+const int RadioComponentController::_rcCalSettleDelta = 20; ///< Amount of delta which is considered no stick movement
+const int RadioComponentController::_rcCalMinDelta = 100; ///< Amount of delta allowed around min value to consider channel at min
const int RadioComponentController::_stickDetectSettleMSecs = 500;
-const char* RadioComponentController::_imageFilePrefix = "calibration/";
+const char* RadioComponentController::_imageFilePrefix = "calibration/";
const char* RadioComponentController::_imageFileMode1Dir = "mode1/";
const char* RadioComponentController::_imageFileMode2Dir = "mode2/";
-const char* RadioComponentController::_imageCenter = "radioCenter.png";
-const char* RadioComponentController::_imageHome = "radioHome.png";
-const char* RadioComponentController::_imageThrottleUp = "radioThrottleUp.png";
+const char* RadioComponentController::_imageCenter = "radioCenter.png";
+const char* RadioComponentController::_imageHome = "radioHome.png";
+const char* RadioComponentController::_imageThrottleUp = "radioThrottleUp.png";
const char* RadioComponentController::_imageThrottleDown = "radioThrottleDown.png";
-const char* RadioComponentController::_imageYawLeft = "radioYawLeft.png";
-const char* RadioComponentController::_imageYawRight = "radioYawRight.png";
-const char* RadioComponentController::_imageRollLeft = "radioRollLeft.png";
-const char* RadioComponentController::_imageRollRight = "radioRollRight.png";
-const char* RadioComponentController::_imagePitchUp = "radioPitchUp.png";
-const char* RadioComponentController::_imagePitchDown = "radioPitchDown.png";
+const char* RadioComponentController::_imageYawLeft = "radioYawLeft.png";
+const char* RadioComponentController::_imageYawRight = "radioYawRight.png";
+const char* RadioComponentController::_imageRollLeft = "radioRollLeft.png";
+const char* RadioComponentController::_imageRollRight = "radioRollRight.png";
+const char* RadioComponentController::_imagePitchUp = "radioPitchUp.png";
+const char* RadioComponentController::_imagePitchDown = "radioPitchDown.png";
const char* RadioComponentController::_imageSwitchMinMax = "radioSwitchMinMax.png";
-const char* RadioComponentController::_settingsGroup = "RadioCalibration";
+const char* RadioComponentController::_settingsGroup = "RadioCalibration";
const char* RadioComponentController::_settingsKeyTransmitterMode = "TransmitterMode";
+const char* RadioComponentController::_px4RevParamFormat = "RC%1_REV";
+const char* RadioComponentController::_apmNewRevParamFormat = "RC%1_REVERSED";
+
const struct RadioComponentController::FunctionInfo RadioComponentController::_rgFunctionInfoPX4[RadioComponentController::rcCalFunctionMax] = {
- //Parameter required
- { "RC_MAP_ROLL" },
- { "RC_MAP_PITCH" },
- { "RC_MAP_YAW" },
- { "RC_MAP_THROTTLE" },
- { "RC_MAP_MODE_SW" },
- { "RC_MAP_POSCTL_SW" },
- { "RC_MAP_LOITER_SW" },
- { "RC_MAP_RETURN_SW" },
- { "RC_MAP_ACRO_SW" },
+{ "RC_MAP_ROLL" },
+{ "RC_MAP_PITCH" },
+{ "RC_MAP_YAW" },
+{ "RC_MAP_THROTTLE" }
};
const struct RadioComponentController::FunctionInfo RadioComponentController::_rgFunctionInfoAPM[RadioComponentController::rcCalFunctionMax] = {
- //Parameter required
- { "RCMAP_ROLL" },
- { "RCMAP_PITCH" },
- { "RCMAP_YAW" },
- { "RCMAP_THROTTLE" },
- { NULL },
- { NULL },
- { NULL },
- { NULL },
- { NULL },
+{ "RCMAP_ROLL" },
+{ "RCMAP_PITCH" },
+{ "RCMAP_YAW" },
+{ "RCMAP_THROTTLE" }
};
-RadioComponentController::RadioComponentController(void) :
- _currentStep(-1),
- _transmitterMode(2),
- _chanCount(0),
- _rcCalState(rcCalStateChannelWait),
- _unitTestMode(false),
- _statusText(NULL),
- _cancelButton(NULL),
- _nextButton(NULL),
- _skipButton(NULL)
+RadioComponentController::RadioComponentController(void)
+ : _currentStep(-1)
+ , _transmitterMode(2)
+ , _chanCount(0)
+ , _rcCalState(rcCalStateChannelWait)
+ , _unitTestMode(false)
+ , _statusText(NULL)
+ , _cancelButton(NULL)
+ , _nextButton(NULL)
+ , _skipButton(NULL)
{
#ifdef UNITTEST_BUILD
// Nasty hack to expose controller to unit test code
_unitTestController = this;
#endif
+ if (parameterExists(FactSystem::defaultComponentId, QStringLiteral("RC1_REVERSED"))) {
+ // Newer ardupilot firmwares have a different reverse param naming scheme and value scheme
+ _revParamFormat = _apmNewRevParamFormat;
+ _revParamIsBool = true; // param value is boolean 0/1 for reversed or not
+ } else {
+ // Older ardupilot firmwares share the same naming convention as PX4
+ _revParamFormat = _px4RevParamFormat;
+ _revParamIsBool = false; // paeram value if -1 indicates reversed
+ }
+
connect(_vehicle, &Vehicle::rcChannelsChanged, this, &RadioComponentController::_rcChannelsChanged);
_loadSettings();
@@ -239,7 +239,7 @@ void RadioComponentController::_rcChannelsChanged(int channelCount, int pwmValue
int channelValue = pwmValues[channel];
if (channelValue != -1) {
- qCDebug(RadioComponentControllerLog) << "Raw value" << channel << channelValue;
+ qCDebug(RadioComponentControllerVerboseLog) << "Raw value" << channel << channelValue;
_rcRawValue[channel] = channelValue;
emit channelRCValueChanged(channel, channelValue);
@@ -272,9 +272,12 @@ void RadioComponentController::_rcChannelsChanged(int channelCount, int pwmValue
}
} else {
const stateMachineEntry* state = _getStateMachineEntry(_currentStep);
- Q_ASSERT(state);
- if (state->rcInputFn) {
- (this->*state->rcInputFn)(state->function, channel, channelValue);
+ if (state) {
+ if (state->rcInputFn) {
+ (this->*state->rcInputFn)(state->function, channel, channelValue);
+ }
+ } else {
+ qWarning() << "Internal error: NULL _getStateMachineEntry return";
}
}
}
@@ -296,20 +299,27 @@ void RadioComponentController::nextButtonClicked(void)
_startCalibration();
} else {
const stateMachineEntry* state = _getStateMachineEntry(_currentStep);
- Q_ASSERT(state);
- Q_ASSERT(state->nextFn);
- (this->*state->nextFn)();
+ if (state && state->nextFn) {
+ (this->*state->nextFn)();
+ } else {
+ qWarning() << "Internal error: NULL _getStateMachineEntry return";
+ }
}
}
void RadioComponentController::skipButtonClicked(void)
{
- Q_ASSERT(_currentStep != -1);
+ if (_currentStep == -1) {
+ qWarning() << "Internal error: _currentStep == -1";
+ return;
+ }
const stateMachineEntry* state = _getStateMachineEntry(_currentStep);
- Q_ASSERT(state);
- Q_ASSERT(state->skipFn);
- (this->*state->skipFn)();
+ if (state && state->skipFn) {
+ (this->*state->skipFn)();
+ } else {
+ qWarning() << "Internal error: NULL _getStateMachineEntry return";
+ }
}
void RadioComponentController::cancelButtonClicked(void)
@@ -572,38 +582,6 @@ void RadioComponentController::_resetInternalCalibrationValues(void)
_rgFunctionChannelMapping[i] = _chanMax();
}
- if (_px4Vehicle()) {
- // Reserve the existing Flight Mode switch settings channels so we don't re-use them
-
- static const rcCalFunctions rgFlightModeFunctions[] = {
- rcCalFunctionModeSwitch,
- rcCalFunctionPosCtlSwitch,
- rcCalFunctionLoiterSwitch,
- rcCalFunctionReturnSwitch };
- static const size_t crgFlightModeFunctions = sizeof(rgFlightModeFunctions) / sizeof(rgFlightModeFunctions[0]);
-
- for (size_t i=0; i < crgFlightModeFunctions; i++) {
- QVariant value;
- enum rcCalFunctions curFunction = rgFlightModeFunctions[i];
-
- Fact* paramFact = getParameterFact(FactSystem::defaultComponentId, _functionInfo()[curFunction].parameterName);
- if (paramFact) {
- bool ok;
- int switchChannel = paramFact->rawValue().toInt(&ok);
- Q_ASSERT(ok);
-
- // Parameter: 1-based channel, 0=not mapped
- // _rgFunctionChannelMapping: 0-based channel, _chanMax=not mapped
-
- if (switchChannel != 0) {
- qCDebug(RadioComponentControllerLog) << "Reserving 0-based switch channel" << switchChannel - 1;
- _rgFunctionChannelMapping[curFunction] = switchChannel - 1;
- _rgChannelInfo[switchChannel - 1].function = curFunction;
- }
- }
- }
- }
-
_signalAllAttiudeValueChanges();
}
@@ -626,9 +604,6 @@ void RadioComponentController::_setInternalCalibrationValuesFromParameters(void)
QString minTpl("RC%1_MIN");
QString maxTpl("RC%1_MAX");
QString trimTpl("RC%1_TRIM");
- QString revTpl("RC%1_REV");
-
- bool convertOk;
for (int i = 0; i < _chanMax(); ++i) {
struct ChannelInfo* info = &_rgChannelInfo[i];
@@ -646,29 +621,20 @@ void RadioComponentController::_setInternalCalibrationValuesFromParameters(void)
Fact* paramFact = getParameterFact(FactSystem::defaultComponentId, trimTpl.arg(i+1));
if (paramFact) {
- info->rcTrim = paramFact->rawValue().toInt(&convertOk);
- Q_ASSERT(convertOk);
+ info->rcTrim = paramFact->rawValue().toInt();
}
paramFact = getParameterFact(FactSystem::defaultComponentId, minTpl.arg(i+1));
if (paramFact) {
- info->rcMin = paramFact->rawValue().toInt(&convertOk);
- Q_ASSERT(convertOk);
+ info->rcMin = paramFact->rawValue().toInt();
}
paramFact = getParameterFact(FactSystem::defaultComponentId, maxTpl.arg(i+1));
if (paramFact) {
- info->rcMax = getParameterFact(FactSystem::defaultComponentId, maxTpl.arg(i+1))->rawValue().toInt(&convertOk);
- Q_ASSERT(convertOk);
+ info->rcMax = getParameterFact(FactSystem::defaultComponentId, maxTpl.arg(i+1))->rawValue().toInt();
}
- paramFact = getParameterFact(FactSystem::defaultComponentId, revTpl.arg(i+1));
- if (paramFact) {
- float floatReversed = paramFact->rawValue().toFloat(&convertOk);
- Q_ASSERT(convertOk);
- Q_ASSERT(floatReversed == 1.0f || floatReversed == -1.0f);
- info->reversed = floatReversed == -1.0f;
- }
+ info->reversed = _channelReversedParamValue(i);
}
for (int i=0; irawValue().toInt(&convertOk);
- Q_ASSERT(convertOk);
+ paramChannel = paramFact->rawValue().toInt();
if (paramChannel != 0) {
_rgFunctionChannelMapping[i] = paramChannel - 1;
@@ -713,21 +678,21 @@ void RadioComponentController::_validateCalibration(void)
info->rcTrim = info->rcMin + ((info->rcMax - info->rcMin) / 2);
} else {
switch (_rgChannelInfo[chan].function) {
- case rcCalFunctionThrottle:
- case rcCalFunctionYaw:
- case rcCalFunctionRoll:
- case rcCalFunctionPitch:
- // Make sure trim is within min/max
- if (info->rcTrim < info->rcMin) {
- info->rcTrim = info->rcMin;
- } else if (info->rcTrim > info->rcMax) {
- info->rcTrim = info->rcMax;
- }
- break;
- default:
- // Non-attitude control channels have calculated trim
- info->rcTrim = info->rcMin + ((info->rcMax - info->rcMin) / 2);
- break;
+ case rcCalFunctionThrottle:
+ case rcCalFunctionYaw:
+ case rcCalFunctionRoll:
+ case rcCalFunctionPitch:
+ // Make sure trim is within min/max
+ if (info->rcTrim < info->rcMin) {
+ info->rcTrim = info->rcMin;
+ } else if (info->rcTrim > info->rcMax) {
+ info->rcTrim = info->rcMax;
+ }
+ break;
+ default:
+ // Non-attitude control channels have calculated trim
+ info->rcTrim = info->rcMin + ((info->rcMax - info->rcMin) / 2);
+ break;
}
}
@@ -762,7 +727,6 @@ void RadioComponentController::_writeCalibration(void)
QString minTpl("RC%1_MIN");
QString maxTpl("RC%1_MAX");
QString trimTpl("RC%1_TRIM");
- QString revTpl("RC%1_REV");
// Note that the rc parameters are all float, so you must cast to float in order to get the right QVariant
for (int chan = 0; chan<_chanMax(); chan++) {
@@ -788,19 +752,16 @@ void RadioComponentController::_writeCalibration(void)
}
// For multi-rotor we can determine reverse setting during radio cal. For anything other than multi-rotor, servo installation
- // may affect channel reversing so we can't automatically determine it.
- if (_vehicle->multiRotor()) {
+ // may affect channel reversing so we can't automatically determine it. This is ok for PX4 given how it uses mixers, but not for ArduPilot.
+ if (_vehicle->px4Firmware() || _vehicle->multiRotor()) {
// APM multi-rotor has a backwards interpretation of "reversed" on the Pitch control. So be careful.
- float reversedParamValue;
+ bool reversed;
if (_px4Vehicle() || info->function != rcCalFunctionPitch) {
- reversedParamValue = info->reversed ? -1.0f : 1.0f;
+ reversed = info->reversed;
} else {
- reversedParamValue = info->reversed ? 1.0f : -1.0f;
- }
- paramFact = getParameterFact(FactSystem::defaultComponentId, revTpl.arg(oneBasedChannel));
- if (paramFact) {
- paramFact->setRawValue(reversedParamValue);
+ reversed = !info->reversed;
}
+ _setChannelReversedParamValue(chan, reversed);
}
}
@@ -842,7 +803,10 @@ void RadioComponentController::_writeCalibration(void)
/// @brief Starts the calibration process
void RadioComponentController::_startCalibration(void)
{
- Q_ASSERT(_chanCount >= _chanMinimum);
+ if (_chanCount < _chanMinimum) {
+ qWarning() << "Call to RadioComponentController::_startCalibration with _chanCount < _chanMinimum";
+ return;
+ }
_resetInternalCalibrationValues();
@@ -898,7 +862,7 @@ void RadioComponentController::_rcCalSave(void)
_statusText->setProperty("text",
"The current calibration settings are now displayed for each channel on screen.\n\n"
- "Click the Next button to upload calibration to board. Click Cancel if you don't want to save these values.");
+ "Click the Next button to upload calibration to board. Click Cancel if you don't want to save these values.");
_nextButton->setEnabled(true);
_skipButton->setEnabled(false);
@@ -940,7 +904,8 @@ void RadioComponentController::_setHelpImage(const char* imageFile)
} else if (_transmitterMode == 2) {
file += _imageFileMode2Dir;
} else {
- Q_ASSERT(false);
+ qWarning() << "Internal error: Bad _transmitterMode value";
+ return;
}
file += imageFile;
@@ -1090,3 +1055,34 @@ int RadioComponentController::_chanMax(void) const
{
return _px4Vehicle() ? _chanMaxPX4 : _chanMaxAPM;
}
+
+bool RadioComponentController::_channelReversedParamValue(int channel)
+{
+ Fact* paramFact = getParameterFact(FactSystem::defaultComponentId, _revParamFormat.arg(channel+1));
+ if (paramFact) {
+ if (_revParamIsBool) {
+ return paramFact->rawValue().toBool();
+ } else {
+ bool convertOk;
+ float floatReversed = paramFact->rawValue().toFloat(&convertOk);
+ if (!convertOk) {
+ floatReversed = 1.0f;
+ }
+ return floatReversed == -1.0f;
+ }
+ }
+
+ return false;
+}
+
+void RadioComponentController::_setChannelReversedParamValue(int channel, bool reversed)
+{
+ Fact* paramFact = getParameterFact(FactSystem::defaultComponentId, _revParamFormat.arg(channel+1));
+ if (paramFact) {
+ if (_revParamIsBool) {
+ paramFact->setRawValue(reversed);
+ } else {
+ paramFact->setRawValue(reversed ? -1.0f : 1.0f);
+ }
+ }
+}
diff --git a/src/AutoPilotPlugins/Common/RadioComponentController.h b/src/AutoPilotPlugins/Common/RadioComponentController.h
index bd3c056cf3ab450b852b1985f210acdbff9978ba..57f0ff02c403a5ecad54cea36ea82314b7b31739 100644
--- a/src/AutoPilotPlugins/Common/RadioComponentController.h
+++ b/src/AutoPilotPlugins/Common/RadioComponentController.h
@@ -24,6 +24,7 @@
#include "AutoPilotPlugin.h"
Q_DECLARE_LOGGING_CATEGORY(RadioComponentControllerLog)
+Q_DECLARE_LOGGING_CATEGORY(RadioComponentControllerVerboseLog)
class RadioConfigest;
@@ -149,20 +150,7 @@ private:
rcCalFunctionPitch,
rcCalFunctionYaw,
rcCalFunctionThrottle,
- rcCalFunctionModeSwitch,
- rcCalFunctionPosCtlSwitch,
- rcCalFunctionLoiterSwitch,
- rcCalFunctionReturnSwitch,
- rcCalFunctionAcroSwitch,
rcCalFunctionMax,
-
- // Attitude functions are roll/pitch/yaw/throttle
- rcCalFunctionFirstAttitudeFunction = rcCalFunctionRoll,
- rcCalFunctionLastAttitudeFunction = rcCalFunctionThrottle,
-
- // Non-Attitude functions are everything else
- rcCalFunctionFirstNonAttitudeFunction = rcCalFunctionModeSwitch,
- rcCalFunctionLastNonAttitudeFunction = rcCalFunctionAcroSwitch,
};
/// @brief The states of the calibration state machine.
@@ -245,7 +233,10 @@ private:
void _signalAllAttiudeValueChanges(void);
int _chanMax(void) const;
-
+
+ bool _channelReversedParamValue(int channel);
+ void _setChannelReversedParamValue(int channel, bool reversed);
+
// @brief Called by unit test code to set the mode to unit testing
void _setUnitTestMode(void){ _unitTestMode = true; }
@@ -272,20 +263,20 @@ private:
int _transmitterMode; ///< 1: transmitter is mode 1, 2: transmitted is mode 2
static const int _updateInterval; ///< Interval for ui update timer
-
+
static const struct FunctionInfo _rgFunctionInfoAPM[rcCalFunctionMax]; ///< Information associated with each function, PX4 firmware
static const struct FunctionInfo _rgFunctionInfoPX4[rcCalFunctionMax]; ///< Information associated with each function, APM firmware
int _rgFunctionChannelMapping[rcCalFunctionMax]; ///< Maps from rcCalFunctions to channel index. _chanMax indicates channel not set for this function.
static const int _attitudeControls = 5;
-
+
int _chanCount; ///< Number of actual rc channels available
static const int _chanMaxPX4 = 18; ///< Maximum number of supported rc channels, PX4 Firmware
static const int _chanMaxAPM = 14; ///< Maximum number of supported rc channels, APM firmware
static const int _chanMaxAny = 18; ///< Maximum number of support rc channels by this implementation
static const int _chanMinimum = 5; ///< Minimum numner of channels required to run
-
+
struct ChannelInfo _rgChannelInfo[_chanMaxAny]; ///< Information associated with each rc channel
QList _apmPossibleMissingRCChannelParams; ///< List of possible missing RC*_* params for APM stack
@@ -305,7 +296,12 @@ private:
static const int _rcCalMoveDelta;
static const int _rcCalSettleDelta;
static const int _rcCalMinDelta;
-
+
+ static const char* _px4RevParamFormat;
+ static const char* _apmNewRevParamFormat;
+ QString _revParamFormat;
+ bool _revParamIsBool;
+
int _rcValueSave[_chanMaxAny]; ///< Saved values prior to detecting channel movement
int _rcRawValue[_chanMaxAny]; ///< Current set of raw channel values
diff --git a/src/AutoPilotPlugins/PX4/AirframeComponent.qml b/src/AutoPilotPlugins/PX4/AirframeComponent.qml
index 0c049b517100c1c2d4c8e203a31b6b78e5b4e33a..13a3f3b8f83cdf0d8d8aaeef78bc869e9241f583 100644
--- a/src/AutoPilotPlugins/PX4/AirframeComponent.qml
+++ b/src/AutoPilotPlugins/PX4/AirframeComponent.qml
@@ -104,8 +104,9 @@ SetupPage {
QGCLabel {
anchors.fill: parent
wrapMode: Text.WordWrap
- text: qsTr("Clicking “Apply” will save the changes you have made to your airframe configuration. ") +
- qsTr("Your vehicle will also be restarted in order to complete the process.")
+ text: qsTr("Clicking “Apply” will save the changes you have made to your airframe configuration. \
+All vehicle parameters other than Radio Calibration will be reset. \
+Your vehicle will also be restarted in order to complete the process.")
}
}
}
@@ -207,6 +208,7 @@ SetupPage {
onCheckedChanged: {
if (checked && combo.currentIndex != -1) {
+ console.log("check box change", combo.currentIndex)
controller.autostartId = modelData.airframes[combo.currentIndex].autostartId
}
}
@@ -229,8 +231,9 @@ SetupPage {
onActivated: {
applyButton.primary = true
- controller.autostartId = modelData.airframes[index].autostartId
airframeCheckBox.checked = true;
+ console.log("combo change", index)
+ controller.autostartId = modelData.airframes[index].autostartId
}
}
}
diff --git a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc
index 2048101a02e0ece35dca432e06621fdfabbf8fe9..bbcb97b471b9bcd0bd75b1bcde7ff6588f3f7c10 100644
--- a/src/AutoPilotPlugins/PX4/AirframeComponentController.cc
+++ b/src/AutoPilotPlugins/PX4/AirframeComponentController.cc
@@ -15,7 +15,6 @@
#include "AirframeComponentAirframes.h"
#include "QGCMAVLink.h"
#include "MultiVehicleManager.h"
-#include "AutoPilotPluginManager.h"
#include "QGCApplication.h"
#include
@@ -118,7 +117,7 @@ void AirframeComponentController::_waitParamWriteSignal(QVariant value)
void AirframeComponentController::_rebootAfterStackUnwind(void)
{
- _uas->executeCommand(MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN, 1, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
+ _vehicle->sendMavCommand(_vehicle->defaultComponentId(), MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN, true /* showError */, 1.0f);
qgcApp()->processEvents(QEventLoop::ExcludeUserInputEvents);
for (unsigned i = 0; i < 2000; i++) {
QGC::SLEEP::usleep(500);
diff --git a/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml b/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
index 67f947e6750d252492bcd973cc9aebe47a6c978f..81d6019f7b77cf89858c667cfe63a9e45c7495f7 100644
--- a/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
+++ b/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml
@@ -82,6 +82,17 @@
Flying Wing
+
+