 OTRadValve::ValveMotorDirectV1HardwareDriver<m1, m2, MOTOR_DRIVE_MI_AIN, MOTOR_DRIVE_MC_AIN> motorDriver;
 OTRadValve::TestValveMotor ValveDirect((OTRadValve::HardwareMotorDriverInterface *)(&motorDriver));
 
-
+static constexpr uint8_t adcSetting = (1 << 6) | (MOTOR_DRIVE_MC_AIN & 7);
 
 // FUNCTIONS
 

 */
void loop()
{
    ValveDirect.poll();
    // Capture and print encoder state.
    const uint16_t encoderLevel = OTV0P2BASE::analogueNoiseReducedRead(MOTOR_DRIVE_MC_AIN, DEFAULT);
    OTV0P2BASE::serialPrintAndFlush(encoderLevel, HEX);
    OTV0P2BASE::serialPrintlnAndFlush();
}



/**
 * @note    Power consumption figures (all in mA).
 * Date/commit:         Device: Wake (Sleep) @ Voltage
 * 20161111/0e6ec96     REV7:   1.5 (1.1) @ 2.5 V       REV11:  0.45 (0.03) @ 2.5 V
 * 20161111/f2eed5e     REV7:   0.46 (0.04) @ 2.5 V
 */

/**
 * @note    REV7 Power consumption investigation.
 *          Figures are not overly accurate due to hot airgun changing board temp. Shouldn't make enough of a difference for our purposes.
 * Baseline:                1.08 mA
 * - Motor decoupling caps: 1.08 mA
 * - Potentiometer:         1.02 mA
 * - BAV99 Suppressors:     1.02 mA
 * - TANT RF decoupling:    1.01 mA
 * - Motor diodes:          1.01 mA
 * - Op Amp:                0.99 mA
 * - Inductor:              178 mA (I think this is due to ML+MR being held high)
 * - H-Bridge Transistors:  0.99 mA
 * - All decoupling:        0.98 mA
 * - All H-Bridge resistors:0.98 mA
 * - Encoder:               0.98 mA
 * - Some resistors:        0.48 mA
 */


    // Long delay after everything set up to allow a non-sleep power measurement.
    delay(1000);
 
    OTV0P2BASE::powerUpADCIfDisabled();
    
    pinMode(IO_POWER_UP, OUTPUT);
    fastDigitalWrite(IO_POWER_UP, HIGH);
    pinMode(m1, OUTPUT);
    fastDigitalWrite(m1, LOW);
}


