repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Bool_Type.h
<reponame>jeanleflambeur/silkopter #include "def_lang/IBool_Type.h" #include "def_lang/ep/Type_Template_EP.h" namespace ts { class IBool_Value; class Bool_Value; class Bool_Type; struct Bool_Type_Traits : public IBool_Type::traits { typedef Bool_Value value_implementation; typedef Bool_Type type_implementati...
jeanleflambeur/silkopter
silkopter/rc/src/IBattery_Info.h
#pragma once namespace silk { class IBattery_Info { public: virtual ~IBattery_Info() = default; virtual float get_voltage() const = 0; virtual float get_low_voltage() const = 0; virtual void set_low_voltage(float voltage) = 0; virtual float get_critical_voltage() const = 0; virtual void set...
jeanleflambeur/silkopter
def_lang/include/def_lang/ep/Symbol_EP.h
<filename>def_lang/include/def_lang/ep/Symbol_EP.h #pragma once #include <memory> #include <string> #include "def_lang/ISymbol.h" namespace ts { class IDeclaration_Scope; class Symbol_EP : virtual public ISymbol { public: Symbol_EP(std::string const& name); Symbol_EP(Symbol_EP const& other, std::string con...
jeanleflambeur/silkopter
silkopter/libs/utils/hw/si446x_patch.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 // COPYRIGHT=2014 Silicon Laboratories, Inc. // GENERATED=16:43 October 16 2014 // ROMID=0x06 // FUNCTION=TEST // MAJOR=0 // MINOR=0 // BUILD=0 // PATCHID=0x311A // REQUIRES=NONE // SIZE=448 // CRCT=0x714b #define SI446X_PATCH_ROMID 00 #define SI446X_PAT...
jeanleflambeur/silkopter
silkopter/libs/common/bus/II2C.h
#pragma once #include "IBus.h" #include "utils/hw/II2C.h" namespace silk { namespace bus { class II2C_Bus: public IBus { public: virtual ~II2C_Bus() = default; virtual util::hw::II2C& get_i2c() = 0; }; } }
jeanleflambeur/silkopter
silkopter/libs/utils/hw/SPI_Dev.h
<filename>silkopter/libs/utils/hw/SPI_Dev.h #pragma once #include "ISPI.h" #include <atomic> #include <vector> #include <string> #include <linux/spi/spidev.h> namespace util { namespace hw { class SPI_Dev : public ISPI { public: SPI_Dev(); ~SPI_Dev(); ts::Result<void> init(std::string const& device, uin...
jeanleflambeur/silkopter
silkopter/gs/src/value_editors/IValue_Editor.h
#pragma once #include "value_editors/Qualified_Value.h" class QWidget; class IValue_Editor { public: virtual ~IValue_Editor() = default; virtual QWidget* get_widget() = 0; virtual Qualified_Value<ts::IValue> get_qualified_value() = 0; virtual void refresh_editor() = 0; virtu...
jeanleflambeur/silkopter
silkopter/libs/common/stream/ILinear_Acceleration.h
<filename>silkopter/libs/common/stream/ILinear_Acceleration.h #pragma once #include "Stream_Base.h" namespace silk { namespace stream { template<Space SPACE_VALUE> class ILinear_AccelerationT : public ISpatial_Stream<Semantic::LINEAR_ACCELERATION, SPACE_VALUE> { public: typedef std::true_type can_be_filtered_t; ...
jeanleflambeur/silkopter
silkopter/libs/embedded/utils/Flash_String.h
<gh_stars>10-100 #ifdef __AVR__ # include <avr/pgmspace.h> #endif namespace util { #ifdef __AVR__ # define F_STR(x) ::util::Flash_String(PSTR(x)) #else # define F_STR(x) (x) # define PGM_P char const* # define pgm_read_byte_near(x) (*(x)) # define strlen_P(x) strlen(x) #endif class Flash_String { ...
jeanleflambeur/silkopter
qmath/include/qmath/cast.h
<filename>qmath/include/qmath/cast.h<gh_stars>10-100 #pragma once namespace math { }
jeanleflambeur/silkopter
silkopter/libs/utils/hw/ADS1115.h
#pragma once #include "II2C.h" #include "utils/Clock.h" namespace util { namespace hw { class ADS1115 { public: ADS1115(); struct Descriptor { struct ADC { bool is_enabled = true; uint32_t rate = 100; }; std::array<ADC, 4> adcs; uint8_t i2...
jeanleflambeur/silkopter
q/include/system/System.h
#pragma once #include "Ptr_Fw_Declaration.h" #include "res/Factory.h" #include "util/Singleton.h" namespace q { class System : public util::Singleton<System> { friend class util::Singleton<System>; friend class std::unique_ptr<System>; protected: System(); public: ~System(); public: ...
jeanleflambeur/silkopter
silkopter/libs/common/stream/IVideo.h
#pragma once #include "Stream_Base.h" #include "utils/Clock.h" namespace silk { namespace stream { class IVideo : public IScalar_Stream<Semantic::VIDEO> { public: typedef std::false_type can_be_filtered_t; enum class Quality : uint8_t { LOW, HIGH }; enum class Type : uint8_t ...
jeanleflambeur/silkopter
qbase/include/util/Flag_Set.h
//#include <iostream> #include <numeric> #include <string> namespace q { namespace util { template <typename enumT, typename storeT> class Flag_Set { public: typedef enumT enum_type; typedef storeT store_type; // Default constructor (all 0s) ...
jeanleflambeur/silkopter
silkopter/gs/src/calibration/Acceleration_Calibration_Wizard.h
#pragma once #include <QDialog> #include "Comms.h" class Acceleration_Calibration_Wizard : public QDialog { public: Acceleration_Calibration_Wizard(silk::Comms& comms, std::string const& node_name, std::string const& stream_name, ...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Member_Def.h
<filename>def_lang/include/def_lang/impl/Member_Def.h #pragma once #include <memory> #include "def_lang/IMember_Def.h" #include "def_lang/ep/Symbol_EP.h" #include "def_lang/ep/Attribute_Container_EP.h" namespace ts { class IType; class IValue; class Member_Def final : virtual public IMember_Def, public Symbol_EP, p...
jeanleflambeur/silkopter
silkopter/libs/common/node/ISource.h
<reponame>jeanleflambeur/silkopter #pragma once #include "common/node/INode.h" namespace silk { namespace node { class ISource : public Node_Base<Type::SOURCE> { public: //sources don't usually have any inputs virtual ts::Result<void> set_input_stream_path(size_t, std::string const&) { return ts::success; } ...
jeanleflambeur/silkopter
qmath/include/qmath/constants.h
namespace math { }
jeanleflambeur/silkopter
q/include/video/Index_Buffer.h
#pragma once #include "Buffer.h" #include "Ptr_Fw_Declaration.h" namespace q { namespace video { class Index_Buffer : public Buffer { public: virtual ~Index_Buffer() {} static Index_Buffer_ptr create(); }; } }
jeanleflambeur/silkopter
qmath/include/qmath/vec4.h
#pragma once #include <array> namespace math { template<typename T> struct vec2; template<typename T> struct vec3; template<typename T> struct vec4 { typedef T value_t; T x, y, z, w; static vec4<T> const zero; static vec4<T> const one; ////////////////////////////////////////////////////...
jeanleflambeur/silkopter
qmath/include/qmath/func_rayintersect.h
<gh_stars>10-100 #pragma once /////////////////////////////////////////////////////////////////////////////// // Defines RayIntersectPrimitive functions /////////////////////////////////////////////////////////////////////////////// namespace math { template<class T> bool ray_intersect_plane( vec3<T> co...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Poly_Type.h
#include "def_lang/IPoly_Type.h" #include "def_lang/ep/Symbol_EP.h" #include "def_lang/ep/Attribute_Container_EP.h" #include "def_lang/Qualified_Type.h" namespace ts { class IStruct_Type; class Poly_Type final : virtual public IPoly_Type, public Symbol_EP, public Attribute_Container_EP, public std::enable_shared_fr...
jeanleflambeur/silkopter
q/include/q.h
#include "QStdAfx.h" #include "Types.h" #include "Ptr_Fw_Declaration.h" #include "mem/Memory.h" #include "util/Util.h" #include "util/Singleton.h" #include "res/Loader.h" #include "res/Streamer.h" #include "res/Factory.h" #include "system/System.h" #include "util/Bounds.h" #include "util/Fps.h" #include "res/Res...
jeanleflambeur/silkopter
def_lang/include/def_lang/ast/Node.h
<gh_stars>10-100 #pragma once #include "Attribute.h" #include "def_lang/Source_Location.h" #include "def_lang/Serialization.h" #include "def_lang/Result.h" namespace ts { namespace ast { class Node { public: enum class Type { NONE, ROOT, LIST, TYPE, LITERAL, EX...
jeanleflambeur/silkopter
silkopter/fc/src/combiner/Combiner.h
#pragma once #include "HAL.h" #include "common/node/ICombiner.h" #include "utils/Clock.h" #include "Sample_Accumulator.h" #include "Basic_Output_Stream.h" #include "hal.def.h" //#include "sz_Combiner.hpp" namespace silk { namespace hal { struct Combiner_Descriptor; struct Combiner_Config; } } namespace silk { na...
jeanleflambeur/silkopter
q/include/res/Factory.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include "Loader.h" #include "Streamer.h" #include "video/Texture.h" namespace q { namespace res { class Factory : util::Noncopyable { public: Factory(data::File_System_ptr const& file_system); ~Factory(); //This registers ...
jeanleflambeur/silkopter
def_lang/include/def_lang/IString_Type.h
<gh_stars>10-100 #pragma once #include "IType.h" namespace ts { class IString_Value; class IString_Type; struct IString_Traits { typedef IString_Value value_interface; typedef IString_Type type_interface; typedef std::string fundamental_type; }; class IString_Type : virtual public IType { public: v...
jeanleflambeur/silkopter
q/include/video/Render_State.h
<gh_stars>10-100 #pragma once namespace q { namespace video { class Render_State { friend struct std::hash<q::video::Render_State>; protected: enum class Flag : uint8_t { CULL = 1 << 0, DEPTH_TEST = 1 << 1, DEPTH_WRITE = 1 << 2, STENCIL = 1 << 3 }...
jeanleflambeur/silkopter
silkopter/gs/src/qnodeseditor/qneblock.h
<gh_stars>10-100 /* 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, this list of condit...
jeanleflambeur/silkopter
silkopter/fc/src/source/OpenCV_Capture.h
<gh_stars>10-100 #pragma once #include "HAL.h" #include "common/node/ISource.h" #include "common/Comm_Data.h" #include "common/stream/IVideo.h" namespace silk { namespace hal { struct OpenCV_Capture_Descriptor; struct OpenCV_Capture_Config; } } namespace silk { namespace node { class Open...
jeanleflambeur/silkopter
q/include/video/Atlaser.h
<gh_stars>10-100 #pragma once namespace q { namespace video { class Atlaser { public: Atlaser(); Atlaser(math::vec2u32 const& size); auto get_size() const->math::vec2u32 const&; void reset(math::vec2u32 const& size); void reset(); auto get_region(math::vec2u32 const& size)->boost::...
jeanleflambeur/silkopter
qmath/include/qmath/angle.h
#pragma once namespace math { template<typename T> struct angle { typedef T value_t; T radians; static angle<T> const zero; static T const pi; static T const pi2; static T const _2pi; static T const _3pi2; angle(); explicit angle(T radians); angle(angle<T> const& a); // Conversion c...
jeanleflambeur/silkopter
silkopter/fc/src/source/UBLOX.h
#pragma once #include "HAL.h" #include "common/node/ISource.h" #include "common/stream/IPosition.h" #include "common/stream/IVelocity.h" #include "common/stream/IGPS_Info.h" #include "common/bus/II2C.h" #include "common/bus/ISPI.h" #include "common/bus/IUART.h" #include "Basic_Output_Stream.h" namespace silk { name...
jeanleflambeur/silkopter
qbase/include/FString.h
#pragma once #include <string> #include <cstring> namespace q { //fixed size string template<size_t SIZE> class FString { public: typedef char value_type; typedef char const* const_iterator; enum { MAX_SIZE = SIZE }; public: FString(); FString(FString<SIZE> const& str); explicit FStri...
jeanleflambeur/silkopter
q/src/video/GLES/GL_Ext_Functions.h
#pragma once #if defined Q_LINUX # define GL_FUN(x) x # define GL_FUN2(interf, x) x #elif defined Q_RASPBERRY_PI # define GL_FUN(x) x # define GL_FUN2(interf, x) x #else # define GL_FUN(x) this->m_funcs->_##x # define GL_FUN2(interf, x) interf->m_funcs->_##x #endif #if defined(Q_ANDROID) //n...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Optional_Type.h
<reponame>jeanleflambeur/silkopter #pragma once #include "def_lang/IOptional_Type.h" #include "def_lang/ep/Attribute_Container_EP.h" #include "def_lang/ep/Symbol_EP.h" namespace ts { class Optional_Type final: virtual public IOptional_Type, public Symbol_EP, public Attribute_Container_EP, public std::enable_shared_f...
jeanleflambeur/silkopter
def_lang/include/def_lang/ep/Declaration_Scope_EP.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include <vector> #include <memory> #include "def_lang/IDeclaration_Scope.h" namespace ts { class ISymbol; class Declaration_Scope_EP : virtual public IDeclaration_Scope { public: Declaration_Scope_EP(std::string const& name); Declaration_Scope...
jeanleflambeur/silkopter
def_lang/include/def_lang/IStruct_Type.h
<reponame>jeanleflambeur/silkopter #pragma once #include "IDeclaration_Scope.h" #include "IMember_Def_Container.h" #include "IType.h" namespace ts { class IStruct_Value; class IStruct_Type: virtual public IType, virtual public IDeclaration_Scope, virtual public IMember_Def_Container { public: virtual ~IStruct_T...
jeanleflambeur/silkopter
qbase/include/Platform.h
#pragma once #if defined(_WIN32) # define Q_WINDOWS # if defined(Q_POSIX_API) # undef Q_POSIX_API # endif #elif defined(ANDROID) # define Q_ANDROID # define Q_POSIX_API #elif defined(__APPLE__) || defined(MACOSX) # define Q_IOS # define Q_POSIX_API #elif defined(RASPBERRY_PI) # define Q_RASPBERRY_PI # ...
jeanleflambeur/silkopter
def_lang/include/def_lang/IMember_Container.h
<filename>def_lang/include/def_lang/IMember_Container.h #pragma once #include <stdint.h> #include <memory> #include <boost/optional.hpp> #include "Result.h" namespace ts { class IMember; class IMember_Container { public: virtual ~IMember_Container() = default; virtual size_t get_member_count() const = 0; ...
jeanleflambeur/silkopter
q/include/res/Loader.h
#pragma once namespace q { namespace res { template<class Res> class Loader : public util::Noncopyable { public: virtual ~Loader() {} virtual void load(Path const& path, data::Source& source, Res& r) const = 0; virtual bool can_load_from_source(data::Source& source) const = 0; ...
jeanleflambeur/silkopter
def_lang/include/def_lang/IAttribute_Container.h
<filename>def_lang/include/def_lang/IAttribute_Container.h #pragma once #include <memory> #include <boost/optional.hpp> #include "Result.h" namespace ts { class IAttribute; class IAttribute_Container { public: virtual ~IAttribute_Container() = default; virtual Result<void> add_attribute(std::shared_ptr<con...
jeanleflambeur/silkopter
silkopter/gs/src/value_editors/Double_Value_Editor.h
<reponame>jeanleflambeur/silkopter #pragma once #include "IValue_Editor.h" #include "Qualified_Value.h" class Numeric_Value_Editor_Helper; class Double_Value_Editor : public IValue_Editor { public: Double_Value_Editor(const Qualified_Value<ts::IDouble_Value>& qualified_value, std::string const& suffix_...
jeanleflambeur/silkopter
silkopter/gs/src/value_editors/String_Value_Editor.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include "IValue_Editor.h" #include "Qualified_Value.h" class QLineEdit; class String_Value_Editor : public IValue_Editor { public: String_Value_Editor(const Qualified_Value<ts::IString_Value>& qualified_value, std::string const& suffix_st...
jeanleflambeur/silkopter
silkopter/libs/common/stream/IFrame.h
<gh_stars>10-100 #pragma once #include "Stream_Base.h" #include "utils/Butterworth.h" namespace silk { namespace stream { template<Space SPACE_VALUE, Space PARENT_SPACE_VALUE> class IFrameT : public ISpatial_Stream<Semantic::FRAME, SPACE_VALUE> { public: typedef std::false_type can_be_filtered_t; typedef ma...
jeanleflambeur/silkopter
qbase/include/util/murmurhash.h
#pragma once namespace q { namespace util { inline uint32_t compute_murmur_hash32(void const* _data, size_t size, uint32_t seed = 0) { if (!_data) { QASSERT(0); return seed; } uint8_t const* data = reinterpret_cast<uint8_t const*>(_data); // 'm' and 'r' are mixin...
jeanleflambeur/silkopter
silkopter/fc/src/processor/Servo_Gimbal.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include "common/node/IProcessor.h" #include "common/stream/IFrame.h" #include "common/stream/IFloat.h" #include "common/stream/IPWM.h" #include "common/stream/IMultirotor_Commands.h" #include "HAL.h" #include "Sample_Accumulator.h" #include "Basic_Outpu...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Literal_Expression.h
<filename>def_lang/include/def_lang/impl/Literal_Expression.h<gh_stars>10-100 #pragma once #include "def_lang/IExpression.h" namespace ts { class ILiteral; class Literal_Expression final : public virtual IExpression { public: Literal_Expression(std::shared_ptr<const ILiteral> literal); ~Literal_Expression...
jeanleflambeur/silkopter
silkopter/fc/src/RC_Comms.h
#pragma once #include "common/Comm_Data.h" #include "HAL.h" #include "common/Manual_Clock.h" #include "common/node/ISource.h" #include "common/stream/ICamera_Commands.h" #include "common/stream/IMultirotor_Commands.h" #include "common/stream/IMultirotor_State.h" #include "common/stream/IVideo.h" #include "utils/comms...
jeanleflambeur/silkopter
q/include/mem/Memory.h
#pragma once #include "../Config.h" #if defined(Q_USE_EXTERNAL_ALLOC) namespace q { //define these in your application, to control ALL allocations in Q extern void* mem_alloc(size_t); extern void* mem_calloc(size_t); extern void* mem_realloc(void*, size_t); extern void mem_free(void*); } #else ...
jeanleflambeur/silkopter
silkopter/gs/src/value_editors/Empty_Value_Editor.h
#pragma once #include "IValue_Editor.h" #include "Qualified_Value.h" class QWidget; class Empty_Value_Editor : public IValue_Editor { public: Empty_Value_Editor(const Qualified_Value<ts::IValue>& qualified_value, std::string const& suffix_str); QWidget* get_widget() override; Qualified_Valu...
jeanleflambeur/silkopter
silkopter/gs/src/value_editors/details/VecX_Value_Editor_Helper.h
<reponame>jeanleflambeur/silkopter #pragma once class QDoubleSpinBox; class QSlider; class QWidget; class VecX_Value_Editor_Helper final { struct SignalKey; public: struct Component { std::string name; double value = 0; double minValue = std::numeric_limits<double>::lowest(); double ma...
jeanleflambeur/silkopter
def_lang/include/def_lang/IEnum_Item_Initializer.h
#pragma once #include "def_lang/IInitializer.h" namespace ts { class IEnum_Item; class IEnum_Item_Initializer : public virtual IInitializer { public: virtual ~IEnum_Item_Initializer() = default; virtual std::shared_ptr<const IEnum_Item> get_enum_item() const = 0; }; }
jeanleflambeur/silkopter
silkopter/gs/src/Multirotor_Render_Widget.h
#pragma once class Multirotor_Render_Widget { };
jeanleflambeur/silkopter
def_lang/include/def_lang/IMember_Def.h
#pragma once #include <memory> #include "ISymbol.h" #include "IAttribute_Container.h" namespace ts { class IType; class IValue; class IMember_Def : virtual public ISymbol, virtual public IAttribute_Container { public: virtual ~IMember_Def() = default; virtual std::shared_ptr<IType const> get_type() const =...
jeanleflambeur/silkopter
q/include/video/Render_State_Def.h
#pragma once #include "Render_State.h" namespace q { namespace video { class Render_State_Def { public: Render_State_Def() = default; Render_State_Def(Render_State_Def&& other); Render_State_Def(bool blending_locked , bool culling_locked , bool depth_locked , Render_...
jeanleflambeur/silkopter
silkopter/gs_old/src/hud/Multi_HUD_Widget.h
#pragma once #include "Render_Widget.h" #include "HAL.h" #include "Comms.h" #include "IHUD_Widget.h" #include "Video_Decoder.h" class Multi_HUD_Widget : public IHUD_Widget { public: Multi_HUD_Widget(silk::HAL& hal, silk::Comms& comms, qinput::Input_Mgr& input_mgr, Render_Context& context, QWidget* parent); v...
jeanleflambeur/silkopter
q/src/res/Impl/Soil_Loader.h
<filename>q/src/res/Impl/Soil_Loader.h #pragma once #include "res/Loader.h" #include "video/Texture.h" #include "video/Dynamic_Image.h" namespace q { namespace res { namespace impl { //handles TGA, PNG, DDS, JPG, BMP class Soil_Texture_Loader : public res::Loader<video::Texture> { virtual void l...
jeanleflambeur/silkopter
qmath/include/qmath/func_string.h
<filename>qmath/include/qmath/func_string.h<gh_stars>10-100 #pragma once #include <string> /////////////////////////////////////////////////////////////////////////////// // Defines RayIntersectPrimitive functions /////////////////////////////////////////////////////////////////////////////// namespace math ...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Member.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include <memory> #include "def_lang/IMember.h" namespace ts { class IValue; class Member final : public IMember { public: Member(std::shared_ptr<IMember_Def const> member_def); ~Member(); std::shared_ptr<IMember_Def const> get_member_def(...
jeanleflambeur/silkopter
silkopter/fc/src/bus/SPI_Linux_Bus.h
<gh_stars>10-100 #pragma once #include "common/bus/ISPI.h" #include "utils/hw/SPI_Dev.h" namespace silk { namespace hal { struct SPI_Linux_Descriptor; } } namespace silk { namespace bus { class SPI_Linux_Bus : public ISPI_Bus { public: SPI_Linux_Bus(); ~SPI_Linux_Bus(); ts::Result<void> init(hal::IBus_...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Variant_Value.h
<filename>def_lang/include/def_lang/impl/Variant_Value.h<gh_stars>10-100 #pragma once #include "def_lang/IVariant_Type.h" #include "def_lang/IVariant_Value.h" namespace ts { class Variant_Value final : virtual public IVariant_Value { public: Variant_Value(std::shared_ptr<IVariant_Type const> type); ~Variant_...
jeanleflambeur/silkopter
qmath/include/qmath/vec3.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include <array> namespace math { template<typename T> struct vec2; template<typename T> struct vec4; template<typename T> struct vec3 { typedef T value_t; T x, y, z; static vec3<T> const zero; static vec3<T> const one; ...
jeanleflambeur/silkopter
silkopter/gs_old/src/input/Gamepad_Multi.h
<gh_stars>10-100 #pragma once #include "Multi.h" namespace input { class Gamepad_Multi : public Multi { public: Gamepad_Multi(q::input::Input_Mgr& input_mgr); ~Gamepad_Multi(); virtual auto get_input() const -> silk::stream::IMulti_Commands::Value const& override; virtual void process() override;...
jeanleflambeur/silkopter
silkopter/libs/utils/Butterworth.h
#pragma once #include "qmath.h" namespace util { namespace dsp { template<class T> bool equals(T const& a, T const& b) { return math::equals(a, b); } template<class T> void apply_coefficients(T& x, T& w0, T& w1, T& w2, double d1, double d2, double A) { w0 = static_cast<T>(d1*w1 + d2*w2 + x); MATH_ASSER...
jeanleflambeur/silkopter
silkopter/libs/common/stream/IAcceleration.h
#pragma once #include "Stream_Base.h" namespace silk { namespace stream { template<Space SPACE_VALUE> class IAccelerationT : public ISpatial_Stream<Semantic::ACCELERATION, SPACE_VALUE> { public: typedef std::true_type can_be_filtered_t; typedef math::vec3f Value; //meters per second^2 typede...
jeanleflambeur/silkopter
silkopter/gs_old/src/Comms.h
<reponame>jeanleflambeur/silkopter #pragma once #include "HAL.h" #include "common/Comm_Data.h" #include "utils/RCP.h" #include "utils/Channel.h" namespace silk { class HAL; class Comms : q::util::Noncopyable { friend class HAL; public: Comms(HAL& hal); auto start_udp(boost::asio::ip::address const& ad...
jeanleflambeur/silkopter
silkopter/gs_old/src/calibration/Magnetic_Field_Calibration_Wizard.h
#pragma once #include <QDialog> #include "sz_math.hpp" #include "sz_Calibration_Data.hpp" #include "HAL.h" #include "Comms.h" class Magnetic_Field_Calibration_Wizard : public QDialog { public: Magnetic_Field_Calibration_Wizard(silk::HAL& hal, silk::Comms& comms, silk::node::gs::Node_ptr node, size_t output_idx,...
jeanleflambeur/silkopter
silkopter/libs/common/params/IParam.h
<reponame>jeanleflambeur/silkopter #pragma once namespace silk { namespace params { class IParam { virtual ~IParam() = default; virtual q::Path const& get_path() const = 0; virtual std::string const& get_ui_prefix() const = 0; virtual std::string const& get_ui_suffix() const = 0; virtual std::string const& get...
jeanleflambeur/silkopter
def_lang/include/def_lang/IInitializer.h
<gh_stars>10-100 #pragma once #include <memory> namespace ts { class IValue; class IInitializer { public: virtual ~IInitializer() = default; }; } #include "impl/IInitializer.inl"
jeanleflambeur/silkopter
silkopter/rc/src/IRotary_Encoder.h
#pragma once #include "IInput_Device.h" namespace silk { class IRotary_Encoder : public IInput_Device { public: virtual ~IRotary_Encoder() = default; virtual int32_t get_delta() const = 0; virtual int32_t get_clicks() const = 0; }; }
jeanleflambeur/silkopter
silkopter/fc/src/processor/Comp_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/IPressure.h" #include "common/stream/IFrame.h" #include "HAL.h" #include "Sample_Accumulator.h" #include "Basic_Output_S...
jeanleflambeur/silkopter
qbase/include/util/Circular_Buffer.h
<reponame>jeanleflambeur/silkopter #pragma once #include "QBase.h" namespace q { namespace util { template <class T, size_t SIZE> class Circular_Buffer : util::Noncopyable { public: static const size_t MAX_SIZE = SIZE; static const size_t MASK = SIZE - 1; Circular_Buffer() ...
jeanleflambeur/silkopter
qmath/include/qmath/triangle3.h
<reponame>jeanleflambeur/silkopter #pragma once namespace math { template <typename T> struct vec3; template <typename T> struct plane; template <typename T> struct line3; template <typename T> struct aabb3; //! 3d triangle template class template <typename T> struct triangle3 { triangle3(); triangl...
jeanleflambeur/silkopter
silkopter/libs/common/node/ISink.h
#pragma once #include "common/node/INode.h" namespace silk { namespace node { class ISink : public Node_Base<Type::SINK> { public: //sinks don't have any outputs virtual auto get_outputs() const -> std::vector<Output> final { return std::vector<Output>(); } }; } }
jeanleflambeur/silkopter
silkopter/fc/src/brain/LiPo_Battery.h
#pragma once #include "common/node/IProcessor.h" #include "common/stream/IVoltage.h" #include "common/stream/ICurrent.h" #include "common/stream/IBattery_State.h" #include "HAL.h" #include "utils/Butterworth.h" namespace silk { class LiPo_Battery : q::util::Noncopyable { public: LiPo_Battery(); ts::Result<...
jeanleflambeur/silkopter
qdata/include/data/File_System.h
#pragma once namespace q { namespace data { class File_System : util::Noncopyable { public: void mount(std::string const& mp, data::Data_Pack_uptr pack); void unmount(std::string const& mp); Path find_path_by_name(std::string const& name) const; std::vector<Path> find_all_paths...
jeanleflambeur/silkopter
silkopter/fc/src/bus/I2C_BCM_Bus.h
#pragma once #include "common/bus/II2C.h" #include "utils/hw/I2C_BCM.h" namespace silk { namespace hal { struct I2C_BCM_Descriptor; } } namespace silk { namespace bus { class I2C_BCM_Bus : public II2C_Bus { public: I2C_BCM_Bus(); ~I2C_BCM_Bus(); ts::Result<void> init(hal::IBus_Descriptor const& descrip...
jeanleflambeur/silkopter
def_lang/include/def_lang/INumeric_Value_Template.h
<reponame>jeanleflambeur/silkopter<gh_stars>10-100 #pragma once #include "Result.h" #include "IValue.h" namespace ts { template<typename Traits> class INumeric_Value_Template : virtual public IValue { public: virtual ~INumeric_Value_Template() = default; typedef Traits traits; virtual std::shared_ptr<t...
jeanleflambeur/silkopter
def_lang/include/def_lang/ITemplated_Type.h
#pragma once #include "Result.h" #include "IType.h" namespace ts { class ITemplate_Argument; class ITemplated_Type : virtual public IType { public: virtual ~ITemplated_Type() = default; virtual Result<void> init(std::vector<std::shared_ptr<const ITemplate_Argument>> const& arguments) = 0; }; }
jeanleflambeur/silkopter
silkopter/gs/src/Stream_Viewer_Window.h
#pragma once #include "common/stream/IStream.h" #include "ui_Stream_Viewer_Window.h" namespace silk { class Comms; } class IStream_Viewer_Widget; class Stream_Viewer_Window : public QWidget { Q_OBJECT public: Stream_Viewer_Window(QWidget* parent); void init(silk::Comms& comms, std::string const& stre...
jeanleflambeur/silkopter
silkopter/fc/src/bus/I2C_Linux_Bus.h
<reponame>jeanleflambeur/silkopter #pragma once #include "common/bus/II2C.h" #include "utils/hw/I2C_Dev.h" namespace silk { namespace hal { struct I2C_Linux_Descriptor; } } namespace silk { namespace bus { class I2C_Linux_Bus : public II2C_Bus { public: I2C_Linux_Bus(); ~I2C_Linux_Bus(); ts::Result<voi...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Literal.h
<reponame>jeanleflambeur/silkopter #pragma once #include "def_lang/ILiteral.h" namespace ts { class IDeclaration_Scope; class Literal final : public virtual ILiteral { public: Literal(IDeclaration_Scope const& scope, bool value); Literal(IDeclaration_Scope const& scope, int64_t value); Literal(IDeclarat...
jeanleflambeur/silkopter
silkopter/gs_old/src/HAL.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
qmath/include/qmath/mat2.h
#pragma once namespace math { /////////////////////////////////////////////////////////////////////////////// // forward declarations /////////////////////////////////////////////////////////////////////////////// template<typename T> struct vec2; template<typename T> struct mat3; template<typename T> struc...
jeanleflambeur/silkopter
silkopter/fc/src/transformer/Transformer_Inv.h
#pragma once #include "HAL.h" #include "common/node/ITransformer.h" #include "common/stream/IFrame.h" #include "Sample_Accumulator.h" #include "Basic_Output_Stream.h" #include "hal.def.h" namespace silk { namespace node { template<class In_Stream_t, class Out_Stream_t, class Frame_Stream_t> class Transformer_Inv :...
jeanleflambeur/silkopter
q/include/video/GLES/GLES_Fbo_Wrapper.h
<filename>q/include/video/GLES/GLES_Fbo_Wrapper.h #pragma once #include "video/Render_Target.h" #include "video/GLES/GLES_Interface.h" namespace q { namespace video { class Command_Stream; class GLES_Fbo_Wrapper : public Render_Target { friend class Command_Stream; public: GLES_Fbo_Wrapper(); ...
jeanleflambeur/silkopter
q/src/res/Impl/Default_Technique_Loader.h
<filename>q/src/res/Impl/Default_Technique_Loader.h #pragma once #include "res/Loader.h" #include "video/Technique.h" #include "video/Uniform.h" #include "video/Render_State.h" #include "video/Sampler_Def.h" #include "video/Attribute_Def.h" #include "video/Pass.h" #include "video/Render_State_Def.h" #include...
jeanleflambeur/silkopter
silkopter/libs/common/comms/def/gs_comms.def.h
<reponame>jeanleflambeur/silkopter #pragma once #include <stdint.h> #include <string> #include <vector> #include <memory> #include <cfloat> #include <boost/variant.hpp> #include <def_lang/Result.h> #include <def_lang/Serialization.h> #include "gen_support.h" namespace silk { namespace gs_comms { template<class T> st...
jeanleflambeur/silkopter
silkopter/gs/src/simulator/Simulator.h
#pragma once #include <QMainWindow> #include "ui_Simulator.h" #include "simulator/Render_Widget.h" #include "simulator/Camera_Controller_3D.h" #include "Comms.h" #include "messages.def.h" #include "common/stream/IMultirotor_Simulator_State.h" class Simulator : public QMainWindow { Q_OBJECT public: explicit ...
jeanleflambeur/silkopter
silkopter/libs/common/node/IMultirotor_Simulator.h
<reponame>jeanleflambeur/silkopter #pragma once #include "common/node/INode.h" namespace silk { namespace node { class IMultirotor_Simulator : public Node_Base<Type::SIMULATOR> { public: }; } }
jeanleflambeur/silkopter
silkopter/libs/embedded/utils/allocator.h
<reponame>jeanleflambeur/silkopter #include <stdlib.h> inline void* operator new(size_t size) { return malloc(size); } inline void* operator new[](size_t size) { return malloc(size); } inline void operator delete(void* p) { free(p); } inline void operator delete[](void* p) { free(p); } inline void* operator new(si...
jeanleflambeur/silkopter
q/include/video/GLES/GLES_Renderer.h
<reponame>jeanleflambeur/silkopter #pragma once #include "video/Renderer.h" #include "GLES_Command_Stream.h" #include "video/Post_FX.h" namespace q { namespace video { class Command_Stream; class GLES_Renderer : public Renderer { friend class GLES_Fbo_Wrapper; friend class GLES_Vertex_Buffer; ...
jeanleflambeur/silkopter
silkopter/libs/common/stream/IMultirotor_Commands.h
#pragma once #include "Stream_Base.h" #include "IFrame.h" namespace silk { namespace stream { template<class T> struct Input_Value { typedef T Value; Input_Value() = default; Input_Value(T value) : value(value) {} void set(Value const& v) { if (value != v) { value = v; version++; } } void set_...
jeanleflambeur/silkopter
silkopter/fc/src/uav_properties/Quad_Multirotor_Properties.h
#pragma once #include "def_lang/Result.h" #include "uav_properties/IMultirotor_Properties.h" #include <stdint.h> #include <vector> namespace silk { namespace hal { struct Quad_Multirotor_Descriptor; } } namespace silk { class Quad_Multirotor_Properties : public IMultirotor_Properties { public: ts::Result<voi...
jeanleflambeur/silkopter
q/include/video/Buffer_Pool.h
#pragma once #include "system/System.h" //NOT THREAD SAFE namespace q { namespace video { template<class T> class Buffer_Pool { public: typedef std::shared_ptr<T> TPtr; Buffer_Pool(size_t max_count, size_t preallocate_size, typename T::Usage usage) : m_max_count(max_count) , m_preallocate_...
jeanleflambeur/silkopter
silkopter/rc/src/Video_Decoder.h
#pragma once #include "common/stream/IVideo.h" #include <memory> class Video_Decoder { public: Video_Decoder(); ~Video_Decoder(); bool decode_data(void const* data, size_t size, math::vec2u16 const& resolution); bool init(); void release_buffers(); uint32_t get_video_texture_id(); st...
jeanleflambeur/silkopter
qbase/include/util/Signals.h
<gh_stars>10-100 #pragma once #include <boost/signals2.hpp> namespace q { namespace util { //signal/slots typedef boost::signals2::connection Connection; typedef boost::signals2::shared_connection_block Shared_Connection_Block; template <class Signature> class Signal : util::Noncopyable { public: ...
jeanleflambeur/silkopter
def_lang/include/def_lang/impl/Vector_Type.h
#include "def_lang/IVector_Type.h" #include "def_lang/ep/Symbol_EP.h" #include "def_lang/ep/Attribute_Container_EP.h" namespace ts { class Vector_Type final : virtual public IVector_Type, public Symbol_EP, public Attribute_Container_EP, public std::enable_shared_from_this<Vector_Type> { public: typedef IVector_V...
jeanleflambeur/silkopter
qbase/include/Debug.h
<filename>qbase/include/Debug.h #pragma once #ifdef Q_POSIX_API # include <signal.h> #endif /////////////////////////////////////////////////////////////////////////////// // namespace q { namespace debug { #define DBG_STRING std::string //The assert handler is called whenever an assert fails a...