teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

HbEngine.h

Committer:
YutakaTakagi
Date:
2019-03-22
Revision:
75:215dd63032d6
Parent:
39:1b76f7df8804

File content as of revision 75:215dd63032d6:

#ifndef __HBENGINE_H__
#define __HBENGINE_H__

#include "typedef.h"

class HbEngine{
private:
    /*
     * Varialbles
     */
    UCHAR   id;
    INT16   accel;//エンジンアクセル12bit
    INT16   rpm;//エンジン  回転数
    INT16   hvAxl;//エンジンアクセル 浮上用
    bool    bSetHvAxl;

    // 仮の定数
    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    setAccel(UINT16 iVal); 
    INT16  getAccel();

    void    setHoverAccel(INT16 val);
    void    clearHoverAccel();
    bool    chkSetHoverAccel();
    INT16   getHoverAccelVal();
    
    bool    chkOverIDLECycle();
    bool    chkInRangeIDLE();
};

#endif