Skip to content

Commit db76351

Browse files
committed
gps_page: enable if gps enabled
1 parent 76aa7cf commit db76351

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

examples/companion_radio/ui-new/UITask.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class HomeScreen : public UIScreen {
7575
RADIO,
7676
BLUETOOTH,
7777
ADVERT,
78-
#if UI_GPS_PAGE == 1
78+
#if ENV_INCLUDE_GPS == 1
7979
GPS,
8080
#endif
8181
#if UI_SENSORS_PAGE == 1
@@ -173,7 +173,7 @@ class HomeScreen : public UIScreen {
173173

174174
// curr page indicator
175175
int y = 14;
176-
int x = display.width() / 2 - 25;
176+
int x = display.width() / 2 - 5 * (HomePage::Count-1);
177177
for (uint8_t i = 0; i < HomePage::Count; i++, x += 10) {
178178
if (i == _page) {
179179
display.fillRect(x-1, y-1, 3, 3);
@@ -253,7 +253,7 @@ class HomeScreen : public UIScreen {
253253
display.setColor(DisplayDriver::GREEN);
254254
display.drawXbm((display.width() - 32) / 2, 18, advert_icon, 32, 32);
255255
display.drawTextCentered(display.width() / 2, 64 - 11, "advert: " PRESS_LABEL);
256-
#if UI_GPS_PAGE == 1
256+
#if ENV_INCLUDE_GPS == 1
257257
} else if (_page == HomePage::GPS) {
258258
LocationProvider* nmea = sensors.getLocationProvider();
259259
int y = 18;
@@ -408,7 +408,7 @@ class HomeScreen : public UIScreen {
408408
}
409409
return true;
410410
}
411-
#if UI_GPS_PAGE == 1
411+
#if ENV_INCLUDE_GPS == 1
412412
if (c == KEY_ENTER && _page == HomePage::GPS) {
413413
_task->toggleGPS();
414414
return true;

variants/wio-tracker-l1-eink/platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ build_flags = ${WioTrackerL1Eink.build_flags}
5555
; -D MESH_DEBUG=1
5656
-D UI_RECENT_LIST_SIZE=6
5757
-D UI_SENSORS_PAGE=1
58-
-D UI_GPS_PAGE=1
5958
build_src_filter = ${WioTrackerL1Eink.build_src_filter}
6059
+<helpers/nrf52/SerialBLEInterface.cpp>
6160
+<helpers/ui/MomentaryButton.cpp>

0 commit comments

Comments
 (0)