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
Diff: LTC1298/ltc1298.hpp
- Revision:
- 9:d5fcdcb3c89d
- Child:
- 10:085ab7328054
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LTC1298/ltc1298.hpp Fri Oct 20 11:41:22 2017 +0000 @@ -0,0 +1,38 @@ +#ifndef MBED_LTC1298_H +#define MBED_LTC1298_H +#include "mbed.h" + +#define CH0OVERSAMPLE 4 +#define CH1OVERSAMPLE 8 + +class SpiADC{ +public: + SpiADC(); + void initialize(); + void update(); + void start(); + void stop(); + + int readCh0(); + int readCh1(); + + +protected: + SPI _spi; + Ticker interval; + DigitalOut adcLed; + DigitalOut cs; + void poll(); + int ch0_raw; + int ch1_raw; + + int ch0_filt; + int ch1_filt; + + int result; + +}; + + + +#endif \ No newline at end of file