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: omegaPX209/omegaPX209.cpp
- Revision:
- 55:f4ec445c42fe
- Parent:
- 54:d4990fb68404
- Child:
- 56:48a8a5a65b82
--- a/omegaPX209/omegaPX209.cpp Fri Jun 08 13:56:30 2018 +0000 +++ b/omegaPX209/omegaPX209.cpp Tue Jun 12 15:41:51 2018 +0000 @@ -17,7 +17,7 @@ { _psi = 14.7; // pressure [psi] _zeroPsi = 14.7; // atmospheric pressure at sea level [psi] - _adcVoltage = 5.6; // Troy: I'm not sure this is the right name for this multiplier... [V] (was 3.3 before) + _adcVoltage = 5.24; // Troy: I'm not sure this is the right name for this multiplier... [V] (was 3.3 before) _fullscale = 50; // value of sensor at full scale (*confirm with Stearns*) [psi] _psi_per_volt_cal = _fullscale/5.0; // psi per volt calibration [psi/V] _PSI_reading = 0; @@ -84,11 +84,11 @@ } float omegaPX209::readVoltage() { - float pressure_voltage = adc().readCh4()/4095.0 * 5.6; + float pressure_voltage = adc().readCh4()/4095.0 * _adcVoltage; return pressure_voltage; } float omegaPX209::getRawPSI() { - float pressure_raw = adc().readCh4()/4095.0 * 56; + float pressure_raw = adc().readCh4()/4095.0 * _adcVoltage * _psi_per_volt_cal; return pressure_raw; } \ No newline at end of file