Firmware for Arduino | PLEN Project Company Inc.
PLEN2::Motion::Frame Class Reference

Class of a motion frame. More...

#include <Motion.h>

Public Types

enum  { UPDATE_INTERVAL_MS = 32, FRAME_BEGIN = 0, FRAME_END = 20 }
 

Static Public Member Functions

static void init (Frame &frame)
 Initialize the frame. More...
 
static bool set (uint8_t slot, uint8_t index, const Frame &frame)
 Write the frame to external EEPROM. More...
 
static bool get (uint8_t slot, uint8_t index, Frame &frame)
 Read the frame from external EEPROM. More...
 

Public Attributes

uint8_t index
 Index of a frame. More...
 
uint16_t transition_time_ms
 Time of transit to the frame. More...
 
int16_t joint_angle [JointController::JOINTS_SUM]
 Angles. More...
 

Detailed Description

Class of a motion frame.

Attention
The firmware backs up memory allocation of an instance to external EEPROM, so if you change the order of member instances, PLEN does not work properly if you did not re-install all motions.

Member Enumeration Documentation

anonymous enum
Enumerator
UPDATE_INTERVAL_MS 

Update interval between frames.

See also
Refer to ISR(TIMER1_OVF_vect), in JointController.cpp.
FRAME_BEGIN 

Beginning value of frames.

FRAME_END 

Ending value of frames.

Member Function Documentation

static bool PLEN2::Motion::Frame::get ( uint8_t  slot,
uint8_t  index,
Frame frame 
)
static

Read the frame from external EEPROM.

Parameters
[in]slotSlot number of a motion.
[in]indexIndex of the frame.
[in,out]frameAn instance of frame.
Returns
Result
static void PLEN2::Motion::Frame::init ( Frame frame)
static

Initialize the frame.

Parameters
[in,out]frameAn instance of frame.
static bool PLEN2::Motion::Frame::set ( uint8_t  slot,
uint8_t  index,
const Frame frame 
)
static

Write the frame to external EEPROM.

Parameters
[in]slotSlot number of a motion.
[in]indexIndex of the frame.
[in]frameAn instance of frame.
Returns
Result

Member Data Documentation

uint8_t PLEN2::Motion::Frame::index

Index of a frame.

int16_t PLEN2::Motion::Frame::joint_angle[JointController::JOINTS_SUM]

Angles.

uint16_t PLEN2::Motion::Frame::transition_time_ms

Time of transit to the frame.


The documentation for this class was generated from the following file: