From f5cdd88854e1c711a5eca26f54e84bee80f7dd39 Mon Sep 17 00:00:00 2001 From: Mike S Date: Mon, 29 Mar 2021 15:06:06 -0400 Subject: [PATCH] Cleanup of extra commented lines --- MotorDriver.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/MotorDriver.cpp b/MotorDriver.cpp index 926e8db..1819ab7 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -20,14 +20,11 @@ #include "MotorDriver.h" #include "DCCTimer.h" #include "DIAG.h" -//#if defined(TEENSYDUINO) + #if defined(ARDUINO_TEENSY40) || defined(ARDUINO_TEENSY41) #include #include ADC *adc = new ADC(); // adc object -//#if defined(ARDUINO_TEENSY35) || defined(ARDUINO_TEENSY36) || defined(ARDUINO_TEENSY32) -//ADC *adc1 = new ADC(); // adc object -//#endif #endif #define setHIGH(fastpin) *fastpin.inout |= fastpin.maskHIGH @@ -72,19 +69,13 @@ MotorDriver::MotorDriver(byte power_pin, byte signal_pin, byte signal_pin2, int8 senseOffset=analogRead(currentPin); // value of sensor at zero current } -//#if defined(TEENSYDUINO) #if defined(ARDUINO_TEENSY40) || defined(ARDUINO_TEENSY41) if(currentPin != current_pin && currentPin!=UNUSED_PIN){ //adc->adc0->setReference(ADC_REFERENCE::REF_3V3); adc->adc0->startContinuous(currentPin); } else if(currentPin!=UNUSED_PIN){ -//#if defined(ARDUINO_TEENSY35) || defined(ARDUINO_TEENSY36) || defined(ARDUINO_TEENSY32) -// adc1->adc0->setReference(ADC_REFERENCE::REF_3V3); -// adc1->adc0->startContinuous(currentPin); -//#else //adc->adc1->setReference(ADC_REFERENCE::REF_3V3); adc->adc1->startContinuous(currentPin); -//#endif } #endif faultPin=fault_pin; @@ -167,16 +158,11 @@ int MotorDriver::getCurrentRaw(bool isMain) { if (currentPin==UNUSED_PIN) return 0; int current; -//#if defined(TEENSYDUINO) #if defined(ARDUINO_TEENSY40) || defined(ARDUINO_TEENSY41) if(isMain) { current = (uint16_t)adc->adc0->analogReadContinuous(); } else { - //#if defined(ARDUINO_TEENSY35) || defined(ARDUINO_TEENSY36) || defined(ARDUINO_TEENSY32) - //current = (uint16_t)adc1->adc0->analogReadContinuous(); - //#else current = (uint16_t)adc->adc1->analogReadContinuous(); - //#endif } #elif defined(ARDUINO_TEENSY32) || defined(ARDUINO_TEENSY35)|| defined(ARDUINO_TEENSY36) unsigned char sreg_backup;