mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Update to 2018_v4 image and new build system. (#598)
* Revert "Force OpenCV to 3.1.0 (#602)"
This reverts commit 50ed55e8e2.
* Removes Simulation
* Removes old build system
* Removes old gtest
* Adds new gmock and gtest
* Updates to new ni-libraries
* removes MyRobot (to be replaced)
* moves files to new location
* Adds new sim backend and new test executables
* updates .styleguide and .gitignore
* Changes cpp WPILibVersion to a function
MSVC throws an AV with the old version.
* Disables USBCamera on all systems except for linux
* 2018 NI Libraries
* New build system
This commit is contained in:
committed by
Peter Johnson
parent
50ed55e8e2
commit
e1195e8b9d
67
hal/src/main/native/include/MockData/HAL_Value.h
Normal file
67
hal/src/main/native/include/MockData/HAL_Value.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2017. 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. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "HAL/Types.h"
|
||||
|
||||
/** HAL data types. */
|
||||
enum HAL_Type {
|
||||
HAL_UNASSIGNED = 0,
|
||||
HAL_BOOLEAN = 0x01,
|
||||
HAL_DOUBLE = 0x02,
|
||||
HAL_ENUM = 0x16,
|
||||
HAL_INT = 0x32,
|
||||
HAL_LONG = 0x64,
|
||||
};
|
||||
|
||||
/** HAL Entry Value. Note this is a typed union. */
|
||||
struct HAL_Value {
|
||||
union {
|
||||
HAL_Bool v_boolean;
|
||||
int32_t v_enum;
|
||||
int32_t v_int;
|
||||
int64_t v_long;
|
||||
double v_double;
|
||||
} data;
|
||||
enum HAL_Type type;
|
||||
};
|
||||
|
||||
inline HAL_Value MakeBoolean(HAL_Bool v) {
|
||||
HAL_Value value;
|
||||
value.type = HAL_BOOLEAN;
|
||||
value.data.v_boolean = v;
|
||||
return value;
|
||||
}
|
||||
|
||||
inline HAL_Value MakeEnum(int v) {
|
||||
HAL_Value value;
|
||||
value.type = HAL_ENUM;
|
||||
value.data.v_enum = v;
|
||||
return value;
|
||||
}
|
||||
|
||||
inline HAL_Value MakeInt(int v) {
|
||||
HAL_Value value;
|
||||
value.type = HAL_INT;
|
||||
value.data.v_int = v;
|
||||
return value;
|
||||
}
|
||||
|
||||
inline HAL_Value MakeLong(int64_t v) {
|
||||
HAL_Value value;
|
||||
value.type = HAL_LONG;
|
||||
value.data.v_long = v;
|
||||
return value;
|
||||
}
|
||||
|
||||
inline HAL_Value MakeDouble(double v) {
|
||||
HAL_Value value;
|
||||
value.type = HAL_DOUBLE;
|
||||
value.data.v_double = v;
|
||||
return value;
|
||||
}
|
||||
Reference in New Issue
Block a user