repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
jeanleflambeur/silkopter
silkopter/gs_old/src/Map_Viewer.h
#pragma once #include "HAL.h" #include "Comms.h" //#include "ui_Map_Viewer.h" namespace qmapcontrol { class MapControl; class MapAdapter; class MapLayer; } class Map_Viewer : public QWidget { public: Map_Viewer(QWidget *parent); ~Map_Viewer(); void add_sample(math::vec3d const& position); ...
jeanleflambeur/silkopter
q/include/util/Fps.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once namespace q { namespace util { class Fps { public: Fps(size_t fps_limit = 0); Fps(Fps const&) = default; Fps& operator=(Fps const&) = default; void tick(); float get_fps() const; Clock::duration get_frame_time() const; pri...
jeanleflambeur/silkopter
silkopter/fc/src/source/UltimateSensorFusion.h
<reponame>jeanleflambeur/silkopter #pragma once #include "HAL.h" #include "common/node/ISource.h" #include "common/stream/IAcceleration.h" #include "common/stream/IAngular_Velocity.h" #include "common/stream/IMagnetic_Field.h" #include "common/stream/IFrame.h" #include "common/stream/IPressure.h" #include "common/stre...
jeanleflambeur/silkopter
q/include/video/Material.h
<gh_stars>10-100 #pragma once #include "video/Uniform.h" #include "video/Uniform_Def.h" #include "video/Render_State.h" #include "video/Sampler.h" #include "Ptr_Fw_Declaration.h" #include "Technique.h" namespace q { namespace video { class Material { public: Material(); Material(Technique_c...
jeanleflambeur/silkopter
q/include/video/Render_Target.h
#pragma once #include "Ptr_Fw_Declaration.h" namespace q { namespace video { class Render_Target : public std::enable_shared_from_this<Render_Target>, public util::Noncopyable { public: virtual ~Render_Target() {} static auto create() -> Render_Target_ptr; enum class Color_Format : u...
jeanleflambeur/silkopter
q/include/res/Resource.h
#pragma once namespace q { namespace res { class Resource { public: Resource(Path const& path); virtual ~Resource() {} virtual bool is_valid() const = 0; virtual void unload() = 0; Path const& get_path() const; private: Path m_path; }; } }
jeanleflambeur/silkopter
q/include/scene/Skeleton.h
<reponame>jeanleflambeur/silkopter #pragma once namespace q { namespace scene { class Skeleton { public: Skeleton(); Skeleton(Skeleton&& other); Skeleton(Skeleton const&) = default; Skeleton& operator=(Skeleton const&) = default; bool operator==(Skeleton const& other); bool ...
jeanleflambeur/silkopter
silkopter/libs/utils/hw/Si4463.h
#pragma once #include <string> #include "ISPI.h" #include "utils/Clock.h" namespace util { namespace hw { class Si4463 { public: Si4463(); ~Si4463(); bool init(hw::ISPI& spi, uint8_t sdn_gpio); enum class Command : uint8_t { NOP = 0x00, POWER_UP = 0x02, PART_INFO = 0x01,...
jeanleflambeur/silkopter
qmath/test/config.h
#pragma once //#define TEST_AGAINST_EIGEN #ifdef TEST_AGAINST_EIGEN # include "Eigen/Dense" # include "Eigen/Geometry" #endif
jeanleflambeur/silkopter
silkopter/fc/src/sink/PIGPIO.h
<filename>silkopter/fc/src/sink/PIGPIO.h #pragma once #include "HAL.h" #include "common/node/ISink.h" #include "common/stream/IPWM.h" namespace silk { namespace hal { struct PIGPIO_Descriptor; struct PIGPIO_Config; } } namespace silk { namespace node { class PIGPIO : public ISink { public: PIGPIO(HAL& hal); ...
jeanleflambeur/silkopter
q/include/video/Viewport.h
<reponame>jeanleflambeur/silkopter #pragma once namespace q { namespace video { struct Viewport { Viewport(); Viewport(math::vec2u32 const& position, math::vec2u32 const& size); bool operator==(Viewport const& other) const; bool operator!=(Viewport const& other) const; math::vec2u32 position;...
jeanleflambeur/silkopter
silkopter/libs/common/stream/IBool.h
#pragma once #include "Stream_Base.h" namespace silk { namespace stream { class IBool : public IScalar_Stream<Semantic::BOOL> { public: typedef std::false_type can_be_filtered_t; typedef bool Value; typedef stream::Sample<Value> Sample; virtual auto get_samples() const -> std::v...
jeanleflambeur/silkopter
qbase/include/util/Noncopyable.h
<filename>qbase/include/util/Noncopyable.h<gh_stars>10-100 #pragma once namespace q { namespace util { class Noncopyable { public: Noncopyable() = default; private: Noncopyable(const Noncopyable&) = delete; Noncopyable& operator=(const Noncopyable&) = delete; }; } }
jeanleflambeur/silkopter
qinput/include/Gamepad.h
#pragma once namespace qinput { class Input_Mgr; // struct Gamepad_Event; class Gamepad : q::util::Noncopyable { friend class Input_Mgr; public: enum class Button { ////////////////////////////////////////////////////////////////////////// RIGHT_BUMPER ...
jeanleflambeur/silkopter
def_lang/include/def_lang/IVariant_Type.h
#pragma once #include "ITemplated_Type.h" namespace ts { class IVariant_Value; class Qualified_Type; class IVariant_Type: virtual public ITemplated_Type { public: virtual ~IVariant_Type() = default; typedef IVariant_Value value_type; virtual size_t get_inner_qualified_type_count() const = 0; virtu...
jeanleflambeur/silkopter
qinput/include/QInputStdAfx.h
<reponame>jeanleflambeur/silkopter #include <array> #include <set> #include "QBase.h" #include "qmath.h"
jeanleflambeur/silkopter
q/include/video/GLES/GLES_Texture.h
<filename>q/include/video/GLES/GLES_Texture.h #pragma once #include "video/Texture.h" namespace q { namespace video { class GLES_Texture : public Texture { friend class GLES_Renderer; friend class GLES_Shader; friend class GLES_Render_Target; public: GLES_Texture(Path const& path); ...
jeanleflambeur/silkopter
def_lang/include/def_lang/Symbol_Path.h
<filename>def_lang/include/def_lang/Symbol_Path.h #pragma once #include <string> #include <vector> namespace ts { class Symbol_Path { public: Symbol_Path() = default; Symbol_Path(std::string const& str); Symbol_Path(char const* str); Symbol_Path get_path_to(Symbol_Path const& path) const; bool ...
jeanleflambeur/silkopter
def_lang/include/def_lang/IOptional_Type.h
#pragma once #include "ITemplated_Type.h" namespace ts { class IOptional_Value; class Qualified_Type; class IOptional_Type: virtual public ITemplated_Type { public: virtual ~IOptional_Type() = default; typedef IOptional_Value value_type; virtual std::shared_ptr<const Qualified_Type> get_inner_qualifie...
jeanleflambeur/silkopter
silkopter/rc/src/Nodes.h
#pragma once #include "common/stream/IAcceleration.h" #include "common/stream/IADC.h" #include "common/stream/IFloat.h" #include "common/stream/IBool.h" #include "common/stream/IAngular_Velocity.h" #include "common/stream/IBattery_State.h" #include "common/stream/ICurrent.h" #include "common/stream/IDistance.h" #inclu...
jeanleflambeur/silkopter
silkopter/fc/src/FCStdAfx.h
#if defined __cplusplus #include <type_traits> #include <typeinfo> #include <algorithm> #include <iterator> #include <limits> #include <numeric> #include <memory> #include <vector> #include <deque> #include <array> #include <map> #include <set> #include <string> #include <chrono> #include <atomic> #in...
jeanleflambeur/silkopter
silkopter/gs/src/qnodeseditor/qneport.h
<reponame>jeanleflambeur/silkopter /* Copyright (c) 2012, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, t...
jeanleflambeur/silkopter
silkopter/gs_old/src/Sim_Window.h
<gh_stars>10-100 #pragma once #include <QMainWindow> #include <QtWidgets> #include "ui_Sim_Window.h" #include "Comms.h" #include "Render_Widget.h" #include "Camera_Controller_3D.h" #include "common/node/IMulti_Simulator.h" class Sim_Window : public QMainWindow { public: explicit Sim_Window(silk::HAL& hal, silk::...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Struct_Type.h
#pragma once #include "def_lang/IStruct_Type.h" #include "def_lang/ep/Declaration_Scope_EP.h" #include "def_lang/ep/Member_Def_Container_EP.h" #include "def_lang/ep/Attribute_Container_EP.h" namespace ts { class Struct_Type final: virtual public IStruct_Type, public Declaration_Scope_EP, public Member_Def_Container_...
jeanleflambeur/silkopter
silkopter/gs/src/stream_viewers/IStream_Viewer_Widget.h
<gh_stars>10-100 #pragma once #include "common/stream/IStream.h" namespace silk { class Comms; } class IStream_Viewer_Widget : public QWidget { public: virtual void init(silk::Comms& comms, std::string const& stream_path, uint32_t stream_rate, silk::stream::Type stream_type) = 0; };
jeanleflambeur/silkopter
q/include/Config.h
<reponame>jeanleflambeur/silkopter<filename>q/include/Config.h #pragma once //#define Q_USE_EXTERNAL_ALLOC //#define Q_USE_NED_ALLOC //#define Q_THREADING #ifdef _WIN32 # define Q_WINDOWS # ifndef NOMINMAX # define NOMINMAX //to avoid clashing with glm # endif # if defined(Q_POSIX_API) # undef Q_POSIX_...
jeanleflambeur/silkopter
silkopter/gs/src/value_editors/Variant_Value_Editor.h
<filename>silkopter/gs/src/value_editors/Variant_Value_Editor.h #pragma once #include "IValue_Editor.h" #include "Qualified_Value.h" class QWidget; class QCheckBox; class QComboBox; class Value_Editor_Factory; class Variant_Value_Editor : public IValue_Editor { public: Variant_Value_Editor(const Q...
jeanleflambeur/silkopter
def_lang/include/def_lang/ep/Attribute_Container_EP.h
<reponame>jeanleflambeur/silkopter<filename>def_lang/include/def_lang/ep/Attribute_Container_EP.h #pragma once #include <memory> #include <vector> #include "def_lang/IAttribute_Container.h" namespace ts { class IAttribute; class Attribute_Container_EP : virtual public IAttribute_Container { public: size_t get_...
jeanleflambeur/silkopter
silkopter/fc/src/source/CPPM_Receiver.h
#pragma once #include "HAL.h" #include "common/node/ISource.h" #include "common/stream/IPWM.h" #include "Basic_Output_Stream.h" #include <atomic> #include <vector> namespace silk { namespace hal { struct CPPM_Receiver_Descriptor; struct CPPM_Receiver_Config; } } namespace silk { namespace node { class CPPM_Rece...
jeanleflambeur/silkopter
silkopter/libs/embedded/utils/Timed_Scope.h
<gh_stars>10-100 #pragma once #include "chrono.h" namespace util { class Timed_Scope { public: Timed_Scope(char const* file, int line); ~Timed_Scope(); private: char const* m_file; int m_line; chrono::time_us m_start; }; } #define TIMED_BLOCK() debug::detail::Timed_Scope __ts__(__F...
jeanleflambeur/silkopter
def_lang/include/def_lang/ILiteral_Initializer.h
#pragma once #include "def_lang/IInitializer.h" namespace ts { class ILiteral; class ILiteral_Initializer : public virtual IInitializer { public: virtual ~ILiteral_Initializer() = default; virtual std::shared_ptr<const ILiteral> get_literal() const = 0; }; }
jeanleflambeur/silkopter
qmath/include/qmath/func_binary.h
#pragma once namespace math { //returns true if the argument is a power of 2. // isPow2(2) == true // isPow2(3) == false // isPow2(16) == true template<typename T> bool is_pot(T a); //returns the smallest power of 2 that is greater or equal than the argument // getSmallestPow2(127) == 128 // getSm...
jeanleflambeur/silkopter
silkopter/libs/common/node/IBrain.h
#pragma once #include "common/node/INode.h" namespace silk { namespace node { class IBrain : public Node_Base<Type::BRAIN> { public: }; } }
jeanleflambeur/silkopter
silkopter/libs/common/node/IPilot.h
<reponame>jeanleflambeur/silkopter #pragma once #include "common/node/INode.h" namespace silk { namespace node { class IPilot : public Node_Base<Type::PILOT> { public: }; } }
jeanleflambeur/silkopter
qdata/include/util/Preprocessor.h
<filename>qdata/include/util/Preprocessor.h #pragma once namespace q { namespace util { class Preprocessor : util::Noncopyable { public: enum class Flag : uint8_t { SPACES_FOR_COMMENTS = 1 << 0, //replaces line comments with spaces IGNORE_COMMENTS = 1 << 1, //ignores comments ...
jeanleflambeur/silkopter
qmath/include/qmath.h
#pragma once #include "_qmath.h"
jeanleflambeur/silkopter
silkopter/libs/embedded/utils/storage.h
#pragma once #include "qbase.h" #include <stdint.h> #include <stddef.h> namespace util { namespace storage { typedef uint16_t crc_type; typedef uint8_t size_type; struct Id { Id() = default; explicit Id(uint32_t value) : value(value) {} uint32_t value; }; struct Offset { Offse...
jeanleflambeur/silkopter
silkopter/libs/utils/comms/ASIO_Socket_Adapter.h
<reponame>jeanleflambeur/silkopter<filename>silkopter/libs/utils/comms/ASIO_Socket_Adapter.h<gh_stars>10-100 #pragma once #include <vector> #include <deque> #include <mutex> #include <functional> #include <asio.hpp> namespace util { namespace comms { template<class S> class ASIO_Socket_Adapter : q::uti...
jeanleflambeur/silkopter
silkopter/libs/utils/Coordinates.h
#pragma once #include "qmath.h" namespace util { namespace coordinates { namespace constants { // WGS84 ellipsoid constants static constexpr double radius = 6378137; static constexpr double radius_sq = radius * radius; static constexpr double eccentricity = 8.1819190842622e-2; static constexpr do...
jeanleflambeur/silkopter
silkopter/libs/common/Manual_Clock.h
<filename>silkopter/libs/common/Manual_Clock.h #pragma once #include "utils/Clock.h" namespace silk { //This clock represents the epoch of the remote side. //For the Ground Station it represents the UAV clock and vice-versa //It can be used to compare time_points sent through the comms channel class Manual_Clock { ...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Bool_Value.h
#pragma once #include "def_lang/IBool_Type.h" #include "def_lang/IBool_Value.h" #include "def_lang/ep/Value_Template_EP.h" namespace ts { class Bool_Value; struct Bool_Traits : public IBool_Traits { typedef Bool_Value value_implementation; }; class Bool_Value final : public Value_Template_EP<Bool_Traits> { pub...
jeanleflambeur/silkopter
qdata/include/data/Folder_Data_Pack.h
<filename>qdata/include/data/Folder_Data_Pack.h #pragma once namespace q { namespace data { class Folder_Data_Pack : public Data_Pack { public: Folder_Data_Pack(Path const& root, bool recurse = true); virtual ~Folder_Data_Pack() {} size_t get_count() const; Path const& get_path(siz...
jeanleflambeur/silkopter
silkopter/libs/common/params/ParamEP.h
#pragma once #include "IParam.h" namespace silk { namespace params { class ParamEP : public IParam { public: ParamEP(q::Path const& path, std::string const& ui_prefix, std::string const& ui_suffix, std::string const& ui_name); q::Path const& get_path() const override; std::string const& get_ui_prefix()...
jeanleflambeur/silkopter
q/include/QStdAfx.h
#ifndef _CRT_SECURE_NO_WARNINGS # define _CRT_SECURE_NO_WARNINGS #endif #ifndef _SCL_SECURE_NO_WARNINGS # define _SCL_SECURE_NO_WARNINGS #endif //android ndk needed this #define _GLIBCXX_USE_C99_MATH 1 #include "Config.h" #include <unordered_map> #include <deque> #include <set> #include <array> /...
jeanleflambeur/silkopter
q/include/anim/Controller.h
<reponame>jeanleflambeur/silkopter<filename>q/include/anim/Controller.h #pragma once namespace q { namespace anim { class Controller { public: void set_interval(Duration start, Duration end); Duration get_interval_start() const; Duration get_interval_end() const; void set_duration(Duration...
jeanleflambeur/silkopter
qinput/include/Touchscreen.h
#pragma once namespace qinput { class Input_Mgr; struct Touchscreen_Event { enum class Type { PRESS, MOVE, RELEASE, CANCEL }; Type type; q::Clock::time_point timestamp; uint32_t touch_id; math::vec2f position; }; class Touchscreen { friend class Input_Mg...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Poly_Value.h
#pragma once #include "def_lang/IPoly_Type.h" #include "def_lang/IPoly_Value.h" namespace ts { class Poly_Value final : virtual public IPoly_Value { public: Poly_Value(std::shared_ptr<IPoly_Type const> type); bool is_constructed() const override; Result<bool> is_equal(IValue const& other) const overri...
jeanleflambeur/silkopter
def_lang/include/def_lang/Type_System.h
#pragma once #include "Result.h" #include "def_lang/impl/Namespace.h" #include "IType.h" namespace ts { class ITemplate_Argument; class ITemplated_Type; class Type_System final { public: Type_System(); Result<std::shared_ptr<const ITemplated_Type>> instantiate_template(std::string const& name, std::vector<s...
jeanleflambeur/silkopter
q/include/draw/Painter.h
#pragma once #include "video/Material.h" #include "video/Renderer.h" #include "video/Render_Job.h" #include "video/Buffer_Pool.h" #include "video/Vertex_Buffer.h" #include "video/Index_Buffer.h" namespace q { namespace text { class Texter; } namespace scene { class Camera; } namespac...
jeanleflambeur/silkopter
silkopter/libs/common/stream/IStream.h
#pragma once #include "utils/Serialization.h" namespace silk { namespace stream { enum class Space : uint8_t { SCALAR, LLA, ECEF, ENU, LOCAL, GIMBAL }; #define GET_AS_STRING(str, details_str) details ? std::string(str) + details_str : std::string(str) inline auto get_as_string(Space s, bool...
jeanleflambeur/silkopter
qmath/include/qmath/func_transform.h
<gh_stars>10-100 #pragma once /////////////////////////////////////////////////////////////////////////////// // Defines transform functions /////////////////////////////////////////////////////////////////////////////// namespace math { ///////////////////////////////////////////////////////////////////////...
jeanleflambeur/silkopter
qmath/include/qmath/line2.h
#pragma once namespace math { //! 2D line between two points with intersection methods. template <typename T> struct line2 { /////////////////////////////////////////////////////////////////////////////// // constructors /////////////////////////////////////////////////////////////////////////////// /** ...
jeanleflambeur/silkopter
qbase/include/QBaseStdAfx.h
<reponame>jeanleflambeur/silkopter #include "Platform.h" #define _USE_MATH_DEFINES #include <cstdint> #include <cmath> #include <cstdarg> #include <map> #include <vector> #include <memory> #include <deque> #include <functional> #include <chrono> #include <thread> #include <mutex> #include <condition_vari...
jeanleflambeur/silkopter
q/include/video/Attribute_Def.h
<gh_stars>10-100 #pragma once #include "video/Vertex_Declaration.h" namespace q { namespace video { class Attribute_Def { public: Attribute_Def() = default; Attribute_Def(std::string const& name); Attribute_Def(std::string const& name, std::string const& human_name); auto get_human_n...
jeanleflambeur/silkopter
q/include/util/Bounds.h
<filename>q/include/util/Bounds.h #pragma once namespace q { namespace util { class Bounds { public: Bounds() = default; Bounds(math::vec3f const& center, float radius); void set_center(math::vec3f const& center); math::vec3f const& get_center() const; void set_radius(floa...
jeanleflambeur/silkopter
silkopter/gs_old/src/GL_Widget.h
#pragma once //this is responsible for initializing opengl and providing API to render to FBOs and converting these to QImages class GL_Widget : public QGLWidget { public: GL_Widget(QWidget* parent); ~GL_Widget(); void initializeGL(); void paintGL(); };
jeanleflambeur/silkopter
silkopter/fc/src/bus/UART_BB_Bus.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include "common/bus/IUART.h" #include "utils/hw/UART_BB.h" namespace silk { namespace hal { struct UART_BB_Descriptor; } } namespace silk { namespace bus { class UART_BB_Bus : public IUART_Bus { public: UART_BB_Bus(); ~UART_BB_Bus(); ts::...
jeanleflambeur/silkopter
silkopter/libs/json_editor/JSON_Model.h
#pragma once #include <QtCore/QAbstractItemModel> #include <memory> #include "rapidjson/document.h" // rapidjson's DOM-style API #include "rapidjson/prettywriter.h" // for stringify JSON #include "rapidjson/stringbuffer.h" class JSON_Model : public QAbstractItemModel { public: JSON_Model(QWidget* parent); ...
jeanleflambeur/silkopter
silkopter/fc/src/processor/KF_ECEF.h
#pragma once #include "common/node/IProcessor.h" #include "common/stream/ILinear_Acceleration.h" #include "common/stream/IPosition.h" #include "common/stream/IVelocity.h" #include "common/stream/IAcceleration.h" #include "common/stream/IFrame.h" #include "HAL.h" #include "Sample_Accumulator.h" #include "Basic_Output...
jeanleflambeur/silkopter
qbase/include/util/Iterators.h
<gh_stars>10-100 #pragma once namespace q { namespace util { template<class T> class Const_Ptr_Iterator { public: typedef std::random_access_iterator_tag iterator_category; typedef T value_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef const T* pointer; typedef const ...
jeanleflambeur/silkopter
qbase/include/util/Delayer.h
<filename>qbase/include/util/Delayer.h #pragma once namespace q { namespace util { template<class T> auto lerp(T const& a, T const& b, T t) -> T { return a*(T(1) - t) + b*t; } template<class Tween, class Rep, class Duration> class Delayer { public: Delayer(Rep const& start = Rep(0), Re...
jeanleflambeur/silkopter
silkopter/fc/src/Basic_Output_Stream.h
#pragma once #include <type_traits> #include "utils/Clock.h" namespace silk { template<class Base> class Basic_Output_Stream : public Base { public: typedef typename Base::Sample Sample; typedef typename Sample::Value Value; Basic_Output_Stream() = default; Sample const& get_last_sample() const { ...
jeanleflambeur/silkopter
def_lang/include/def_lang/ts_assert.h
<gh_stars>10-100 #pragma once #include <cassert> #ifndef TS_ASSERT # define TS_ASSERT(x) assert(x) #endif
jeanleflambeur/silkopter
q/include/video/Vertex_Buffer.h
<filename>q/include/video/Vertex_Buffer.h #pragma once #include "Buffer.h" #include "Ptr_Fw_Declaration.h" namespace q { namespace video { class Vertex_Buffer : public Buffer { public: virtual ~Vertex_Buffer() {} static Vertex_Buffer_ptr create(); }; } }
jeanleflambeur/silkopter
qmath/include/qmath/trans3d.h
<reponame>jeanleflambeur/silkopter #pragma once namespace math { /////////////////////////////////////////////////////////////////////////////// // forward declarations /////////////////////////////////////////////////////////////////////////////// template<typename T> struct vec3; template<typename T> struc...
jeanleflambeur/silkopter
def_lang/include/def_lang/Result.h
#pragma once #include "ts_assert.h" #include "Source_Location.h" namespace ts { namespace detail { struct success_helper{}; } typedef int detail::success_helper::*success_t; constexpr success_t success = (static_cast<success_t>(0)); //////////////////////////////////////////////////////////////...
jeanleflambeur/silkopter
q/include/video/GLES/GLES_Interface.h
<filename>q/include/video/GLES/GLES_Interface.h #pragma once namespace q { namespace video { namespace gles { typedef void iGLvoid; typedef unsigned int iGLenum; typedef unsigned char iGLboolean; typedef unsigned int iGLbitfield; typedef uint8_t iGLbyte; typedef short...
jeanleflambeur/silkopter
silkopter/gs/src/value_editors/details/Numeric_Value_Editor_Helper.h
<reponame>jeanleflambeur/silkopter<filename>silkopter/gs/src/value_editors/details/Numeric_Value_Editor_Helper.h<gh_stars>10-100 #pragma once class QDoubleSpinBox; class QSlider; class QWidget; class Numeric_Value_Editor_Helper final { struct SignalKey; public: Numeric_Value_Editor_Helper(double val...
jeanleflambeur/silkopter
silkopter/gs_old/src/calibration/Acceleration_Calibration_Wizard.h
<reponame>jeanleflambeur/silkopter #pragma once #include <QDialog> #include "sz_math.hpp" #include "sz_Calibration_Data.hpp" #include "HAL.h" #include "Comms.h" class Acceleration_Calibration_Wizard : public QDialog { public: Acceleration_Calibration_Wizard(silk::HAL& hal, silk::Comms& comms, silk::node::gs::No...
jeanleflambeur/silkopter
silkopter/libs/physics/constants.h
#pragma once namespace physics { namespace constants { constexpr float g = 9.80665f; //newton's constant constexpr math::vec3f uav_front_vector = math::vec3f(0, 1, 0); constexpr math::vec3f uav_right_vector = math::vec3f(1, 0, 0); constexpr math::vec3f uav_up_vector = math::vec3f(0, 0, 1);...
jeanleflambeur/silkopter
def_lang/include/def_lang/ep/Member_Container_EP.h
#pragma once #include <vector> #include "def_lang/IMember_Container.h" namespace ts { class Member_Container_EP : virtual public IMember_Container { public: ~Member_Container_EP(); size_t get_member_count() const override; Result<void> add_member(std::shared_ptr<IMember> member) override; std::sh...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Enum_Value.h
#pragma once #include "def_lang/IEnum_Type.h" #include "def_lang/IEnum_Value.h" #include "def_lang/IEnum_Item.h" namespace ts { class Enum_Value final : public virtual IEnum_Value { public: Enum_Value(std::shared_ptr<IEnum_Type const> type); bool is_constructed() const override; Result<bool> is_equal(...
jeanleflambeur/silkopter
silkopter/libs/common/node/INode.h
#pragma once #include "common/stream/IStream.h" #include "utils/Clock.h" namespace silk { namespace hal { struct INode_Descriptor; struct INode_Config; } namespace messages { struct INode_Message; } } namespace silk { namespace node { enum class Type : uint8_t { NODE, PROCESSOR, SINK, SOURCE, LP...
jeanleflambeur/silkopter
silkopter/rc/src/IButton.h
#pragma once #include "IInput_Device.h" namespace silk { class IButton : public IInput_Device { public: virtual ~IButton() = default; virtual bool is_pressed() const = 0; virtual bool was_pressed() const = 0; virtual bool was_released() const = 0; virtual uint32_t get_press_count() const = 0; ...
jeanleflambeur/silkopter
silkopter/libs/embedded/utils/Scope_Sync.h
#pragma once #include "qbase.h" #ifdef __AVR__ # include <avr/interrupt.h> #endif #ifdef Q_WINDOWS extern std::atomic<uint8_t> SREG; extern void cli(); #endif namespace util { class Scope_Sync : q::util::Noncopyable { public: Scope_Sync() { m_old_sreg = SREG; cli(); } ~Scope_Sync()...
jeanleflambeur/silkopter
qmath/include/qmath/lua_binding.h
<filename>qmath/include/qmath/lua_binding.h #pragma once //#include <lua5.2/lua.hpp> extern "C" { struct lua_State; } namespace math { extern void bind_to_lua(lua_State* L, std::string const& module_name = "qmath"); }
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Struct_Value.h
<gh_stars>10-100 #pragma once #include "def_lang/IStruct_Type.h" #include "def_lang/IStruct_Value.h" #include "def_lang/IMember.h" #include "def_lang/ep/Member_Container_EP.h" namespace ts { class Struct_Value final : public virtual IStruct_Value, public Member_Container_EP { public: Struct_Value(std::shared_ptr...
jeanleflambeur/silkopter
qinput/include/Touch.h
#pragma once namespace qinput { class Touchscreen; class Touch : q::util::Noncopyable { friend class Touchscreen; public: //Note, if you change this, change the mPositions array length to fit them all enum class State: uint8_t { INACTIVE = 1 << 0, PRESSED = 1 << 1, MOVED ...
jeanleflambeur/silkopter
qmath/include/qmath/color.h
<gh_stars>10-100 #pragma once namespace math { namespace color { template<typename T> vec4<T> u32_to_rgba(uint32_t); template<typename T> vec4<T> u32_to_argb(uint32_t); template<typename T> vec4<T> u32_to_bgra(uint32_t); template<typename T> vec4<T> u32_to_abgr(uint32_t); template<t...
jeanleflambeur/silkopter
q/include/scene/Scene.h
#pragma once #include "Ptr_Fw_Declaration.h" #include "Camera.h" namespace q { namespace scene { inline math::vec3f get_front_vector() { return math::vec3f(0, 1, 0); } inline math::vec3f get_up_vector() { return math::vec3f(0, 0, 1); } inline math::vec3f get_right_vector() { return ma...
jeanleflambeur/silkopter
silkopter/gs/src/UAV_Descriptor_Widget.h
#pragma once #include <QToolBar> #include "ITab_Widget.h" namespace silk { class Comms; } class Properties_Browser; class Ui_UAV_Descriptor_Widget; class UAV_Descriptor_Widget : public ITab_Widget { public: UAV_Descriptor_Widget(); ~UAV_Descriptor_Widget(); void init(QToolBar* toolbar, silk::Comms& com...
jeanleflambeur/silkopter
silkopter/fc/src/generator/Scalar_Generator.h
#pragma once #include "HAL.h" #include "common/node/IGenerator.h" #include "generator/Oscillator.h" #include "Basic_Output_Stream.h" #include "hal.def.h" namespace silk { namespace node { template<class Stream_t> class Scalar_Generator : public IGenerator { public: Scalar_Generator(HAL& hal); ts::Result<v...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Enum_Type.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include "def_lang/IEnum_Type.h" #include "def_lang/ep/Declaration_Scope_EP.h" #include "def_lang/ep/Attribute_Container_EP.h" namespace ts { class Enum_Type final: virtual public IEnum_Type, public Declaration_Scope_EP, public Attribute_Container_EP, p...
jeanleflambeur/silkopter
qmath/include/qmath/func_projection.h
<reponame>jeanleflambeur/silkopter #pragma once namespace math { ///! Creates a RH offseted orthographic projection matrix template<typename T> mat4<T> ortho(T left, T right, T bottom, T top, T z_near, T z_far); ///! Creates a RH perspective projection matrix template<typename T> mat4<T> perspective(T ...
jeanleflambeur/silkopter
silkopter/libs/common/stream/IDistance.h
#pragma once #include "Stream_Base.h" namespace silk { namespace stream { template<Space SPACE_VALUE> class IDistanceT : public ISpatial_Stream<Semantic::DISTANCE, SPACE_VALUE> { public: typedef std::true_type can_be_filtered_t; typedef math::vec3f Value; //meters typedef stream::Sample<Va...
jeanleflambeur/silkopter
silkopter/fc/src/brain/Multirotor_Brain.h
<filename>silkopter/fc/src/brain/Multirotor_Brain.h #pragma once #include "utils/Clock.h" #include "common/node/IBrain.h" #include "common/stream/IAngular_Velocity.h" #include "common/stream/IFrame.h" #include "common/stream/IFloat.h" #include "common/stream/ILinear_Acceleration.h" #include "common/stream/IBattery_St...
jeanleflambeur/silkopter
silkopter/gs_old/src/Video_Viewer.h
#pragma once #include "HAL.h" #include "Comms.h" #include "Video_Decoder.h" class Video_Viewer : public QWidget { public: Video_Viewer(QWidget *parent); virtual ~Video_Viewer(); void add_sample(silk::stream::gs::Video::Sample const& sample); private: void paintEvent(QPaintEvent* ev); Video_Decod...
jeanleflambeur/silkopter
silkopter/fc/src/source/ADS1115_Source.h
<reponame>jeanleflambeur/silkopter #pragma once #include "HAL.h" #include "common/node/ISource.h" #include "common/stream/IADC.h" #include "common/bus/II2C.h" #include "Basic_Output_Stream.h" namespace silk { namespace hal { struct ADS1115_Descriptor; struct ADS1115_Config; } } namespace silk { namespace node { ...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Numeric_Type_Template.h
#pragma once #include "def_lang/INumeric_Type_Template.h" #include "def_lang/All_INumeric_Values.h" #include "def_lang/ep/Type_Template_EP.h" #include "def_lang/IAttribute.h" #include "def_lang/ILiteral_Attribute.h" #include "def_lang/IName_Attribute.h" namespace ts { template<typename Traits> class Numeric_Type_Te...
jeanleflambeur/silkopter
silkopter/libs/common/node/IController.h
<reponame>jeanleflambeur/silkopter #pragma once #include "common/node/INode.h" namespace silk { namespace node { class IController : public Node_Base<Type::CONTROLLER> { public: }; } }
jeanleflambeur/silkopter
qmath/include/qmath/aabb2.h
<filename>qmath/include/qmath/aabb2.h #pragma once namespace math { //! Axis aligned bounding box in 3d dimensional space. template <typename T> struct aabb2 { /////////////////////////////////////////////////////////////////////////////// // constructors ///////////////////////////////////////////////////...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Literal_Initializer.h
<filename>def_lang/include/def_lang/impl/Literal_Initializer.h #pragma once #include "def_lang/ILiteral_Initializer.h" namespace ts { class Literal_Initializer : public virtual ILiteral_Initializer { public: Literal_Initializer(std::shared_ptr<const ILiteral> literal); std::shared_ptr<const ILiteral> get_li...
jeanleflambeur/silkopter
silkopter/fc/src/Sample_Accumulator.h
#pragma once #include "MPL_Helper.h" namespace silk { namespace detail { constexpr bool Greater_Than_Zero(size_t N) { return N > 0; } template<class... Streams> class Storage { public: template<size_t N> ts::Result<void> set_stream_path(size_t, std::string const&, uint32_t, HAL&) { return m...
jeanleflambeur/silkopter
silkopter/libs/common/stream/IMagnetic_Field.h
#pragma once #include "Stream_Base.h" namespace silk { namespace stream { template<Space SPACE_VALUE> class IMagnetic_FieldT : public ISpatial_Stream<Semantic::MAGNETIC_FIELD, SPACE_VALUE> { public: typedef std::true_type can_be_filtered_t; typedef math::vec3f Value; //micro T(eslas) typedef strea...
jeanleflambeur/silkopter
qbase/include/Path.h
<reponame>jeanleflambeur/silkopter #pragma once #include "Platform.h" #include "util/Hash.h" #include "mem/Embedded_Allocator.h" namespace q { class Path { friend std::size_t hash_value(Path const& p); public: Path(); explicit Path(char const* path); explicit Path(std::string const& path); Path(P...
jeanleflambeur/silkopter
q/include/video/Texture.h
<filename>q/include/video/Texture.h<gh_stars>10-100 #pragma once #include "res/Resource.h" #include "Ptr_Fw_Declaration.h" namespace q { namespace video { class Texture : public res::Resource { public: static Texture_ptr create(Path const& path); enum class Type : int { LDR = 0,...
jeanleflambeur/silkopter
q/include/res/Simple_Share_Streamer.h
<reponame>jeanleflambeur/silkopter #pragma once #include "video/Texture.h" #include "Factory.h" namespace q { namespace res { template<class T> class Simple_Share_Streamer : public Streamer<T> { public: typedef std::shared_ptr<T> T_ptr; virtual ~Simple_Share_Streamer<T>() {} ...
jeanleflambeur/silkopter
q/include/draw/Sprite_Base.h
<filename>q/include/draw/Sprite_Base.h #pragma once #include "res/Resource.h" #include "draw/Painter.h" namespace q { namespace draw { class SpriteBase : public res::Resource, public std::enable_shared_from_this<SpriteBase> { friend class Sprite; public: SpriteBase(Path const& path); virtu...
jeanleflambeur/silkopter
q/include/util/Singleton.h
#pragma once namespace q { namespace util { template<class T> class Singleton : util::Noncopyable { public: static T& inst() { QASSERT_MSG(s_instance, "Create an instance manually first with create()."); return *s_instance; } static bool has_inst() { return s_instance != nullptr; } static T...
jeanleflambeur/silkopter
silkopter/gs_old/src/input/Multi.h
<gh_stars>10-100 #pragma once namespace input { class Multi : q::util::Noncopyable { public: virtual ~Multi() {} virtual auto get_input() const -> silk::stream::IMulti_Commands::Value const& = 0; virtual void process() = 0; }; }