1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

Clearing up more warnings

NOTE: the ones in MemStream are not mine!
This commit is contained in:
Asbelos 2020-06-30 09:09:39 +01:00
parent 7f7d707bc9
commit 5269177f2e
6 changed files with 11 additions and 11 deletions

View File

@ -74,6 +74,6 @@ class DCCWaveform {
// current sampling // current sampling
POWERMODE powerMode; POWERMODE powerMode;
unsigned long lastSampleTaken; unsigned long lastSampleTaken;
int sampleDelay; unsigned int sampleDelay;
}; };
#endif #endif

View File

@ -55,14 +55,14 @@ void Hardware::setCallback(int duration, void (*isr)()) {
// Railcom support functions, not yet implemented // Railcom support functions, not yet implemented
void Hardware::setSingleCallback(int duration, void (*isr)()) { //void Hardware::setSingleCallback(int duration, void (*isr)()) {
// Timer2.initialize(duration); // Timer2.initialize(duration);
// Timer2.disablePwm(TIMER1_A_PIN); // Timer2.disablePwm(TIMER1_A_PIN);
// Timer2.disablePwm(TIMER1_B_PIN); // Timer2.disablePwm(TIMER1_B_PIN);
// Timer2.attachInterrupt(isr); // Timer2.attachInterrupt(isr);
} //}
void Hardware::resetSingleCallback(int duration) { //void Hardware::resetSingleCallback(int duration) {
// if (duration==0) Timer2.stop(); // if (duration==0) Timer2.stop();
// else Timer2.initialize(duration); // else Timer2.initialize(duration);
} //}

View File

@ -9,7 +9,7 @@ class Hardware {
static int getCurrentMilliamps(bool isMainTrack); static int getCurrentMilliamps(bool isMainTrack);
static void setBrake(bool isMainTrack, bool on); static void setBrake(bool isMainTrack, bool on);
static void setCallback(int duration, void (*isr)()); static void setCallback(int duration, void (*isr)());
static void setSingleCallback(int duration, void (*isr)()); // static void setSingleCallback(int duration, void (*isr)());
static void resetSingleCallback(int duration); // static void resetSingleCallback(int duration);
}; };
#endif #endif

View File

@ -63,12 +63,12 @@ void PWMServoDriver::setup(int board) {
/*! /*!
* @brief Sets the PWM output to a servo * @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); //DIAG(F("\nsetServo %d %d\n"),servoNum,value);
int board=servoNum/16; int board=servoNum/16;
int pin=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 setup(board); // in case not already done
Wire.beginTransmission(PCA9685_I2C_ADDRESS + board); Wire.beginTransmission(PCA9685_I2C_ADDRESS + board);

View File

@ -9,7 +9,7 @@
class PWMServoDriver { class PWMServoDriver {
public: public:
static void setServo(short servoNum, uint16_t pos); static void setServo(byte servoNum, uint16_t pos);
private: private:
static byte setupFlags; static byte setupFlags;

View File

@ -52,7 +52,7 @@ WiThrottle::WiThrottle(Print & stream, int wificlientid) {
for(Turnout *tt=Turnout::firstTurnout;tt!=NULL;tt=tt->nextTurnout){ 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("]\\[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 heartBeatEnable=false; // until client turns it on
} }