Skip to content

Commit

Permalink
remove whitespac, reduce cpu freq optional
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberman54 committed Jun 14, 2024
1 parent f81c106 commit 31a60ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 0 additions & 6 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ BB_SPI_LCD *dp = NULL;
#endif
#endif


#define DISPLAY_PAGE_PAX_PARAM_OVERVIEW 0
#define DISPLAY_PAGE_PAX_LORAWAN_PARAM 1
#define DISPLAY_PAGE_PAX_GPS_LAT_LONG 2
Expand All @@ -63,11 +62,6 @@ BB_SPI_LCD *dp = NULL;
#define DISPLAY_PAGE_PAX_GRAPH 6
#define DISPLAY_PAGE_BLANK_SCREEN 7






void dp_setup(int contrast) {
#if (HAS_DISPLAY) == 1 // I2C OLED

Expand Down
9 changes: 7 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ char clientId[20] = {0}; // unique ClientID
void setup() {
char features[100] = "";

// Reduce power consumption
setCpuFrequencyMhz(80);
// Reduce power consumption (optional)
// This reduces the power consumption with about 50 mWatt.
// Typically it uses 660 mWatt when the CPU frequency is set to 80 MHz.
// When left running at 240 mHz, the power consumption is about 710 - 730 mWatt.
// Higher CPU speed may be preferred for wifi & ble sniffing.
//
// setCpuFrequencyMhz(80);

// disable brownout detection
#ifdef DISABLE_BROWNOUT
Expand Down

1 comment on commit 31a60ae

@TD-er
Copy link
Contributor

@TD-er TD-er commented on 31a60ae Jun 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also note that the stated power consumption was measured on a TTGO T-beam v1.0 with SSD1306 OLED.

Please sign in to comment.