Skip to content

Commit c3e69d2

Browse files
committed
fix handling of picaxe 40x2 directive, uses same compiler as 20x2
1 parent 2a538af commit c3e69d2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

picaxepreprocess.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,13 @@ def set_chip(new_chip):
306306
global chip
307307
valid_chips = ["08", "08m2", "08m2le", "14m", "14m2", "18", "18a", "18m", "18m2", "18x",
308308
"18x_1", "20m", "20m2", "20x2", "28", "28a", "28x", "28x_1", "28x1", "28x1_0",
309-
"28x2"]
309+
"28x2", "40x2"]
310310
new_chip = new_chip.lower() # In case of 08M2 or 08m2
311311
if new_chip in valid_chips:
312312
print("Setting the PICAXE chip to: '{}'".format(new_chip))
313313
chip = new_chip
314+
if (chip == "40x2"):
315+
chip = "28x2" #28x2 and 40x2 use the same compiler
314316
else:
315317
preprocessor_error("""'{}' given as a PICAXE chip, but is not in the list of known parts or compilers.
316318
Please select from:\n{}""".format(new_chip,valid_chips))

0 commit comments

Comments
 (0)