Headers cleanups

This commit is contained in:
Oleg Kalachev 2023-12-19 05:06:19 +03:00
parent d3e7291197
commit a174d5cd7d
11 changed files with 19 additions and 24 deletions

View File

@ -1,6 +1,8 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// Main firmware file
#include "vector.h" #include "vector.h"
#include "quaternion.h" #include "quaternion.h"

View File

@ -1,6 +1,8 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// Work with the IMU sensor
#include <SPI.h> #include <SPI.h>
#include <MPU9250.h> #include <MPU9250.h>

View File

@ -1,6 +1,8 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// Main LED control
#define BLINK_PERIOD 500000 #define BLINK_PERIOD 500000
void setupLED() void setupLED()

View File

@ -1,6 +1,8 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// MAVLink communication
#if WIFI_ENABLED == 1 #if WIFI_ENABLED == 1
#include "mavlink/common/mavlink.h" #include "mavlink/common/mavlink.h"

View File

@ -1,7 +1,7 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// Motors output // Motors output control
// Motor: 8520 3.7V // Motor: 8520 3.7V
// ESC: KINGDUO Micro Mini 4A 1S Brushed Esc 3.6-6V // ESC: KINGDUO Micro Mini 4A 1S Brushed Esc 3.6-6V

View File

@ -1,6 +1,8 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// Work with the RC receiver
#include <SBUS.h> #include <SBUS.h>
const uint16_t channelNeutral[] = {995, 883, 200, 972, 512, 512}; const uint16_t channelNeutral[] = {995, 883, 200, 972, 512, 512};

View File

@ -1,6 +1,8 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// Time related functions
void step() void step()
{ {
float now = micros() / 1000000.0; float now = micros() / 1000000.0;

View File

@ -1,6 +1,8 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// Utility functions
#include "math.h" #include "math.h"
float mapf(long x, long in_min, long in_max, float out_min, float out_max) float mapf(long x, long in_min, long in_max, float out_min, float out_max)

View File

@ -1,9 +1,7 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiAccessPoint/WiFiAccessPoint.ino // Wi-Fi support
// https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiClient/WiFiClient.ino
// https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiUDPClient/WiFiUDPClient.ino
#if WIFI_ENABLED == 1 #if WIFI_ENABLED == 1
@ -15,9 +13,7 @@
#define WIFI_SSID "flix" #define WIFI_SSID "flix"
#define WIFI_PASSWORD "flixwifi" #define WIFI_PASSWORD "flixwifi"
// #define WIFI_UDP_IP "192.168.4.255"
#define WIFI_UDP_IP "255.255.255.255" #define WIFI_UDP_IP "255.255.255.255"
// #define WIFI_UDP_IP "192.168.4.2"
#define WIFI_UDP_PORT 14550 #define WIFI_UDP_PORT 14550
WiFiUDP udp; WiFiUDP udp;

View File

@ -1,24 +1,7 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// https://classic.gazebosim.org/tutorials?tut=plugins_model&cat=write_plugin // Gazebo plugin for running Arduino code and simulating the drone
// https://classic.gazebosim.org/tutorials?tut=set_velocity&cat=
// https://github.com/gazebosim/gazebo-classic/blob/gazebo11/plugins/ArduCopterPlugin.cc
// https://github.com/gazebosim/gazebo-classic/blob/gazebo11/plugins/ArduCopterPlugin.cc#L510 - motor
// https://classic.gazebosim.org/tutorials?tut=gui_overlay&cat=user_input
// https://github.com/gazebosim/gazebo-classic/blob/gazebo9/examples/plugins/gui_overlay_plugin_time/GUIExampleTimeWidget.cc
// https://github.com/yujinrobot/kobuki_desktop/blob/ea5b7283d92f61efbd1a2185b46e1ad344e7e81a/kobuki_gazebo_plugins/src/gazebo_ros_kobuki_loads.cpp#L29
// https://github.com/osrf/swarm/blob/1a2e4040b12b686ed7a13e32301d538b1c7d0b1d/src/RobotPlugin.cc#L936
// motors thrust: https://www.youtube.com/watch?v=VtKI4Pjx8Sk
// https://github.com/gazebosim/gazebo-classic/tree/master/examples/plugins
// publish to topics https://github.com/wuwushrek/sim_cf/blob/df68af275c9f753d9bf1b0494a4e513d9f4c9a7c/crazyflie_gazebo/src/gazebo_lps_plugin.cpp#L104
// https://github.com/bitcraze/crazyflie-simulation
// GUI overlay:
// https://github.com/gazebosim/gazebo-classic/blob/gazebo9/examples/plugins/gui_overlay_plugin_time/GUIExampleTimeWidget.cc
#include <functional> #include <functional>
#include <cmath> #include <cmath>

View File

@ -1,6 +1,8 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix // Repository: https://github.com/okalachev/flix
// Joystick support for simulation
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include <gazebo/gazebo.hh> #include <gazebo/gazebo.hh>
#include <iostream> #include <iostream>