Comments (1)
I did not finish it yet, but you could take a look at the Configuration wiki.
This is more than just a configuration file, the LUA engine actually spawn class (by allocating and calling constructors)) instances by itself. If you are not afraid of automatically-generated C++ code, you can take a look at flight/build/lua_init.cpp:lua_init()
Take a look to /flight/config.lua as an example.
Some variables are mandatory, but most of their values should be ok if left empty :
frame = Multicopter {
maxspeed = 1.0,
motors = {},
matrix = {}
}
imu = IMU {
gyroscopes = {},
accelerometers = {},
magnetometers = {},
altimeters = {},
gpses = {},
}
-- same scales as betaflight
PID.pscale = 0.032029
PID.iscale = 0.244381
PID.dscale = 0.000529
stabilizer = Stabilizer {
loop_time = 500, -- 500 ยตs => 2000Hz stabilizer update
rate_speed = 1000, -- deg/sec
pid_roll = PID( 45, 70, 40 ),
pid_pitch = PID( 46, 70, 40 ),
pid_yaw = PID( 45, 90, 2 ),
horizon_angles = Vector( 20.0, 20.0 ),
pid_horizon = PID( 150, 0, 0 )
}
controller = Controller {
expo = Vector(4, 4, 3.5, 2.25),
link = Socket {
type = Socket.UDP,
port = 2020,
read_timeout = 500
}
}
For the camera, something like this should be what you are asking for :
camera_link = Socket {
type = Socket.UDPLite,
port = 2021,
broadcast = false
}
camera = LinuxCamera {
vflip = false,
hflip = false,
hdr = true, -- this forces framerate down to 30 (HW limitation)
width = 1920,
height = 1080,
framerate = 50,
sharpness = 0.5,
preview_output = LiveOutput(), -- this live outputs to HDMI / DPI / CRT / etc, can be removed
video_output = V4L2Encoder {
video_device = "/dev/video11",
bitrate = 8 * 1024 * 1024,
width = 1920,
height = 1080,
framerate = 30,
link = camera_link
}
}
In the controller_pc app, go to File โ Settings, Connection tab, then :
- select TCP/IP mode
- enter your PI4's IP adress
- choose UDP port 2020 for controller
- choose UDPLite port 2021 for video
You don't have to start video recording, the live stream should show up by itself without any action
from bcflight.
Related Issues (10)
- Manual for installation HOT 4
- Tutorial HOT 7
- What is your resolution of the oneshot125? HOT 5
- Raspberry Flight HAT HOT 1
- flight Build errors! What compiler to use? HOT 5
- testing motor output HOT 8
- recommendations for soldering HOT 12
- Is the HUD class instantiation necessary to get successful video stream in controller_pc? HOT 2
- PCBWay question share/sell HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcflight.