Pluto-IDE is the professional development environment required to build, flash, and monitor firmware using the MagisV2 library on Pluto Drones.
Status LED control interface for system indication and feedback.
led_status_etypedef enum {
GREEN, // Green LED
BLUE, // Blue LED
RED, // Red LED
STATUS // Status LED
} led_status_e;
led_state_etypedef enum {
OFF = 0, // LED off
ON, // LED on
TOGGLE // Toggle LED state
} led_state_e;
bool LedStatusState - Current status LED statevoid Set_LED(led_status_e _led_status, led_state_e _state)Controls the state of status LEDs.
Parameters:
_led_status - LED to control (GREEN, BLUE, RED, STATUS)_state - State to set (ON, OFF, TOGGLE)// Basic LED control
Set_LED(GREEN, ON); // Turn green LED on
Set_LED(RED, OFF); // Turn red LED off
Set_LED(BLUE, TOGGLE); // Toggle blue LED
Set_LED(STATUS, ON); // Turn status LED on
// System status indication
void indicateSystemStatus() {
if (FlightStatus_Check(FS_ARMED)) {
Set_LED(BLUE, ON); // Armed - blue LED
Set_LED(GREEN, OFF);
} else {
Set_LED(GREEN, ON); // Disarmed - green LED
Set_LED(BLUE, OFF);
}
// Battery warning
uint16_t battery = Bms_Get(Voltage);
if (battery < 3300) {
Set_LED(RED, TOGGLE); // Low battery - blinking red
} else {
Set_LED(RED, OFF);
}
}
// Heartbeat indication
void heartbeat() {
static uint32_t lastBlink = 0;
if (millis() - lastBlink > 1000) {
Set_LED(STATUS, TOGGLE);
lastBlink = millis();
}
}
