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

LTC1298/ltc1298.hpp

Committer:
danstrider
Date:
2017-10-23
Revision:
10:085ab7328054
Parent:
9:d5fcdcb3c89d
Child:
51:c5c40272ecc3

File content as of revision 10:085ab7328054:

#ifndef MBED_LTC1298_H
#define MBED_LTC1298_H
#include "mbed.h"

#define CH0OVERSAMPLE 8
#define CH1OVERSAMPLE 8

class SpiADC{
public:
    SpiADC(PinName mosi, PinName miso, PinName sclk, PinName csel, PinName led);
    void initialize();
    void update();
    void start();
    void stop();
    
    int readCh0();
    int readCh1();
    
protected:
    SPI _spi;
    Ticker interval;
    DigitalOut adcLed;
    DigitalOut cs;

    int ch0_raw;
    int ch1_raw;
    
    int ch0_filt;
    int ch1_filt;
};



#endif