Skip to content

Commit

Permalink
Merge pull request #4 from bmorcelli/main
Browse files Browse the repository at this point in the history
Update display.cpp
  • Loading branch information
bmorcelli authored May 7, 2024
2 parents b5f0ceb + cdf2406 commit eceb24f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/display.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "display.h"
#include "mykeyboard.h"
#include "wg.h" //for is_connected to print wireguard lock
#include "wg.h" //for isConnectedWireguard to print wireguard lock

#if defined(CARDPUTER) || defined(STICK_C_PLUS2) //Battery Calculation
#include <driver/adc.h>
Expand Down Expand Up @@ -341,7 +341,7 @@ void drawMainMenu(int index) {
int i=0;
if(wifiConnected) { drawWifiSmall(WIDTH - 90, 7); i++;} //Draw Wifi Symbol beside battery
if(BLEConnected) { drawBLESmall(WIDTH - (90 + 20*i), 7); i++; } //Draw BLE beside Wifi
if(is_connected) { drawWireguardStatus(WIDTH - (90 + 21*i), 7); i++; }//Draw Wg bedide BLE, if the others exist, if not, beside battery
if(isConnectedWireguard) { drawWireguardStatus(WIDTH - (90 + 21*i), 7); i++; }//Draw Wg bedide BLE, if the others exist, if not, beside battery


tft.drawRoundRect(5, 5, WIDTH - 10, HEIGHT - 10, 5, FGCOLOR);
Expand Down Expand Up @@ -412,7 +412,7 @@ void drawBatteryStatus() {
void drawWireguardStatus(int x, int y) {
draw.deleteSprite();
draw.createSprite(20,17);
if(is_connected){
if(isConnectedWireguard){
draw.drawRoundRect(10, 0, 10, 16, 5, TFT_GREEN);
draw.fillRoundRect(10, 12, 10, 5, 0, TFT_GREEN);
} else {
Expand Down

0 comments on commit eceb24f

Please sign in to comment.