teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
MasashiNomura
Date:
Fri Jan 18 11:52:00 2019 +0000
Revision:
38:24ee50452755
Parent:
36:2cc739c7e4cb
Child:
39:1b76f7df8804
20190118 Modify for 45inc. check User SW (include analogIn)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takeru0x1103 17:f9610f3cfa1b 1 #ifndef __HBENGINE_H__
takeru0x1103 17:f9610f3cfa1b 2 #define __HBENGINE_H__
takeru0x1103 17:f9610f3cfa1b 3
takeru0x1103 17:f9610f3cfa1b 4 #include "typedef.h"
takeru0x1103 17:f9610f3cfa1b 5
takeru0x1103 17:f9610f3cfa1b 6 class HbEngine{
takeru0x1103 17:f9610f3cfa1b 7 private:
takeru0x1103 17:f9610f3cfa1b 8 /*
takeru0x1103 17:f9610f3cfa1b 9 * Varialbles
takeru0x1103 17:f9610f3cfa1b 10 */
takeru0x1103 17:f9610f3cfa1b 11 UCHAR id;
takeru0x1103 17:f9610f3cfa1b 12 INT16 accel;//エンジンアクセル12bit
takeru0x1103 17:f9610f3cfa1b 13 INT16 rpm;//エンジン 回転数
MasashiNomura 36:2cc739c7e4cb 14 INT16 hvAxl;//エンジンアクセル 浮上用
MasashiNomura 36:2cc739c7e4cb 15 bool bSetHvAxl;
MasashiNomura 36:2cc739c7e4cb 16
MasashiNomura 23:79e20be4bc5b 17 // 仮の定数
MasashiNomura 23:79e20be4bc5b 18 static const int IDLE_LOW = 1500;
MasashiNomura 23:79e20be4bc5b 19 static const int IDLE_HI = 3000;
MasashiNomura 23:79e20be4bc5b 20 static const int HOVER_CYCLE = 6000;
MasashiNomura 23:79e20be4bc5b 21
takeru0x1103 17:f9610f3cfa1b 22 /*
takeru0x1103 17:f9610f3cfa1b 23 * functions
takeru0x1103 17:f9610f3cfa1b 24 */
takeru0x1103 17:f9610f3cfa1b 25 public:
takeru0x1103 17:f9610f3cfa1b 26 HbEngine(UCHAR iID);
takeru0x1103 17:f9610f3cfa1b 27 UINT16 getRpm();
MasashiNomura 35:3779201b4c73 28 void setAccel(UINT16 iVal);
MasashiNomura 23:79e20be4bc5b 29
MasashiNomura 36:2cc739c7e4cb 30 void setHoverAccel(INT16 val);
MasashiNomura 36:2cc739c7e4cb 31 void clearHoverAccel();
MasashiNomura 36:2cc739c7e4cb 32 bool chkSetHoverAccel();
MasashiNomura 38:24ee50452755 33 INT16 getHoverAccelVal();
MasashiNomura 38:24ee50452755 34
MasashiNomura 23:79e20be4bc5b 35 bool chkOverIDLECycle();
MasashiNomura 23:79e20be4bc5b 36 bool chkInRangeIDLE();
takeru0x1103 17:f9610f3cfa1b 37 };
takeru0x1103 17:f9610f3cfa1b 38
takeru0x1103 17:f9610f3cfa1b 39 #endif
takeru0x1103 17:f9610f3cfa1b 40
takeru0x1103 17:f9610f3cfa1b 41