most functionality to splashdwon, find neutral and start mission. short timeouts still in code for testing, will adjust to go directly to sit_idle after splashdown

Dependencies:   mbed MODSERIAL FATFileSystem

Committer:
joel_ssc
Date:
Mon May 13 19:25:26 2019 +0000
Revision:
92:52a91656458a
Parent:
73:f6f378311c8d
version for first flight test, timeouts not yet set correctly

Who changed what in which revision?

UserRevisionLine numberNew 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 */