Browse Source

Fixed windows compile errors

QGC4.4
pixhawk 15 years ago
parent
commit
73b9e202c9
  1. 16
      deploy/qgroundcontrol_installer.nsi
  2. 10
      src/lib/qextserialport/win_qextserialport.h
  3. 13
      src/uas/UAS.cc

16
deploy/qgroundcontrol_installer.nsi

@ -16,20 +16,20 @@ LicenseData ..\license.txt
Section "" Section ""
SetOutPath $INSTDIR SetOutPath $INSTDIR
File qgroundcontrol\*.* File ..\release\*.*
WriteUninstaller $INSTDIR\QGroundcontrol_uninstall.exe WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe
SectionEnd SectionEnd
Section "Uninstall" Section "Uninstall"
Delete $INSTDIR\QGroundcontrol_uninstall.exe Delete $INSTDIR\QGroundControl_uninstall.exe
Delete $INSTDIR\*.* Delete $INSTDIR\*.*
RMDir $INSTDIR RMDir $INSTDIR
Delete "$SMPROGRAMS\QGroundcontrol\*.*" Delete "$SMPROGRAMS\QGroundControl\*.*"
RMDir "$SMPROGRAMS\QGroundcontrol\" RMDir "$SMPROGRAMS\QGroundControl\"
SectionEnd SectionEnd
Section "create Start Menu Shortcuts" Section "create Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\QGroundcontrol" CreateDirectory "$SMPROGRAMS\QGroundControl"
CreateShortCut "$SMPROGRAMS\QGroundcontrol\uninstall.lnk" "$INSTDIR\QGroundcontrol_uninstall.exe" "" "$INSTDIR\QGroundcontrol_uninstall.exe" 0 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 CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
SectionEnd SectionEnd

10
src/lib/qextserialport/win_qextserialport.h

@ -5,6 +5,16 @@
#include <windows.h> #include <windows.h>
#include <QThread> #include <QThread>
/* 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*/ /*if all warning messages are turned off, flag portability warnings to be turned off as well*/
#ifdef _TTY_NOWARN_ #ifdef _TTY_NOWARN_

13
src/uas/UAS.cc

@ -26,6 +26,19 @@
#include "LinkManager.h" #include "LinkManager.h"
#include "SerialLink.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(), UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
uasId(id), uasId(id),

Loading…
Cancel
Save