Skip to content

Commit

Permalink
Cleaning up stragglers causing debugging to fail on samd
Browse files Browse the repository at this point in the history
  • Loading branch information
SRGDamia1 committed Jun 24, 2019
1 parent 02cd9b7 commit ed6ee06
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
10 changes: 9 additions & 1 deletion src/LoggerModem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ loggerModem::loggerModem(int8_t powerPin, int8_t statusPin, bool statusLevel,
loggerModem::~loggerModem(){}


void loggerModem::setModemLED(int8_t modemLEDPin) { _modemLEDPin = modemLEDPin; };
void loggerModem::setModemLED(int8_t modemLEDPin)
{
_modemLEDPin = modemLEDPin;
if (_modemLEDPin >= 0)
{
pinMode(_modemLEDPin, OUTPUT);
digitalWrite(_modemLEDPin, LOW);
}
};
void loggerModem::modemLEDOn(void)
{
if (_modemLEDPin >= 0)
Expand Down
4 changes: 2 additions & 2 deletions src/SensorBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ bool Sensor::startSingleMeasurement(void)
void Sensor::registerVariable(int sensorVarNum, Variable* var)
{
variables[sensorVarNum] = var;
MS_DBG(F("... Registration from"), getSensorNameAndLocation(), F("for"),
var->getVarName(), F("accepted."));
/*MS_DBG(F("... Registration from"), getSensorNameAndLocation(), F("for"),
var->getVarName(), F("accepted."));*/
}


Expand Down
10 changes: 5 additions & 5 deletions src/VariableArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,14 +860,14 @@ void VariableArray::printSensorData(Stream *stream)
// Check for unique sensors
bool VariableArray::isLastVarFromSensor(int arrayIndex)
{
MS_DEEP_DBG(F("Checking if"), arrayOfVars[arrayIndex]->getVarName(), '(',
arrayIndex, F(") is the last variable from a sensor..."));
/*MS_DEEP_DBG(F("Checking if"), arrayOfVars[arrayIndex]->getVarName(), '(',
arrayIndex, F(") is the last variable from a sensor..."));*/

// Calculated variables are never the last variable from a sensor, simply
// because the don't come from a sensor at all.
if (arrayOfVars[arrayIndex]->isCalculated)
{
MS_DEEP_DBG(F(" ... Nope, it's calculated!"));
// MS_DEEP_DBG(F(" ... Nope, it's calculated!"));
return false;
}

Expand All @@ -880,11 +880,11 @@ bool VariableArray::isLastVarFromSensor(int arrayIndex)
if (sensNameLoc == arrayOfVars[j]->getParentSensorNameAndLocation())
{
unique = false;
MS_DEEP_DBG(F(" ... Nope, there are others after it!"));
// MS_DEEP_DBG(F(" ... Nope, there are others after it!"));
break;
}
}
if (unique) MS_DEEP_DBG(F(" ... Yes, it is!"));
// if (unique) MS_DEEP_DBG(F(" ... Yes, it is!"));
return unique;
}
}
Expand Down

0 comments on commit ed6ee06

Please sign in to comment.