From 91173d06c9f0f5be62994edabbc3650aeec76157 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 22 May 2026 08:03:46 +0300 Subject: [PATCH] Various minor changes --- README.md | 2 +- docs/troubleshooting.md | 2 +- docs/usage.md | 2 +- flix/mavlink.ino | 2 +- flix/motors.ino | 5 +---- flix/parameters.ino | 6 ++---- flix/wifi.ino | 10 +++++++--- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c7da620..28da1b8 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Additional articles: |-|-|:-:|:-:| |Microcontroller board|ESP32 Mini.
ESP32-S3/ESP32-C3 boards are also supported.||1| |IMU (and barometer¹) board|GY‑91, MPU-9265 (or other MPU‑9250/MPU‑6500 board)
ICM20948V2 (ICM‑20948)
GY-521 (MPU-6050)|

|1| -|Boost converter (optional, for more stable power supply)|5V output||1| +|*Boost converter (optional, for more stable power supply)*|*5V output*||1| |Motor|8520 3.7V brushed motor.
Motor with exact 3.7V voltage is needed, not ranged working voltage (3.7V — 6V).
Make sure the motor shaft diameter and propeller hole diameter match!||4| |Propeller|55 mm or 65 mm||4| |MOSFET (transistor)|100N03A or [analog](https://t.me/opensourcequadcopter/33)||4| diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 8f06718..28af53f 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -5,7 +5,7 @@ Do the following: * **Check ESP32 core is installed**. Check if the version matches the one used in the [tutorial](usage.md#building-the-firmware). -* **Check libraries**. Install all the required libraries from the tutorial. Make sure there are no MPU9250 or other peripherals libraries that may conflict with the ones used in the tutorial. +* **Check libraries**. Install all the required libraries from the tutorial. Make sure there are no MPU-9250 or other peripherals libraries that may conflict with the ones used in the tutorial. * **Check the chosen board**. The correct board to choose in Arduino IDE for ESP32 Mini is *WEMOS D1 MINI ESP32*. ## The drone doesn't fly diff --git a/docs/usage.md b/docs/usage.md index 5984a32..16123c8 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -329,7 +329,7 @@ To setup ESP-NOW communication: espnow 7a:c8:e3:eb:bf:e9 &PiuSysxP9+$L&5E ``` - Run this line as a console command on each drone you want to bind to this proxy board. + Run this line as a console command on each drone you want to bind to this proxy board. [The maximum number](https://github.com/espressif/esp-idf/blob/e95cab4be8fd293e3f3323181e7a2280874da6f7/components/esp_wifi/include/esp_now.h#L32-L33) of simultaneously connected drones is 20 (unencrypted) io 6 (encrypted). 3. Set the `WIFI_MODE` parameter to `3` on the drone: diff --git a/flix/mavlink.ino b/flix/mavlink.ino index 0fae287..a635947 100644 --- a/flix/mavlink.ino +++ b/flix/mavlink.ino @@ -241,7 +241,7 @@ void handleMavlink(const void *_msg) { } if (m.command == MAV_CMD_COMPONENT_ARM_DISARM) { - if (m.param1 && controlThrottle > 0.05) return; // don't arm if throttle is not low + if (m.param1 == 1 && controlThrottle > 0.05) return; // don't arm if throttle is not low accepted = true; armed = m.param1 == 1; } diff --git a/flix/motors.ino b/flix/motors.ino index 3289755..b25e61a 100644 --- a/flix/motors.ino +++ b/flix/motors.ino @@ -14,10 +14,7 @@ int pwmStop = 0; int pwmMin = 0; int pwmMax = -1; // -1 means duty cycle mode -const int MOTOR_REAR_LEFT = 0; -const int MOTOR_REAR_RIGHT = 1; -const int MOTOR_FRONT_RIGHT = 2; -const int MOTOR_FRONT_LEFT = 3; +const int MOTOR_REAR_LEFT = 0, MOTOR_REAR_RIGHT = 1, MOTOR_FRONT_RIGHT = 2, MOTOR_FRONT_LEFT = 3; void setupMotors() { print("Setup Motors\n"); diff --git a/flix/parameters.ino b/flix/parameters.ino index 6533110..f1dd5df 100644 --- a/flix/parameters.ino +++ b/flix/parameters.ino @@ -6,13 +6,11 @@ #include #include "util.h" -extern int channelZero[16]; -extern int channelMax[16]; +extern int channelZero[16], channelMax[16]; extern int rollChannel, pitchChannel, throttleChannel, yawChannel, armedChannel, modeChannel; -extern int rcRxPin; +extern int rcRxPin, voltagePin; extern int wifiMode, wifiLongRange, udpLocalPort, udpRemotePort, espnowChannel; extern float rcLossTimeout, descendTime; -extern int voltagePin; extern float voltageScale; extern LowPassFilter voltageFilter; diff --git a/flix/wifi.ino b/flix/wifi.ino index 5c87828..bfd5061 100644 --- a/flix/wifi.ino +++ b/flix/wifi.ino @@ -8,7 +8,7 @@ #include #include #include -#include "Preferences.h" +#include #include "util.h" extern Preferences storage; // use the main preferences storage @@ -33,10 +33,14 @@ void setupWiFi() { if (wifiMode == W_AP) { WiFi.softAP(storage.getString("WIFI_AP_SSID", "flix").c_str(), storage.getString("WIFI_AP_PASS", "flixwifi").c_str()); udp.begin(udpLocalPort); - } else if (wifiMode == W_STA) { + } + + if (wifiMode == W_STA) { WiFi.begin(storage.getString("WIFI_STA_SSID", "").c_str(), storage.getString("WIFI_STA_PASS", "").c_str()); udp.begin(udpLocalPort); - } else if (wifiMode == W_ESPNOW) { + } + + if (wifiMode == W_ESPNOW) { WiFi.mode(WIFI_AP); WiFi.setChannel(espnowChannel); espnow.addr(MacAddress(storage.getString("ESPNOW_PEER_MAC", "FF:FF:FF:FF:FF:FF").c_str()));