Set up wpiformat (#86)

This commit is contained in:
Tyler Veness
2017-08-25 17:48:06 -07:00
committed by Peter Johnson
parent dd85b1e519
commit 06636a0e1c
75 changed files with 866 additions and 655 deletions

View File

@@ -1,12 +1,12 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2016. All Rights Reserved. */
/* Copyright (c) 2016-2017 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. */
/*----------------------------------------------------------------------------*/
#ifndef CSCORE_H_
#define CSCORE_H_
#ifndef CSCORE_CSCORE_H_
#define CSCORE_CSCORE_H_
/* C API */
#include "cscore_c.h"
@@ -15,6 +15,6 @@
/* C++ API */
#include "cscore_cpp.h"
#include "cscore_oo.h"
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* CSCORE_H_ */
#endif /* CSCORE_CSCORE_H_ */

View File

@@ -1,16 +1,17 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2016. All Rights Reserved. */
/* Copyright (c) 2016-2017 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. */
/*----------------------------------------------------------------------------*/
#ifndef CSCORE_C_H_
#define CSCORE_C_H_
#ifndef CSCORE_CSCORE_C_H_
#define CSCORE_CSCORE_C_H_
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#ifdef __cplusplus
extern "C" {
#endif
@@ -46,7 +47,7 @@ typedef CS_Handle CS_Source;
enum CS_StatusValue {
CS_PROPERTY_WRITE_FAILED = 2000,
CS_OK = 0,
CS_INVALID_HANDLE = -2000, // handle was invalid (does not exist)
CS_INVALID_HANDLE = -2000, // handle was invalid (does not exist)
CS_WRONG_HANDLE_SUBTYPE = -2001,
CS_INVALID_PROPERTY = -2002,
CS_WRONG_PROPERTY_TYPE = -2003,
@@ -127,11 +128,7 @@ enum CS_HttpCameraKind {
//
// Sink kinds
//
enum CS_SinkKind {
CS_SINK_UNKNOWN = 0,
CS_SINK_MJPEG = 2,
CS_SINK_CV = 4
};
enum CS_SinkKind { CS_SINK_UNKNOWN = 0, CS_SINK_MJPEG = 2, CS_SINK_CV = 4 };
//
// Listener event kinds
@@ -165,7 +162,7 @@ struct CS_Event {
CS_Sink sink;
// Source/sink/property name
const char *name;
const char* name;
// Fields for CS_SOURCE_VIDEOMODE_CHANGED event
CS_VideoMode mode;
@@ -383,4 +380,4 @@ void CS_FreeNetworkInterfaces(char** interfaces, int count);
}
#endif
#endif /* CSCORE_C_H_ */
#endif // CSCORE_CSCORE_C_H_

View File

@@ -1,12 +1,12 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2015. All Rights Reserved. */
/* Copyright (c) 2015-2017 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. */
/*----------------------------------------------------------------------------*/
#ifndef CSCORE_CPP_H_
#define CSCORE_CPP_H_
#ifndef CSCORE_CSCORE_CPP_H_
#define CSCORE_CSCORE_CPP_H_
#include <stdint.h>
@@ -14,9 +14,9 @@
#include <string>
#include <vector>
#include "llvm/ArrayRef.h"
#include "llvm/SmallVector.h"
#include "llvm/StringRef.h"
#include <llvm/ArrayRef.h>
#include <llvm/SmallVector.h>
#include <llvm/StringRef.h>
#include "cscore_c.h"
@@ -88,7 +88,7 @@ struct RawEvent {
};
RawEvent() = default;
RawEvent(RawEvent::Kind kind_) : kind{kind_} {}
explicit RawEvent(RawEvent::Kind kind_) : kind{kind_} {}
RawEvent(llvm::StringRef name_, CS_Handle handle_, RawEvent::Kind kind_)
: kind{kind_}, name{name_} {
if (kind_ == kSinkCreated || kind_ == kSinkDestroyed ||
@@ -339,4 +339,4 @@ uint64_t CS_GrabSinkFrameTimeoutCpp(CS_Sink sink, cv::Mat* image,
void CS_PutSourceFrameCpp(CS_Source source, cv::Mat* image, CS_Status* status);
}
#endif // CSCORE_CPP_H_
#endif // CSCORE_CSCORE_CPP_H_

View File

@@ -1,14 +1,17 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2015. All Rights Reserved. */
/* Copyright (c) 2015-2017 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. */
/*----------------------------------------------------------------------------*/
#ifndef CSCORE_OO_H_
#define CSCORE_OO_H_
#ifndef CSCORE_CSCORE_OO_H_
#define CSCORE_CSCORE_OO_H_
#include <initializer_list>
#include <string>
#include <utility>
#include <vector>
#include "cscore_cpp.h"
@@ -416,18 +419,18 @@ class CvSource : public VideoSource {
/// @param defaultValue Default value
/// @param value Current value
/// @return Property
VideoProperty CreateIntegerProperty(llvm::StringRef name,
int minimum, int maximum, int step,
int defaultValue, int value);
VideoProperty CreateIntegerProperty(llvm::StringRef name, int minimum,
int maximum, int step, int defaultValue,
int value);
/// Create a boolean property.
/// @param name Property name
/// @param defaultValue Default value
/// @param value Current value
/// @return Property
VideoProperty CreateBooleanProperty(llvm::StringRef name,
bool defaultValue, bool value);
VideoProperty CreateBooleanProperty(llvm::StringRef name, bool defaultValue,
bool value);
/// Create a string property.
/// @param name Property name
/// @param defaultValue Default value
@@ -641,4 +644,4 @@ class VideoListener {
#include "cscore_oo.inl"
#endif // CSCORE_OO_H_
#endif // CSCORE_CSCORE_OO_H_