| 
    Prusa MINI Firmware overview
    
   | 
 
 
 
  
  
 
◆ has_g1()
      
        
          | def g29_auto.has_g1  | 
          ( | 
            | 
          line | ) | 
           | 
        
      
 
   49     return line[:2].upper() == 
"G1" 
 
 
 
◆ find_axis()
      
        
          | def g29_auto.find_axis  | 
          ( | 
            | 
          line,  | 
        
        
           | 
           | 
            | 
          axis  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
   69             found = char.upper() == axis.upper()
 
 
 
 
◆ set_mima()
      
        
          | def g29_auto.set_mima  | 
          ( | 
            | 
          line | ) | 
           | 
        
      
 
   78     global min_x, max_x, min_y, max_y, last_z
 
   83     if current_x 
is not None:
 
   84         min_x = 
min(current_x, min_x)
 
   85         max_x = 
max(current_x, max_x)
 
   86     if current_y 
is not None:
 
   87         min_y = 
min(current_y, min_y)
 
   88         max_y = 
max(current_y, max_y)
 
   90     return min_x, max_x, min_y, max_y
 
 
 
 
◆ find_z()
      
        
          | def g29_auto.find_z  | 
          ( | 
            | 
          gcode,  | 
        
        
           | 
           | 
            | 
          start_at_line = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
   94 def find_z(gcode, start_at_line=0):
 
   95     for i 
in range(start_at_line, len(gcode)):
 
 
 
 
◆ z_parse()
      
        
          | def g29_auto.z_parse  | 
          ( | 
            | 
          gcode,  | 
        
        
           | 
           | 
            | 
          start_at_line = 0,  | 
        
        
           | 
           | 
            | 
          end_at_line = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
  101 def z_parse(gcode, start_at_line=0, end_at_line=0):
 
  109     while len(gcode) > i:
 
  111             z, i = 
find_z(gcode, i + 1)
 
  117         temp_line = i - last_i -1
 
  118         line_between_z.append(i - last_i - 1)
 
  121         if 0 < end_at_line <= i 
or temp_line >= min_g1:
 
  125     line_between_z = line_between_z[1:]
 
  126     return all_z, line_between_z, z_at_line
 
 
 
 
◆ get_lines()
      
        
          | def g29_auto.get_lines  | 
          ( | 
            | 
          gcode,  | 
        
        
           | 
           | 
            | 
          minimum  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
  132     all_z, line_between_z, z_at_line = 
z_parse(gcode, end_at_line=max_g1)
 
  133     for count 
in line_between_z:
 
  137             return z_at_line[i - 1], z_at_line[i]
 
 
 
 
◆ folder
      
        
          | string g29_auto.folder = './' | 
        
      
 
 
◆ my_file
◆ min_g1
◆ max_g1
      
        
          | int g29_auto.max_g1 = 100000000 | 
        
      
 
 
◆ g29_keyword
      
        
          | string g29_auto.g29_keyword = 'g29' | 
        
      
 
 
◆ output_file
◆ input_file
◆ min_size
      
        
          | int g29_auto.min_size = 40 | 
        
      
 
 
◆ probing_points
      
        
          | int g29_auto.probing_points = 3 | 
        
      
 
 
◆ min_x
◆ min_y
◆ max_x
◆ max_y
◆ last_z
      
        
          | float g29_auto.last_z = 0.001 | 
        
      
 
 
◆ layer
◆ lines_of_g1
      
        
          | int g29_auto.lines_of_g1 = 0 | 
        
      
 
 
◆ gcode
◆ lines
◆ start
◆ end
◆ offset_x
◆ offset_y
◆ new_command
      
        
          | string g29_auto.new_command | 
        
      
 
Initial value:    1 =  
'G29 L{0} R{1} F{2} B{3} P{4}\n'.format(min_x,
 
 
 
 
◆ out_file
◆ in_file
 
 
def find_axis(line, axis)
Definition: g29_auto.py:53
 
def find_z(gcode, start_at_line=0)
Definition: g29_auto.py:94
 
#define max(a, b)
Definition: wiring_constants.h:40
 
def set_mima(line)
Definition: g29_auto.py:77
 
def has_g1(line)
Definition: g29_auto.py:48
 
#define min(a, b)
Definition: wiring_constants.h:36
 
int
Definition: createSpeedLookupTable.py:15
 
def z_parse(gcode, start_at_line=0, end_at_line=0)
Definition: g29_auto.py:101
 
def get_lines(gcode, minimum)
Definition: g29_auto.py:130