def drop(leap): a = pronsole() a.preloop() a.load_default_rc() # logger = logging.getLogger() # logger .setLevel(logging.DEBUG) a.do_disconnect('') time.sleep(.2) a.do_connect('') time.sleep(3) a.p.loud = True a.p.send_now('G21') #mm mode a.p.send_now('G90') #absolute coordinates a.p.send_now('G28') #home time.sleep(.25) a.p.send_now('G92 Z0') #set z at top to be zero position = 'G1 Z' + str(leap) a.p.send_now(position) #a.p.send_now('') #add something wen sensor integration is done a.p.send_now('G92 z0') #print a.p.send_now('M114') time.sleep(2) stop = None #a.parse_cmdline(sys.argv[1:]) setup_logging(sys.stdout, a.settings.log_path, True) loop(a) # while (True): # # print "in loop" # time.sleep(1) # sys.stdout.write("please wait\r") # time.sleep(1) # # a.p.send_now('M114') # a.p._send('M114') # #a.p._listen() # #a.write_prompt() # print a.p.abs_pos print 'floor calibrations complete'
# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Printrun. If not, see <http://www.gnu.org/licenses/>. import time import getopt import sys import getopt from printrun.printcore import printcore from printrun.utils import setup_logging from printrun import gcoder if __name__ == '__main__': setup_logging(sys.stderr) baud = 115200 loud = False statusreport = False from printrun.printcore import __version__ as printcore_version usage = "Usage:\n"+\ " printcore [OPTIONS] PORT FILE\n\n"+\ "Options:\n"+\ " -b, --baud=BAUD_RATE"+\ "\t\tSet baud rate value. Default value is 115200\n"+\ " -s, --statusreport\t\tPrint progress as percentage\n"+\ " -v, --verbose\t\t\tPrint additional progress information\n"+\ " -V, --version\t\t\tPrint program's version number and exit\n"+\ " -h, --help\t\t\tPrint this help message and exit\n"
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Printrun. If not, see <http://www.gnu.org/licenses/>. import time import getopt import sys from printrun.printcore import printcore from printrun.utils import setup_logging from printrun import gcoder if __name__ == '__main__': setup_logging(sys.stderr) baud = 115200 loud = False statusreport = False from printrun.printcore import __version__ as printcore_version usage = "Usage:\n" + \ " printcore [OPTIONS] PORT FILE\n\n" + \ "Options:\n" + \ " -b, --baud=BAUD_RATE" + \ "\t\tSet baud rate value. Default value is 115200\n" + \ " -s, --statusreport\t\tPrint progress as percentage\n" + \ " -v, --verbose\t\t\tPrint additional progress information\n" + \ " -V, --version\t\t\tPrint program's version number and exit\n" + \ " -h, --help\t\t\tPrint this help message and exit\n"