应该支持C++11:
root@jimmy:/opt/LVGLBuilder# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
楼主在什么平台用什么Qt 版本编译的, 我用Ubuntu18.04 Qt5.9.5 一堆错误
这样修正了一些:
diff --git a/LVGLObject.cpp b/LVGLObject.cpp
index 57bca92..2e28b13 100644
--- a/LVGLObject.cpp
+++ b/LVGLObject.cpp
@@ -3,6 +3,7 @@
#include "LVGLCore.h"
#include <QJsonArray>
+#include <assert.h>
LVGLObject::LVGLObject(const LVGLWidget *widgetClass, QString name, LVGLObject *parent)
: m_obj(widgetClass->newObject(parent->obj())), m_widgetClass(widgetClass)
diff --git a/LVGLProject.cpp b/LVGLProject.cpp
index b2ba85c..e9ce218 100644
--- a/LVGLProject.cpp
+++ b/LVGLProject.cpp
@@ -6,6 +6,7 @@
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
+#include <assert.h>
#include "LVGLCore.h"
#include "LVGLObject.h"
diff --git a/freetype/builds/unix/ftsystem.c b/freetype/builds/unix/ftsystem.c
index 826713f..8ba5600 100644
--- a/freetype/builds/unix/ftsystem.c
+++ b/freetype/builds/unix/ftsystem.c
@@ -19,6 +19,9 @@
#include <ft2build.h>
/* we use our special ftconfig.h file, not the standard one */
#include <ftconfig.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
#include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
diff --git a/freetype/freetype.pri b/freetype/freetype.pri
index 52a036a..a3f8a46 100644
--- a/freetype/freetype.pri
+++ b/freetype/freetype.pri
@@ -57,3 +57,5 @@ win32 {
}
DEFINES += FT2_BUILD_LIBRARY
+
+INCLUDEPATH += $$PWD/include/freetype/config/
但是还是有一个错误, 不知道如何解决:
root@jimmy:/opt/LVGLBuilder# make
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DFT_CONFIG_OPTION_ERROR_STRINGS -DFT2_BUILD_LIBRARY -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Ilvgl -Ifreetype/include -Ifreetype/builds/unix -Ifreetype/include/freetype/config -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibuild/moc -isystem /usr/include/libdrm -Ibuild/ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o build/obj/LVGLProject.o LVGLProject.cpp
LVGLProject.cpp: In static member function ‘static LVGLProject* LVGLProject::load(const QString&)’:
LVGLProject.cpp:42:27: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [5]’)
QJsonObject lvglObj = doc["lvgl"].toObject();
^
LVGLProject.cpp:46:27: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [7]’)
QJsonArray imageArr = doc["images"].toArray();
^
LVGLProject.cpp:52:26: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [6]’)
QJsonArray fontArr = doc["fonts"].toArray();
^
Makefile:6064: recipe for target 'build/obj/LVGLProject.o' failed
make: *** [build/obj/LVGLProject.o] Error 1
root@jimmy:/opt/LVGLBuilder#
看下晕哥这个帖子: https://whycan.cn/t_397.html
終於解決registered sensor subdev 同找到OV5640 sensor.
但還有新問題 [VFE_WARN] Nobody is waiting on this video buffer,buf = xxxx. 是什麼問題?
前面那个问题是怎么解决的?
硬件IO中断的 demo: https://whycan.cn/t_1261.html
/usr/bin/make all-recursive
make[10]: Entering directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
make[11]: Entering directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/dirname-lgpl.c
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/basename-lgpl.c
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/stripslash.c
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/localcharset.c
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/malloca.c
../.././../gnulib/import/localcharset.c: In function 'get_charset_aliases':
../.././../gnulib/import/localcharset.c:172:34: error: 'HAVE_WORKING_O_NOFOLLOW' undeclared (first use in this function)
O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
^
../.././../gnulib/import/localcharset.c:172:34: note: each undeclared identifier is reported only once for each function it appears in
make[11]: *** [localcharset.o] Error 1
make[11]: *** Waiting for unfinished jobs....
make[11]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
make[10]: *** [all-recursive] Error 1
make[10]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
make[9]: *** [all] Error 2
make[9]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
make[8]: *** [subdir_do] Error 1
make[8]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver'
make[7]: *** [all] Error 2
make[7]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver'
make[6]: *** [subdir_do] Error 1
make[6]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver'
make[5]: *** [all-lib] Error 2
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver'
make[4]: *** [subdir_do] Error 1
make[4]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb'
make[2]: *** [all-gdb] Error 2
make[2]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1'
make: *** [/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/.stamp_built] Error 2
请教这个错误是什么问题造成的呢?
localcharset.c:172:34: error: 'HAVE_WORKING_O_NOFOLLOW' undeclared (first use in this function)
先把 wifi 账号密码硬编码到固件吧
RT-Thread已率先发布GD32V BSP:
https://github.com/RT-Thread/rt-thread/tree/master/bsp/gd32vf103v-eval
我觉得可以忽略证书吧:
https://blog.csdn.net/bytxl/article/details/46989667
curl wget 不验证证书进行https请求:
wget 'https://x.x.x.x/get_ips' --no-check-certificate
curl 'https://x.x.x.x/get_ips' -k
谢谢, 有空我用 JLINK 试一试!
这类题目可以先考虑交点的数值。设所有点横向顺序为a到h。
首先可以确定,第一行中间的点有三条线,则必有三组数满足x+y=14-b,枚举后可以发现只有5和7满足要求。
进一步可以验证b=5时三组数分别是(1,8),(2,7),(3,6),g为4。
b=7时三组数分别是(1,6),(2,5),(3,4),g为8。
之后考虑剩下的三个交点。把所有可能的情况加起来,可以得到
(a+b+c)+(b+d+f)+(b+e+h)+(a+d+g)+(c+e+g)
=(a+b+c+d+e+f+g+h)+(a+2*b+c+d+e+g)
=(1+2+3+4+5+6+7+8)+(a+b+c)+(b+e)+(d+e)
=36+14+(b+e)+(d+e)=14*5=70
因此(b+e)+(d+e)=20,代入可以求出所有解。
点赞点赞
debounce-delay-ms 这个去抖延迟时间 100ms 感觉有点太大了, 改小试一试了。
https://e2echina.ti.com/question_answer/dsp_arm/sitara_arm/f/25/t/134142
这个才 5ms
晕哥 说:605364021 说:https://github.com/tinyalsa/tinyalsa
这个是tinyalsa源码?把头文件和C文件加入到QT程序中一起编译吗?对的,就是这个!
晕哥能简单说下怎么把源码加进QT项目一起编译吗?谢谢
直接把源码加进去,
见错改错,应该只会有很少错.
设置好声卡参数, 然后调用 play_sample() 播放内存数据即可。
https://github.com/tinyalsa/tinyalsa/blob/master/utils/tinyplay.c