This UI works

Fork of UI_old by Michael Ling

Committer:
perr1940
Date:
Wed Feb 25 01:41:17 2015 +0000
Revision:
2:d6595294497c
Parent:
0:6b5a3a0138ad
UI that works

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mzling 0:6b5a3a0138ad 1 #ifndef USERINTERFACE_H
mzling 0:6b5a3a0138ad 2 #define USERINTERFACE_H
mzling 0:6b5a3a0138ad 3
mzling 0:6b5a3a0138ad 4 /**
mzling 0:6b5a3a0138ad 5 * Copyright (c) 2014
mzling 0:6b5a3a0138ad 6 * All rights reserved.
mzling 0:6b5a3a0138ad 7 *
mzling 0:6b5a3a0138ad 8 * This header file contains functions for reading received signals and checking that they are properly formed.
mzling 0:6b5a3a0138ad 9 * @author Bradley Perry
mzling 0:6b5a3a0138ad 10 * @date
mzling 0:6b5a3a0138ad 11 */
mzling 0:6b5a3a0138ad 12
mzling 0:6b5a3a0138ad 13 #include "mbed.h"
mzling 0:6b5a3a0138ad 14 #include "MODSERIAL.h"
mzling 0:6b5a3a0138ad 15 #include "initDatabed.h"
mzling 0:6b5a3a0138ad 16 extern int UI;
mzling 0:6b5a3a0138ad 17 class UserInterface
mzling 0:6b5a3a0138ad 18 {
mzling 0:6b5a3a0138ad 19 public:
mzling 0:6b5a3a0138ad 20 UserInterface(void);
mzling 0:6b5a3a0138ad 21 void find_length(char *idx, int *count);
mzling 0:6b5a3a0138ad 22 bool checksum_check(char * idx, int length);
mzling 0:6b5a3a0138ad 23 void checkUI_XBee();
mzling 0:6b5a3a0138ad 24 void readBuffer();
mzling 0:6b5a3a0138ad 25 void initializeUI();
mzling 0:6b5a3a0138ad 26
mzling 0:6b5a3a0138ad 27 private:
mzling 0:6b5a3a0138ad 28 int _buttonA;
mzling 0:6b5a3a0138ad 29 int _buttonA_prev;
mzling 0:6b5a3a0138ad 30 float _tHold;
mzling 0:6b5a3a0138ad 31 float _tIdle;
mzling 0:6b5a3a0138ad 32 int _SSconfirm;
mzling 0:6b5a3a0138ad 33 float _tRelease;
mzling 0:6b5a3a0138ad 34 Timer _time_StateChange;
mzling 0:6b5a3a0138ad 35 Timer _time_pressA;
mzling 0:6b5a3a0138ad 36 Timer _time_pressB;
mzling 0:6b5a3a0138ad 37 int _buttonB;
mzling 0:6b5a3a0138ad 38 int _buttonB_prev;
mzling 0:6b5a3a0138ad 39 char _xbeeBuffer[250];
mzling 0:6b5a3a0138ad 40 int _dataCnt;
mzling 0:6b5a3a0138ad 41 float _time_sinceA;
mzling 0:6b5a3a0138ad 42 float _time_sinceB;
mzling 0:6b5a3a0138ad 43 };
mzling 0:6b5a3a0138ad 44 #endif