sampleProgram

Dependencies:   QEI accelerator bit_test cyclic_io cyclic_var cylinder event_var limit mbed mecanum motor_drive pid pid_encoder rs422_put sbdbt servo

Fork of 17robo_fuzi by kusano kiyoshige

cyclic.h

Committer:
echo_piyo
Date:
2017-08-29
Revision:
32:f535ace7c529
Parent:
14:aac2f18f6779

File content as of revision 32:f535ace7c529:

class Cyclic
{
  public:
    void cyclic(int state_in)
    {
        if(state_in)
        {
            if(flag == false)
            {
                state = !state;
            }
            flag = true;
        }
        else flag = false;
    }
    
    int getState()
    {
        return state; 
    }
    
  private:
    bool flag;
    bool state;
};