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:
- 10:085ab7328054
- Parent:
- 9:d5fcdcb3c89d
- Child:
- 51:c5c40272ecc3
--- a/LTC1298/ltc1298.hpp Fri Oct 20 11:41:22 2017 +0000 +++ b/LTC1298/ltc1298.hpp Mon Oct 23 12:50:53 2017 +0000 @@ -2,12 +2,12 @@ #define MBED_LTC1298_H #include "mbed.h" -#define CH0OVERSAMPLE 4 +#define CH0OVERSAMPLE 8 #define CH1OVERSAMPLE 8 class SpiADC{ public: - SpiADC(); + SpiADC(PinName mosi, PinName miso, PinName sclk, PinName csel, PinName led); void initialize(); void update(); void start(); @@ -16,21 +16,17 @@ 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; - };