Simplify WIFI_ENABLED macro test

This commit is contained in:
Oleg Kalachev 2025-02-08 02:41:09 +03:00
parent 33adf33f0e
commit 3ed4143ba0
4 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ void setup() {
setupLED(); setupLED();
setupMotors(); setupMotors();
setLED(true); setLED(true);
#if WIFI_ENABLED == 1 #if WIFI_ENABLED
setupWiFi(); setupWiFi();
#endif #endif
setupIMU(); setupIMU();
@ -45,7 +45,7 @@ void loop() {
control(); control();
sendMotors(); sendMotors();
parseInput(); parseInput();
#if WIFI_ENABLED == 1 #if WIFI_ENABLED
processMavlink(); processMavlink();
#endif #endif
logData(); logData();

View File

@ -3,7 +3,7 @@
// MAVLink communication // MAVLink communication
#if WIFI_ENABLED == 1 #if WIFI_ENABLED
#include <MAVLink.h> #include <MAVLink.h>

View File

@ -68,7 +68,7 @@ Parameter parameters[] = {
{"RC_MAX_5", &channelMax[5]}, {"RC_MAX_5", &channelMax[5]},
{"RC_MAX_6", &channelMax[6]}, {"RC_MAX_6", &channelMax[6]},
{"RC_MAX_7", &channelMax[7]}, {"RC_MAX_7", &channelMax[7]},
#if WIFI_ENABLED == 1 #if WIFI_ENABLED
// MAVLink // MAVLink
{"MAV_CTRL_SCALE", &mavlinkControlScale}, {"MAV_CTRL_SCALE", &mavlinkControlScale},
#endif #endif

View File

@ -3,7 +3,7 @@
// Wi-Fi support // Wi-Fi support
#if WIFI_ENABLED == 1 #if WIFI_ENABLED
#include <WiFi.h> #include <WiFi.h>
#include <WiFiAP.h> #include <WiFiAP.h>