Skip to content

Commit

Permalink
Changed BLE specific code to conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Apr 28, 2024
1 parent eb96bdc commit 5fee282
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AppLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ void AppLayer::genPayload(uint8_t port, LoraEncoder &encoder)

void AppLayer::getPayloadStage1(uint8_t port, LoraEncoder &encoder)
{
(void)port; // suppress warning regarding unused parameter

#ifdef PIN_SUPPLY_IN
uint16_t supply_voltage = getVoltage(PIN_SUPPLY_IN, SUPPLY_SAMPLES, SUPPLY_DIV);
#endif
Expand Down Expand Up @@ -602,6 +604,7 @@ void AppLayer::getConfigPayload(uint8_t cmd, uint8_t &port, LoraEncoder &encoder
encoder.writeUint8(ws_timeout);
port = CMD_GET_WS_TIMEOUT;
}
#if defined(MITHERMOMETER_EN) || defined(THEENGSDECODER_EN)
else if (cmd == CMD_GET_BLE_CONFIG)
{
appPrefs.begin("BWS-LW-APP", false);
Expand All @@ -612,6 +615,7 @@ void AppLayer::getConfigPayload(uint8_t cmd, uint8_t &port, LoraEncoder &encoder
encoder.writeUint8(ble_scantime);
port = CMD_GET_BLE_CONFIG;
}
#endif
else if (cmd == CMD_GET_SENSORS_INC)
{
uint8_t payload[48];
Expand Down

0 comments on commit 5fee282

Please sign in to comment.