Skip to content

Commit

Permalink
removed logComm user setting
Browse files Browse the repository at this point in the history
  • Loading branch information
doudar committed Feb 11, 2024
1 parent 1e0c994 commit e9999a6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
5 changes: 0 additions & 5 deletions data/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,6 @@ <h2>
<p class="tooltip">Enable BLE RX Logging<span class="tooltiptext">Enable logging BLE RX messages.
Uses lots of bandwidth.</span></p>
</td>
<td>
<label class="switch"><input type="checkbox" name="logComm" id="logComm"><span
class="slider"></span></label>
</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -334,7 +330,6 @@ <h2>
document.getElementById("stepperDir").checked = obj.stepperDir;
document.getElementById("shifterDir").checked = obj.shifterDir;
document.getElementById("udpLogEnabled").checked = !!obj.udpLogEnabled;
document.getElementById("logComm").checked = !!obj.logComm;
updateSlider(document.getElementById("shiftStep").value, document.getElementById("shiftStepValue"));
updateSlider(document.getElementById("inclineMultiplier").value, document.getElementById("inclineMultiplierValue"));
updateSlider(document.getElementById("ERGSensitivity").value, document.getElementById("ERGSensitivityValue"));
Expand Down
4 changes: 0 additions & 4 deletions include/SmartSpin_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class userParameters {
bool stepperDir;
bool shifterDir;
bool udpLogEnabled = false;
bool logComm = false;

String ssid;
String password;
Expand Down Expand Up @@ -192,9 +191,6 @@ class userParameters {
void setUdpLogEnabled(bool enabled) { udpLogEnabled = enabled; }
bool getUdpLogEnabled() { return udpLogEnabled; }

void setLogComm(bool lgcm) { logComm = lgcm; }
bool getLogComm() { return logComm; }

void setFoundDevices(String fdv) { foundDevices = fdv; }
const char* getFoundDevices() { return foundDevices.c_str(); }

Expand Down
5 changes: 0 additions & 5 deletions src/HTTP_Server_Basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,6 @@ void HTTP_Server::settingsProcessor() {
} else if (wasSettingsUpdate) {
userConfig->setUdpLogEnabled(false);
}
if (!server.arg("logComm").isEmpty()) {
userConfig->setLogComm(true);
} else if (wasSettingsUpdate) {
userConfig->setLogComm(false);
}
if (!server.arg("stealthChop").isEmpty()) {
userConfig->setStealthChop(true);
ss2k->updateStealthChop();
Expand Down
8 changes: 3 additions & 5 deletions src/SensorCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ void collectAndSet(NimBLEUUID charUUID, NimBLEUUID serviceUUID, NimBLEAddress ad
}
}
strncat(logBuf + logBufLength, " ]", kLogBufMaxLength - logBufLength);
if (userConfig->getLogComm()) {
SS2K_LOG(BLE_COMMON_LOG_TAG, "%s", logBuf);
} else {
SS2K_LOG(BLE_COMMON_LOG_TAG, "rx %s", sensorData->getId().c_str());
}

SS2K_LOG(BLE_COMMON_LOG_TAG, "%s", logBuf);

#ifdef USE_TELEGRAM
SEND_TO_TELEGRAM(String(logBuf));
#endif
Expand Down
6 changes: 0 additions & 6 deletions src/SmartSpin_parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ void userParameters::setDefaults() {
stepperDir = true;
shifterDir = true;
udpLogEnabled = false;
logComm = false;
}

//---------------------------------------------------------------------------------
Expand Down Expand Up @@ -101,7 +100,6 @@ String userParameters::returnJSON() {
doc["shifterDir"] = shifterDir;
doc["stepperDir"] = stepperDir;
doc["udpLogEnabled"] = udpLogEnabled;
doc["logComm"] = logComm;

String output;
serializeJson(doc, output);
Expand Down Expand Up @@ -150,7 +148,6 @@ void userParameters::saveToLittleFS() {
doc["shifterDir"] = shifterDir;
doc["stepperDir"] = stepperDir;
doc["udpLogEnabled"] = udpLogEnabled;
doc["logComm"] = logComm;

// Serialize JSON to file
if (serializeJson(doc, file) == 0) {
Expand Down Expand Up @@ -218,9 +215,6 @@ void userParameters::loadFromLittleFS() {
if (!doc["udpLogEnabled"].isNull()) {
setUdpLogEnabled(doc["udpLogEnabled"]);
}
if (!doc["logComm"].isNull()) {
setLogComm(doc["logComm"]);
}
if (doc["powerCorrectionFactor"]) {
setPowerCorrectionFactor(doc["powerCorrectionFactor"]);
if ((getPowerCorrectionFactor() < MIN_PCF) || (getPowerCorrectionFactor() > MAX_PCF)) {
Expand Down

0 comments on commit e9999a6

Please sign in to comment.