DRONEFIGHTER2017 / Protocol / Structs / Light
Modified : 2018.02.12


Introduce the definitions and structures involved in LED control.




Definitions


Light::Drone::Mode::Type

Used to specify the Drone LED mode or event commands.

namespace Light
{
    namespace Drone
    {
        namespace Mode
        {
            enum Type
            {
                None,
                
                EyeNone = 0x10,
                EyeManual,              // Eye LED color Manual control
                EyeHold,                // Eye LED color Hold 
                EyeFlicker,             // Eye LED flicker light        
                EyeFlickerDouble,       // Eye LED flicker light (Blinking twice and turning off as much as the blinking time.)            
                EyeDimming,             // Eye LED Dimming
                
                ArmNone = 0x40,         
                ArmManual,              // Arm LED color Manual control
                ArmHold,                // Arm LED color Hold 
                ArmFlicker,             // Arm LED flicker light        
                ArmFlickerDouble,       // Arm LED flicker light (Blinking twice and turning off as much as the blinking time.)               
                ArmDimming,             // Arm LED Dimming
                
                EndOfType
            };
        }
    }
}



Light::Drone::Flags::Type

Used to control the drone LED directly.

namespace Light
{
    namespace Drone
    {
        namespace Flags
        {
            enum Type
            {
                None        = 0x00,

                FrontOut    = 0x80,
                FrontIn     = 0x40,

                RearIn      = 0x20,
                RearOut     = 0x10,

                Blue        = 0x08,
                Red         = 0x04
            };
        }
    }
}



Light::Controller::Mode::Type

Used to specify the mode of controller LED or Operation for event command.

namespace Light
{
    namespace Controller
    {
        namespace Mode
        {
            enum Type
            {
                None,
                
                Manual,                         ///<  Manual control
                
                // Team
                TeamNone = 0x10,
                
                TeamHoldRed,
                TeamHoldBlue,
                TeamHoldAll,
                
                TeamFlickerRed,
                TeamFlickerBlue,
                TeamFlickerAll,
                TeamFlickerSeesaw,
                
                TeamFlickerDoubleRed,
                TeamFlickerDoubleBlue,
                TeamFlickerDoubleAll,
                
                TeamDimmingRed,
                TeamDimmingBlue,
                TeamDimmingAll,
                TeamDimmingSeesaw,
                
                Team,                           ///< Team display
                
                
                EndOfType
            };
        }
    }
}



Light::Controller::Flags::Type

Manually control for the selected LED.

namespace Light
{
    namespace Controller
    {
        namespace Flags
        {
            enum Type
            {
                None        = 0x00,

                Yellow0     = 0x80,
                Yellow1     = 0x40,
                Green0      = 0x20,
                Green1      = 0x10,
                White0      = 0x08,
                White1      = 0x04,

                Blue        = 0x02,
                Red         = 0x01
            };
        }
    }
}



Structs



Protocol::Light::Manual

Manually adjust the brightness of the selected LED.

namespace Protocol
{
    namespace Light
    {
        struct Manual
        {
            u8  flags;         // Flags enumeration value
            u8  brightness;    // brightness     
        };
    }
}



Protocol::Light::Mode

LED mode change

namespace Protocol
{
    namespace Light
    {
        struct Mode
        {
            u8      mode;       // LED mode
            u16     interval;   // LED mode interval
        };
    }
}



Protocol::Light::ModeCommand

LED mode change and event execution,

namespace Protocol
{
    namespace Light
    {
        struct ModeCommand
        {
            Protocol::Light::Mode   mode;
            Protocol::Command       command;
        };
    }
}



Protocol::Light::ModeCommandIr

LED mode change and event execution, IR data transfer.

namespace Protocol
{
    namespace Light
    {
        struct ModeCommandIr
        {
            Protocol::Light::Mode   mode;
            Protocol::Command       command;
            u32                     irData;
        };
    }
}



Protocol::Light::Event

LED event execution

namespace Protocol
{
    namespace Light
    {
        struct Event
        {
            u8      event;      // LED event
            u16     interval;   // LED event interval
            u8      repeat;     // LED event repeat count
        };
    }
}



Protocol::Light::EventCommand

LED event execution, command.

namespace Protocol
{
    namespace Light
    {
        struct EventCommand
        {
            Protocol::Light::Event  event;
            Protocol::Command       command;
        };
    }
}



Protocol::Light::EventCommandIr

LED event execution, command, and IR data transfer.

namespace Protocol
{
    namespace Light
    {
        struct EventCommandIr
        {
            Protocol::Light::Event  event;
            Protocol::Command       command;
            u32                     irData;
        };
    }
}




DRONE FIGHTER 2017

  1. Intro
  2. Typedef
  3. DataType
  4. Definitions
  5. Structs
  6. Structs - Light


Index