Skip to content

Commit

Permalink
Merge pull request #469 from mc-hamster/master
Browse files Browse the repository at this point in the history
 Switched to esp32_https_server from the Espressif (Issue #452) and Enable RX LNA (#466)
  • Loading branch information
mc-hamster authored Oct 11, 2020
2 parents 3d21794 + d39cc3d commit 76b4be3
Show file tree
Hide file tree
Showing 8 changed files with 264 additions and 110 deletions.
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ lib_deps =
https://github.com/meshtastic/RadioLib.git#8657380241bce681c33aab46598bbf13b11f876c
https://github.com/meshtastic/TinyGPSPlus.git
https://github.com/meshtastic/AXP202X_Library.git#8404abb6d4b486748636bc6ad72d2a47baaf5460
https://github.com/meshtastic/esp32_https_server.git
Wire ; explicitly needed here because the AXP202 library forgets to add it
SPI
https://github.com/geeksville/ArduinoThread.git#333ffd09b596977c217ba25da4258f588b462ac6
Expand Down
3 changes: 3 additions & 0 deletions src/PowerFSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ static void powerEnter()
{
screen->setOn(true);
setBluetoothEnable(true);
setCPUFast(true); // Set CPU to 240mhz when we're plugged in to wall power.
}

static void onEnter()
Expand All @@ -140,6 +141,7 @@ static void onEnter()
service.sendNetworkPing(displayedNodeNum, true); // Refresh the currently displayed node
lastPingMs = now;
}

}

static void screenPress()
Expand All @@ -157,6 +159,7 @@ State stateSERIAL(serialEnter, NULL, NULL, "SERIAL");
State stateBOOT(bootEnter, NULL, NULL, "BOOT");
State stateON(onEnter, NULL, NULL, "ON");
State statePOWER(powerEnter, NULL, NULL, "POWER");

Fsm powerFSM(&stateBOOT);

void PowerFSM_setup()
Expand Down
6 changes: 6 additions & 0 deletions src/graphics/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,12 @@ void DebugInfo::drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *stat
String(days) + "d " + (hours < 10 ? "0" : "") + String(hours) + ":" + (minutes < 10 ? "0" : "") +
String(minutes) + ":" + (seconds < 10 ? "0" : "") + String(seconds));

#ifndef NO_ESP32
// Show CPU Frequency.
display->drawString(x + SCREEN_WIDTH - display->getStringWidth("CPU " + String(getCpuFrequencyMhz()) + "MHz"), y + FONT_HEIGHT * 1,
"CPU " + String(getCpuFrequencyMhz()) + "MHz");
#endif

// Line 3
drawGPSAltitude(display, x, y + FONT_HEIGHT * 2, gpsStatus);

Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ void setup()

// Initialize Wifi
initWifi();


if (!rIf)
recordCriticalError(ErrNoRadio);
Expand Down
4 changes: 2 additions & 2 deletions src/mesh/SX1262Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ bool SX1262Interface::reconfigure()
assert(err == ERR_NONE);

// Hmm - seems to lower SNR when the signal levels are high. Leaving off for now...
// err = lora.setRxGain(true);
// assert(err == ERR_NONE);
err = lora.setRxGain(true);
assert(err == ERR_NONE);

err = lora.setSyncWord(syncWord);
assert(err == ERR_NONE);
Expand Down
Loading

0 comments on commit 76b4be3

Please sign in to comment.