Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MODSERIAL FATFileSystem
GUI/Gui.hpp@84:eccd8e837134, 2019-02-19 (annotated)
- Committer:
- joel_ssc
- Date:
- Tue Feb 19 20:11:43 2019 +0000
- Revision:
- 84:eccd8e837134
- Parent:
- 73:f6f378311c8d
updated file management of logfiles and diagfile numbers
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tnhnrl | 73:f6f378311c8d | 1 | #ifndef GUI_HPP |
tnhnrl | 73:f6f378311c8d | 2 | #define GUI_HPP |
tnhnrl | 73:f6f378311c8d | 3 | |
tnhnrl | 73:f6f378311c8d | 4 | #include "mbed.h" |
tnhnrl | 73:f6f378311c8d | 5 | #include <string> |
tnhnrl | 73:f6f378311c8d | 6 | using namespace std; |
tnhnrl | 73:f6f378311c8d | 7 | |
tnhnrl | 73:f6f378311c8d | 8 | #include <algorithm> //for reverse function |
tnhnrl | 73:f6f378311c8d | 9 | |
tnhnrl | 73:f6f378311c8d | 10 | #include <vector> //delete? |
tnhnrl | 73:f6f378311c8d | 11 | |
tnhnrl | 73:f6f378311c8d | 12 | enum { |
tnhnrl | 73:f6f378311c8d | 13 | HEADER_FE, |
tnhnrl | 73:f6f378311c8d | 14 | HEADER_ED, |
tnhnrl | 73:f6f378311c8d | 15 | COMMAND_PACKET, |
tnhnrl | 73:f6f378311c8d | 16 | FSM_PACKET_SIZE, |
tnhnrl | 73:f6f378311c8d | 17 | FSM_CRC_ONE, |
tnhnrl | 73:f6f378311c8d | 18 | FSM_CRC_TWO |
tnhnrl | 73:f6f378311c8d | 19 | }; |
tnhnrl | 73:f6f378311c8d | 20 | |
tnhnrl | 73:f6f378311c8d | 21 | class Gui { |
tnhnrl | 73:f6f378311c8d | 22 | public: |
tnhnrl | 73:f6f378311c8d | 23 | Gui(); //constructor |
tnhnrl | 73:f6f378311c8d | 24 | |
tnhnrl | 73:f6f378311c8d | 25 | int guiCalcCrc1(int *input_array, int array_length); |
tnhnrl | 73:f6f378311c8d | 26 | int guiCalcCrc2(int *input_array, int array_length); |
tnhnrl | 73:f6f378311c8d | 27 | |
tnhnrl | 73:f6f378311c8d | 28 | void getCommandFSM(); |
tnhnrl | 73:f6f378311c8d | 29 | |
tnhnrl | 73:f6f378311c8d | 30 | void updateGUI(); |
tnhnrl | 73:f6f378311c8d | 31 | |
tnhnrl | 73:f6f378311c8d | 32 | int calcCrcOneVector(vector <int> crc_packet); |
tnhnrl | 73:f6f378311c8d | 33 | int calcCrcTwoVector(vector <int> crc_packet); |
tnhnrl | 73:f6f378311c8d | 34 | void transmitDataPacket(vector <int> crc_packet); |
tnhnrl | 73:f6f378311c8d | 35 | |
tnhnrl | 73:f6f378311c8d | 36 | private: |
tnhnrl | 73:f6f378311c8d | 37 | int _crc_table[]; |
tnhnrl | 73:f6f378311c8d | 38 | |
tnhnrl | 73:f6f378311c8d | 39 | vector <int> _gui_update_packet; |
tnhnrl | 73:f6f378311c8d | 40 | |
tnhnrl | 73:f6f378311c8d | 41 | std::vector<int>::iterator _it; |
tnhnrl | 73:f6f378311c8d | 42 | }; |
tnhnrl | 73:f6f378311c8d | 43 | |
tnhnrl | 73:f6f378311c8d | 44 | #endif /* GUI_HPP */ |