diff --git a/DCCWaveform.h b/DCCWaveform.h index 7b50b88..1b1628d 100644 --- a/DCCWaveform.h +++ b/DCCWaveform.h @@ -74,6 +74,6 @@ class DCCWaveform { // current sampling POWERMODE powerMode; unsigned long lastSampleTaken; - int sampleDelay; + unsigned int sampleDelay; }; #endif diff --git a/Hardware.cpp b/Hardware.cpp index c276e8d..a3d46c9 100644 --- a/Hardware.cpp +++ b/Hardware.cpp @@ -55,14 +55,14 @@ void Hardware::setCallback(int duration, void (*isr)()) { // Railcom support functions, not yet implemented -void Hardware::setSingleCallback(int duration, void (*isr)()) { +//void Hardware::setSingleCallback(int duration, void (*isr)()) { // Timer2.initialize(duration); // Timer2.disablePwm(TIMER1_A_PIN); // Timer2.disablePwm(TIMER1_B_PIN); // Timer2.attachInterrupt(isr); -} +//} -void Hardware::resetSingleCallback(int duration) { +//void Hardware::resetSingleCallback(int duration) { // if (duration==0) Timer2.stop(); // else Timer2.initialize(duration); -} +//} diff --git a/Hardware.h b/Hardware.h index 7b68466..0c69d57 100644 --- a/Hardware.h +++ b/Hardware.h @@ -9,7 +9,7 @@ class Hardware { static int getCurrentMilliamps(bool isMainTrack); static void setBrake(bool isMainTrack, bool on); static void setCallback(int duration, void (*isr)()); - static void setSingleCallback(int duration, void (*isr)()); - static void resetSingleCallback(int duration); +// static void setSingleCallback(int duration, void (*isr)()); +// static void resetSingleCallback(int duration); }; #endif diff --git a/PWMServoDriver.cpp b/PWMServoDriver.cpp index 8871a75..8e2edf4 100644 --- a/PWMServoDriver.cpp +++ b/PWMServoDriver.cpp @@ -63,12 +63,12 @@ void PWMServoDriver::setup(int board) { /*! * @brief Sets the PWM output to a servo */ -void PWMServoDriver::setServo(short servoNum, uint16_t value) { +void PWMServoDriver::setServo(byte servoNum, uint16_t value) { //DIAG(F("\nsetServo %d %d\n"),servoNum,value); int board=servoNum/16; int pin=servoNum%16; - if (board<0 | board>3) return; // safe dropout + if ( board>3) return; // safe dropout setup(board); // in case not already done Wire.beginTransmission(PCA9685_I2C_ADDRESS + board); diff --git a/PWMServoDriver.h b/PWMServoDriver.h index ca8b304..da27bac 100644 --- a/PWMServoDriver.h +++ b/PWMServoDriver.h @@ -9,7 +9,7 @@ class PWMServoDriver { public: - static void setServo(short servoNum, uint16_t pos); + static void setServo(byte servoNum, uint16_t pos); private: static byte setupFlags; diff --git a/WiThrottle.cpp b/WiThrottle.cpp index 6c7b580..59f1fc9 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -52,7 +52,7 @@ WiThrottle::WiThrottle(Print & stream, int wificlientid) { for(Turnout *tt=Turnout::firstTurnout;tt!=NULL;tt=tt->nextTurnout){ StringFormatter::send(stream,F("]\\[LT&d}|{%d}|{%d"), tt->data.id, tt->data.id, (bool)(tt->data.tStatus & STATUS_ACTIVE)); } - StringFormatter::send(stream,F("\n*10")); + StringFormatter::send(stream,F("\n*10\n")); heartBeatEnable=false; // until client turns it on }