id int64 0 755k | file_name stringlengths 3 109 | file_path stringlengths 13 185 | content stringlengths 31 9.38M | size int64 31 9.38M | language stringclasses 1
value | extension stringclasses 11
values | total_lines int64 1 340k | avg_line_length float64 2.18 149k | max_line_length int64 7 2.22M | alphanum_fraction float64 0 1 | repo_name stringlengths 6 65 | repo_stars int64 100 47.3k | repo_forks int64 0 12k | repo_open_issues int64 0 3.4k | repo_license stringclasses 9
values | repo_extraction_date stringclasses 92
values | exact_duplicates_redpajama bool 2
classes | near_duplicates_redpajama bool 2
classes | exact_duplicates_githubcode bool 2
classes | exact_duplicates_stackv2 bool 1
class | exact_duplicates_stackv1 bool 2
classes | near_duplicates_githubcode bool 2
classes | near_duplicates_stackv1 bool 2
classes | near_duplicates_stackv2 bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
754,772 | Board.cpp | dridri_bcflight/flight/boards/rpi/Board.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 19,008 | C++ | .cpp | 671 | 25.934426 | 166 | 0.633548 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,773 | DShot_dead.cpp | dridri_bcflight/flight/boards/rpi/DShot_dead.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 17,409 | C++ | .cpp | 520 | 31.230769 | 172 | 0.659164 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,774 | Thread.cpp | dridri_bcflight/flight/boards/rpi/Thread.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 3,871 | C++ | .cpp | 140 | 25.064286 | 108 | 0.672511 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,775 | startup.cpp | dridri_bcflight/flight/boards/rpi/startup.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 938 | C++ | .cpp | 29 | 30.137931 | 72 | 0.713496 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,776 | Serial.cpp | dridri_bcflight/flight/boards/rpi/Serial.cpp | #include "Serial.h"
#include <stdio.h>
#include <unistd.h>
#include <sys/fcntl.h>
// #include <sys/ioctl.h>
// #include <termios.h>
#include <asm/termios.h>
#include <map>
#include "Debug.h"
#include <poll.h>
extern "C" int ioctl (int __fd, unsigned long int __request, ...) __THROW;
static map< int, int > sSpeeds = ... | 3,338 | C++ | .cpp | 147 | 20.591837 | 74 | 0.615921 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,777 | GLContext.cpp | dridri_bcflight/flight/boards/rpi/GLContext.cpp | #include <iostream>
#include <algorithm>
#include "Debug.h"
#include "GLContext.h"
// #include <vc_dispmanx_types.h>
#include <bcm_host.h>
#include <fcntl.h>
#include "Board.h"
#define OPTIMUM_WIDTH 840
#define OPTIMUM_HEIGHT 480
GLContext* GLContext::sInstance = nullptr;
GLContext* GLContext::instance()
{
if ( !s... | 8,110 | C++ | .cpp | 267 | 28.059925 | 180 | 0.704309 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,778 | PWM.cpp | dridri_bcflight/flight/boards/rpi/PWM.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 41,379 | C++ | .cpp | 1,255 | 30.564143 | 178 | 0.652844 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,779 | I2C.cpp | dridri_bcflight/flight/boards/rpi/I2C.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 3,842 | C++ | .cpp | 168 | 20.488095 | 81 | 0.611907 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,780 | Bus.cpp | dridri_bcflight/flight/boards/common/Bus.cpp | #include "Bus.h"
#include <Board.h>
#include <Debug.h>
Bus::Bus()
: mConnected( false )
{
}
Bus::~Bus()
{
}
int Bus::Read8( uint8_t reg, uint8_t* value )
{
return Read( reg, value, 1 );
}
int Bus::Read16( uint8_t reg, uint16_t* value, bool big_endian )
{
int ret = Read( reg, value, 2 );
if ( big_endian ) {
#... | 1,661 | C++ | .cpp | 84 | 17.869048 | 93 | 0.608247 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,781 | ThreadBase.cpp | dridri_bcflight/flight/boards/common/ThreadBase.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,924 | C++ | .cpp | 128 | 20.84375 | 80 | 0.703046 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,782 | Servo.cpp | dridri_bcflight/flight/boards/generic/Servo.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,886 | C++ | .cpp | 59 | 30.118644 | 109 | 0.728926 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,783 | SPI.cpp | dridri_bcflight/flight/boards/generic/SPI.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,074 | C++ | .cpp | 86 | 22.337209 | 72 | 0.697509 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,784 | DShotDriver.cpp | dridri_bcflight/flight/boards/generic/DShotDriver.cpp | #include "DShotDriver.h"
DShotDriver* DShotDriver::instance( bool create_new )
{
return nullptr;
}
DShotDriver::DShotDriver()
{
}
DShotDriver::~DShotDriver()
{
}
void DShotDriver::Kill() noexcept
{
}
void DShotDriver::setPinValue( uint32_t pin, uint16_t value, bool telemetry )
{
(void)pin;
(void)value;
(v... | 438 | C++ | .cpp | 27 | 14.518519 | 77 | 0.765743 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,785 | GPIO.cpp | dridri_bcflight/flight/boards/generic/GPIO.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,067 | C++ | .cpp | 35 | 28.6 | 78 | 0.737512 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,787 | Board.cpp | dridri_bcflight/flight/boards/generic/Board.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 6,076 | C++ | .cpp | 240 | 23.033333 | 151 | 0.649592 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,788 | Thread.cpp | dridri_bcflight/flight/boards/generic/Thread.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,955 | C++ | .cpp | 112 | 23.955357 | 83 | 0.674229 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,789 | startup.cpp | dridri_bcflight/flight/boards/generic/startup.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 867 | C++ | .cpp | 23 | 35.73913 | 72 | 0.745843 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,790 | Serial.cpp | dridri_bcflight/flight/boards/generic/Serial.cpp | #include "Serial.h"
#include <stdio.h>
#include <unistd.h>
#include <sys/fcntl.h>
// #include <sys/ioctl.h>
// #include <termios.h>
#include <asm/termios.h>
#include <map>
#include "Debug.h"
//#include <pigpio.h>
extern "C" int ioctl (int __fd, unsigned long int __request, ...) __THROW;
static map< int, int > sSpeed... | 1,500 | C++ | .cpp | 81 | 16.753086 | 74 | 0.636624 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,791 | PWM.cpp | dridri_bcflight/flight/boards/generic/PWM.cpp | #include "PWM.h"
#include <stdio.h>
PWM::PWM( uint32_t pin, uint32_t time_base, uint32_t period_time_us, uint32_t sample_us, bool loop )
{
}
PWM::~PWM()
{
}
void PWM::SetPWMus( uint32_t width_us )
{
}
void PWM::Update()
{
}
| 231 | C++ | .cpp | 14 | 15 | 100 | 0.690476 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,792 | I2C.cpp | dridri_bcflight/flight/boards/generic/I2C.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,430 | C++ | .cpp | 64 | 20.53125 | 72 | 0.710253 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,793 | Debug.cpp | dridri_bcflight/libdebug/Debug.cpp | #include <time.h>
#include <mutex>
#include <map>
#define __DBG_CLASS
#include "Debug.h"
#ifdef ANDROID
#include <android/log.h>
#endif
pthread_t Debug::mMainThread = 0;
bool Debug::mStoreLog = false;
std::string Debug::mLog = std::string();
std::mutex Debug::mLogMutex;
std::ofstream Debug::mLogFile;
Debug::Level D... | 857 | C++ | .cpp | 35 | 22.571429 | 101 | 0.669951 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,794 | LuaObject.cpp | dridri_bcflight/libluacore/src/LuaObject.cpp | #include "LuaObject.h"
LuaObject::LuaObject( Lua* state )
: mState( state )
, mReference( 0 )
{
if ( lua_type( state->state(), -1 ) == LUA_TUSERDATA ) {
lua_pushvalue( state->state(), -1 );
mReference = luaL_ref( state->state(), LUA_REGISTRYINDEX );
// gDebug() << "mReference : " << mReference;
}
}
LuaObje... | 341 | C++ | .cpp | 14 | 22.428571 | 61 | 0.638889 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,795 | Lua.cpp | dridri_bcflight/libluacore/src/Lua.cpp | #include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <dirent.h>
#include <cmath>
#include <algorithm>
#include <dlfcn.h>
#include <netdb.h>
#include <netinet/in.h>
#include "Lua.h"
map< lua_State*, Lua* > Lua::mStates;
LuaValue LuaValue::mNil;
LuaValue LuaValue::Value( Lua* state, int32_t index )
{
... | 25,459 | C++ | .cpp | 847 | 27.252656 | 170 | 0.58332 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,796 | LuaInterface.cpp | dridri_bcflight/libluacore/src/LuaInterface.cpp | #include "LuaInterface.h"
void LuaInterface::PreInit()
{
lua_State* L = mLua->state();
*reinterpret_cast<LuaInterface**>( lua_newuserdata( L, sizeof(LuaInterface*) ) ) = this;
lua_pushvalue( L, -1 );
// mInstanceRef = luaL_ref( L, LUA_REGISTRYINDEX );
mType = Reference;
mReference[L] = luaL_ref( L, LUA_REGISTR... | 1,742 | C++ | .cpp | 58 | 27.310345 | 89 | 0.601796 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,797 | main.cpp | dridri_bcflight/joystick/main.cpp | #include <iostream>
#include <cmath>
#include <unistd.h>
#include <limits.h>
#include <string.h>
#include <fcntl.h>
#include <linux/joystick.h>
#include <linux/uinput.h>
#include <libudev.h>
#include "Socket.h"
static int create_joystick()
{
int fd = open( "/dev/uinput", O_WRONLY | O_NONBLOCK );
ioctl( fd, UI_SET_E... | 2,201 | C++ | .cpp | 77 | 26.220779 | 79 | 0.652587 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,798 | Socket.cpp | dridri_bcflight/joystick/Socket.cpp | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <unistd.h> /* close */
#include <netdb.h> /* gethostbyname */
#define INVALID_SOCKET -1
#de... | 4,937 | C++ | .cpp | 173 | 25.878613 | 128 | 0.63139 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,799 | Stream.cpp | dridri_bcflight/controller_pc/Stream.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 14,670 | C++ | .cpp | 411 | 32.907543 | 137 | 0.659744 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,800 | ControllerPC.cpp | dridri_bcflight/controller_pc/ControllerPC.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* T... | 4,119 | C++ | .cpp | 182 | 20.527473 | 72 | 0.70454 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,801 | main.cpp | dridri_bcflight/controller_pc/main.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,501 | C++ | .cpp | 47 | 30.12766 | 84 | 0.752941 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,802 | MainWindow.cpp | dridri_bcflight/controller_pc/MainWindow.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* T... | 34,591 | C++ | .cpp | 827 | 39 | 750 | 0.669402 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,805 | Config.cpp | dridri_bcflight/controller_pc/Config.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 6,956 | C++ | .cpp | 166 | 39.554217 | 158 | 0.697904 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,806 | BlackBox.cpp | dridri_bcflight/controller_pc/BlackBox.cpp | #include "BlackBox.h"
#include "ui_blackbox.h"
#include <QFileDialog>
#include <QTextStream>
#include <QCheckBox>
#include <QPalette>
#include <QDebug>
BlackBox::BlackBox()
{
ui = new Ui::BlackBox;
ui->setupUi(this);
connect( ui->open, SIGNAL(pressed()), this, SLOT(openFile()) );
mData = new BlackBoxData(ui->tab... | 4,541 | C++ | .cpp | 166 | 24.277108 | 130 | 0.61216 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,807 | VideoEditor.cpp | dridri_bcflight/controller_pc/VideoEditor.cpp | #include <unistd.h>
#include <mp4v2/mp4v2.h>
#include <QtWidgets/QFileDialog>
#include <QtCore/QTextStream>
#include <QtCore/QDebug>
#include <iostream>
#include "VideoEditor.h"
#include "ui_videoEditor.h"
#include "ui/VideoViewer.h"
extern "C" {
#include "../../external/openh264-master/codec/api/svc/codec_api.h"
}
V... | 10,901 | C++ | .cpp | 312 | 32.153846 | 144 | 0.673855 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,808 | HStatusBar.cpp | dridri_bcflight/controller_pc/ui/HStatusBar.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,111 | C++ | .cpp | 62 | 32.16129 | 124 | 0.723697 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,809 | VideoViewer.cpp | dridri_bcflight/controller_pc/ui/VideoViewer.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 7,895 | C++ | .cpp | 211 | 34.701422 | 119 | 0.672896 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,810 | RawWifiRx.cpp | dridri_bcflight/librawwifi++/RawWifiRx.cpp | #include <Debug.h>
#include "RawWifi.h"
#include "constants.h"
#include "radiotap.h"
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define le16_to_cpu(x) (x)
#define le32_to_cpu(x) (x)
#else
#define le16_to_cpu(x) ((((x)&0xff)<<8)|(((x)&0xff00)>>8))
#define le32_to_cpu(x) \
((((x)&0xff)<<24)|(((x)&0xff00)<<8)|(((x)&0xff0000)>>8... | 11,288 | C++ | .cpp | 306 | 33.581699 | 164 | 0.638208 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,811 | RawWifiTx.cpp | dridri_bcflight/librawwifi++/RawWifiTx.cpp | #include <Debug.h>
#include "RawWifi.h"
#include "constants.h"
#include "ieee80211_radiotap.h"
using namespace rawwifi;
int32_t RawWifi::Send( const uint8_t* buffer, uint32_t size, uint8_t retries )
{
fDebug( (void*)buffer, size, (int)retries );
if ( retries > 16 ) {
gError() << "Too many retries asked (" << retr... | 4,277 | C++ | .cpp | 113 | 35.345133 | 172 | 0.684769 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,812 | RawWifi.cpp | dridri_bcflight/librawwifi++/RawWifi.cpp | #include <Debug.h>
#include "RawWifi.h"
#include "constants.h"
using namespace rawwifi;
RawWifi::RawWifi( const std::string& device, uint8_t rx_port, uint8_t tx_port, bool blocking, int32_t read_timeout_ms )
: mDevice( device )
, mRxPort( rx_port )
, mTxPort( tx_port )
, mBlocking( blocking )
, mReadTimeoutMs( r... | 1,890 | C++ | .cpp | 72 | 23.986111 | 119 | 0.633889 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,813 | WifiInterfaceLinux.cpp | dridri_bcflight/librawwifi++/WifiInterfaceLinux.cpp | #include <unistd.h>
#include <dirent.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/family.h>
#include <netlink/genl/ctrl.h>
#include <netlink/msg.h>
#include <netlink/attr.h>
#include "WifiInterfaceLinux.h"
#include "... | 9,177 | C++ | .cpp | 266 | 31.890977 | 160 | 0.651501 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,814 | PcapHandler.cpp | dridri_bcflight/librawwifi++/PcapHandler.cpp | #include "PcapHandler.h"
#include <stdexcept>
#include <Debug.h>
using namespace rawwifi;
PcapHandler::PcapHandler( const std::string& device, uint8_t port, bool blocking, int32_t read_timeout_ms )
: mPcap( nullptr )
, mDevice( device )
, mPort( port )
, mBlocking( blocking )
, mHeaderLength( 0 )
{
fDebug( de... | 2,791 | C++ | .cpp | 89 | 28.842697 | 107 | 0.6566 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,815 | Controller.cpp | dridri_bcflight/libcontroller/Controller.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 43,878 | C++ | .cpp | 1,645 | 23.555623 | 138 | 0.649587 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,816 | ControllerBase.cpp | dridri_bcflight/libcontroller/ControllerBase.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 5,578 | C++ | .cpp | 131 | 40.664122 | 74 | 0.717935 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,817 | Thread.cpp | dridri_bcflight/libcontroller/Thread.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 3,766 | C++ | .cpp | 153 | 22.490196 | 84 | 0.684137 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,818 | SX127x.cpp | dridri_bcflight/libcontroller/links/SX127x.cpp | #include <unistd.h>
#include "SX127x.h"
#include "SX127xRegs.h"
#include "SX127xRegs-LoRa.h"
#include <iostream>
#include <cmath>
#include <string.h>
#include <Thread.h>
#include <GPIO.h>
#include <SPI.h>
#include <Debug.h>
#ifdef BOARD_rpi
#include <pigpio.h>
#endif
#define TICKS Thread::GetTick()
#define SX_TIMEOUT... | 33,725 | C++ | .cpp | 960 | 32.502083 | 310 | 0.653016 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,819 | Link.cpp | dridri_bcflight/libcontroller/links/Link.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 4,283 | C++ | .cpp | 186 | 20.967742 | 92 | 0.648569 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,820 | RawWifi.cpp | dridri_bcflight/libcontroller/links/RawWifi.cpp | #include "RawWifi.h"
#include "../librawwifi++/RawWifi.h"
#include "../librawwifi++/WifiInterfaceLinux.h"
#include <Debug.h>
RawWifi::RawWifi( const std::string& device, int16_t out_port, int16_t in_port, int read_timeout_ms )
: Link()
{
// Debug::setDebugLevel( Debug::Level::Trace );
try {
mWifiInterface = new ... | 1,639 | C++ | .cpp | 73 | 20.60274 | 101 | 0.697795 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,821 | Serial.cpp | dridri_bcflight/libcontroller/links/Serial.cpp | #include "Serial.h"
Serial::Serial( const std::string& device, uint32_t baudrate )
{
}
Serial::~Serial()
{
}
int Serial::setBlocking( bool blocking )
{
(void)blocking;
return 0;
}
void Serial::setRetriesCount( int retries )
{
}
int Serial::retriesCount() const
{
return 0;
}
int32_t Serial::Channel()
{
re... | 750 | C++ | .cpp | 51 | 13 | 77 | 0.719585 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,822 | nRF24L01.cpp | dridri_bcflight/libcontroller/links/nRF24L01.cpp | /*
* BCFlight
* Copyright (C) 2017 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 8,162 | C++ | .cpp | 301 | 24.66113 | 179 | 0.678073 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,823 | Socket.cpp | dridri_bcflight/libcontroller/links/Socket.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 7,056 | C++ | .cpp | 247 | 26.303644 | 119 | 0.666765 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,825 | spi.cpp | dridri_bcflight/libcontroller/links/RF24/utility/spi.cpp | #include "spi.h"
#include <sys/fcntl.h>
#include <sys/ioctl.h>
#include <linux/i2c-dev.h>
#include <pthread.h>
#include <string.h>
#include <errno.h>
#include <iostream>
static std::string mSPIDevice = "";
static pthread_mutex_t spiMutex = PTHREAD_MUTEX_INITIALIZER;
static int mFD = -1;
static int mBitsPerWord = 8;
s... | 3,998 | C++ | .cpp | 161 | 21.863354 | 195 | 0.624606 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | true | false | false | true | false | false |
754,826 | RendererHUD.cpp | dridri_bcflight/libhud/RendererHUD.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 23,152 | C++ | .cpp | 647 | 33.313756 | 187 | 0.675143 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,827 | RendererHUDNeo.cpp | dridri_bcflight/libhud/RendererHUDNeo.cpp | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 39,694 | C++ | .cpp | 875 | 42.181714 | 221 | 0.645031 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | true | false | false |
754,829 | Config.h | dridri_bcflight/controller_rc/Config.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,310 | C++ | .h | 60 | 36.566667 | 90 | 0.723861 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,830 | GlobalUI.h | dridri_bcflight/controller_rc/ui/GlobalUI.h | #ifndef GLOBALUI_H
#define GLOBALUI_H
#include <QtWidgets/QApplication>
#include <Thread.h>
class MainWindow;
class Controller;
class Config;
class GlobalUI : public Thread
{
public:
GlobalUI( Config* config, Controller* controller );
~GlobalUI();
void Run() { while( run() ); }
protected:
virtual bool run();
... | 454 | C++ | .h | 22 | 18.909091 | 52 | 0.778302 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,831 | MainWindow.h | dridri_bcflight/controller_rc/ui/MainWindow.h | #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtWidgets/QMainWindow>
#include <QtCore/QTimer>
#include <ControllerClient.h>
namespace Ui {
class MainWindow;
class PageMain;
class PageCalibrate;
class PageCamera;
class PageNetwork;
class PageSettings;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
p... | 1,990 | C++ | .h | 81 | 22.493827 | 49 | 0.798417 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,832 | MCP320x.h | dridri_bcflight/controller_rc/ADCs/MCP320x.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,116 | C++ | .h | 35 | 30 | 72 | 0.740465 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,833 | Socket.h | dridri_bcflight/controller_rc/boards/rpi/Socket.h | #ifndef SOCKET_H
#define SOCKET_H
#include <string>
#include <netinet/in.h>
namespace rpi {
class Socket
{
public:
typedef enum {
Server,
Client
} SocketType;
typedef enum {
TCP,
UDP,
UDPLite
} PortType;
Socket();
Socket( uint16_t port, PortType type = TCP );
Socket( const std::string& host, uint16... | 771 | C++ | .h | 37 | 18.783784 | 71 | 0.726897 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,834 | GPIO.h | dridri_bcflight/controller_rc/boards/rpi/GPIO.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,558 | C++ | .h | 57 | 25.175439 | 95 | 0.719064 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,835 | ControllerClient.h | dridri_bcflight/controller_rc/boards/rpi/ControllerClient.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 3,176 | C++ | .h | 96 | 30.666667 | 96 | 0.72671 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,836 | SPI.h | dridri_bcflight/controller_rc/boards/rpi/SPI.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,059 | C++ | .h | 35 | 28.4 | 72 | 0.743615 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,837 | ControllerClient.h | dridri_bcflight/controller_rc/boards/generic/ControllerClient.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,015 | C++ | .h | 30 | 31.966667 | 72 | 0.760204 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,838 | BlackBox.h | dridri_bcflight/flight/BlackBox.h | #ifndef BLACKBOX_H
#define BLACKBOX_H
#include <Thread.h>
#include <mutex>
#include "Config.h"
#include "Vector.h"
using namespace STD;
LUA_CLASS class BlackBox : public Thread
{
public:
LUA_EXPORT BlackBox();
~BlackBox();
const uint32_t id() const;
LUA_EXPORT void Enqueue( const string& data, const string& va... | 1,014 | C++ | .h | 36 | 26.138889 | 100 | 0.698969 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,839 | Vector.h | dridri_bcflight/flight/Vector.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 8,152 | C++ | .h | 296 | 24.837838 | 95 | 0.540118 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,840 | Controller.h | dridri_bcflight/flight/Controller.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,417 | C++ | .h | 80 | 28.3625 | 103 | 0.754303 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,841 | Matrix.h | dridri_bcflight/flight/Matrix.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,709 | C++ | .h | 55 | 29.090909 | 94 | 0.726553 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,842 | Console.h | dridri_bcflight/flight/Console.h | #ifndef CONSOLE_H
#define CONSOLE_H
#include <Thread.h>
class Config;
class Console : public Thread
{
public:
Console( Config* config );
~Console();
protected:
virtual bool run();
bool alnum( char c );
bool luavar( char c );
Config* mConfig;
vector<string> mFullHistory;
};
#endif // CONSOLE_H
| 307 | C++ | .h | 17 | 16.294118 | 29 | 0.742958 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,843 | Config.h | dridri_bcflight/flight/Config.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,122 | C++ | .h | 60 | 33.3 | 76 | 0.727406 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,845 | Main.h | dridri_bcflight/flight/Main.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,306 | C++ | .h | 91 | 23.472527 | 72 | 0.764759 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,846 | PowerThread.h | dridri_bcflight/flight/PowerThread.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,861 | C++ | .h | 72 | 23.75 | 72 | 0.779594 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,847 | FilterChain.h | dridri_bcflight/flight/stabilizer/FilterChain.h | #pragma once
#include <Vector.h>
#include <Lua.h>
#include <Debug.h>
#include "Filter.h"
template<typename V> class FilterChain : public Filter<V>
{
public:
FilterChain() : mState( V() ) {
fDebug();
}
FilterChain( const std::list<Filter<V>*>& filters ) : mFilters( filters ), mState( V() ) {
fDebug( mFilters.si... | 1,142 | C++ | .h | 45 | 23.466667 | 91 | 0.702479 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,848 | Stabilizer.h | dridri_bcflight/flight/stabilizer/Stabilizer.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 3,460 | C++ | .h | 100 | 32.49 | 72 | 0.77236 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,849 | EKF.h | dridri_bcflight/flight/stabilizer/EKF.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,329 | C++ | .h | 43 | 28.883721 | 77 | 0.750979 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,850 | MahonyAHRS.h | dridri_bcflight/flight/stabilizer/MahonyAHRS.h | #pragma once
#include "SensorFusion.h"
#include <Vector.h>
#include <Quaternion.h>
#include <Matrix.h>
#include "Lua.h"
LUA_CLASS class MahonyAHRS : public SensorFusion<Vector3f>
{
public:
LUA_EXPORT MahonyAHRS( float kp, float ki );
virtual ~MahonyAHRS();
virtual void UpdateInput( uint32_t row, const Vector3f& i... | 586 | C++ | .h | 24 | 22.708333 | 65 | 0.781362 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,851 | PT1.h | dridri_bcflight/flight/stabilizer/PT1.h | #pragma once
#include "Lua.h"
#include "Filter.h"
#include "Debug.h"
LUA_CLASS template<typename V> class PT1 : public Filter<V>
{
public:
PT1( const V& cutoff ) : mCutOff( cutoff ), mState( V() ) {
fDebug( V( cutoff ) );
}
PT1( const LuaValue& cutoff ) : mCutOff( V(cutoff) ), mState( V() ) {
fDebug( V( cutoff... | 1,041 | C++ | .h | 41 | 23.536585 | 120 | 0.653226 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,852 | BiquadFilter.h | dridri_bcflight/flight/stabilizer/BiquadFilter.h | #pragma once
#include "Lua.h"
#include "Filter.h"
#include "Debug.h"
LUA_CLASS template<typename V> class BiquadFilter : public Filter<V>
{
public:
typedef enum {
LPF,
NOTCH
} Type;
BiquadFilter( const float& q, const float& centerFreq = 0.0f )
: mType( NOTCH )
, mQ( q )
, mCenterFrequency(centerFreq)
... | 4,002 | C++ | .h | 143 | 25 | 132 | 0.640365 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,853 | Filter.h | dridri_bcflight/flight/stabilizer/Filter.h | #pragma once
#include <Vector.h>
template<typename V> class Filter {
public:
virtual ~Filter() {}
virtual V filter( const V& input, float dt ) = 0;
virtual V state() = 0;
};
| 180 | C++ | .h | 8 | 20.75 | 50 | 0.698225 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,854 | IMU.h | dridri_bcflight/flight/stabilizer/IMU.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 3,967 | C++ | .h | 126 | 29.436508 | 99 | 0.783918 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,855 | SensorFusion.h | dridri_bcflight/flight/stabilizer/SensorFusion.h | #pragma once
#include <stdint.h>
template <typename V> class SensorFusion
{
public:
virtual ~SensorFusion() {}
virtual void UpdateInput( uint32_t row, const V& input ) = 0;
virtual void Process( float dt ) = 0;
virtual const V& state() const = 0;
};
| 256 | C++ | .h | 10 | 24 | 62 | 0.72541 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,856 | PID.h | dridri_bcflight/flight/stabilizer/PID.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 3,332 | C++ | .h | 126 | 23.849206 | 132 | 0.657689 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,857 | DynamicNotchFilter.h | dridri_bcflight/flight/stabilizer/DynamicNotchFilter.h | #pragma once
#include <cassert>
#include "Lua.h"
#include "Filter.h"
#include "Debug.h"
#include <Thread.h>
#include <BiquadFilter.h>
typedef struct fftwf_plan_s* fftwf_plan;
typedef float fftwf_complex[2];
#define DYNAMIC_NOTCH_COUNT 4
template<typename V> class _DynamicNotchFilterBase : public Filter<V>
{
public:... | 2,465 | C++ | .h | 88 | 25.886364 | 92 | 0.725847 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,858 | DRM.h | dridri_bcflight/flight/video/DRM.h | #ifndef DRM_H
#define DRM_H
class DRM
{
public:
static int drmFd();
protected:
static int sDrmFd;
};
#endif // DRM_H
| 122 | C++ | .h | 10 | 10.7 | 20 | 0.743119 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,859 | HUD.h | dridri_bcflight/flight/video/HUD.h | #ifndef HUD_H
#define HUD_H
#if ( BUILD_HUD == 1 )
#include <stdint.h>
#include <Thread.h>
#include <RendererHUD.h>
#include <map>
class GLContext;
class SmartAudio;
LUA_CLASS class HUD : public Thread
{
public:
LUA_EXPORT typedef enum {
START = 0,
CENTER = 1,
END = 2,
} TextAlignment;
LUA_EXPORT HUD();
... | 1,932 | C++ | .h | 67 | 26.80597 | 215 | 0.746486 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,860 | V4L2Encoder.h | dridri_bcflight/flight/video/V4L2Encoder.h | #ifndef V4L2ENCODER_H
#define V4L2ENCODER_H
#include <queue>
#include <mutex>
#include <thread>
#include <condition_variable>
#include "Lua.h"
#include "VideoEncoder.h"
LUA_CLASS class V4L2Encoder : public VideoEncoder, protected Thread
{
public:
LUA_EXPORT typedef enum {
FORMAT_H264,
FORMAT_MJPEG
} Format;
L... | 1,397 | C++ | .h | 53 | 24.264151 | 89 | 0.770787 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,861 | RecorderAvformat.h | dridri_bcflight/flight/video/RecorderAvformat.h | #ifndef RECORDERAVFORMAT_H
#define RECORDERAVFORMAT_H
extern "C" {
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
};
#include "Recorder.h"
#include "Thread.h"
LUA_CLASS class RecorderAvformat : public Recorder, protected Thread
{
public:
LUA_EXPORT RecorderAvformat();
~RecorderAvformat();
LUA_... | 2,175 | C++ | .h | 76 | 26.289474 | 146 | 0.76259 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,862 | AvcodecEncoder.h | dridri_bcflight/flight/video/AvcodecEncoder.h | #ifndef AVCODECENCODER_H
#define AVCODECENCODER_H
#include "VideoEncoder.h"
class AVCodec;
class AVCodecContext;
LUA_CLASS class AvcodecEncoder : public VideoEncoder
{
public:
LUA_EXPORT typedef enum {
FORMAT_H264,
FORMAT_MJPEG
} Format;
LUA_EXPORT AvcodecEncoder();
~AvcodecEncoder();
virtual void Enqueue... | 785 | C++ | .h | 28 | 26.035714 | 84 | 0.784759 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,863 | DRMSurface.h | dridri_bcflight/flight/video/DRMSurface.h | #ifndef DRMSURFACE_H
#define DRMSURFACE_H
#include <stdint.h>
#include <xf86drmMode.h>
#include "DRM.h"
#include "DRMFrameBuffer.h"
class DRMSurface : public DRM
{
public:
DRMSurface( int32_t zindex = 0 );
~DRMSurface();
void Show( DRMFrameBuffer* fb );
const drmModeModeInfo* mode() const;
protected:
uint32_... | 459 | C++ | .h | 22 | 19.090909 | 37 | 0.774419 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,864 | Camera.h | dridri_bcflight/flight/video/Camera.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 2,813 | C++ | .h | 74 | 35.959459 | 115 | 0.746882 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,865 | Recorder.h | dridri_bcflight/flight/video/Recorder.h | #ifndef RECORDER_H
#define RECORDER_H
#ifdef SYSTEM_NAME_Linux
#include <mutex>
#include <set>
#include <list>
#include <vector>
#include <stdint.h>
#include "Vector.h"
class Recorder
{
public:
typedef enum {
TrackTypeVideo,
TrackTypeAudio,
} TrackType;
Recorder();
~Recorder();
LUA_EXPORT virtual void Sta... | 1,160 | C++ | .h | 37 | 29.513514 | 145 | 0.745946 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,866 | RecorderBasic.h | dridri_bcflight/flight/video/RecorderBasic.h | #ifndef RECORDERBASIC_H
#define RECORDERBASIC_H
#include "Recorder.h"
#include "Thread.h"
LUA_CLASS class RecorderBasic : public Recorder, protected Thread
{
public:
LUA_EXPORT RecorderBasic();
~RecorderBasic();
virtual void Start();
virtual void Stop();
virtual bool recording();
virtual uint32_t AddVideoTrac... | 1,469 | C++ | .h | 49 | 27.632653 | 141 | 0.75691 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,867 | VideoEncoder.h | dridri_bcflight/flight/video/VideoEncoder.h | #ifndef VIDEOENCODER_H
#define VIDEOENCODER_H
#include <stdint.h>
#include "Lua.h"
#include "Link.h"
#include "Recorder.h"
class VideoEncoder
{
public:
VideoEncoder();
~VideoEncoder();
virtual void Setup() = 0;
virtual void EnqueueBuffer( size_t size, void* mem, int64_t timestamp_us, int fd = -1 ) = 0;
virtual v... | 567 | C++ | .h | 22 | 24.136364 | 93 | 0.761553 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,868 | DRMFrameBuffer.h | dridri_bcflight/flight/video/DRMFrameBuffer.h | #ifndef DRMFRAMEBUFFER_H
#define DRMFRAMEBUFFER_H
#include <stdint.h>
#include <drm_fourcc.h>
#include "DRM.h"
class DRMFrameBuffer : public DRM
{
public:
DRMFrameBuffer( uint32_t width, uint32_t height, uint32_t stride, uint32_t format = DRM_FORMAT_YUV420, uint32_t bufferObjectHandle = 0, int dmaFd = -1 );
~DRMFra... | 582 | C++ | .h | 21 | 26 | 154 | 0.77518 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,869 | LiveOutput.h | dridri_bcflight/flight/video/LiveOutput.h | #ifndef LIVEOUTPUT_H
#define LIVEOUTPUT_H
#include "VideoEncoder.h"
LUA_CLASS class LiveOutput : public VideoEncoder
{
public:
LUA_EXPORT LiveOutput();
~LiveOutput();
void Setup();
void EnqueueBuffer( size_t size, void* mem, int64_t timestamp_us, int fd = -1 );
};
#endif // LIVEOUTPUT_H
| 296 | C++ | .h | 12 | 23 | 81 | 0.753571 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,870 | LinuxCamera.h | dridri_bcflight/flight/video/LinuxCamera.h | #ifndef LINUXCAMERA_H
#define LINUXCAMERA_H
#include <libcamera/libcamera.h>
#include "DRMFrameBuffer.h"
#include "DRMSurface.h"
#include <Thread.h>
#include "Camera.h"
#include "Lua.h"
#include <set>
LUA_CLASS class LinuxCamera : public Camera
{
public:
LUA_EXPORT LinuxCamera();
virtual ~LinuxCamera();
virtual v... | 4,539 | C++ | .h | 110 | 39.327273 | 111 | 0.792299 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,871 | Frame.h | dridri_bcflight/flight/frames/Frame.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,808 | C++ | .h | 59 | 28.728814 | 98 | 0.742363 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,872 | Multicopter.h | dridri_bcflight/flight/frames/Multicopter.h | #ifndef MULTICOPTER_H
#define MULTICOPTER_H
#include "Frame.h"
class Main;
LUA_CLASS class Multicopter : public Frame
{
public:
LUA_EXPORT Multicopter();
~Multicopter();
void Arm();
void Disarm();
void WarmUp();
virtual bool Stabilize( const Vector3f& pid_output, float thrust );
protected:
vector< float > m... | 603 | C++ | .h | 22 | 25.590909 | 68 | 0.770435 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,873 | SBUS.h | dridri_bcflight/flight/links/SBUS.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,735 | C++ | .h | 51 | 32.039216 | 176 | 0.74552 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,874 | Socket.h | dridri_bcflight/flight/links/Socket.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 1,961 | C++ | .h | 65 | 28.138462 | 100 | 0.73617 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,875 | SX127xRegs-LoRa.h | dridri_bcflight/flight/links/SX127xRegs-LoRa.h | /*
/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C) 2014 Semtech
Description: SX1276 LoRa modem registers and bits definitions
License: Revis... | 19,994 | C++ | .h | 482 | 39.390041 | 79 | 0.529607 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,876 | SX127x.h | dridri_bcflight/flight/links/SX127x.h | #ifndef SX127X_H
#define SX127X_H
#include <atomic>
#include <Mutex.h>
#include <list>
#include "Link.h"
#include "Config.h"
class Main;
class SPI;
LUA_CLASS class SX127x : public Link
{
public:
typedef enum {
FSK,
LoRa,
} Modem;
LUA_EXPORT SX127x();
~SX127x();
int Connect();
void setFrequency( float f )... | 4,258 | C++ | .h | 155 | 25.2 | 91 | 0.744123 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
754,877 | Link.h | dridri_bcflight/flight/links/Link.h | /*
* BCFlight
* Copyright (C) 2016 Adrien Aubry (drich)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | 3,213 | C++ | .h | 89 | 34.146067 | 111 | 0.71134 | dridri/bcflight | 131 | 22 | 8 | GPL-3.0 | 9/20/2024, 9:42:21 PM (Europe/Amsterdam) | false | false | false | false | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.