Nathaniel Honka / UI

Fork of UI by Michael Ling

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers UserInterface.h Source File

UserInterface.h

00001 #ifndef USERINTERFACE_H
00002 #define USERINTERFACE_H
00003 
00004 /**
00005 * Copyright (c) 2014
00006 * All rights reserved.
00007 *
00008  * This header file contains functions for reading received signals and checking that they are properly formed.
00009  * @author Bradley Perry
00010  * @date
00011 */
00012 
00013 #include "mbed.h"
00014 #include "MODSERIAL.h"
00015 #include "initDatabed.h"
00016 #include "common.h"
00017 
00018 extern UI_t UI;
00019 class UserInterface
00020 {
00021 public:
00022     UserInterface(void);
00023     void find_length(char *idx, int *count);
00024     bool checksum_check(char * idx, int length);
00025     void checkUI_XBee();
00026     void readBuffer();
00027     void initializeUI();
00028 
00029 private:
00030     int _buttonA;
00031     int _buttonA_prev;
00032     float _tHold;
00033     float _tIdle;
00034     int _SSconfirm;
00035     float _tRelease;
00036     Timer _time_StateChange;
00037     Timer _time_pressA;
00038     Timer _time_pressB;
00039     int _buttonB;
00040     int _buttonB_prev;
00041     char _xbeeBuffer[250];
00042     int _dataCnt;
00043     float _time_sinceA;
00044     float _time_sinceB;
00045 };
00046 #endif