Commit Graph
100 Commits
Author SHA1 Message Date
Oleg Kalachev a687303062 Make motor parameters apply without reboot
Add callback to parameter definition to call after parameter is changed.
2026-02-19 04:56:12 +03:00
Oleg Kalachev b2daf2587f Minor parameters code simplifications
readOnly is false by default
INFINITY == INFINITY, so remove redundant check
2026-02-19 02:59:38 +03:00
Oleg Kalachev a8c25d8ac0 Minor updates to usage article 2026-02-04 17:52:23 +03:00
Oleg Kalachev 3e49d41986 Make rc channel numbers and calibration params use int instead of float
As parameter subsystems supports int now, and int is much more natural here.
2026-02-02 20:36:22 +03:00
Oleg Kalachev 67430c7aac Several minor changes 2026-02-02 18:46:36 +03:00
Oleg Kalachev 3631743a29 Drop messages from another systems in pyflix
We shouldn't pass messages where system id != our system id. 
This change may be useful when there are many drones in one network.
2026-02-02 18:28:20 +03:00
Oleg Kalachev 3dde380bb7 Add parameters for list of modes bound to rc switch
Parameters: CTL_FLT_MODE_0, CTL_FLT_MODE_1, CTL_FLT_MODE_2.
Also fix a bug with incorrect choosing the mode from controlMode.
2026-01-27 16:38:20 +03:00
Oleg Kalachev 377b21429b Fix error when launching the sim
Also make the parameters WIFI_LOC_PORT and WIFI_REM_PORT work in the sim.
2026-01-27 16:32:52 +03:00
Oleg Kalachev 1ac443d6f8 Add a build by Arky Matsekh 2026-01-27 15:17:58 +03:00
Oleg Kalachev 964c0f7bc1 Make setting parameter in console printing actual parameter value.
In some cases, it would not be equal to the requested value.
2026-01-27 09:28:01 +03:00
Oleg Kalachev 40bdaacedb Make motor subsystem configurable using parameters
Motor pins: MOT_PIN_FL, MOT_PIN_FR, MOT_PIN_RL, MOT_PIN_RR.
PWM configuration: MOT_PWM_FREQ, MOT_PWM_RES, MOT_PWM_STOP, MOT_PWM_MIN, MOT_PWM_MAX.
MOT_PWM_MAX = -1 chooses duty cycle mode for brushed motors (default).
2026-01-27 08:40:52 +03:00
Oleg Kalachev 7d74f3d5cd Minor docs fixes 2026-01-27 07:21:21 +03:00
Oleg Kalachev 9fd35ba361 Simplify lpf filter code
Begin with zero instead of the initializing value, as the latter doesn't make much sense in practice, but complicates the code much.
2026-01-24 09:43:46 +03:00
Oleg Kalachev ca50f75576 Various minor fixes 2026-01-24 09:34:16 +03:00
Oleg Kalachev e47a31f981 Fix mavlink parameter set acknowledgement value
If the parameter is integer the acknowledgement should contain the rounded value.
2026-01-24 09:32:49 +03:00
Oleg Kalachev 7ad3022798 Add parameter for configuring gyro bias lpf
+ reset the filter on `reset` command
2026-01-24 09:31:32 +03:00
Oleg Kalachev 5b654e4d8e Update ESP32-Core to 3.3.6 2026-01-23 02:41:43 +03:00
Oleg Kalachev cf10ec6161 Update MAVLink-Arduino to 2.0.16 2026-01-23 01:11:35 +03:00
Oleg Kalachev 6d01cd2e79 Make failsafe configurable using parameters
SF_RC_LOSS_TIME - time without rc to activate failsafe.
SD_DESCEND_TIME - total time to decrease the throttle to zero.
Make controlTime nan on the start to simplify the logic.
2026-01-22 23:57:52 +03:00
Oleg Kalachev 0abb18c616 Make parameter names case-insensitive
+ minor fix
2026-01-22 23:11:47 +03:00
Oleg Kalachev 30326a5662 Add parameters for configuring the mavlink subsystem
MAV_SYS_ID - mavlink system id.
MAV_RATE_SLOW - rate of slow telemetry (e. g. heartbeats).
MAV_RATE_FAST - rate of fast telemetry (e. g. attitude, imu data).
2026-01-22 23:04:45 +03:00
Oleg Kalachev dd3575174b Add wifi configuration using parameters and cli
Add console commands to setup wifi.
Add a parameter for choosing between STA and AP mode.
Add parameters for udp ports.
Remove WIFI_ENABLED macro.
2026-01-22 22:58:43 +03:00
Oleg Kalachev c0f3301da4 Support integer parameters in addition to floats
The variable pointer is stored as a union field.
If `.integer` field is true, then integer pointer should be used.
Interfaces to parameters (cli and mavlink) keep working using floats.
Setting a non-finite value to int parameter will cause an error.
`.value` field is renamed to `.cache`.
2026-01-22 22:54:05 +03:00
Oleg Kalachev 9a9bd07251 Add correct attitude estimation video to the usage article 2026-01-15 23:46:23 +03:00
Oleg Kalachev 28f5855a57 Re-arrange control.ino declarations to make a bit more sensible
So the control command is above the PID controllers.
2026-01-13 17:43:53 +03:00
Oleg Kalachev 7e24ee30f7 Documentation and book updates
Improve the main list of features.
Use lowercase imu variable for consistency with the firmware code.
Minor fixes.
2026-01-13 17:26:40 +03:00
Oleg Kalachev 2a8faf5759 Fix logo svg slightly 2026-01-08 19:45:08 +03:00
Oleg Kalachev f4e58a652a Add project logo 2026-01-08 17:58:59 +03:00
Oleg Kalachev 6c46328da1 Minor doc fixes 2026-01-04 15:01:53 +03:00
Oleg Kalachev c8e5e08b03 Move all global variable declarations to the appropriate subsystems
As it makes the subsystems code easier to understand.
Declare the most used variables in main sketch file as forward declarations.
Make all control input zero by default (except controlMode).
Minor changes.
2026-01-03 13:28:18 +03:00
Oleg Kalachev a5e3dfcf69 Some updates to the docs 2026-01-03 12:18:47 +03:00
Oleg Kalachev d6e8be0c05 Add parameters for easier IMU orientation definition 2025-12-26 21:14:15 +03:00
Oleg Kalachev 68d16855df Add motors rotation diagram to usage article 2025-12-25 07:22:09 +03:00
Oleg Kalachev 0547ea548b Add parameters for acc weight and rates lpf alpha 2025-12-24 05:43:55 +03:00
Oleg Kalachev c02dba6812 Rename gyroCalibrationFilter to gyroBiasFilter
Which seems a better name
2025-12-24 05:36:43 +03:00
Oleg Kalachev f1dc4a0400 Updates to user builds article 2025-12-17 02:21:51 +03:00
Oleg Kalachev 158827ac55 Add new user builds, add school 548 course overview
+ minor doc fixes.
2025-12-13 21:09:33 +03:00
Oleg Kalachev 36ca30c3e4 Minor docs fix 2025-11-27 18:34:32 +03:00
Oleg Kalachev 48711b55e1 Add tip about CNT_TILT_MAX parameter to the simulator article 2025-11-26 17:34:08 +03:00
Oleg Kalachev 4d583185a9 Rename manual mode to raw mode
Make it callable from the console.
Increase the coefficient.
Corresponding change in pyflix.
pyflix@0.11.
2025-11-25 04:44:16 +03:00
Oleg Kalachev d757ffa853 Move yaw dead zone handling from mavlink to control subsystem
So yaw dead zone works the same for rc and mavlink.
2025-11-22 05:11:46 +03:00
Oleg Kalachev 5352386486 Minor updates to pyflix library, pyflix@0.10
Fixes to documentation.
Improve logger format.
2025-11-22 05:07:46 +03:00
Oleg Kalachev 9b5872740f Add wifi cli command
To show wi-fi info.
2025-11-22 04:46:54 +03:00
Oleg Kalachev 31dbdaf241 Group control parameters
Also add IMU group to accelerometer calibration parameters.
2025-11-19 01:50:46 +03:00
Oleg Kalachev f4b56262b1 Remove unneeded SERIAL_BAUDRATE define 2025-11-14 20:23:15 +03:00
Oleg Kalachev 49039f752d Refactor Wi-Fi log download
Use MAVLink LOG_REQUEST_DATA and LOG_DATA for download log instead of console.
Make Wi-Fi download default way of downloading the log.
Make `log` command only print the header and `log dump` dump the log.
2025-11-14 20:21:05 +03:00
Oleg Kalachev 348721acc9 Updates in documentation
Fixes, updates, new illustrations.
2025-11-10 20:16:14 +03:00
Oleg Kalachev 774144c430 Many updates to documentation
Updates to main readme.
Add much more info to usage article.
Move simulator building to simulation's readme.
Improve assembly article.
Many fixes.
Updates in diagrams.
2025-11-06 13:55:52 +03:00
Oleg Kalachev 0e6651ab82 Add Rate class for running the code at fixed rate 2025-11-06 13:41:33 +03:00
Oleg Kalachev 1a017ccb97 Keep only one floating point version of map function
Two variants are redundant
2025-11-02 00:02:28 +03:00
Oleg Kalachev 7170b20d1d Simplify command for command handling 2025-10-21 19:41:10 +03:00
Oleg Kalachev dc9aed113b Minor code fixes 2025-10-21 19:41:05 +03:00
Oleg Kalachev 08b6123eb7 Fixes to troubleshooting 2025-10-21 19:40:54 +03:00
Oleg Kalachev 1a8b63ee04 Send only mavlink heartbeats until connected 2025-10-21 19:39:17 +03:00
Oleg Kalachev 8c49a40516 Skip attitude/rate control if thrustTarget is ineffective
To prevent i term windup.
2025-10-20 23:01:17 +03:00
Oleg Kalachev ca595edce5 Refactor PID control to simplify the code and modifications
Each PID uses its internal dt, so may be various contexts with different rate.
PID has max dt, so no need to reset explicitly.
2025-10-20 22:54:18 +03:00
Oleg Kalachev e50a9d5fea Revert t variable type to float instead of double
For the sake of simplicity and consistency.
2025-10-19 20:46:38 +03:00
Oleg Kalachev ebac78dc0f Minor change 2025-10-19 20:46:26 +03:00
Oleg Kalachev 186cf88d84 Add generic Delay filter 2025-10-19 20:46:11 +03:00
Oleg Kalachev 253aae2220 Lowercase imu and rc variables
To make it more obvious these are variables, not classes.
2025-10-19 20:45:56 +03:00
Oleg Kalachev 6f0964fac4 Rename failsafe.ino to safety.ino
To aggregate all the safety related functionality.
2025-10-19 20:44:54 +03:00
Oleg Kalachev 1d034f268d Add ESP32-S3 build to Actions 2025-10-19 20:44:46 +03:00
Oleg Kalachev 1ca7d32862 Update VSCode settings
Disable error squiggles as they often work incorrectly.
Decrease number of include libraries to index.
2025-10-14 11:43:55 +03:00
Oleg Kalachev ab941e34fa Fix Gazebo installation
Installation script is deprecated, install using package on Ubuntu 20.04
2025-10-13 18:56:14 +03:00
Oleg Kalachev 7bee3d1751 Improve rc failsafe logic
Don't trigger failsafe if there's no RC at all
Use AUTO mode for descending, instead of STAB
Increase RC loss timeout and descend time
2025-10-12 21:27:08 +03:00
Oleg Kalachev 06ec5f3160 Disarm the drone on simulator plugin reset
In order to reset yaw target.
2025-10-07 15:45:48 +03:00
Oleg Kalachev c4533e3ac8 Reset yaw target when drone disarmed
Prevent unexpected behavior when the drone tries to restore its old yaw on takeoff.
2025-10-07 15:43:28 +03:00
Oleg Kalachev e673b50f52 Include FlixPeriph header instead of MPU9250
This simplifies choosing IMU model
2025-10-07 08:43:12 +03:00
Oleg Kalachev 5151bb9133 Ensure showing correct raw data in imu command
Some IMUs will reset acc and gyro buffer on whoAmI() call
2025-10-07 08:43:06 +03:00
Oleg Kalachev c08c8ad91c pyflix@0.9 2025-10-03 06:49:44 +03:00
Oleg Kalachev e44f32fca7 pyflix: don't quit on any sendto error 2025-10-03 06:47:56 +03:00
Oleg Kalachev ca03bdb260 pyflix: partially fix wireless downloading logs 2025-10-03 06:46:56 +03:00
Oleg Kalachev b3dffe99fb pyflix: add passing event name to off method 2025-10-03 06:46:29 +03:00
Oleg Kalachev 6e6a71fa69 Remove unneeded advice from troubleshooting 2025-10-03 06:45:16 +03:00
Oleg Kalachev 838fe11f6b Simplify mode index check in set_mode 2025-09-26 05:03:36 +03:00
Oleg Kalachev 8b36509932 pyflix@0.8 2025-09-25 16:55:06 +03:00
Oleg Kalachev 0268c8ebcf Some fixes and updates in pyflix
Fix set_controls
Add set_armed method
2025-09-25 16:53:49 +03:00
Oleg Kalachev 09bf09e520 Update schematics diagram 2025-09-25 06:16:02 +03:00
Oleg Kalachev 4c89b10767 Fix fields order in psq command 2025-09-20 22:35:36 +03:00
Oleg Kalachev a79df52959 Don't trigger rc failsafe in AUTO mode or if disamed 2025-09-20 20:36:36 +03:00
Oleg Kalachev e88888baeb Fix rc calibration steps enumeration again 2025-09-11 11:47:28 +03:00
Oleg Kalachev de69b228ff Fix rc calibration steps enumeration 2025-09-02 11:03:44 +03:00
Oleg Kalachev f9739dcd7e Don't arm by mavlink command if throttle is not low 2025-08-29 03:47:51 +03:00
Oleg Kalachev 708c8f04dc Minor docs fix 2025-08-28 05:17:46 +03:00
Oleg Kalachev 2128201440 Fix simulation build 2025-08-28 01:13:38 +03:00
Oleg Kalachev 8e3c86f5ee pyflix@0.7 2025-08-28 00:52:27 +03:00
Oleg Kalachev 40fc4b96b5 Implement AUTO mode for automatic flights
Support SET_ATTITUDE_TARGET, SET_ACTUATOR_CONTROL_TARGET in mavlink.
ACTUATOR_OUTPUT_STATUS is changed ACTUATOR_CONTROL_TARGET to match used message for setting motor outputs.
Add support for changing mode from mavlink.
Support automatic flights in pyflix.
2025-08-28 00:49:24 +03:00
Oleg Kalachev 10fafbc4a0 Send udp packets in unicast after connection is established
This makes qgc connection faster.
Add WIFI_UDP_REMOTE_ADDR macro for default remote address for both the firmware and simulation.
2025-08-27 05:01:07 +03:00
Oleg Kalachev d47d7b8bd4 Support arm/disarm mavlink commands
Refactor commands handling to remove repeating ack message packing.
2025-08-27 04:45:25 +03:00
Oleg Kalachev a7fdc2a88f Minor change in cli help message 2025-08-27 04:43:24 +03:00
Oleg Kalachev c1788e2c75 Refactor arming logic
Arm and disarm with gestures only: left stick right/down for arming, left/down for disarming.
Remove arming switch as it complicates arming gestures logic.
Remove MAV_CTRL_SCALE parameter as it complicates arming gestures logic, advise to decrease TILT_MAX when controlling with a smartphone.
Put some minimal thrust to motors to indicate armed state.
Rename build article to usage article, add flight instructions.
2025-08-27 03:19:26 +03:00
Oleg Kalachev beb655fdcb Add illustration for qgc proxy for pyflix 2025-08-27 03:13:28 +03:00
Oleg Kalachev bf0cdac111 Major update of the articles
Reflect control subsystem refactoring.
Update dataflow diagram.
Add control subsystem diagram.
Minor updates.
2025-08-27 00:09:42 +03:00
Oleg Kalachev b21e81a68b Add cli commands for switching mode
Make mode variable int instead of enum, which is more convinient.
2025-08-26 21:55:27 +03:00
Oleg Kalachev 8418723ccc Refactor control subsystem
Add interpretControls function to convert pilot commands and mode into control targets and make control functions independent from the mode.
Add ratesExtra target for rates feed-forward; remove yawMode.
Rename controlRate to controlRates to reflect rates variable name.
Remove USER mode.
2025-08-26 01:00:56 +03:00
Oleg Kalachev a1539157b8 Show raw values in imu command 2025-08-22 17:20:33 +03:00
Oleg Kalachev 80922dc68a Some updates to readme and build article
Add info on using USB gamepad
Replace KINGKONG transmitter with BetaFPV LiteRadio
Add RoboCamp video
2025-08-20 22:06:17 +03:00
Oleg Kalachev fcd2738763 Add link to stls from robocamp 2025-08-19 15:20:24 +03:00
Oleg Kalachev fa07ed3a4e Minor docs change 2025-08-15 00:51:08 +03:00
Oleg Kalachev dee4d97ab3 Add getRoll, getPitch, setRoll, setPitch methods
Add methods to Quaternion for consistency with getYaw and setYaw
2025-08-09 18:10:11 +03:00