Move to Qt5 and Qt5Multimedia
This commit is contained in:
+13
-12
@@ -11,76 +11,77 @@ cd -
|
||||
mkdir build || true
|
||||
cd build
|
||||
|
||||
COMMON_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/opt/qt55"
|
||||
|
||||
# Companion
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} ${SRCDIR}
|
||||
make -j2
|
||||
|
||||
# OpenTX on 9X stock with FrSky telemetry
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=9X -DHELI=YES -DEXT=FRSKY ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=9X -DHELI=YES -DEXT=FRSKY ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
make -j2 gtests ; ./gtests
|
||||
|
||||
# OpenTX on 9X stock with Mavlink telemetry
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=9X -DHELI=YES -DEXT=MAVLINK ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=9X -DHELI=YES -DEXT=MAVLINK ${SRCDIR}
|
||||
make -j2 firmware
|
||||
|
||||
# OpenTX on Mega2560
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=MEGA2560 -DHELI=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=MEGA2560 -DHELI=YES ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
make -j2 gtests ; ./gtests
|
||||
|
||||
# OpenTX on Mega2560 with Mavlink telemetry
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=MEGA2560 -DEXT=MAVLINK -DHELI=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=MEGA2560 -DEXT=MAVLINK -DHELI=YES ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
make -j2 gtests ; ./gtests
|
||||
|
||||
# OpenTX on gruvin9x board
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=GRUVIN9X -DHELI=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=GRUVIN9X -DHELI=YES ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
make -j2 gtests ; ./gtests
|
||||
|
||||
# OpenTX on Sky9x
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=SKY9X -DHELI=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=SKY9X -DHELI=YES ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
make -j2 gtests ; ./gtests
|
||||
|
||||
# OpenTX on Taranis
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=TARANIS -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
make -j2 gtests ; ./gtests
|
||||
|
||||
# OpenTX on Taranis X9E
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS -DPCBREV=REV9E -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=TARANIS -DPCBREV=REV9E -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
make -j2 gtests ; ./gtests
|
||||
|
||||
# OpenTX on Taranis Plus
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS -DPCBREV=REVPLUS -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=TARANIS -DPCBREV=REVPLUS -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
make -j2 gtests ; ./gtests
|
||||
|
||||
# OpenTX on Horus
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=HORUS -DHELI=NO -DUSB=SERIAL -DCLI=YES -DDEBUG=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=HORUS -DHELI=NO -DUSB=SERIAL -DCLI=YES -DDEBUG=YES ${SRCDIR}
|
||||
make -j2 firmware
|
||||
make -j2 simu
|
||||
#make -j2 gtests ; ./gtests
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import clang.cindex
|
||||
|
||||
@@ -7,21 +9,21 @@ structs = []
|
||||
|
||||
def build_struct(cursor):
|
||||
structs.append(cursor.spelling)
|
||||
print "template <class A, class B>\nvoid copy%s(A * dest, B * src)\n{" % cursor.spelling
|
||||
print("template <class A, class B>\nvoid copy%s(A * dest, B * src)\n{" % cursor.spelling)
|
||||
for c in cursor.get_children():
|
||||
if c.kind == clang.cindex.CursorKind.FIELD_DECL:
|
||||
if c.type.get_array_size() > 0:
|
||||
if c.type.get_array_element_type().spelling in structs:
|
||||
print " for (int i=0; i<%d; i++) {" % c.type.get_array_size()
|
||||
print " copy%s(&dest->%s[i], &src->%s[i]);" % (c.type.get_array_element_type().spelling, c.spelling, c.spelling)
|
||||
print " }"
|
||||
print(" for (int i=0; i<%d; i++) {" % c.type.get_array_size())
|
||||
print(" copy%s(&dest->%s[i], &src->%s[i]);" % (c.type.get_array_element_type().spelling, c.spelling, c.spelling))
|
||||
print(" }")
|
||||
else:
|
||||
print " memcpy(&dest->%s, &src->%s, sizeof(dest->%s));" % (c.spelling, c.spelling, c.spelling)
|
||||
print(" memcpy(&dest->%s, &src->%s, sizeof(dest->%s));" % (c.spelling, c.spelling, c.spelling))
|
||||
elif c.type.get_declaration().spelling in structs:
|
||||
print " copy%s(&dest->%s, &src->%s);" % (c.type.get_declaration().spelling, c.spelling, c.spelling)
|
||||
print(" copy%s(&dest->%s, &src->%s);" % (c.type.get_declaration().spelling, c.spelling, c.spelling))
|
||||
else:
|
||||
print " dest->%s = src->%s;" % (c.spelling, c.spelling)
|
||||
print "}\n"
|
||||
print(" dest->%s = src->%s;" % (c.spelling, c.spelling))
|
||||
print("}\n")
|
||||
|
||||
def build(cursor):
|
||||
result = []
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
from PyQt4 import Qt, QtGui
|
||||
try:
|
||||
from PyQt5 import Qt, QtGui
|
||||
except:
|
||||
from PyQt4 import Qt, QtGui
|
||||
|
||||
image = QtGui.QImage(sys.argv[1])
|
||||
width, height = image.size().width(), image.size().height()
|
||||
|
||||
Reference in New Issue
Block a user