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:
mkelly10
Date:
Fri Oct 20 11:41:22 2017 +0000
Revision:
9:d5fcdcb3c89d
Child:
10:085ab7328054
Tested 10/19/17 Folders

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mkelly10 9:d5fcdcb3c89d 1 #ifndef MBED_LTC1298_H
mkelly10 9:d5fcdcb3c89d 2 #define MBED_LTC1298_H
mkelly10 9:d5fcdcb3c89d 3 #include "mbed.h"
mkelly10 9:d5fcdcb3c89d 4
mkelly10 9:d5fcdcb3c89d 5 #define CH0OVERSAMPLE 4
mkelly10 9:d5fcdcb3c89d 6 #define CH1OVERSAMPLE 8
mkelly10 9:d5fcdcb3c89d 7
mkelly10 9:d5fcdcb3c89d 8 class SpiADC{
mkelly10 9:d5fcdcb3c89d 9 public:
mkelly10 9:d5fcdcb3c89d 10 SpiADC();
mkelly10 9:d5fcdcb3c89d 11 void initialize();
mkelly10 9:d5fcdcb3c89d 12 void update();
mkelly10 9:d5fcdcb3c89d 13 void start();
mkelly10 9:d5fcdcb3c89d 14 void stop();
mkelly10 9:d5fcdcb3c89d 15
mkelly10 9:d5fcdcb3c89d 16 int readCh0();
mkelly10 9:d5fcdcb3c89d 17 int readCh1();
mkelly10 9:d5fcdcb3c89d 18
mkelly10 9:d5fcdcb3c89d 19
mkelly10 9:d5fcdcb3c89d 20 protected:
mkelly10 9:d5fcdcb3c89d 21 SPI _spi;
mkelly10 9:d5fcdcb3c89d 22 Ticker interval;
mkelly10 9:d5fcdcb3c89d 23 DigitalOut adcLed;
mkelly10 9:d5fcdcb3c89d 24 DigitalOut cs;
mkelly10 9:d5fcdcb3c89d 25 void poll();
mkelly10 9:d5fcdcb3c89d 26 int ch0_raw;
mkelly10 9:d5fcdcb3c89d 27 int ch1_raw;
mkelly10 9:d5fcdcb3c89d 28
mkelly10 9:d5fcdcb3c89d 29 int ch0_filt;
mkelly10 9:d5fcdcb3c89d 30 int ch1_filt;
mkelly10 9:d5fcdcb3c89d 31
mkelly10 9:d5fcdcb3c89d 32 int result;
mkelly10 9:d5fcdcb3c89d 33
mkelly10 9:d5fcdcb3c89d 34 };
mkelly10 9:d5fcdcb3c89d 35
mkelly10 9:d5fcdcb3c89d 36
mkelly10 9:d5fcdcb3c89d 37
mkelly10 9:d5fcdcb3c89d 38 #endif