8 Commits

Author SHA1 Message Date
Oleg Kalachev
d5c3b5b5f7 Bring back handling old message for motor outputs in pyflix 2025-07-31 12:35:59 +03:00
Oleg Kalachev
37b9a3a41c Add support form arm/disarm mavlink command 2025-07-31 12:35:41 +03:00
Oleg Kalachev
7f4fc7acea Make rc loss timeout longer 2025-07-31 12:32:43 +03:00
Oleg Kalachev
3f269f57be Fixes 2025-07-31 12:23:26 +03:00
Oleg Kalachev
8e043555c5 Fix 2025-07-30 00:38:55 +03:00
Oleg Kalachev
c39e2ca998 Fixes 2025-07-30 00:38:34 +03:00
Oleg Kalachev
f46842f341 Fixed 2025-07-30 00:38:24 +03:00
Oleg Kalachev
3d72224b32 Print armed state in rc command 2025-07-30 00:38:13 +03:00
5 changed files with 3 additions and 21 deletions

View File

@@ -40,7 +40,6 @@ const char* motd =
"cr - calibrate RC\n"
"ca - calibrate accel\n"
"mfr, mfl, mrr, mrl - test motor (remove props)\n"
"wifi - show Wi-Fi info\n"
"sys - show system info\n"
"reset - reset drone's state\n"
"reboot - reboot the drone\n";
@@ -143,10 +142,6 @@ void doCommand(String str, bool echo = false) {
testMotor(MOTOR_REAR_RIGHT);
} else if (command == "mrl") {
testMotor(MOTOR_REAR_LEFT);
} else if (command == "wifi") {
#if WIFI_ENABLED
printWiFiInfo();
#endif
} else if (command == "sys") {
#ifdef ESP32
print("Chip: %s\n", ESP.getChipModel());

View File

@@ -12,7 +12,7 @@
#define PERIOD_FAST 0.1
#define MAVLINK_CONTROL_YAW_DEAD_ZONE 0.1f
float mavlinkControlScale = 1;
float mavlinkControlScale = 0.7;
String mavlinkPrintBuffer;
extern double controlTime;

View File

@@ -13,7 +13,6 @@
#define WIFI_PASSWORD "flixwifi"
#define WIFI_UDP_PORT 14550
#define WIFI_UDP_REMOTE_PORT 14550
#define WIFI_UDP_ALWAYS_BROADCAST 1
WiFiUDP udp;
@@ -25,9 +24,7 @@ void setupWiFi() {
void sendWiFi(const uint8_t *buf, int len) {
if (WiFi.softAPIP() == IPAddress(0, 0, 0, 0) && WiFi.status() != WL_CONNECTED) return;
IPAddress remote = WiFi.softAPBroadcastIP();
if (!WIFI_UDP_ALWAYS_BROADCAST && udp.remoteIP()) remote = udp.remoteIP();
udp.beginPacket(remote, WIFI_UDP_REMOTE_PORT);
udp.beginPacket(WiFi.softAPBroadcastIP(), WIFI_UDP_REMOTE_PORT);
udp.write(buf, len);
udp.endPacket();
}
@@ -37,13 +34,4 @@ int receiveWiFi(uint8_t *buf, int len) {
return udp.read(buf, len);
}
void printWiFiInfo() {
print("SSID: %s\n", WiFi.softAPSSID().c_str());
print("Clients: %d\n", WiFi.softAPgetStationNum());
print("Status: %d\n", WiFi.status());
print("IP: %s\n", WiFi.softAPIP().toString().c_str());
print("Remote IP: %s\n", udp.remoteIP().toString().c_str());
print("Broadcast IP: %s\n", WiFi.softAPBroadcastIP().toString().c_str());
}
#endif

View File

@@ -72,5 +72,4 @@ void calibrateGyro() { print("Skip gyro calibrating\n"); };
void calibrateAccel() { print("Skip accel calibrating\n"); };
void printIMUCalibration() { print("cal: N/A\n"); };
void printIMUInfo() {};
void printWiFiInfo() {};
Vector accBias, gyroBias, accScale(1, 1, 1);

View File

@@ -1,6 +1,6 @@
[project]
name = "pyflix"
version = "0.6"
version = "0.5"
description = "Python API for Flix drone"
authors = [{ name="Oleg Kalachev", email="okalachev@gmail.com" }]
license = "MIT"