Pluto-IDE is the professional development environment required to build, flash, and monitor firmware using the MagisV2 library on Pluto Drones.
System utilities and global variables for MagisV2 flight controller.
uint8_t resetCounter - System reset counteruint8_t intLogCounter - Integer logging counteruint8_t floatLogCounter - Float logging counterint16_t appHeading - Application heading in degreesint16_t userHeading - User-defined headingint16_t AUX3_VALUE - AUX3 channel valueuint32_t userLoopFrequency - User-defined loop frequencyint32_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 executionbool developerMode - Developer mode flagbool hasTakeOff - Takeoff completion flagbool fsLowBattery - Low battery failsafebool External_RC_FLAG[4] - External RC channel flagsvoid userEnabledLand(void)Initiates user-controlled landing sequence.
void resetUserRCflag(void)Resets all user RC flags to default state.
void resetUser(void)Resets all user-defined variables and flags to default values.
int getGPIOport(unibus_e pin) - Gets GPIO port numberGPIO_Pin getGPIOpin(unibus_e pin) - Gets GPIO pin structureuint32_t getGPIOclock(unibus_e pin) - Gets clock configuration// Check system state
if (hasTakeOff && !fsLowBattery) {
// Continue flight operations
}
// Reset user settings
resetUser();
resetUserRCflag();
