From be0b79f1fcb6fe6b04bc0b180a40fc825c56a43f Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Thu, 10 Jan 2019 21:53:37 -0800 Subject: [PATCH] fixed windows build problem --- CMakeLists.txt | 2 +- forms/mbientconfigpanel.cpp | 8 ++++++-- forms/mbientconfigpanel.h | 1 + platform/windows/common/DiscoveryAgent.h | 1 - platform/windows/common/metawearwrapper.h | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50ec83f..4ba8f8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,7 @@ if (MSVC) platform/windows/common/DiscoveryAgent.h ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") - + add_compile_definitions(_MBCS) add_compile_options("/std:c++14") include_directories(zlib) message(${Qt5Widgets_INCLUDE_DIRS}/QtZlib) diff --git a/forms/mbientconfigpanel.cpp b/forms/mbientconfigpanel.cpp index 7a987a4..59e8d77 100644 --- a/forms/mbientconfigpanel.cpp +++ b/forms/mbientconfigpanel.cpp @@ -2,6 +2,11 @@ // Created by michaelpollind on 21/12/18. // +//I have no idea windows +#ifdef _WIN32 + #include +#endif + #include "forms/mbientconfigpanel.h" #include "ui_mbientconfigpanel.h" @@ -25,7 +30,6 @@ const float MbientConfigPanel::ACC_ODR_RANGE[] = {2.0f, 4.0f, 8.0f, 16.0f}; const float MbientConfigPanel::ACC_FSR_RANGE[] = {12.5f, 50.f,100.0f,200.0f}; const float MbientConfigPanel::FUSION_RANGE[] = {8.0f,12.5f,50.0f,100.0f}; - MbientConfigPanel::MbientConfigPanel(QWidget *parent) : QWidget(parent), ui(new Ui::MbientConfigPanel){ ui->setupUi(this); @@ -352,6 +356,6 @@ float MbientConfigPanel::toFusionSampleRangeIndex(int index) { if(index < 0 || index > 3){ return 0; } - return FUSION_RANGE[index]; + return MbientConfigPanel::FUSION_RANGE[index]; } diff --git a/forms/mbientconfigpanel.h b/forms/mbientconfigpanel.h index eaae66e..9428258 100644 --- a/forms/mbientconfigpanel.h +++ b/forms/mbientconfigpanel.h @@ -5,6 +5,7 @@ #ifndef SMART_MBIENTCONFIGPANEL_H #define SMART_MBIENTCONFIGPANEL_H + #include #include #include <3rdparty/mbientlab/src/metawear/sensor/gyro_bmi160.h> diff --git a/platform/windows/common/DiscoveryAgent.h b/platform/windows/common/DiscoveryAgent.h index ab2a859..7b80198 100644 --- a/platform/windows/common/DiscoveryAgent.h +++ b/platform/windows/common/DiscoveryAgent.h @@ -4,7 +4,6 @@ #ifndef SMART_DISCOVERYAGENT_H #define SMART_DISCOVERYAGENT_H - #include "common/BaseDiscoveryAgent.h" #include #include diff --git a/platform/windows/common/metawearwrapper.h b/platform/windows/common/metawearwrapper.h index 8d23fbc..34367bf 100644 --- a/platform/windows/common/metawearwrapper.h +++ b/platform/windows/common/metawearwrapper.h @@ -5,6 +5,7 @@ #ifndef SMART_QTMETAWEARWRAPPER_H #define SMART_QTMETAWEARWRAPPER_H + #include #include "common/metawearwrapperbase.h"