jf002 / cfgui Goto Github PK
View Code? Open in Web Editor NEWA simple GUI library for M5Stack (ESP32)
License: MIT License
A simple GUI library for M5Stack (ESP32)
License: MIT License
I have a working code that supports M5Stack Core2. A couple of things require design decisions to make the cfGUI library compatible with Core and Core2 (if both should be supported by the same code base - this is also a design decision on its own):
I am seeing these issues on the library, just wondering how to solve it
In file included from lib/cfGUI/src/Screen.h:3:0, from src/main.cpp:4: lib/cfGUI/src/Widget.h:69:12: error: 'vector' in namespace 'std' does not name a template type std::vector<Widget*> children; ^ lib/cfGUI/src/Widget.h: In member function 'virtual void Codingfield::UI::Widget::AddChild(Codingfield::UI::Widget*)': lib/cfGUI/src/Widget.h:40:47: error: 'children' was not declared in this scope virtual void AddChild(Widget* widget) { children.push_back(widget); } ^
Looks like the StatusBar is outdated against the M5stack library, the position of the parameters have changed and now it doesn't properly shows the wifi bitmap =(
hello, what library from ntpclient client did you use?
There is an issue with the order in which private fields are declared in cpp files. It's a trivial fix and will issue a PR soon. This issue is just to reference the branch name for PR and leave a trace in case someone hits the same error. Adding -Werror=reorder build flag workaround does not work for this issue.
Library Manager: M5Stack @ 0.1.9 has been installed!
Library Manager: Installing NTPClient
Library Manager: Warning! More than one package has been found by NTPClient requirements:
- arduino-libraries/NTPClient @ 3.1.0
- limiteddata/NTPClient @ 3.1.0
- mbed-dietergraef/NTPClient @ 0.0.0-alpha+sha.584a18640e84
- mbed-robot-arm-demo-team/NTPClient @ 0.0.0+sha.9a7b8df5fad7
- mbed-kkempeneers/NTPClient @ 0.0.0+sha.537dcd4ff837
- mbed-ibiltari/NTPClient @ 0.0.0+sha.f31bb718d362
- mbed-sparkfun/NTPClient @ 0.0.0+sha.881559865a93
- mbed-vpcola/NTPClient @ 0.0.0+sha.0b96fbd7cfca
- mbed-kubegmbh/NTPClient @ 0.0.0+sha.c2440e1c92cc
- mbed-lmussier/NTPClient @ 0.0.0+sha.175284afeb38
Library Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts
Library Manager: NTPClient @ 3.1.0 has been installed!
Found 29 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <M5Stack> 0.1.9
| |-- <FS> 1.0
| |-- <SPIFFS> 1.0
| | |-- <FS> 1.0
| |-- <SPI> 1.0
| |-- <Wire> 1.0.1
| |-- <SD(esp32)> 1.0.5
| | |-- <FS> 1.0
| | |-- <SPI> 1.0
|-- <NTPClient> 3.1.0
|-- <cfGUI> 0.3.0
| |-- <M5Stack> 0.1.9
| | |-- <FS> 1.0
| | |-- <SPIFFS> 1.0
| | | |-- <FS> 1.0
| | |-- <SPI> 1.0
| | |-- <Wire> 1.0.1
| | |-- <SD(esp32)> 1.0.5
| | | |-- <FS> 1.0
| | | |-- <SPI> 1.0
|-- <WiFi> 1.0
// a usual compilation output with couple of warnings removed
Compiling .pio\build\m5stack-core-esp32\lib66b\cfGUI\ressources\wifi3.c.o
lib\cfGUI\src\Button.cpp: In member function 'virtual void Codingfield::UI::Button::Draw()':
lib\cfGUI\src\Button.cpp:98:50: warning: 'yTitle' may be used uninitialized in this function [-Wmaybe-uninitialized]
M5.Lcd.drawString(title.c_str(), x, yTitle);
^
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\ETH.cpp.o
Archiving .pio\build\m5stack-core-esp32\libbdf\libM5Stack.a
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFi.cpp.o
In file included from lib\cfGUI\src\Widget.cpp:1:0:
lib\cfGUI\src\Widget.h: In constructor 'Codingfield::UI::Widget::Widget(Codingfield::UI::Widget*, Codingfield::UI::Point, Codingfield::UI::Size)':
lib\cfGUI\src\Widget.h:81:24: error: 'Codingfield::UI::Widget::parent' will be initialized after [-Werror=reorder]
Widget* parent = nullptr;
^
lib\cfGUI\src\Widget.h:79:13: error: 'Codingfield::UI::Point Codingfield::UI::Widget::position' [-Werror=reorder]
Point position;
^
lib\cfGUI\src\Widget.cpp:9:1: error: when initialized here [-Werror=reorder]
Widget::Widget(Widget* parent, Point position, Size size) : parent{parent}, position{position}, size {size} {
^
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFiAP.cpp.o
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFiClient.cpp.o
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFiMulti.cpp.o
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFiSTA.cpp.o
cc1plus.exe: some warnings being treated as errors
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFiScan.cpp.o
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFiServer.cpp.o
Compiling .pio\build\m5stack-core-esp32\lib5bc\WiFi\WiFiUdp.cpp.o
*** [.pio\build\m5stack-core-esp32\lib66b\cfGUI\Widget.cpp.o] Error 1
In file included from lib\cfGUI\src\WidgetMosaic.cpp:1:0:
lib\cfGUI\src\WidgetMosaic.h: In constructor 'Codingfield::UI::WidgetMosaic::WidgetMosaic(Codingfield::UI::Widget*, Codingfield::UI::Point, Codingfield::UI::Size, int32_t, int32_t)':
lib\cfGUI\src\WidgetMosaic.h:25:15: error: 'Codingfield::UI::WidgetMosaic::nbColumns' will be initialized after [-Werror=reorder]
int32_t nbColumns;
^
lib\cfGUI\src\WidgetMosaic.h:24:15: error: 'int32_t Codingfield::UI::WidgetMosaic::nbRows' [-Werror=reorder]
int32_t nbRows;
^
lib\cfGUI\src\WidgetMosaic.cpp:4:1: error: when initialized here [-Werror=reorder]
WidgetMosaic::WidgetMosaic(Widget* parent, Point position, Size size, int32_t nbColumns, int32_t nbRows) : Widget(parent, position,
size),
^
cc1plus.exe: some warnings being treated as errors
*** [.pio\build\m5stack-core-esp32\lib66b\cfGUI\WidgetMosaic.cpp.o] Error 1
==================================================== [FAILED] Took 30.94 seconds ====================================================
I would like to kindly ask you to add a license to your project. As it is now, neither personal nor commercial use of your code is permitted withouth potential legal issues.
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.