-
Notifications
You must be signed in to change notification settings - Fork 8
API Utils
Hrisabh Yadav edited this page Nov 14, 2025
·
1 revision
System utilities and global variables for MagisV2 flight controller.
-
uint8_t resetCounter- System reset counter -
uint8_t intLogCounter- Integer logging counter -
uint8_t floatLogCounter- Float logging counter
-
int16_t appHeading- Application heading in degrees -
int16_t userHeading- User-defined heading -
int16_t AUX3_VALUE- AUX3 channel value -
uint32_t userLoopFrequency- User-defined loop frequency
-
int32_t user_GPS_coord[2]- User GPS coordinates [lat, lon] -
int32_t app_GPS_coord[2]- Application GPS coordinates [lat, lon] -
int32_t MOTOR_ARRAY[4]- Motor PWM values [M1, M2, M3, M4] -
int32_t RC_ARRAY[4]- RC command values [Roll, Pitch, Yaw, Throttle]
-
bool runUserCode- Enable/disable user code execution -
bool developerMode- Developer mode flag -
bool hasTakeOff- Takeoff completion flag -
bool fsLowBattery- Low battery failsafe -
bool External_RC_FLAG[4]- External RC channel flags
Initiates user-controlled landing sequence.
Resets all user RC flags to default state.
Resets all user-defined variables and flags to default values.
-
int getGPIOport(unibus_e pin)- Gets GPIO port number -
GPIO_Pin getGPIOpin(unibus_e pin)- Gets GPIO pin structure -
uint32_t getGPIOclock(unibus_e pin)- Gets clock configuration
// Check system state
if (hasTakeOff && !fsLowBattery) {
// Continue flight operations
}
// Reset user settings
resetUser();
resetUserRCflag();MagisV2 © 2025 Drona Aviation | Licensed under GPL-3.0 | Report Issues