teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

HbEngine.h

Committer:
MasashiNomura
Date:
2018-12-08
Revision:
23:79e20be4bc5b
Parent:
17:f9610f3cfa1b
Child:
35:3779201b4c73

File content as of revision 23:79e20be4bc5b:

#ifndef __HBENGINE_H__
#define __HBENGINE_H__

#include "typedef.h"

class HbEngine{
private:
    /*
     * Varialbles
     */
    UCHAR   id;
    INT16   accel;//エンジンアクセル12bit
    INT16   rpm;//エンジン  回転数
    
    // 仮の定数
    static const int IDLE_LOW = 1500;
    static const int IDLE_HI = 3000;
    static const int HOVER_CYCLE = 6000;

    /*
     * functions
     */
public:
    HbEngine(UCHAR iID);
    UINT16  getRpm();
    void    setAccell(UINT16 iVal); 
    
    bool    chkOverIDLECycle();
    bool    chkInRangeIDLE();
};

#endif