Skip to content

Commit

Permalink
Remove experimental code
Browse files Browse the repository at this point in the history
  • Loading branch information
thebentern committed Oct 5, 2023
1 parent 303016b commit 48a8548
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
6 changes: 0 additions & 6 deletions src/mesh/RadioLibInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ bool RadioLibInterface::canSendImmediately()
/// bluetooth comms code. If the txmit queue is empty it might return an error
ErrorCode RadioLibInterface::send(meshtastic_MeshPacket *p)
{
setCpuHighPower();
#ifndef DISABLE_WELCOME_UNSET

if (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_UNSET) {
Expand Down Expand Up @@ -303,11 +302,6 @@ void RadioLibInterface::completeSending()
// We are done sending that packet, release it
packetPool.release(p);
// LOG_DEBUG("Done with send\n");
#ifdef ARCH_NRF52
//if (config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) {
setCpuLowPower();
//}
#endif
}
}

Expand Down
30 changes: 1 addition & 29 deletions src/mesh/RadioLibInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "MeshPacketQueue.h"
#include "RadioInterface.h"
#include "concurrency/NotifiedWorkerThread.h"
#include "main.h"
#include "target_specific.h"

#include <RadioLib.h>

Expand Down Expand Up @@ -178,30 +176,4 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified
virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) = 0;

virtual void setStandby() = 0;

void setCpuLowPower()
{
// This may cause crashes as debug messages continue to flow.
// Serial.end();

// #ifdef PIN_SERIAL_RX1
// Serial1.end();
// #endif
setBluetoothEnable(false);

#ifdef RAK4630
#ifdef PIN_3V3_EN
digitalWrite(PIN_3V3_EN, LOW);
#endif
#ifndef USE_EINK
// RAK-12039 set pin for Air quality sensor
digitalWrite(AQ_SET_PIN, LOW);
#endif
#endif
sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
}

void setCpuHighPower() {
sd_power_mode_set(NRF_POWER_MODE_CONSTLAT);
}
};
};

0 comments on commit 48a8548

Please sign in to comment.