New display pages feature added
This commit is contained in:
parent
084cf50792
commit
41db662627
@ -46,7 +46,7 @@ Depending on board hardware following features are supported:
|
|||||||
- LED (shows power & status)
|
- LED (shows power & status)
|
||||||
- OLED Display (shows detailed status)
|
- OLED Display (shows detailed status)
|
||||||
- RGB LED (shows colorized status)
|
- RGB LED (shows colorized status)
|
||||||
- Button
|
- Button (used to flip display pages if device has display, else sends alarm message)
|
||||||
- Silicon unique ID
|
- Silicon unique ID
|
||||||
- Battery voltage monitoring
|
- Battery voltage monitoring
|
||||||
- GPS (Generic serial NMEA, or Quectel L76 I2C)
|
- GPS (Generic serial NMEA, or Quectel L76 I2C)
|
||||||
@ -140,6 +140,10 @@ Paxcounter generates identifiers for sniffed MAC adresses and collects them temp
|
|||||||
- Red long blink: LoRaWAN stack error
|
- Red long blink: LoRaWAN stack error
|
||||||
- White long blink: Known Beacon detected
|
- White long blink: Known Beacon detected
|
||||||
|
|
||||||
|
# Display
|
||||||
|
|
||||||
|
If you're using a device with OLED display, or if you add such one to the I2C bus, the device shows live data on the display. You can flip between pages showing pax, time and gps data by pressing the button of the device.
|
||||||
|
|
||||||
# Sensors and Peripherals
|
# Sensors and Peripherals
|
||||||
|
|
||||||
You can add up to 3 user defined sensors. Insert sensor's payload scheme in [*sensors.cpp*](src/sensors.cpp). Bosch BME280 / BME680 environment sensors are supported. Enable *flag lib_deps_sensors* for your board in [*platformio.ini*](src/platformio.ini) and configure BME in board's hal file before build. If you need Bosch's proprietary BSEC libraray (e.g. to get indoor air quality value from BME680) further enable *build_flags_sensors*, which comes on the price of reduced RAM and increased build size. RTC DS3231, generic serial NMEA GPS, I2C LoPy GPS are supported, and to be configured in board's hal file. See [*generic.h*](src/hal/generic.h) for all options.
|
You can add up to 3 user defined sensors. Insert sensor's payload scheme in [*sensors.cpp*](src/sensors.cpp). Bosch BME280 / BME680 environment sensors are supported. Enable *flag lib_deps_sensors* for your board in [*platformio.ini*](src/platformio.ini) and configure BME in board's hal file before build. If you need Bosch's proprietary BSEC libraray (e.g. to get indoor air quality value from BME680) further enable *build_flags_sensors*, which comes on the price of reduced RAM and increased build size. RTC DS3231, generic serial NMEA GPS, I2C LoPy GPS are supported, and to be configured in board's hal file. See [*generic.h*](src/hal/generic.h) for all options.
|
||||||
|
@ -166,6 +166,7 @@ void draw_page(time_t t, uint8_t page) {
|
|||||||
|
|
||||||
char timeState, buff[16];
|
char timeState, buff[16];
|
||||||
uint8_t msgWaiting;
|
uint8_t msgWaiting;
|
||||||
|
static bool wasnofix = true;
|
||||||
|
|
||||||
switch (page % DISPLAY_PAGES) {
|
switch (page % DISPLAY_PAGES) {
|
||||||
|
|
||||||
@ -306,16 +307,28 @@ void draw_page(time_t t, uint8_t page) {
|
|||||||
|
|
||||||
#if (HAS_GPS)
|
#if (HAS_GPS)
|
||||||
if (gps.location.age() < 1500) {
|
if (gps.location.age() < 1500) {
|
||||||
|
// line 5: clear "No fix"
|
||||||
|
if (wasnofix) {
|
||||||
|
snprintf(buff, sizeof(buff), " ");
|
||||||
|
u8x8.draw2x2String(2, 5, buff);
|
||||||
|
wasnofix = false;
|
||||||
|
}
|
||||||
// line 3-4: GPS latitude
|
// line 3-4: GPS latitude
|
||||||
snprintf(buff, sizeof(buff), "%-02.4f", gps.location.lat());
|
snprintf(buff, sizeof(buff), "%c%-07.4f",
|
||||||
|
gps.location.rawLat().negative ? 'S' : 'N', gps.location.lat());
|
||||||
u8x8.draw2x2String(0, 3, buff);
|
u8x8.draw2x2String(0, 3, buff);
|
||||||
|
|
||||||
// line 6-7: GPS longitude
|
// line 6-7: GPS longitude
|
||||||
snprintf(buff, sizeof(buff), "%-03.4f", gps.location.lng());
|
snprintf(buff, sizeof(buff), "%c%-07.4f",
|
||||||
|
gps.location.rawLat().negative ? 'W' : 'E', gps.location.lng());
|
||||||
u8x8.draw2x2String(0, 6, buff);
|
u8x8.draw2x2String(0, 6, buff);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
snprintf(buff, sizeof(buff), "No fix");
|
snprintf(buff, sizeof(buff), "No fix");
|
||||||
|
u8x8.setInverseFont(1);
|
||||||
u8x8.draw2x2String(2, 5, buff);
|
u8x8.draw2x2String(2, 5, buff);
|
||||||
|
u8x8.setInverseFont(0);
|
||||||
|
wasnofix = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user