1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 14:25:11 +03:00

Fix compilation issues

This commit is contained in:
romolo.manfredini@gmail.com 2012-03-22 00:59:36 +00:00
parent 629480d4ae
commit dfdb4bbade

View file

@ -22,7 +22,7 @@ options_v4 = [[("", "EXT=FRSKY")],
languages = ["en", "fr", "se"] languages = ["en", "fr", "se"]
def generate(hex, arg, options): def generate(hex, arg, options,v4):
result = [] result = []
states = [0] * len(options) states = [0] * len(options)
@ -63,14 +63,14 @@ def generate(hex, arg, options):
while "" in parts: while "" in parts:
parts.remove("") parts.remove("")
size = int(parts[1]) size = int(parts[1])
if size > 65530: if ((size > 65530 and v4==0) or (size > 262000 and v4==1)):
print " ", line[:-1], "[NOT RELEASED]" print " ", line[:-1], "[NOT RELEASED]"
else: else:
print " ", line, print " ", line,
if line.startswith("Data:"): if line.startswith("Data:"):
print " ", line, print " ", line,
if size <= 65530: if ((size <= 65530 and v4==0) or (size <=262000 and v4==1)) :
shutil.copyfile("open9x.hex", "../binaries/" + hex_file + ".hex") shutil.copyfile("open9x.hex", "../binaries/" + hex_file + ".hex")
result.append(hex_file) result.append(hex_file)
@ -91,11 +91,11 @@ def generate_c9x_list(filename, hexes, size):
f.write('open9x->add_option(new Open9xFirmware("%s", new Open9xInterface(%s), OPEN9X_BIN_URL "%s.hex"));\n' % (hex, size, hex)) f.write('open9x->add_option(new Open9xFirmware("%s", new Open9xInterface(%s), OPEN9X_BIN_URL "%s.hex"));\n' % (hex, size, hex))
# stock board # stock board
hexes = generate("open9x-stock", "PCB=STD", options_stock) hexes = generate("open9x-stock", "PCB=STD", options_stock,0)
generate_c9x_list("../../companion9x/src/open9x-stock-binaries.cpp", hexes, "EESIZE_STOCK") generate_c9x_list("../../companion9x/src/open9x-stock-binaries.cpp", hexes, "EESIZE_STOCK")
# v4 board # v4 board
hexes = generate("open9x-v4", "PCB=V4", options_v4) hexes = generate("open9x-v4", "PCB=V4", options_v4,1)
generate_c9x_list("../../companion9x/src/open9x-v4-binaries.cpp", hexes, "EESIZE_V4") generate_c9x_list("../../companion9x/src/open9x-v4-binaries.cpp", hexes, "EESIZE_V4")
# stamp # stamp