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;        // 명령에 대한 옵션
    };
}



Protocol::LightModeBase

LED mode change structure

namespace Protocol
{
    struct LightModeBase
    {
        u8 mode;         // LED mode
        u8 color;        // RGB color(pallet index)
        u8 interval;     // call interval
    };
}



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
    };
}



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
    };
}



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
    };
}



Protocol::MotorBase

Motor control and check current value structure

namespace Protocol
{
    struct MotorBase
    {
        s16 forward;        // forward
        s16 reverse;        // reverse
    };
}



PETRONE

  1. Intro
  2. Typedef
  3. DataType
  4. Definitions
  5. Base Structs
  6. Structs
  7. Structs - Light
  8. Firmware Update
  1. Intro
  2. DataType
  3. Definitions
  4. Structs
  5. Examples


Index