213 Commits

Author SHA1 Message Date
Oleg Kalachev
b19270f14e Minor cleanups and fixes 2025-01-17 12:30:12 +03:00
Oleg Kalachev
740121a88e Check if requested parameters indexes are correct
In case if gcs gets crazy and requests incorrect parameter index
2025-01-14 21:14:04 +03:00
Oleg Kalachev
7effd92043 Make MAVLink control scale a parameter 2025-01-14 14:51:34 +03:00
Oleg Kalachev
70f5186c1b Use double for storing time instead of float
Float precision may be not enough after some time of operating
2025-01-12 19:58:36 +03:00
Oleg Kalachev
d4e04c46cd Add time command to cli 2025-01-12 19:50:00 +03:00
Oleg Kalachev
48d21a911f Add missing const qualifiers 2025-01-12 19:46:50 +03:00
Oleg Kalachev
f456e10177 Increase motors PWM frequency to 1000
To match the main loop frequency
2025-01-12 15:35:05 +03:00
Oleg Kalachev
9e4a2c5ffc Move controlsTime variable to rc.ino 2025-01-11 00:28:31 +03:00
Oleg Kalachev
b9e30be98c Better support for ESCs, add PWM_STOP parameter 2025-01-10 10:49:40 +03:00
Oleg Kalachev
821e6b105e Make channels definition to rc.ino
It's also planned to parametrize them later
2025-01-10 09:37:48 +03:00
Oleg Kalachev
568f9dd5b1 Minor code improvements 2025-01-10 08:59:09 +03:00
Oleg Kalachev
698cc3d9b8 Global variables cleanups
Remove unused PID objects for cli
Move loopRate to time.ino
2025-01-10 07:10:30 +03:00
Oleg Kalachev
85172cdcc8 Make util module header instead of .ino-file 2025-01-10 06:51:14 +03:00
Oleg Kalachev
08b14d1d76 Minor cleanup 2025-01-10 06:04:32 +03:00
Oleg Kalachev
95824e3b75 Make max tilt and max angle rates MAVLink parameters
Also decrease default max yaw rate to 300 degrees
2025-01-10 06:00:06 +03:00
Oleg Kalachev
0a45614751 Move motorsActive function to motors.ino 2025-01-09 11:30:04 +03:00
Oleg Kalachev
c8109af04f Make ONE_G definition const and move to utils.ino 2025-01-09 11:24:40 +03:00
Oleg Kalachev
404ceed851 Make motor indexes definition const int and move them to motors.ino
Remove motor indexes definitions from flix.ino
Add motors.ino to simulation code and implement required mocks
2025-01-09 11:14:18 +03:00
Oleg Kalachev
72033cdd75 Increase motors PWM resolution to 12 bits 2025-01-09 11:02:38 +03:00
Oleg Kalachev
3088ade743 Fix getDutyCycle return type to make it possible to increase resolution 2025-01-09 11:02:21 +03:00
Oleg Kalachev
c2a9d36d4e Add small delay before gyro calibration 2025-01-09 10:06:15 +03:00
Oleg Kalachev
ca409396c7 Add missing const qualifiers to some quaternion methods 2025-01-09 10:02:53 +03:00
Oleg Kalachev
ca032abc03 Implement rotate method for quaternions as replace for multiplication
Vector rotating method is renamed from `rotate` to `rotateVector` to avoid inconsistent object and argument order in different `rotate` methods
2025-01-09 09:56:49 +03:00
Oleg Kalachev
5d10446aaf Bring back possibility to use ESCs for motors 2025-01-09 07:43:49 +03:00
Oleg Kalachev
732de2a5d6 Remove redundant inline specifiers
In-class defined methods are specified as inline by default
2025-01-04 04:09:51 +03:00
Oleg Kalachev
e10475a5e0 Some minor cleanups and fixes 2024-12-28 23:57:44 +03:00
Oleg Kalachev
7ae5457bb4 Improve logging code
Make it easer to add and remove log entries
2024-12-28 22:10:43 +03:00
Oleg Kalachev
299c8a6a02 Various minor fixes 2024-12-27 21:52:21 +03:00
Oleg Kalachev
2440c65c46 Remove unused include 2024-12-26 16:07:01 +03:00
Oleg Kalachev
8d7a4595f5 Rename flushParameters to more clear syncParameters 2024-12-26 01:14:26 +03:00
Oleg Kalachev
acc0274175 Minor fix 2024-12-25 02:21:17 +03:00
Oleg Kalachev
edd249566e Increase motors output frequency 2024-12-25 02:13:57 +03:00
Oleg Kalachev
ca355e0162 Simplify motors duty cycle computation 2024-12-25 02:13:33 +03:00
Oleg Kalachev
2efae82177 Minor fixes 2024-12-25 01:41:45 +03:00
Oleg Kalachev
fd30027ea4 Support AUTOPILOT_VERSION message request to make qgc connection faster
Don't have to wait until the request is timed out.
2024-12-23 17:59:35 +03:00
Oleg Kalachev
ae349fb73c Implement parameters subsystem
* Unified parameters storage.
* Store parameters in flash on the hardware.
* Store parameters in text file in simulation.
* Work with parameters in command line.
* Support parameters in MAVLink for working with parameters in QGC.
2024-12-23 13:00:02 +03:00
Oleg Kalachev
7533a9cbfa Move ONE_G definition to flix.ino 2024-12-23 02:37:03 +03:00
Oleg Kalachev
b6286a50b2 Minor change 2024-12-23 02:01:55 +03:00
Oleg Kalachev
4f2cf0c0b1 Don't let throttle be less than 0 in failsafe 2024-12-23 01:32:25 +03:00
Oleg Kalachev
f06a9301df Add notice on removing props in motor test commands in help 2024-12-23 01:14:05 +03:00
Oleg Kalachev
f54da5bf42 Add CLI command for rebooting the drone 2024-12-20 20:59:59 +03:00
Oleg Kalachev
77effa5577 Rotate IMU data to support standard axes orientation in new FlixPeriph 2024-12-11 06:17:37 +03:00
Oleg Kalachev
6e140d673c Cleanup unused utility functions 2024-12-05 08:29:21 +03:00
Oleg Kalachev
172b6becc6 Use new FlixPeriph library with ICM-20948 support 2024-12-04 14:41:23 +03:00
Oleg Kalachev
475e9a87ba Configure IMU before calibrating the gyro which improves calibration 2024-12-04 12:25:07 +03:00
Oleg Kalachev
ea141f851f Use 'loop rate' term instead of misleading 'loop frequency' 2024-12-04 07:00:00 +03:00
Oleg Kalachev
048a3c6375 Use the new UART2 pins for RC by default
To make it consistent with the documentation
2024-11-27 23:02:20 +03:00
Oleg Kalachev
a7b69f99d0 Fix non-working motor control commands 2024-11-24 00:17:47 +03:00
Oleg Kalachev
b015c15a7e Remove non-working fullmot command 2024-11-24 00:10:37 +03:00
Oleg Kalachev
eca48c6546 Minor fix 2024-11-04 16:28:54 +03:00