Skip to content

Commit

Permalink
Cleanups (#345)
Browse files Browse the repository at this point in the history
* Mark two functions and one variable static

These are not used or referenced outside the file they are defined in,
so give the compiler a better chance to optimize the code.

* Remove unused global variables
  • Loading branch information
toofishes authored Apr 19, 2022
1 parent a7109bd commit 06e4859
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@

#include "RapiSender.h"

int espflash = 0;
int espfree = 0;

long current_scale = 0;
long current_offset = 0;

class InputTask : public MicroTasks::Task
{
private:
Expand Down
4 changes: 2 additions & 2 deletions src/net_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static bool eth_connected = false;
// Start Access Point
// Access point is used for wifi network selection
// -------------------------------------------------------------------
void
static void
startAP() {
DBUGLN("Starting AP");

Expand Down Expand Up @@ -105,7 +105,7 @@ startAP() {
// -------------------------------------------------------------------
// Start Client, attempt to connect to Wifi network
// -------------------------------------------------------------------
void
static void
startClient()
{
DEBUG.print("Connecting to SSID: ");
Expand Down
2 changes: 1 addition & 1 deletion src/ohm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#endif

String ohm_hour = "NotConnected";
int evse_sleep = 0;
static int evse_sleep = 0;

static MongooseHttpClient client;

Expand Down

0 comments on commit 06e4859

Please sign in to comment.