Skip to content

Commit

Permalink
Merge pull request #146 from jgauchia/136-update-libraries
Browse files Browse the repository at this point in the history
136 update libraries
  • Loading branch information
jgauchia authored Jun 15, 2024
2 parents c679018 + 862db34 commit 1fff229
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
2 changes: 0 additions & 2 deletions lib/gps/gps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ TinyGPSPlus GPS = TinyGPSPlus();
TinyGPSCustom pdop(GPS, PSTR("GNGSA"), 15); // $GNGSA sentence, 15th element
TinyGPSCustom hdop(GPS, PSTR("GNGSA"), 16); // $GNGSA sentence, 16th element
TinyGPSCustom vdop(GPS, PSTR("GNGSA"), 17); // $GNGSA sentence, 17th element
TinyGPSCustom fix(GPS, PSTR("GNGGA"), 6);
TinyGPSCustom fixMode(GPS, PSTR("GNGSA"), 2);

GSV GPS_GSV; // GPS Satellites in view
Expand All @@ -32,7 +31,6 @@ GSV BD_GSV; // BEIDOU Satellites in view
TinyGPSCustom pdop(GPS, PSTR("GPGSA"), 15); // $GPGSA sentence, 15th element
TinyGPSCustom hdop(GPS, PSTR("GPGSA"), 16); // $GPGSA sentence, 16th element
TinyGPSCustom vdop(GPS, PSTR("GPGSA"), 17); // $GPGSA sentence, 17th element
TinyGPSCustom fix(GPS, PSTR("GPGGA"), 6);
TinyGPSCustom fixMode(GPS, PSTR("GPGSA"), 2);

GSV GPS_GSV; // GPS Satellites in view
Expand Down
2 changes: 0 additions & 2 deletions lib/gps/gps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ struct GSV
extern TinyGPSCustom pdop; // $GNGSA sentence, 15th element
extern TinyGPSCustom hdop; // $GNGSA sentence, 16th element
extern TinyGPSCustom vdop; // $GNGSA sentence, 17th element
extern TinyGPSCustom fix;
extern TinyGPSCustom fixMode;

extern GSV GPS_GSV; // GPS Satellites in view
Expand All @@ -65,7 +64,6 @@ struct GSV
extern TinyGPSCustom pdop; // $GPGSA sentence, 15th element
extern TinyGPSCustom hdop; // $GPGSA sentence, 16th element
extern TinyGPSCustom vdop; // $GPGSA sentence, 17th element
extern TinyGPSCustom fix;
extern TinyGPSCustom fixMode;

extern GSV GPS_GSV; // GPS Satellites in view
Expand Down
35 changes: 20 additions & 15 deletions lib/gui/src/notifyBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,27 @@ void updateNotifyBarTimer(lv_timer_t *t)
lv_obj_send_event(gpsTime, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_send_event(gpsCount, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_send_event(gpsFixMode, LV_EVENT_VALUE_CHANGED, NULL);
switch (atoi(fix.value()))

if (GPS.location.isValid())
{
case 0:
lv_led_off(gpsFix);
break;
case 1:
lv_led_toggle(gpsFix);
break;
case 2:
lv_led_toggle(gpsFix);
break;
default:
lv_led_off(gpsFix);
break;
switch (GPS.location.FixQuality())
{
case '0':
lv_led_off(gpsFix);
break;
case '1':
lv_led_toggle(gpsFix);
break;
case '2':
lv_led_toggle(gpsFix);
break;
default:
lv_led_off(gpsFix);
break;
}
}
else
lv_led_off(gpsFix);

#ifdef ENABLE_BME
tempValue = (uint8_t)(bme.readTemperature());
Expand Down Expand Up @@ -173,7 +178,7 @@ void createNotifyBar()
lv_led_off(gpsFix);

gpsFixMode = lv_label_create(notifyBarIcons);
lv_obj_set_style_text_font(gpsFixMode, &lv_font_montserrat_10, 0);
lv_obj_set_style_text_font(gpsFixMode, fontSmall, 0);
lv_label_set_text_static(gpsFixMode, "--");
lv_obj_add_event_cb(gpsFixMode, updateNotifyBar, LV_EVENT_VALUE_CHANGED, NULL);

Expand Down
4 changes: 2 additions & 2 deletions lib/utils/src/gpsMath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <Arduino.h>
#include <stdint.h>

#define EARTH_RADIUS 6378137 // Earth Radius
#define EARTH_RADIUS 6371009 //6378137 // Earth Radius
#define METER_PER_PIXELS 156543.03 // Meters per pixels

#define DEG2RAD(a) ((a) / (180 / M_PI)) // Convert degrees to radians
Expand All @@ -29,4 +29,4 @@ float mapFloat(float x, float inMin, float inMax, float outMin, float outMax);
char *latFormatString(double lat);
char *lonFormatString(double lon);

#endif
#endif
6 changes: 3 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ default_envs = CUSTOMBOARD
platform = espressif32
framework = arduino
version = 0.1.8_dev
revision = 62
revision = 63
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
Expand All @@ -40,7 +40,7 @@ build_flags =
; -D DISABLE_CLI=1 # removed CLI module. Config via Bluetooth only

lib_deps =
mikalhart/TinyGPSPlus@^1.0.3
mikalhart/TinyGPSPlus@^1.1.0
paulstoffregen/Time@^1.6.1
lvgl/lvgl@^9.1.0
lovyan03/LovyanGFX@^1.1.16
Expand All @@ -61,7 +61,7 @@ board_build.partitions = default_16MB.csv
lib_deps =
${common.lib_deps}
adafruit/Adafruit Unified Sensor@^1.1.14
adafruit/Adafruit BusIO@^1.16.0
adafruit/Adafruit BusIO@^1.16.1
adafruit/Adafruit BME280 Library@^2.2.4
adafruit/Adafruit HMC5883 Unified@^1.2.3
build_flags =
Expand Down

0 comments on commit 1fff229

Please sign in to comment.