PETRONE / BLE / Protocol / BaseStructs
Modified : 2018.02.13
Introduce the structures used to send and receive data.
Protocol::CommandBase
Use to change settings or request data for PETRONE
namespace Protocol
{
struct CommandBase
{
u8 commandType; // 명령 타입
u8 option; // 명령에 대한 옵션
};
}
- commandType : Protocol::CommandType::Type
- option : System::ModeVehicle::Type, System::Coordinate::Type, System::Trim::Type, System::FlightEvent::Type, Protocol::DataType::Type
Protocol::LightModeBase
LED mode change structure
namespace Protocol
{
struct LightModeBase
{
u8 mode; // LED mode
u8 color; // RGB color(pallet index)
u8 interval; // call interval
};
}
- mode : Light::Mode::Type
- color : Light::Colors::Type
Light::Color
This structure is used to directly color RGB LED.
namespace Light
{
struct Color
{
u8 r; // Red
u8 g; // Green
u8 b; // Blue
};
}
Protocol::LightModeColorBase
LED mode change structure. RGB color can be specified directly.
namespace Protocol
{
struct LightModeColorBase
{
u8 mode; // LED mode
Light::Color color; // RGB colors
u8 interval; // call interval
};
}
- mode : Light::Mode::Type
- color : Light::Color
Protocol::LightEventBase
Execute LED event structure. Returns to the mode you used to run after running it repeatedly for the specified number of times.
namespace Protocol
{
struct LightEventBase
{
u8 event; // LED event
u8 color; // RGB color(pallet index)
u8 interval; // call interval
u8 repeat; // repeat count
};
}
- event : Light::Mode::Type
- color : Light::Colors::Type
Protocol::LightEventColorBase
Execute LED event structure. Returns to the mode you used to run after running it repeatedly for the specified number of times. RGB color can be specified directly.
namespace Protocol
{
struct LightEventColorBase
{
u8 event; // LED event
Light::Color color; // RGB color
u8 interval; // call interval
u8 repeat; // repeat count
};
}
- event : Light::Mode::Type
- color : Light::Color
Protocol::MotorBase
Motor control and check current value structure
namespace Protocol
{
struct MotorBase
{
s16 forward; // forward
s16 reverse; // reverse
};
}
PETRONE
- Intro
- Typedef
- DataType
- Definitions
- Base Structs
- Structs
- Structs - Light
- Firmware Update