@@ -1,42 +0,0 @@
|
||||
SET SRCDIR=%~dp0%\..\..
|
||||
|
||||
cd %SRCDIR%
|
||||
git fetch
|
||||
git checkout next
|
||||
git reset --hard origin/next
|
||||
|
||||
cd ..
|
||||
rmdir build /s /q
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
SET COMMON_OPTIONS=-DCMAKE_PREFIX_PATH=C:\Qt\5.6\msvc2015 -DALLOW_NIGHTLY_BUILDS=YES -DVERSION_SUFFIX=%1 -DGVARS=YES -DHELI=YES
|
||||
SET STM32_OPTIONS=%COMMON_OPTIONS% -DLUA=YES
|
||||
|
||||
cmake %COMMON_OPTIONS% -DPCB=9X %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake %COMMON_OPTIONS% -DPCB=GRUVIN9X %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake %COMMON_OPTIONS% -DPCB=MEGA2560 %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake %COMMON_OPTIONS% -DPCB=SKY9X %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake %COMMON_OPTIONS% -DPCB=9XRPRO %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake %STM32_OPTIONS% -DPCB=TARANIS %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake %STM32_OPTIONS% -DPCB=TARANIS -DPCBREV=REVPLUS %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake %STM32_OPTIONS% -DPCB=TARANIS -DPCBREV=REV9E %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
|
||||
cmake %STM32_OPTIONS% -DPCB=HORUS %SRCDIR%
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" radio\src\targets\simu\libsimulator.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" companion\src\installer.vcxproj /t:Rebuild /p:Configuration=Release
|
||||
@@ -123,9 +123,15 @@ elif options[optcount] == "x9e":
|
||||
maxsize = 65536 * 8
|
||||
board = BOARD_TARANIS
|
||||
board_family = BOARD_FAMILY_ARM
|
||||
elif options[optcount] == "horus":
|
||||
command_options["PCB"] = "HORUS"
|
||||
firmware_options = options_horus
|
||||
elif options[optcount] == "x10":
|
||||
command_options["PCB"] = "X10"
|
||||
firmware_options = options_x10
|
||||
maxsize = 2 * 1024 * 1024
|
||||
board = BOARD_HORUS
|
||||
board_family = BOARD_FAMILY_ARM
|
||||
elif options[optcount] == "x12s":
|
||||
command_options["PCB"] = "X12S"
|
||||
firmware_options = options_x12s
|
||||
maxsize = 2 * 1024 * 1024
|
||||
board = BOARD_HORUS
|
||||
board_family = BOARD_FAMILY_ARM
|
||||
|
||||
+16
-1
@@ -292,7 +292,7 @@ options_taranisx9e = {
|
||||
"multimodule": ("MULTIMODULE", "YES", "NO")
|
||||
}
|
||||
|
||||
options_horus = {
|
||||
options_x12s = {
|
||||
"noheli": ("HELI", "NO", "YES"),
|
||||
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
|
||||
"lua": ("LUA", "YES", "NO_MODEL_SCRIPTS"),
|
||||
@@ -307,3 +307,18 @@ options_horus = {
|
||||
"multimodule": ("MULTIMODULE", "YES", "NO"),
|
||||
"pcbdev": ("PCBREV", "10", None),
|
||||
}
|
||||
|
||||
options_x10 = {
|
||||
"noheli": ("HELI", "NO", "YES"),
|
||||
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
|
||||
"lua": ("LUA", "YES", "NO_MODEL_SCRIPTS"),
|
||||
"luac": ("LUA_COMPILER", "YES", "NO"),
|
||||
"nogvars": ("GVARS", "NO", "YES"),
|
||||
"faimode": ("FAI", "YES", None),
|
||||
"faichoice": ("FAI", "CHOICE", None),
|
||||
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES"),
|
||||
"massstorage": ("USB", "MASSSTORAGE", None),
|
||||
"cli": ("USB", "SERIAL", None),
|
||||
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO"),
|
||||
"multimodule": ("MULTIMODULE", "YES", "NO"),
|
||||
}
|
||||
|
||||
@@ -53,6 +53,16 @@ with open(sys.argv[2], "w") as f:
|
||||
values.append(str(val))
|
||||
f.write("const uint16_t __%s[] __ALIGNED = { %s };\n" % (constant, ",".join(values)))
|
||||
f.write("const Bitmap %s(BMP_ARGB4444, %d, %d, __%s);\n" % (constant, width, height, constant))
|
||||
elif what == "4/4/4/4-R":
|
||||
constant = sys.argv[2].upper()[:-4]
|
||||
values = []
|
||||
for y in range(height):
|
||||
for x in range(width):
|
||||
pixel = image.pixel(width-x-1, height-y-1)
|
||||
val = ((Qt.qAlpha(pixel) // 16) << 12) + ((Qt.qRed(pixel) // 16) << 8) + ((Qt.qGreen(pixel) // 16) << 4) + ((Qt.qBlue(pixel) // 16) << 0)
|
||||
values.append(str(val))
|
||||
f.write("const uint16_t __%s[] __ALIGNED = { %s };\n" % (constant, ",".join(values)))
|
||||
f.write("const Bitmap %s(BMP_ARGB4444, %d, %d, __%s);\n" % (constant, width, height, constant))
|
||||
elif what == "5/6/5":
|
||||
constant = sys.argv[2].upper()[:-4]
|
||||
values = []
|
||||
@@ -63,6 +73,16 @@ with open(sys.argv[2], "w") as f:
|
||||
values.append(str(val))
|
||||
f.write("const uint16_t __%s[] __ALIGNED = { %s };\n" % (constant, ",".join(values)))
|
||||
f.write("const Bitmap %s(BMP_RGB565, %d, %d, __%s);\n" % (constant, width, height, constant))
|
||||
elif what == "5/6/5-R":
|
||||
constant = sys.argv[2].upper()[:-4]
|
||||
values = []
|
||||
for y in range(height):
|
||||
for x in range(width):
|
||||
pixel = image.pixel(width-x-1, height-y-1)
|
||||
val = ((Qt.qRed(pixel) >> 3) << 11) + ((Qt.qGreen(pixel) >> 2) << 5) + ((Qt.qBlue(pixel) >> 3) << 0)
|
||||
values.append(str(val))
|
||||
f.write("const uint16_t __%s[] __ALIGNED = { %s };\n" % (constant, ",".join(values)))
|
||||
f.write("const Bitmap %s(BMP_RGB565, %d, %d, __%s);\n" % (constant, width, height, constant))
|
||||
elif what == "5/6/5/8":
|
||||
colors = []
|
||||
writeSize(f, width, height)
|
||||
|
||||
Reference in New Issue
Block a user