Attempting to buffer
This commit is contained in:
124
Crash.log
Normal file
124
Crash.log
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
--- Terminal on /dev/ttyACM1 | 115200 8-N-1
|
||||||
|
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
|
||||||
|
--- More details at https://bit.ly/pio-monitor-filters
|
||||||
|
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
|
||||||
|
Serial initialized
|
||||||
|
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
|
||||||
|
|
||||||
|
Core 1 register dump:
|
||||||
|
PC : 0x40109528 PS : 0x00060a30 A0 : 0x80109180 A1 : 0x3ffb2180
|
||||||
|
A2 : 0x3ffb7e3c A3 : 0x00000000 A4 : 0x00000000 A5 : 0x000000f0
|
||||||
|
A6 : 0x000000f0 A7 : 0x00002104 A8 : 0x00000000 A9 : 0x00000000
|
||||||
|
A10 : 0x000000f0 A11 : 0x003fffff A12 : 0x80083c8a A13 : 0x3ffbcdc0
|
||||||
|
A14 : 0x00000001 A15 : 0x3ffb0320 SAR : 0x00000013 EXCCAUSE: 0x0000001d
|
||||||
|
EXCVADDR: 0x00000000 LBEG : 0x4008665d LEND : 0x4008666d LCOUNT : 0xfffffffb
|
||||||
|
|
||||||
|
|
||||||
|
Backtrace: 0x40109525:0x3ffb2180 0x4010917d:0x3ffb21a0 0x400d417b:0x3ffb21c0 0x400d41a1:0x3ffb21e0 0x400d2426:0x3ffb2200 0x400d2876:0x3ffb2250 0x400dac91:0x3ffb2290
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ELF file SHA256: 5a0a0b661c61d07f
|
||||||
|
|
||||||
|
Rebooting...
|
||||||
|
ets Jul 29 2019 12:21:46
|
||||||
|
|
||||||
|
rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
|
||||||
|
configsip: 0, SPIWP:0xee
|
||||||
|
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
|
||||||
|
mode:DIO, clock div:2
|
||||||
|
load:0x3fff0030,len:1184
|
||||||
|
load:0x40078000,len:13232
|
||||||
|
load:0x40080400,len:3028
|
||||||
|
entry 0x400805e4
|
||||||
|
Serial initialized
|
||||||
|
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
|
||||||
|
|
||||||
|
Core 1 register dump:
|
||||||
|
PC : 0x40109528 PS : 0x00060a30 A0 : 0x80109180 A1 : 0x3ffb2180
|
||||||
|
A2 : 0x3ffb7e3c A3 : 0x00000000 A4 : 0x00000000 A5 : 0x000000f0
|
||||||
|
A6 : 0x000000f0 A7 : 0x00002104 A8 : 0x00000000 A9 : 0x00000000
|
||||||
|
A10 : 0x000000f0 A11 : 0x003fffff A12 : 0x80083c8a A13 : 0x3ffbcdc0
|
||||||
|
A14 : 0x00000001 A15 : 0x3ffb0320 SAR : 0x00000013 EXCCAUSE: 0x0000001d
|
||||||
|
EXCVADDR: 0x00000000 LBEG : 0x4008665d LEND : 0x4008666d LCOUNT : 0xfffffffb
|
||||||
|
|
||||||
|
|
||||||
|
Backtrace: 0x40109525:0x3ffb2180 0x4010917d:0x3ffb21a0 0x400d417b:0x3ffb21c0 0x400d41a1:0x3ffb21e0 0x400d2426:0x3ffb2200 0x400d2876:0x3ffb2250 0x400dac91:0x3ffb2290
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ELF file SHA256: 5a0a0b661c61d07f
|
||||||
|
|
||||||
|
Rebooting...
|
||||||
|
ets Jul 29 2019 12:21:46
|
||||||
|
|
||||||
|
rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
|
||||||
|
configsip: 0, SPIWP:0xee
|
||||||
|
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
|
||||||
|
mode:DIO, clock div:2
|
||||||
|
load:0x3fff0030,len:1184
|
||||||
|
load:0x40078000,len:13232
|
||||||
|
load:0x40080400,len:3028
|
||||||
|
entry 0x400805e4
|
||||||
|
Serial initialized
|
||||||
|
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
|
||||||
|
|
||||||
|
Core 1 register dump:
|
||||||
|
PC : 0x40109528 PS : 0x00060a30 A0 : 0x80109180 A1 : 0x3ffb2180
|
||||||
|
A2 : 0x3ffb7e3c A3 : 0x00000000 A4 : 0x00000000 A5 : 0x000000f0
|
||||||
|
A6 : 0x000000f0 A7 : 0x00002104 A8 : 0x00000000 A9 : 0x00000000
|
||||||
|
A10 : 0x000000f0 A11 : 0x003fffff A12 : 0x80083c8a A13 : 0x3ffbcdc0
|
||||||
|
A14 : 0x00000001 A15 : 0x3ffb0320 SAR : 0x00000013 EXCCAUSE: 0x0000001d
|
||||||
|
EXCVADDR: 0x00000000 LBEG : 0x4008665d LEND : 0x4008666d LCOUNT : 0xfffffffb
|
||||||
|
|
||||||
|
|
||||||
|
Backtrace: 0x40109525:0x3ffb2180 0x4010917d:0x3ffb21a0 0x400d417b:0x3ffb21c0 0x400d41a1:0x3ffb21e0 0x400d2426:0x3ffb2200 0x400d2876:0x3ffb2250 0x400dac91:0x3ffb2290
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ELF file SHA256: 5a0a0b661c61d07f
|
||||||
|
|
||||||
|
Rebooting...
|
||||||
|
ets Jul 29 2019 12:21:46
|
||||||
|
|
||||||
|
rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
|
||||||
|
configsip: 0, SPIWP:0xee
|
||||||
|
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
|
||||||
|
mode:DIO, clock div:2
|
||||||
|
load:0x3fff0030,len:1184
|
||||||
|
load:0x40078000,len:13232
|
||||||
|
load:0x40080400,len:3028
|
||||||
|
entry 0x400805e4
|
||||||
|
Serial initialized
|
||||||
|
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
|
||||||
|
|
||||||
|
Core 1 register dump:
|
||||||
|
PC : 0x40109528 PS : 0x00060a30 A0 : 0x80109180 A1 : 0x3ffb2180
|
||||||
|
A2 : 0x3ffb7e3c A3 : 0x00000000 A4 : 0x00000000 A5 : 0x000000f0
|
||||||
|
A6 : 0x000000f0 A7 : 0x00002104 A8 : 0x00000000 A9 : 0x00000000
|
||||||
|
A10 : 0x000000f0 A11 : 0x003fffff A12 : 0x80083c8a A13 : 0x3ffbcdc0
|
||||||
|
A14 : 0x00000001 A15 : 0x3ffb0320 SAR : 0x00000013 EXCCAUSE: 0x0000001d
|
||||||
|
EXCVADDR: 0x00000000 LBEG : 0x4008665d LEND : 0x4008666d LCOUNT : 0xfffffffb
|
||||||
|
|
||||||
|
|
||||||
|
Backtrace: 0x40109525:0x3ffb2180 0x4010917d:0x3ffb21a0 0x400d417b:0x3ffb21c0 0x400d41a1:0x3ffb21e0 0x400d2426:0x3ffb2200 0x400d2876:0x3ffb2250 0x400dac91:0x3ffb2290
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ELF file SHA256: 5a0a0b661c61d07f
|
||||||
|
|
||||||
|
Rebooting...
|
||||||
|
ets Jul 29 2019 12:21:46
|
||||||
|
|
||||||
|
rst:0xc (SW_CPU_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
|
||||||
|
configsip: 0, SPIWP:0xee
|
||||||
|
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
|
||||||
|
mode:DIO, clock div:2
|
||||||
|
load:0x3fff0030,len:1184
|
||||||
|
load:0x40078000,len:13232
|
||||||
|
load:0x40080400,len:3028
|
||||||
|
entry 0x400805e4
|
||||||
@@ -12,10 +12,11 @@
|
|||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
framework = arduino
|
framework = arduino
|
||||||
upload_port = /dev/ttyACM0
|
upload_port = /dev/ttyACM1
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_port = /dev/ttyACM0
|
monitor_port = /dev/ttyACM1
|
||||||
lib_deps =
|
lib_deps =
|
||||||
tzapu/WiFiManager@^2.0.17
|
tzapu/WiFiManager@^2.0.17
|
||||||
robtillaart/FastTrig@^0.3.4
|
robtillaart/FastTrig@^0.3.4
|
||||||
olikraus/U8g2@^2.36.12
|
olikraus/U8g2@^2.36.12
|
||||||
|
adafruit/Adafruit GFX Library@^1.12.1
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <U8g2lib.h>
|
#include <U8g2lib.h>
|
||||||
#include <Arduino_GFX_Library.h>
|
#include <Arduino_GFX_Library.h>
|
||||||
#include <FastTrig.h>
|
#include <FastTrig.h>
|
||||||
|
// #include <Adafruit_GFX.h>
|
||||||
|
|
||||||
void Ticks(Arduino_GFX *gfx, uint8_t count, int16_t start_angle, int16_t end_angle, int color=RGB565_WHITE, bool enthicken=false, bool invert=false, uint16_t radius=95, uint16_t length=30) {
|
void Ticks(Arduino_GFX *gfx, uint8_t count, int16_t start_angle, int16_t end_angle, int color=RGB565_WHITE, bool enthicken=false, bool invert=false, uint16_t radius=95, uint16_t length=30) {
|
||||||
for (uint8_t i = 0; i < count; i++) {
|
for (uint8_t i = 0; i < count; i++) {
|
||||||
@@ -20,7 +21,13 @@ void Ticks(Arduino_GFX *gfx, uint8_t count, int16_t start_angle, int16_t end_ang
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gauge(Arduino_GFX *gfx, int airspeed) {
|
void gauge(Arduino_Canvas *gfx) {
|
||||||
|
gfx->fillScreen(BACKGROUND);
|
||||||
|
// TAS
|
||||||
|
gfx->fillArc(120, 120, 89, 120, 49, 130, RGB565(181, 181, 179));
|
||||||
|
gfx->fillArc(120, 120, 40, 120, -228, 49, BACKGROUND);
|
||||||
|
// TODO: insert true air speed adjusted rotating numbers here
|
||||||
|
// Main Dial
|
||||||
gfx->fillArc(120, 120, 100, 90, -60, 36, RGB565_WHITE);
|
gfx->fillArc(120, 120, 100, 90, -60, 36, RGB565_WHITE);
|
||||||
gfx->fillArc(120, 120, 90, 80, -45, 130, RGB565(90, 170, 69));
|
gfx->fillArc(120, 120, 90, 80, -45, 130, RGB565(90, 170, 69));
|
||||||
gfx->fillArc(120, 120, 90, 80, 130, 181, RGB565_YELLOW);
|
gfx->fillArc(120, 120, 90, 80, 130, 181, RGB565_YELLOW);
|
||||||
@@ -47,12 +54,27 @@ void gauge(Arduino_GFX *gfx, int airspeed) {
|
|||||||
gfx->setCursor(114+xa, 126+ya);
|
gfx->setCursor(114+xa, 126+ya);
|
||||||
gfx->print(buf);
|
gfx->print(buf);
|
||||||
}
|
}
|
||||||
|
// Titles
|
||||||
gfx->setFont(u8g2_font_t0_15b_me);
|
gfx->setFont(u8g2_font_t0_15b_me);
|
||||||
gfx->setCursor(102, 142);
|
gfx->setCursor(102, 142);
|
||||||
gfx->print("KNOTS");
|
gfx->print("KNOTS");
|
||||||
gfx->setCursor(90, 100);
|
gfx->setCursor(90, 100);
|
||||||
gfx->print("AIRSPEED");
|
gfx->print("AIRSPEED");
|
||||||
|
return;
|
||||||
gfx->fillCircle(120, 120, 6, RGB565_WHITE);
|
}
|
||||||
|
|
||||||
|
void needle(Arduino_Canvas *gfx, uint16_t airspeed) {
|
||||||
|
// Needle
|
||||||
|
const uint16_t needle_length = 100;
|
||||||
|
const uint8_t needle_width = 20;
|
||||||
|
int16_t angle = map(airspeed, GAUGE_AIRSPEED_MIN, GAUGE_AIRSPEED_MAX, -60, 182);
|
||||||
|
gfx->fillTriangle(icos(angle)*needle_length + 120, isin(angle)*needle_length + 120,
|
||||||
|
icos(angle-90)*(needle_width/2) + 120, isin(angle-90)*(needle_width/2) + 120,
|
||||||
|
icos(angle+90)*(needle_width/2) + 120, isin(angle+90)*(needle_width/2) + 120,
|
||||||
|
RGB565_RED);
|
||||||
|
gfx->fillTriangle(icos(angle-90)*(needle_width/2) + 120, isin(angle-90)*(needle_width/2) + 120,
|
||||||
|
icos(angle+90)*(needle_width/2) + 120, isin(angle+90)*(needle_width/2) + 120,
|
||||||
|
isin(angle-90)*((2*needle_width)/3) + 120, -icos(angle-90)*((2*needle_width)/3) + 120,
|
||||||
|
RGB565_RED);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#ifdef GAUGE_AIRSPEED
|
#ifdef GAUGE_AIRSPEED
|
||||||
|
|
||||||
void gauge(Arduino_GFX *gfx, int airspeed);
|
void gauge(Arduino_Canvas *gfx);
|
||||||
|
void needle(Arduino_Canvas *gfx, uint16_t airspeed);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
25
src/main.cpp
25
src/main.cpp
@@ -2,6 +2,7 @@
|
|||||||
#include <WiFiManager.h>
|
#include <WiFiManager.h>
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
|
// #include <Adafruit_GFX.h>
|
||||||
#include <Arduino_GFX_Library.h>
|
#include <Arduino_GFX_Library.h>
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -9,6 +10,9 @@
|
|||||||
|
|
||||||
Arduino_DataBus *bus = new Arduino_ESP32SPI(27, 5, 14, 15, -1, VSPI);
|
Arduino_DataBus *bus = new Arduino_ESP32SPI(27, 5, 14, 15, -1, VSPI);
|
||||||
Arduino_GFX *gfx = new Arduino_GC9A01(bus, 33, 0, true);
|
Arduino_GFX *gfx = new Arduino_GC9A01(bus, 33, 0, true);
|
||||||
|
// Arduino_GFX *canvas = new Arduino_Canvas_Indexed(240, 240, gfx, 0, 0, 0, 2);
|
||||||
|
Arduino_Canvas *canvas = new Arduino_Canvas(240, 240, gfx);
|
||||||
|
// GFXcanvas16 canvas(240, 240);
|
||||||
|
|
||||||
WiFiManager wifiManager;
|
WiFiManager wifiManager;
|
||||||
#define SW1 19
|
#define SW1 19
|
||||||
@@ -27,6 +31,7 @@ void registerWifi() {
|
|||||||
drawWifi(gfx);
|
drawWifi(gfx);
|
||||||
log("Create Access Point SSID\n");
|
log("Create Access Point SSID\n");
|
||||||
log(AP_SSID);
|
log(AP_SSID);
|
||||||
|
// canvas->flush(true);
|
||||||
wifiManager.autoConnect(AP_SSID);
|
wifiManager.autoConnect(AP_SSID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,12 +49,24 @@ void setup() {
|
|||||||
// registerWifi();
|
// registerWifi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t asa = 0;
|
||||||
void loop() {
|
void loop() {
|
||||||
if (digitalRead(SW1) == LOW) {
|
if (digitalRead(SW1) == LOW) {
|
||||||
log("Button pressed\n");
|
log("Button pressed\n");
|
||||||
}
|
}
|
||||||
gfx->fillScreen(BACKGROUND);
|
// gfx->fillScreen(BACKGROUND);
|
||||||
gauge(gfx, 50);
|
if(asa > 200) {
|
||||||
delay(10);
|
asa = 0;
|
||||||
for(;;);
|
}
|
||||||
|
delay(100);
|
||||||
|
gauge(canvas);
|
||||||
|
needle(canvas, asa);
|
||||||
|
log("Airspeed: ");
|
||||||
|
log(String(asa).c_str());
|
||||||
|
log("\n");
|
||||||
|
// gfx->draw16bitRGBBitmapWithMask();
|
||||||
|
// gfx->draw16bitRGBBitmap(0, 0, (uint16_t *)canvas->getBuffer(), 240, 240);
|
||||||
|
canvas->flush();
|
||||||
|
// delay(100);
|
||||||
|
asa += 5;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user