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:
tnhnrl
Date:
Wed Dec 20 23:21:15 2017 +0000
Revision:
36:966a86937e17
Parent:
35:2f66ea4863d5
Child:
39:58375ca6b6ff
Working version for pool testing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tnhnrl 32:f2f8ae34aadc 1 #ifndef MBEDLOGGER_HPP
tnhnrl 32:f2f8ae34aadc 2 #define MBEDLOGGER_HPP
tnhnrl 32:f2f8ae34aadc 3
tnhnrl 32:f2f8ae34aadc 4 #include "mbed.h"
tnhnrl 32:f2f8ae34aadc 5 #include <string>
tnhnrl 32:f2f8ae34aadc 6 using namespace std;
tnhnrl 32:f2f8ae34aadc 7
tnhnrl 32:f2f8ae34aadc 8 #include "DirectoryList.h"
tnhnrl 32:f2f8ae34aadc 9
tnhnrl 32:f2f8ae34aadc 10 class MbedLogger {
tnhnrl 32:f2f8ae34aadc 11 public:
tnhnrl 32:f2f8ae34aadc 12 MbedLogger(); //constructor
tnhnrl 32:f2f8ae34aadc 13 void createTestLog(); //test log function
tnhnrl 32:f2f8ae34aadc 14
tnhnrl 32:f2f8ae34aadc 15 //one log file type for now
tnhnrl 36:966a86937e17 16 void openFile();
tnhnrl 32:f2f8ae34aadc 17
tnhnrl 32:f2f8ae34aadc 18 //save float array to file (append each time)
tnhnrl 36:966a86937e17 19 void saveDataToFile(string string_state, int input_state, float *input);
tnhnrl 36:966a86937e17 20 void saveDataToFile(int input_state, float *input);
tnhnrl 32:f2f8ae34aadc 21
tnhnrl 32:f2f8ae34aadc 22 //print the directory to the screen
tnhnrl 32:f2f8ae34aadc 23 void printMbedDirectory();
tnhnrl 32:f2f8ae34aadc 24
tnhnrl 32:f2f8ae34aadc 25 //close the current file stream [before creating a new one]
tnhnrl 32:f2f8ae34aadc 26 void closeFile();
tnhnrl 35:2f66ea4863d5 27
tnhnrl 35:2f66ea4863d5 28 //print the current MBED log file
tnhnrl 35:2f66ea4863d5 29 void printCurrentLogFile();
tnhnrl 32:f2f8ae34aadc 30
tnhnrl 32:f2f8ae34aadc 31 private:
tnhnrl 32:f2f8ae34aadc 32 int _f; //file name number
tnhnrl 32:f2f8ae34aadc 33 char _file_name[128]; //file name placeholder
tnhnrl 32:f2f8ae34aadc 34 int _file_number;
tnhnrl 32:f2f8ae34aadc 35
tnhnrl 32:f2f8ae34aadc 36 FILE *_fp; //the file is a class member variable
tnhnrl 32:f2f8ae34aadc 37 };
tnhnrl 32:f2f8ae34aadc 38
tnhnrl 32:f2f8ae34aadc 39 #endif