mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-12-28 10:20:36 -07:00
🧑💻 Update example build scripts
This commit is contained in:
parent
c7e10c5622
commit
f0b960e2ef
22 changed files with 201 additions and 47909 deletions
|
|
@ -2,14 +2,9 @@
|
|||
# MarlinBinaryProtocol.py
|
||||
# Supporting Firmware upload via USB/Serial, saving to the attached media.
|
||||
#
|
||||
import serial
|
||||
import math
|
||||
import time
|
||||
import serial, math, time, threading, sys, datetime, random
|
||||
from collections import deque
|
||||
import threading
|
||||
import sys
|
||||
import datetime
|
||||
import random
|
||||
|
||||
try:
|
||||
import heatshrink2 as heatshrink
|
||||
heatshrink_exists = True
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@ Options:
|
|||
--num-temps=... the number of temperature points to calculate (default: 36)
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division
|
||||
from __future__ import print_function, division
|
||||
|
||||
from math import *
|
||||
import sys, getopt
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
#
|
||||
# Usage: rle16_compress_cpp_image_data.py INPUT_FILE.cpp OUTPUT_FILE.cpp
|
||||
#
|
||||
import sys,struct
|
||||
import re
|
||||
import sys, struct, re
|
||||
|
||||
def addCompressedData(input_file, output_file):
|
||||
ofile = open(output_file, 'wt')
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@
|
|||
#
|
||||
# Usage: rle_compress_bitmap.py INPUT_FILE OUTPUT_FILE
|
||||
#
|
||||
import sys,struct
|
||||
import re
|
||||
import sys, struct, re
|
||||
|
||||
def addCompressedData(input_file, output_file):
|
||||
input_lines = input_file.readlines()
|
||||
input_file.close()
|
||||
ofile = open(output_file, 'wt')
|
||||
|
||||
datatype = "uint8_t"
|
||||
|
|
@ -18,8 +19,7 @@ def addCompressedData(input_file, output_file):
|
|||
arrname = ''
|
||||
|
||||
c_data_section = False ; c_skip_data = False ; c_footer = False
|
||||
while True:
|
||||
line = input_file.readline()
|
||||
for line in input_lines:
|
||||
if not line: break
|
||||
|
||||
if not c_footer:
|
||||
|
|
@ -56,8 +56,6 @@ def addCompressedData(input_file, output_file):
|
|||
arrname = line.split('[')[0].split(' ')[-1]
|
||||
print("Found data array", arrname)
|
||||
|
||||
input_file.close()
|
||||
|
||||
#print("\nRaw Bitmap Data", raw_data)
|
||||
|
||||
#
|
||||
|
|
@ -190,11 +188,11 @@ if len(sys.argv) <= 2:
|
|||
print('Usage: rle_compress_bitmap.py INPUT_FILE OUTPUT_FILE')
|
||||
exit(1)
|
||||
|
||||
output_cpp = sys.argv[2]
|
||||
output_h = sys.argv[2]
|
||||
inname = sys.argv[1].replace('//', '/')
|
||||
try:
|
||||
input_cpp = open(inname)
|
||||
input_h = open(inname)
|
||||
print("Processing", inname, "...")
|
||||
addCompressedData(input_cpp, output_cpp)
|
||||
addCompressedData(input_h, output_h)
|
||||
except OSError:
|
||||
print("Can't find input file", inname)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue