mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Update for C++17 and fix MSVC warnings (#1694)
* Update MSVC arguments * Fix json allocator * Fix simulation diamond * Bump gtest * Remove empty varargs in unit tests * Replace test case with test suite * Remove deprecation warning in optional * Remove need for NOMIXMAX to be defined in wpilib headers
This commit is contained in:
committed by
Peter Johnson
parent
fb1239a2ad
commit
221011494d
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lowfisim/SimulatorComponent.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class AccelerometerSim : public virtual SimulatorComponent {
|
||||
class AccelerometerSim : public SimulatorComponentBase {
|
||||
public:
|
||||
virtual double GetAcceleration() = 0;
|
||||
virtual void SetAcceleration(double acceleration) = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lowfisim/SimulatorComponent.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class EncoderSim : public virtual SimulatorComponent {
|
||||
class EncoderSim : public SimulatorComponentBase {
|
||||
public:
|
||||
virtual void SetPosition(double position) = 0;
|
||||
virtual void SetVelocity(double velocity) = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lowfisim/SimulatorComponent.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class GyroSim : public virtual SimulatorComponent {
|
||||
class GyroSim : public SimulatorComponentBase {
|
||||
public:
|
||||
virtual void SetAngle(double angle) = 0;
|
||||
virtual double GetAngle() = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lowfisim/SimulatorComponent.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class MotorSim : public virtual SimulatorComponent {
|
||||
class MotorSim : public SimulatorComponentBase {
|
||||
public:
|
||||
virtual double GetPosition() const = 0;
|
||||
virtual double GetVelocity() const = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -10,17 +10,13 @@
|
||||
#include <functional>
|
||||
|
||||
#include "lowfisim/AccelerometerSim.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class SimpleAccelerometerSim : public SimulatorComponentBase,
|
||||
public AccelerometerSim {
|
||||
class SimpleAccelerometerSim : public AccelerometerSim {
|
||||
public:
|
||||
using SimulatorComponentBase::GetDisplayName;
|
||||
|
||||
SimpleAccelerometerSim(const std::function<bool(void)>& initializedFunction,
|
||||
const std::function<void(double)>& setterFunction,
|
||||
const std::function<double(void)>& getterFunction)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -9,13 +9,12 @@
|
||||
|
||||
#include "ADXRS450_SpiGyroWrapperData.h"
|
||||
#include "lowfisim/GyroSim.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class ADXRS450_SpiGyroSim : public SimulatorComponentBase, public GyroSim {
|
||||
class ADXRS450_SpiGyroSim : public GyroSim {
|
||||
public:
|
||||
explicit ADXRS450_SpiGyroSim(int spiPort);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -8,14 +8,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "lowfisim/GyroSim.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
#include "simulation/AnalogGyroSim.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class WpiAnalogGyroSim : public SimulatorComponentBase, public GyroSim {
|
||||
class WpiAnalogGyroSim : public GyroSim {
|
||||
public:
|
||||
explicit WpiAnalogGyroSim(int index);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -8,14 +8,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "lowfisim/EncoderSim.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
#include "simulation/EncoderSim.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class WpiEncoderSim : public SimulatorComponentBase, public EncoderSim {
|
||||
class WpiEncoderSim : public EncoderSim {
|
||||
public:
|
||||
explicit WpiEncoderSim(int index);
|
||||
bool IsWrapperInitialized() const override;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -8,7 +8,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "lowfisim/MotorSim.h"
|
||||
#include "lowfisim/SimulatorComponentBase.h"
|
||||
#include "lowfisim/motormodel/MotorModel.h"
|
||||
#include "simulation/PWMSim.h"
|
||||
|
||||
@@ -16,7 +15,7 @@ namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class WpiMotorSim : public SimulatorComponentBase, public MotorSim {
|
||||
class WpiMotorSim : public MotorSim {
|
||||
public:
|
||||
explicit WpiMotorSim(int index, MotorModel& motorModelSimulator);
|
||||
bool IsWrapperInitialized() const override;
|
||||
|
||||
Reference in New Issue
Block a user