https://os.mbed.com/users/sayzyas

Dependencies:   QEI TextLCD mbed

Committer:
sayzyas
Date:
Thu Jul 26 00:20:15 2018 +0000
Revision:
0:73dd48be5ca6
2018.07.26

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sayzyas 0:73dd48be5ca6 1 class mcchk
sayzyas 0:73dd48be5ca6 2 {
sayzyas 0:73dd48be5ca6 3 private:
sayzyas 0:73dd48be5ca6 4 float m_LBCRW_center_value;
sayzyas 0:73dd48be5ca6 5 float m_RFCRW_center_value;
sayzyas 0:73dd48be5ca6 6 float m_LBTFM_center_value;
sayzyas 0:73dd48be5ca6 7 float m_RFTFM_center_value;
sayzyas 0:73dd48be5ca6 8 float m_WINCH_center_value;
sayzyas 0:73dd48be5ca6 9 float m_CMPAN_center_value;
sayzyas 0:73dd48be5ca6 10 float m_CTILT_center_value;
sayzyas 0:73dd48be5ca6 11
sayzyas 0:73dd48be5ca6 12 int8_t flg_mclock_LBCRW; // bit0: forward, bit1: reverse
sayzyas 0:73dd48be5ca6 13 int8_t flg_mclock_RFCRW; // bit0: forward, bit1: reverse
sayzyas 0:73dd48be5ca6 14 int8_t flg_mclock_LBTFM; // bit0: forward, bit1: reverse
sayzyas 0:73dd48be5ca6 15 int8_t flg_mclock_RFTFM; // bit0: forward, bit1: reverse
sayzyas 0:73dd48be5ca6 16 int8_t flg_mclock_CMPAN; // bit0: forward, bit1: reverse
sayzyas 0:73dd48be5ca6 17 int8_t flg_mclock_CTILT; // bit0: forward, bit1: reverse
sayzyas 0:73dd48be5ca6 18 int8_t flg_mclock_WINCH; // bit0: forward, bit1: reverse
sayzyas 0:73dd48be5ca6 19
sayzyas 0:73dd48be5ca6 20 public:
sayzyas 0:73dd48be5ca6 21
sayzyas 0:73dd48be5ca6 22 int8_t cnt_mclock_LBCRW_f; // motor lock counter
sayzyas 0:73dd48be5ca6 23 int8_t cnt_mclock_LBCRW_r; // motor lock counter
sayzyas 0:73dd48be5ca6 24 int8_t cnt_mclock_RFCRW_f; // motor lock counter
sayzyas 0:73dd48be5ca6 25 int8_t cnt_mclock_RFCRW_r; // motor lock counter
sayzyas 0:73dd48be5ca6 26 int8_t cnt_mclock_LBTFM_f; // motor lock counter
sayzyas 0:73dd48be5ca6 27 int8_t cnt_mclock_LBTFM_r; // motor lock counter
sayzyas 0:73dd48be5ca6 28 int8_t cnt_mclock_RFTFM_f; // motor lock counter
sayzyas 0:73dd48be5ca6 29 int8_t cnt_mclock_RFTFM_r; // motor lock counter
sayzyas 0:73dd48be5ca6 30 int8_t cnt_mclock_CMPAN_f; // motor lock counter
sayzyas 0:73dd48be5ca6 31 int8_t cnt_mclock_CMPAN_r; // motor lock counter
sayzyas 0:73dd48be5ca6 32 int8_t cnt_mclock_CTILT_f; // motor lock counter
sayzyas 0:73dd48be5ca6 33 int8_t cnt_mclock_CTILT_r; // motor lock counter
sayzyas 0:73dd48be5ca6 34 int8_t cnt_mclock_WINCH_f; // motor lock counter
sayzyas 0:73dd48be5ca6 35 int8_t cnt_mclock_WINCH_r; // motor lock counter
sayzyas 0:73dd48be5ca6 36
sayzyas 0:73dd48be5ca6 37
sayzyas 0:73dd48be5ca6 38 int16_t mc_th_LBCRW_f;
sayzyas 0:73dd48be5ca6 39 int16_t mc_th_LBCRW_r;
sayzyas 0:73dd48be5ca6 40 int16_t mc_th_RFCRW_f;
sayzyas 0:73dd48be5ca6 41 int16_t mc_th_RFCRW_r;
sayzyas 0:73dd48be5ca6 42 int16_t mc_th_LBTFM_f;
sayzyas 0:73dd48be5ca6 43 int16_t mc_th_LBTFM_r;
sayzyas 0:73dd48be5ca6 44 int16_t mc_th_RFTFM_f;
sayzyas 0:73dd48be5ca6 45 int16_t mc_th_RFTFM_r;
sayzyas 0:73dd48be5ca6 46 int16_t mc_th_WINCH_f;
sayzyas 0:73dd48be5ca6 47 int16_t mc_th_WINCH_r;
sayzyas 0:73dd48be5ca6 48 int16_t mc_th_CMPAN_f;
sayzyas 0:73dd48be5ca6 49 int16_t mc_th_CMPAN_r;
sayzyas 0:73dd48be5ca6 50 int16_t mc_th_CTILT_f;
sayzyas 0:73dd48be5ca6 51 int16_t mc_th_CTILT_r;
sayzyas 0:73dd48be5ca6 52
sayzyas 0:73dd48be5ca6 53 int32_t mc_abs_pct;
sayzyas 0:73dd48be5ca6 54
sayzyas 0:73dd48be5ca6 55 float _cnt_now;
sayzyas 0:73dd48be5ca6 56 float _cnt_center;
sayzyas 0:73dd48be5ca6 57 int _cnt_th;
sayzyas 0:73dd48be5ca6 58
sayzyas 0:73dd48be5ca6 59 bool motor_lock_flg;
sayzyas 0:73dd48be5ca6 60
sayzyas 0:73dd48be5ca6 61 mcchk();
sayzyas 0:73dd48be5ca6 62 void set_init_mc( int );
sayzyas 0:73dd48be5ca6 63 bool rdnchk_motorCurrent( int8_t, int8_t, int8_t );
sayzyas 0:73dd48be5ca6 64 bool chk_motor_lock( float, float, int );
sayzyas 0:73dd48be5ca6 65 float mcchk::rd_motorCurrent( int no );
sayzyas 0:73dd48be5ca6 66 };