From 73b9e202c9bb0fabe3bccc70ba5e8df9d4bbff1e Mon Sep 17 00:00:00 2001 From: pixhawk Date: Sun, 2 Jan 2011 19:42:22 +0100 Subject: [PATCH] Fixed windows compile errors --- deploy/qgroundcontrol_installer.nsi | 16 ++++++++-------- src/lib/qextserialport/win_qextserialport.h | 10 ++++++++++ src/uas/UAS.cc | 13 +++++++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/deploy/qgroundcontrol_installer.nsi b/deploy/qgroundcontrol_installer.nsi index dca29cb1b..d2c351a6f 100644 --- a/deploy/qgroundcontrol_installer.nsi +++ b/deploy/qgroundcontrol_installer.nsi @@ -16,20 +16,20 @@ LicenseData ..\license.txt Section "" SetOutPath $INSTDIR - File qgroundcontrol\*.* - WriteUninstaller $INSTDIR\QGroundcontrol_uninstall.exe + File ..\release\*.* + WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe SectionEnd Section "Uninstall" - Delete $INSTDIR\QGroundcontrol_uninstall.exe + Delete $INSTDIR\QGroundControl_uninstall.exe Delete $INSTDIR\*.* RMDir $INSTDIR - Delete "$SMPROGRAMS\QGroundcontrol\*.*" - RMDir "$SMPROGRAMS\QGroundcontrol\" + Delete "$SMPROGRAMS\QGroundControl\*.*" + RMDir "$SMPROGRAMS\QGroundControl\" SectionEnd Section "create Start Menu Shortcuts" - CreateDirectory "$SMPROGRAMS\QGroundcontrol" - CreateShortCut "$SMPROGRAMS\QGroundcontrol\uninstall.lnk" "$INSTDIR\QGroundcontrol_uninstall.exe" "" "$INSTDIR\QGroundcontrol_uninstall.exe" 0 - CreateShortCut "$SMPROGRAMS\QGroundcontrol\QGroundcontrol.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0 + CreateDirectory "$SMPROGRAMS\QGroundControl" + CreateShortCut "$SMPROGRAMS\QGroundControl\uninstall.lnk" "$INSTDIR\QGroundControl_uninstall.exe" "" "$INSTDIR\QGroundControl_uninstall.exe" 0 + CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0 SectionEnd \ No newline at end of file diff --git a/src/lib/qextserialport/win_qextserialport.h b/src/lib/qextserialport/win_qextserialport.h index 1de6138c4..d3358f2d5 100644 --- a/src/lib/qextserialport/win_qextserialport.h +++ b/src/lib/qextserialport/win_qextserialport.h @@ -5,6 +5,16 @@ #include #include +/* These baudrates work on windows, but are not part of the windows headers */ +#ifndef CBR_230400 +#define CBR_230400 230400 +#endif +#ifndef CBR_460800 +#define CBR_460800 460800 +#endif +#ifndef CBR_921600 +#define CBR_921600 921600 +#endif /*if all warning messages are turned off, flag portability warnings to be turned off as well*/ #ifdef _TTY_NOWARN_ diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 3a3b61782..7fc1a66ae 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -26,6 +26,19 @@ #include "LinkManager.h" #include "SerialLink.h" +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif + +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 /* pi/2 */ +#endif + +#ifndef M_PI_4 +#define M_PI_4 0.78539816339744830962 /* pi/4 */ +#endif + + UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), uasId(id), -- 2.22.0