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
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 51:c5c40272ecc3 5 #define CH0OVERSAMPLE 10
mkelly10 51:c5c40272ecc3 6 #define CH1OVERSAMPLE 10
mkelly10 51:c5c40272ecc3 7 #define CH2OVERSAMPLE 10
mkelly10 51:c5c40272ecc3 8 #define CH3OVERSAMPLE 10
mkelly10 51:c5c40272ecc3 9 #define CH4OVERSAMPLE 10
mkelly10 51:c5c40272ecc3 10 #define CH5OVERSAMPLE 10
mkelly10 51:c5c40272ecc3 11 #define CH6OVERSAMPLE 10
mkelly10 51:c5c40272ecc3 12 #define CH7OVERSAMPLE 10
mkelly10 9:d5fcdcb3c89d 13
mkelly10 9:d5fcdcb3c89d 14 class SpiADC{
mkelly10 9:d5fcdcb3c89d 15 public:
danstrider 10:085ab7328054 16 SpiADC(PinName mosi, PinName miso, PinName sclk, PinName csel, PinName led);
mkelly10 9:d5fcdcb3c89d 17 void initialize();
mkelly10 9:d5fcdcb3c89d 18 void update();
mkelly10 9:d5fcdcb3c89d 19 void start();
mkelly10 9:d5fcdcb3c89d 20 void stop();
mkelly10 9:d5fcdcb3c89d 21
mkelly10 9:d5fcdcb3c89d 22 int readCh0();
mkelly10 9:d5fcdcb3c89d 23 int readCh1();
mkelly10 51:c5c40272ecc3 24 int readCh2();
mkelly10 51:c5c40272ecc3 25 int readCh3();
mkelly10 51:c5c40272ecc3 26 int readCh4();
mkelly10 51:c5c40272ecc3 27 int readCh5();
mkelly10 51:c5c40272ecc3 28 int readCh6();
mkelly10 51:c5c40272ecc3 29 int readCh7();
mkelly10 9:d5fcdcb3c89d 30
tnhnrl 73:f6f378311c8d 31 int readRawCh0();
tnhnrl 73:f6f378311c8d 32 int readRawCh1();
tnhnrl 73:f6f378311c8d 33 int readRawCh2();
tnhnrl 73:f6f378311c8d 34 int readRawCh3();
tnhnrl 73:f6f378311c8d 35 int readRawCh4();
tnhnrl 73:f6f378311c8d 36 int readRawCh5();
tnhnrl 73:f6f378311c8d 37 int readRawCh6();
tnhnrl 73:f6f378311c8d 38 int readRawCh7();
tnhnrl 73:f6f378311c8d 39
mkelly10 9:d5fcdcb3c89d 40 protected:
mkelly10 9:d5fcdcb3c89d 41 SPI _spi;
mkelly10 9:d5fcdcb3c89d 42 Ticker interval;
mkelly10 9:d5fcdcb3c89d 43 DigitalOut adcLed;
mkelly10 9:d5fcdcb3c89d 44 DigitalOut cs;
danstrider 10:085ab7328054 45
mkelly10 9:d5fcdcb3c89d 46 int ch0_raw;
mkelly10 9:d5fcdcb3c89d 47 int ch1_raw;
mkelly10 51:c5c40272ecc3 48 int ch2_raw;
mkelly10 51:c5c40272ecc3 49 int ch3_raw;
mkelly10 51:c5c40272ecc3 50 int ch4_raw;
mkelly10 51:c5c40272ecc3 51 int ch5_raw;
mkelly10 51:c5c40272ecc3 52 int ch6_raw;
mkelly10 51:c5c40272ecc3 53 int ch7_raw;
mkelly10 9:d5fcdcb3c89d 54
mkelly10 9:d5fcdcb3c89d 55 int ch0_filt;
mkelly10 9:d5fcdcb3c89d 56 int ch1_filt;
mkelly10 51:c5c40272ecc3 57 int ch2_filt;
mkelly10 51:c5c40272ecc3 58 int ch3_filt;
mkelly10 51:c5c40272ecc3 59 int ch4_filt;
mkelly10 51:c5c40272ecc3 60 int ch5_filt;
mkelly10 51:c5c40272ecc3 61 int ch6_filt;
mkelly10 51:c5c40272ecc3 62 int ch7_filt;
mkelly10 9:d5fcdcb3c89d 63 };
mkelly10 9:d5fcdcb3c89d 64
mkelly10 9:d5fcdcb3c89d 65
mkelly10 9:d5fcdcb3c89d 66
mkelly10 9:d5fcdcb3c89d 67 #endif