{
  "appVersion": "0.19.0",
  "savedAt": "2026-10-26T09:57:57.808Z",
  "workspace": {
    "blocks": {
      "languageVersion": 0,
      "blocks": [
        {
          "type": "apm_mini_pid",
          "id": "la0j`{Y+YjVz~6Fs=g|!",
          "x": -11,
          "y": -207,
          "fields": {
            "MOTOR": "0"
          },
          "inputs": {
            "P": {
              "shadow": {
                "type": "math_number",
                "id": "6zt?S1A+!G?u:#CPTg+:",
                "fields": {
                  "NUM": 0.7
                }
              }
            },
            "I": {
              "shadow": {
                "type": "math_number",
                "id": "2,Q4KFL!mLjxh1KerT_b",
                "fields": {
                  "NUM": 0.008
                }
              }
            },
            "D": {
              "shadow": {
                "type": "math_number",
                "id": "T0spjg:zV8wE7V.R9wVR",
                "fields": {
                  "NUM": 0.002
                }
              }
            }
          },
          "next": {
            "block": {
              "type": "apm_mini_smart_declare",
              "id": "Grh2cI$|C5bmM56x|e(5",
              "fields": {
                "NAME": "吸轮马达",
                "PORT": "1",
                "DIRECTION": "True"
              },
              "next": {
                "block": {
                  "type": "variables_set",
                  "id": "%x4sX!1Iz*_^rsl5uB`C",
                  "fields": {
                    "VAR": {
                      "id": "wR48!kj32FL0|mAt^ATd"
                    }
                  },
                  "inputs": {
                    "VALUE": {
                      "block": {
                        "type": "math_number",
                        "id": "a@P#)0Kij?CE8(~Dz_L!",
                        "fields": {
                          "NUM": 0
                        }
                      }
                    }
                  },
                  "next": {
                    "block": {
                      "type": "apm_mini_competition_mode",
                      "id": "E.gufFF5Ol_GN0le$|KB",
                      "fields": {
                        "auto_duration": 3,
                        "auto_trigger": "START"
                      },
                      "inputs": {
                        "AUTO_COMMANDS": {
                          "block": {
                            "type": "procedures_callnoreturn",
                            "id": "u?wcS60[o72H4wGka6DP",
                            "extraState": {
                              "name": "前",
                              "params": [
                                "距离",
                                "前后"
                              ]
                            },
                            "inputs": {
                              "ARG0": {
                                "block": {
                                  "type": "math_number",
                                  "id": "l)]@R=i`Akd!VXTU+VKM",
                                  "fields": {
                                    "NUM": 50
                                  }
                                }
                              },
                              "ARG1": {
                                "block": {
                                  "type": "math_number",
                                  "id": "79kEq=I0I!L{sh+ncow`",
                                  "fields": {
                                    "NUM": 50
                                  }
                                }
                              }
                            },
                            "next": {
                              "block": {
                                "type": "apm_mini_wait",
                                "id": "B?,BO3sS/fid6lEhgv:T",
                                "inputs": {
                                  "MS": {
                                    "shadow": {
                                      "type": "math_number",
                                      "id": "?VjxonLO}%;_I38Ooe#f",
                                      "fields": {
                                        "NUM": 4000
                                      }
                                    }
                                  }
                                },
                                "next": {
                                  "block": {
                                    "type": "procedures_callnoreturn",
                                    "id": "XbS{n6MC.|ttnw{b|u,M",
                                    "extraState": {
                                      "name": "左转"
                                    },
                                    "next": {
                                      "block": {
                                        "type": "apm_mini_wait",
                                        "id": "]0a!]^Zaxc`U50P+T4,9",
                                        "inputs": {
                                          "MS": {
                                            "shadow": {
                                              "type": "math_number",
                                              "id": "%K$?Nw5Q:G8E:s%vIKFN",
                                              "fields": {
                                                "NUM": 1000
                                              }
                                            }
                                          }
                                        },
                                        "next": {
                                          "block": {
                                            "type": "procedures_callnoreturn",
                                            "id": "Ug/:HpzMw*O{G?Lb*!Tg",
                                            "extraState": {
                                              "name": "前",
                                              "params": [
                                                "距离",
                                                "前后"
                                              ]
                                            },
                                            "inputs": {
                                              "ARG0": {
                                                "block": {
                                                  "type": "math_number",
                                                  "id": "IP@%Zh/3_?Aq74MzIC#p",
                                                  "fields": {
                                                    "NUM": 20
                                                  }
                                                }
                                              },
                                              "ARG1": {
                                                "block": {
                                                  "type": "math_number",
                                                  "id": "wp+Ry]:78`cY2CfQrobI",
                                                  "fields": {
                                                    "NUM": 50
                                                  }
                                                }
                                              }
                                            },
                                            "next": {
                                              "block": {
                                                "type": "apm_mini_wait",
                                                "id": "w6tHBKacTA+~}v;OoZ,d",
                                                "inputs": {
                                                  "MS": {
                                                    "shadow": {
                                                      "type": "math_number",
                                                      "id": "%24^W6:t?Y(B_VWF)n8R",
                                                      "fields": {
                                                        "NUM": 2000
                                                      }
                                                    }
                                                  }
                                                },
                                                "next": {
                                                  "block": {
                                                    "type": "procedures_callnoreturn",
                                                    "id": "Y{;_fvQlS{RF/zlDvz}L",
                                                    "extraState": {
                                                      "name": "前",
                                                      "params": [
                                                        "距离",
                                                        "前后"
                                                      ]
                                                    },
                                                    "inputs": {
                                                      "ARG0": {
                                                        "block": {
                                                          "type": "math_number",
                                                          "id": "*k_r~=bBkl?3h?8CCjg1",
                                                          "fields": {
                                                            "NUM": 20
                                                          }
                                                        }
                                                      },
                                                      "ARG1": {
                                                        "block": {
                                                          "type": "math_number",
                                                          "id": "Qp8jS,i$F39uFvG5g}MW",
                                                          "fields": {
                                                            "NUM": -50
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "next": {
                                                      "block": {
                                                        "type": "apm_mini_wait",
                                                        "id": "(;[g$1$!8|x?@;VJf{?l",
                                                        "inputs": {
                                                          "MS": {
                                                            "shadow": {
                                                              "type": "math_number",
                                                              "id": "smjyhoT%)L0ax;s[hJDh",
                                                              "fields": {
                                                                "NUM": 2000
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "MANUAL_COMMANDS": {
                          "block": {
                            "type": "controls_if",
                            "id": "2IxRij(A#,@vW3X-W)Ws",
                            "extraState": {
                              "elseIfCount": 1
                            },
                            "inputs": {
                              "IF0": {
                                "block": {
                                  "type": "apm_mini_remote_button",
                                  "id": "ITBwYQ[io~j)SD?7Y-hN",
                                  "fields": {
                                    "BUTTON": "A"
                                  }
                                }
                              },
                              "DO0": {
                                "block": {
                                  "type": "variables_set",
                                  "id": "~0t75J|f+J#N6m5HjND^",
                                  "fields": {
                                    "VAR": {
                                      "id": "wR48!kj32FL0|mAt^ATd"
                                    }
                                  },
                                  "inputs": {
                                    "VALUE": {
                                      "block": {
                                        "type": "math_number",
                                        "id": "]GsJ+/p-2(E.H||#}(zd",
                                        "fields": {
                                          "NUM": 0
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "IF1": {
                                "block": {
                                  "type": "apm_mini_remote_button",
                                  "id": "Lc[-K,0nWuJ[k3=y]@#0",
                                  "fields": {
                                    "BUTTON": "M"
                                  }
                                }
                              },
                              "DO1": {
                                "block": {
                                  "type": "variables_set",
                                  "id": "?)gY5AyJV#K~w;b(RM1s",
                                  "fields": {
                                    "VAR": {
                                      "id": "wR48!kj32FL0|mAt^ATd"
                                    }
                                  },
                                  "inputs": {
                                    "VALUE": {
                                      "block": {
                                        "type": "math_number",
                                        "id": "yJ:}~@`vTHXpcnwwJ8.R",
                                        "fields": {
                                          "NUM": 1
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "next": {
                              "block": {
                                "type": "controls_if",
                                "id": "[iJL@n{GvePE[SkmYe}j",
                                "extraState": {
                                  "elseIfCount": 5
                                },
                                "inputs": {
                                  "IF0": {
                                    "block": {
                                      "type": "apm_mini_remote_button",
                                      "id": "Ajm#=5ir(e=4sAiAxwqD",
                                      "fields": {
                                        "BUTTON": "UP"
                                      }
                                    }
                                  },
                                  "DO0": {
                                    "block": {
                                      "type": "apm_mini_rpm",
                                      "id": "ACY$:RK*tU!+V-:xqal%",
                                      "inputs": {
                                        "LEFT": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "4=aK9bU%646-n4r(){+_",
                                            "fields": {
                                              "NUM": 100
                                            }
                                          }
                                        },
                                        "RIGHT": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "1/m4#|#_bU3HwmR5MNeh",
                                            "fields": {
                                              "NUM": 100
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "IF1": {
                                    "block": {
                                      "type": "apm_mini_remote_button",
                                      "id": "0|Se[+gHDp(@_@Nt|C8V",
                                      "fields": {
                                        "BUTTON": "DOWN"
                                      }
                                    }
                                  },
                                  "DO1": {
                                    "block": {
                                      "type": "apm_mini_rpm",
                                      "id": "+hSOM.n-sRK;Eiq)V)5}",
                                      "inputs": {
                                        "LEFT": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "%up=fyjLyKkzPILIBm]P",
                                            "fields": {
                                              "NUM": -100
                                            }
                                          }
                                        },
                                        "RIGHT": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "jS[nTB,36re9sy*#zp16",
                                            "fields": {
                                              "NUM": -100
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "IF2": {
                                    "block": {
                                      "type": "apm_mini_remote_button",
                                      "id": "nK8RuUC|FeljX4F_A1nv",
                                      "fields": {
                                        "BUTTON": "LEFT"
                                      }
                                    }
                                  },
                                  "DO2": {
                                    "block": {
                                      "type": "apm_mini_rpm",
                                      "id": "^ju$0xYIHD(MngrFPxys",
                                      "inputs": {
                                        "LEFT": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "8:WdkwF79(Up_4q2-*f~",
                                            "fields": {
                                              "NUM": -100
                                            }
                                          }
                                        },
                                        "RIGHT": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "$/^G3dD2uYL5ib3t8$(U",
                                            "fields": {
                                              "NUM": 100
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "IF3": {
                                    "block": {
                                      "type": "apm_mini_remote_button",
                                      "id": "UVLe-Yxa}Xs?a`}qc^QY",
                                      "fields": {
                                        "BUTTON": "RIGHT"
                                      }
                                    }
                                  },
                                  "DO3": {
                                    "block": {
                                      "type": "apm_mini_rpm",
                                      "id": "e9~RJi#.-ArSs-LCx=U.",
                                      "inputs": {
                                        "LEFT": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "5TsH~^Jb19[et4TOJWG!",
                                            "fields": {
                                              "NUM": 100
                                            }
                                          }
                                        },
                                        "RIGHT": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "]|P%5(50*u@ume@#/MM)",
                                            "fields": {
                                              "NUM": -100
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "IF4": {
                                    "block": {
                                      "type": "logic_compare",
                                      "id": "_wcQ$Q?p1$c8!]ZsQHCi",
                                      "fields": {
                                        "OP": "EQ"
                                      },
                                      "inputs": {
                                        "A": {
                                          "block": {
                                            "type": "variables_get",
                                            "id": "=6J5Mjh~@GnF=+xLhm3W",
                                            "fields": {
                                              "VAR": {
                                                "id": "wR48!kj32FL0|mAt^ATd"
                                              }
                                            }
                                          }
                                        },
                                        "B": {
                                          "block": {
                                            "type": "math_number",
                                            "id": "H`mZ*zu-s@[jXN-Z6[cc",
                                            "fields": {
                                              "NUM": 0
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "DO4": {
                                    "block": {
                                      "type": "controls_if",
                                      "id": "TGgPh)}-QPEw*e?[leT3",
                                      "extraState": {
                                        "hasElse": true
                                      },
                                      "inputs": {
                                        "IF0": {
                                          "block": {
                                            "type": "logic_operation",
                                            "id": "%91K{xBrm8eG.sND9by[",
                                            "fields": {
                                              "OP": "OR"
                                            },
                                            "inputs": {
                                              "A": {
                                                "block": {
                                                  "type": "logic_compare",
                                                  "id": "a-eQ49F@7agkd44eKcMP",
                                                  "fields": {
                                                    "OP": "GT"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "math_arithmetic",
                                                        "id": ";h-LO9w0N;/K(V;5GOx3",
                                                        "fields": {
                                                          "OP": "MINUS"
                                                        },
                                                        "inputs": {
                                                          "A": {
                                                            "block": {
                                                              "type": "apm_mini_remote_axis",
                                                              "id": "rTyTp*Pm:7a};ba.BrgW",
                                                              "fields": {
                                                                "AXIS": "LEFT_Y"
                                                              }
                                                            }
                                                          },
                                                          "B": {
                                                            "block": {
                                                              "type": "apm_mini_remote_axis",
                                                              "id": "(-8EF-7h4*!0D{G=5P}b",
                                                              "fields": {
                                                                "AXIS": "RIGHT_Y"
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "%A7hK1x,z.Y%x:M.y}aY",
                                                        "fields": {
                                                          "NUM": 40
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              "B": {
                                                "block": {
                                                  "type": "logic_compare",
                                                  "id": "svATFzxT~MJFor8E@+=d",
                                                  "fields": {
                                                    "OP": "GT"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "math_arithmetic",
                                                        "id": "t=Dp5Qnhx~lmOzV:)RmO",
                                                        "fields": {
                                                          "OP": "MINUS"
                                                        },
                                                        "inputs": {
                                                          "A": {
                                                            "block": {
                                                              "type": "apm_mini_remote_axis",
                                                              "id": "5ydSTDNT`]+4Yn.2k^O|",
                                                              "fields": {
                                                                "AXIS": "RIGHT_Y"
                                                              }
                                                            }
                                                          },
                                                          "B": {
                                                            "block": {
                                                              "type": "apm_mini_remote_axis",
                                                              "id": "(tSe|55z:o$U:v?P@P3^",
                                                              "fields": {
                                                                "AXIS": "LEFT_Y"
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "x54!o(8(8uTBeio~QRam",
                                                        "fields": {
                                                          "NUM": 40
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "DO0": {
                                          "block": {
                                            "type": "apm_mini_rpm",
                                            "id": "{C!(LZ#t*^S%|1#bP|!~",
                                            "inputs": {
                                              "LEFT": {
                                                "shadow": {
                                                  "type": "math_number",
                                                  "id": "Ph`[lW:lb!70~rU07E[;",
                                                  "fields": {
                                                    "NUM": 30
                                                  }
                                                },
                                                "block": {
                                                  "type": "math_arithmetic",
                                                  "id": "Oye/2Tj{Al]%p*lP#*rQ",
                                                  "fields": {
                                                    "OP": "MULTIPLY"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "apm_mini_remote_axis",
                                                        "id": "SVC4QS1t,-v]tY/m.8J@",
                                                        "fields": {
                                                          "AXIS": "LEFT_Y"
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "mwW~|[[tM2J@D.9,{y8-",
                                                        "fields": {
                                                          "NUM": 0.8
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              "RIGHT": {
                                                "shadow": {
                                                  "type": "math_number",
                                                  "id": "@!eApgPZ8zl[NV=l!tgd",
                                                  "fields": {
                                                    "NUM": 30
                                                  }
                                                },
                                                "block": {
                                                  "type": "math_arithmetic",
                                                  "id": "|eYlg4jz}5Cb8~Cghfp]",
                                                  "fields": {
                                                    "OP": "MULTIPLY"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "apm_mini_remote_axis",
                                                        "id": "6O1-;E}fN8|P.}We!#.8",
                                                        "fields": {
                                                          "AXIS": "RIGHT_Y"
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "?OjT3qm6~4v1F-vQwjfE",
                                                        "fields": {
                                                          "NUM": 0.8
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "ELSE": {
                                          "block": {
                                            "type": "apm_mini_rpm",
                                            "id": "bQo53TT5Jfzxy-J%k%ah",
                                            "inputs": {
                                              "LEFT": {
                                                "shadow": {
                                                  "type": "math_number",
                                                  "id": "Ph`[lW:lb!70~rU07E[;",
                                                  "fields": {
                                                    "NUM": 30
                                                  }
                                                },
                                                "block": {
                                                  "type": "math_arithmetic",
                                                  "id": "b=3z1~1CkHhxplIpm/[k",
                                                  "fields": {
                                                    "OP": "MULTIPLY"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "apm_mini_remote_axis",
                                                        "id": "xMHE+DH^i`zfNs7]_n}$",
                                                        "fields": {
                                                          "AXIS": "LEFT_Y"
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "5601lx(%q|pc?y)cZRdB",
                                                        "fields": {
                                                          "NUM": 1
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              "RIGHT": {
                                                "shadow": {
                                                  "type": "math_number",
                                                  "id": "@!eApgPZ8zl[NV=l!tgd",
                                                  "fields": {
                                                    "NUM": 30
                                                  }
                                                },
                                                "block": {
                                                  "type": "math_arithmetic",
                                                  "id": "dqm=lih2.{-OqIyCnPsp",
                                                  "fields": {
                                                    "OP": "MULTIPLY"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "apm_mini_remote_axis",
                                                        "id": "dt)w](~c@OqeKmy7Qlh9",
                                                        "fields": {
                                                          "AXIS": "RIGHT_Y"
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "=8^8eHxTMHm{w?0sIYBL",
                                                        "fields": {
                                                          "NUM": 1
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "IF5": {
                                    "block": {
                                      "type": "logic_compare",
                                      "id": "Bs|^k[@et:N$b)3a_X17",
                                      "fields": {
                                        "OP": "EQ"
                                      },
                                      "inputs": {
                                        "A": {
                                          "block": {
                                            "type": "variables_get",
                                            "id": "]yU1/=BsLQFuANlTEls3",
                                            "fields": {
                                              "VAR": {
                                                "id": "wR48!kj32FL0|mAt^ATd"
                                              }
                                            }
                                          }
                                        },
                                        "B": {
                                          "block": {
                                            "type": "math_number",
                                            "id": ";]7f,1dk}5pMd(b{(ckC",
                                            "fields": {
                                              "NUM": 1
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "DO5": {
                                    "block": {
                                      "type": "controls_if",
                                      "id": "Lj`dRN`8aKVA)9RyO^@J",
                                      "extraState": {
                                        "hasElse": true
                                      },
                                      "inputs": {
                                        "IF0": {
                                          "block": {
                                            "type": "logic_operation",
                                            "id": "HPdn[?MH*ZN{j137Ax`]",
                                            "fields": {
                                              "OP": "OR"
                                            },
                                            "inputs": {
                                              "A": {
                                                "block": {
                                                  "type": "logic_compare",
                                                  "id": "@CZY`11GqGGr*f#A%Td6",
                                                  "fields": {
                                                    "OP": "GT"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "math_arithmetic",
                                                        "id": "Kvl?b.C!3]8/Wu-UZ+*n",
                                                        "fields": {
                                                          "OP": "MINUS"
                                                        },
                                                        "inputs": {
                                                          "A": {
                                                            "block": {
                                                              "type": "apm_mini_remote_axis",
                                                              "id": "=9wl8B0N7Y/rGkf`~#2F",
                                                              "fields": {
                                                                "AXIS": "LEFT_Y"
                                                              }
                                                            }
                                                          },
                                                          "B": {
                                                            "block": {
                                                              "type": "apm_mini_remote_axis",
                                                              "id": "iB)4%g)K|9G!Lk$Y@5MN",
                                                              "fields": {
                                                                "AXIS": "RIGHT_Y"
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "]7qBUUjfs#;aA0HLZpzg",
                                                        "fields": {
                                                          "NUM": 40
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              },
                                              "B": {
                                                "block": {
                                                  "type": "logic_compare",
                                                  "id": "iIP2$TUuL2/0y0}!0|aA",
                                                  "fields": {
                                                    "OP": "GT"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "math_arithmetic",
                                                        "id": "gG5%jt,]LuTH#9EfXV_X",
                                                        "fields": {
                                                          "OP": "MINUS"
                                                        },
                                                        "inputs": {
                                                          "A": {
                                                            "block": {
                                                              "type": "apm_mini_remote_axis",
                                                              "id": "R?4bVxkewVJ[43R0]J@M",
                                                              "fields": {
                                                                "AXIS": "RIGHT_Y"
                                                              }
                                                            }
                                                          },
                                                          "B": {
                                                            "block": {
                                                              "type": "apm_mini_remote_axis",
                                                              "id": "}4JB9K^ECw%TQ93Xvf4/",
                                                              "fields": {
                                                                "AXIS": "LEFT_Y"
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "hdajA@Ezzox10#):MJAx",
                                                        "fields": {
                                                          "NUM": 40
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "DO0": {
                                          "block": {
                                            "type": "apm_mini_power",
                                            "id": "v~/)OEZ2}?]D~De0oDZ0",
                                            "fields": {
                                              "MOTOR": "1",
                                              "BRAKE": "False"
                                            },
                                            "inputs": {
                                              "POWER": {
                                                "shadow": {
                                                  "type": "math_number",
                                                  "id": "tS]Fic@-`?($=QKatkDM",
                                                  "fields": {
                                                    "NUM": 50
                                                  }
                                                },
                                                "block": {
                                                  "type": "math_arithmetic",
                                                  "id": "7Ga#-R/hej]{mwaJ-XQh",
                                                  "fields": {
                                                    "OP": "MULTIPLY"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "apm_mini_remote_axis",
                                                        "id": "[Tj*ft2b:BHs8^yvsg1#",
                                                        "fields": {
                                                          "AXIS": "LEFT_Y"
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": ")7NB%Oznt;r#h:rSq?[|",
                                                        "fields": {
                                                          "NUM": 0.66
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            },
                                            "next": {
                                              "block": {
                                                "type": "apm_mini_power",
                                                "id": "@PU$*)hTZH:3oL$)MDT^",
                                                "fields": {
                                                  "MOTOR": "2",
                                                  "BRAKE": "False"
                                                },
                                                "inputs": {
                                                  "POWER": {
                                                    "shadow": {
                                                      "type": "math_number",
                                                      "id": "tS]Fic@-`?($=QKatkDM",
                                                      "fields": {
                                                        "NUM": 50
                                                      }
                                                    },
                                                    "block": {
                                                      "type": "math_arithmetic",
                                                      "id": "4b3`-j6As(OE_QK)hy-i",
                                                      "fields": {
                                                        "OP": "MULTIPLY"
                                                      },
                                                      "inputs": {
                                                        "A": {
                                                          "block": {
                                                            "type": "apm_mini_remote_axis",
                                                            "id": "MUouyVUH!U^lmYJF$%Tj",
                                                            "fields": {
                                                              "AXIS": "RIGHT_Y"
                                                            }
                                                          }
                                                        },
                                                        "B": {
                                                          "block": {
                                                            "type": "math_number",
                                                            "id": ".%l%mw?s|arr|;7X@SU=",
                                                            "fields": {
                                                              "NUM": 0.66
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        },
                                        "ELSE": {
                                          "block": {
                                            "type": "apm_mini_power",
                                            "id": "j|V%@5Oo),g!?~uUE]xi",
                                            "fields": {
                                              "MOTOR": "1",
                                              "BRAKE": "False"
                                            },
                                            "inputs": {
                                              "POWER": {
                                                "shadow": {
                                                  "type": "math_number",
                                                  "id": "tS]Fic@-`?($=QKatkDM",
                                                  "fields": {
                                                    "NUM": 50
                                                  }
                                                },
                                                "block": {
                                                  "type": "math_arithmetic",
                                                  "id": "pO+YBUiU1xB9G3-8B1ed",
                                                  "fields": {
                                                    "OP": "MULTIPLY"
                                                  },
                                                  "inputs": {
                                                    "A": {
                                                      "block": {
                                                        "type": "apm_mini_remote_axis",
                                                        "id": "uCB|GUFo|!1zM[q.F3=3",
                                                        "fields": {
                                                          "AXIS": "LEFT_Y"
                                                        }
                                                      }
                                                    },
                                                    "B": {
                                                      "block": {
                                                        "type": "math_number",
                                                        "id": "3@to-ZhS#9aq`y|Nfn2Y",
                                                        "fields": {
                                                          "NUM": 0.85
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            },
                                            "next": {
                                              "block": {
                                                "type": "apm_mini_power",
                                                "id": ",zX#+ThZF_N0txeRyloV",
                                                "fields": {
                                                  "MOTOR": "2",
                                                  "BRAKE": "False"
                                                },
                                                "inputs": {
                                                  "POWER": {
                                                    "shadow": {
                                                      "type": "math_number",
                                                      "id": "DWvM/`kHmZR]0+e36/[?",
                                                      "fields": {
                                                        "NUM": 50
                                                      }
                                                    },
                                                    "block": {
                                                      "type": "math_arithmetic",
                                                      "id": "`(pgEiBxA-d$U@6OD-X#",
                                                      "fields": {
                                                        "OP": "MULTIPLY"
                                                      },
                                                      "inputs": {
                                                        "A": {
                                                          "block": {
                                                            "type": "apm_mini_remote_axis",
                                                            "id": "OeRX^b.vE1CBm)WC(hsl",
                                                            "fields": {
                                                              "AXIS": "RIGHT_Y"
                                                            }
                                                          }
                                                        },
                                                        "B": {
                                                          "block": {
                                                            "type": "math_number",
                                                            "id": "Y2)eZ0arT9RtZ|S6?y(P",
                                                            "fields": {
                                                              "NUM": 0.85
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                },
                                "next": {
                                  "block": {
                                    "type": "controls_if",
                                    "id": "BK_QwCkdB9voJjP^J}BW",
                                    "extraState": {
                                      "elseIfCount": 1,
                                      "hasElse": true
                                    },
                                    "inputs": {
                                      "IF0": {
                                        "block": {
                                          "type": "apm_mini_remote_button",
                                          "id": "E3DRx6c_RC%bwBBdz.Ef",
                                          "fields": {
                                            "BUTTON": "R1"
                                          }
                                        }
                                      },
                                      "DO0": {
                                        "block": {
                                          "type": "apm_mini_smart_open",
                                          "id": "R[aR]eB_E(!!B_]:pG4S",
                                          "fields": {
                                            "INSTANCE": "id:Grh2cI$|C5bmM56x|e(5"
                                          },
                                          "inputs": {
                                            "SPEED": {
                                              "shadow": {
                                                "type": "math_number",
                                                "id": "ja63!B8Oy]P122Wo!b=z",
                                                "fields": {
                                                  "NUM": 80
                                                }
                                              }
                                            }
                                          }
                                        }
                                      },
                                      "IF1": {
                                        "block": {
                                          "type": "apm_mini_remote_button",
                                          "id": "5ds5AreM)8|7-6_M;9tx",
                                          "fields": {
                                            "BUTTON": "R2"
                                          }
                                        }
                                      },
                                      "DO1": {
                                        "block": {
                                          "type": "apm_mini_smart_open",
                                          "id": "@c5#fP.VnZGX5A(pxBH6",
                                          "fields": {
                                            "INSTANCE": "id:Grh2cI$|C5bmM56x|e(5"
                                          },
                                          "inputs": {
                                            "SPEED": {
                                              "shadow": {
                                                "type": "math_number",
                                                "id": "CAC;s*Z5wC^F1D!$o/c:",
                                                "fields": {
                                                  "NUM": -80
                                                }
                                              }
                                            }
                                          }
                                        }
                                      },
                                      "ELSE": {
                                        "block": {
                                          "type": "apm_mini_smart_open",
                                          "id": "gW:6jctg8q|4J:-e[.-4",
                                          "fields": {
                                            "INSTANCE": "id:Grh2cI$|C5bmM56x|e(5"
                                          },
                                          "inputs": {
                                            "SPEED": {
                                              "shadow": {
                                                "type": "math_number",
                                                "id": "q|fyG*ar^1NhdZ397d5{",
                                                "fields": {
                                                  "NUM": 0
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "type": "procedures_defnoreturn",
          "id": "LJ.d3RuU1#cNUq=C]G[`",
          "x": 420,
          "y": 12,
          "extraState": {
            "params": [
              {
                "name": "距离",
                "id": "I*%G=_]V-sXBNOftv-iw"
              },
              {
                "name": "前后",
                "id": "cwr5{@=]SOVruAC9x6~d"
              }
            ]
          },
          "icons": {
            "comment": {
              "text": "描述该功能...",
              "pinned": false,
              "height": 80,
              "width": 160
            }
          },
          "fields": {
            "NAME": "前"
          },
          "inputs": {
            "STACK": {
              "block": {
                "type": "apm_mini_native_move_cm",
                "id": "N^R,Q^ga5fe;x*3=h`n8",
                "fields": {
                  "MOTOR": "3"
                },
                "inputs": {
                  "RPM": {
                    "shadow": {
                      "type": "math_number",
                      "id": "~TNlt)RNov-M#Wn/~|JE",
                      "fields": {
                        "NUM": 50
                      }
                    },
                    "block": {
                      "type": "variables_get",
                      "id": "[;z$ID4[J[$`$g:!Lj.q",
                      "fields": {
                        "VAR": {
                          "id": "cwr5{@=]SOVruAC9x6~d"
                        }
                      }
                    }
                  },
                  "CM": {
                    "shadow": {
                      "type": "math_number",
                      "id": "|}q-X{J}Qex:yIW_JON-",
                      "fields": {
                        "NUM": 50
                      }
                    },
                    "block": {
                      "type": "variables_get",
                      "id": "v-b~Kxb{WPJ5Kn2RvZ~T",
                      "fields": {
                        "VAR": {
                          "id": "I*%G=_]V-sXBNOftv-iw"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "type": "procedures_defnoreturn",
          "id": "]nz}vm[j#Y9j+2RM[-PU",
          "x": 876,
          "y": 36,
          "icons": {
            "comment": {
              "text": "描述该功能...",
              "pinned": false,
              "height": 80,
              "width": 160
            }
          },
          "fields": {
            "NAME": "左转"
          },
          "inputs": {
            "STACK": {
              "block": {
                "type": "apm_mini_native_rotate",
                "id": "0|Yv%uPB5=h40pDKeHH^",
                "inputs": {
                  "ANGLE": {
                    "shadow": {
                      "type": "math_number",
                      "id": "YJba)D~`V^z6$R+4jY!A",
                      "fields": {
                        "NUM": -90
                      }
                    }
                  },
                  "RPM": {
                    "shadow": {
                      "type": "math_number",
                      "id": "%0}X2k/$2#Rjjc:uEAl4",
                      "fields": {
                        "NUM": 50
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    },
    "variables": [
      {
        "name": "speed",
        "id": "wR48!kj32FL0|mAt^ATd"
      },
      {
        "name": "x",
        "id": ")nP):$+)@2nAN:!Kk/r$"
      },
      {
        "name": "速度",
        "id": "3mh/4K[7Grmey(Of6_9-"
      },
      {
        "name": "距离",
        "id": "I*%G=_]V-sXBNOftv-iw"
      },
      {
        "name": "前后",
        "id": "cwr5{@=]SOVruAC9x6~d"
      }
    ]
  },
  "python": "import drive\nimport motor\nimport competition_control\nimport remote_controller\nimport time\n\n距离 = None\n前后 = None\nspeed = None\n\ndef _E5_89_8D(距离, 前后):\n  global speed\n  competition_control.checkpoint()\n  competition_control.checkpoint()\n  competition_control.checkpoint()\n  drive.move_cm(3, 前后, 距离)\n\ndef _E5_B7_A6_E8_BD_AC():\n  global 距离, 前后, speed\n  competition_control.checkpoint()\n  competition_control.checkpoint()\n  competition_control.checkpoint()\n  drive.rotate((-90) * 2, 50)\n\n\ncompetition_control.checkpoint()\ndrive.set_pid(0.7, 0.008, 0.002)\ncompetition_control.checkpoint()\n吸轮马达 = motor.smart_motor(1, openloop_remap_cut=int(10), direction=True)\ncompetition_control.checkpoint()\nspeed = 0\ncompetition_control.checkpoint()\nwith competition_control.Session(remote_controller.START, 15, remote_controller, ((drive.stop_rpm, (0,)), (吸轮马达.stop, ()), (吸轮马达.stop, (True,)),), scan_remote=False, manual_interval_ms=0, auto_enabled=True) as competition_session:\n  while competition_session.poll():\n    if competition_session.is_auto():\n      with competition_session.auto_phase():\n        competition_control.checkpoint()\n        _E5_89_8D(50, 50)\n        competition_control.checkpoint()\n        time.sleep_ms(int(4000))\n        competition_control.checkpoint()\n        _E5_B7_A6_E8_BD_AC()\n        competition_control.checkpoint()\n        time.sleep_ms(int(1000))\n        competition_control.checkpoint()\n        _E5_89_8D(20, 50)\n        competition_control.checkpoint()\n        time.sleep_ms(int(2000))\n        competition_control.checkpoint()\n        _E5_89_8D(20, -50)\n        competition_control.checkpoint()\n        time.sleep_ms(int(2000))\n    elif competition_session.is_manual():\n      competition_control.checkpoint()\n      if remote_controller.get_button(remote_controller.A):\n        competition_control.checkpoint()\n        speed = 0\n      elif remote_controller.get_button(remote_controller.M):\n        competition_control.checkpoint()\n        speed = 1\n      competition_control.checkpoint()\n      if remote_controller.get_button(remote_controller.UP):\n        competition_control.checkpoint()\n        drive.drive_rpm(100, 100)\n      elif remote_controller.get_button(remote_controller.DOWN):\n        competition_control.checkpoint()\n        drive.drive_rpm(-100, -100)\n      elif remote_controller.get_button(remote_controller.LEFT):\n        competition_control.checkpoint()\n        drive.drive_rpm(-100, 100)\n      elif remote_controller.get_button(remote_controller.RIGHT):\n        competition_control.checkpoint()\n        drive.drive_rpm(100, -100)\n      elif speed == 0:\n        competition_control.checkpoint()\n        if remote_controller.get_axis(remote_controller.LEFT_Y) - remote_controller.get_axis(remote_controller.RIGHT_Y) > 40 or remote_controller.get_axis(remote_controller.RIGHT_Y) - remote_controller.get_axis(remote_controller.LEFT_Y) > 40:\n          competition_control.checkpoint()\n          drive.drive_rpm(remote_controller.get_axis(remote_controller.LEFT_Y) * 0.8, remote_controller.get_axis(remote_controller.RIGHT_Y) * 0.8)\n        else:\n          competition_control.checkpoint()\n          drive.drive_rpm(remote_controller.get_axis(remote_controller.LEFT_Y) * 1, remote_controller.get_axis(remote_controller.RIGHT_Y) * 1)\n      elif speed == 1:\n        competition_control.checkpoint()\n        if remote_controller.get_axis(remote_controller.LEFT_Y) - remote_controller.get_axis(remote_controller.RIGHT_Y) > 40 or remote_controller.get_axis(remote_controller.RIGHT_Y) - remote_controller.get_axis(remote_controller.LEFT_Y) > 40:\n          competition_control.checkpoint()\n          drive.control_motor(1, remote_controller.get_axis(remote_controller.LEFT_Y) * 0.66, soft_break=False)\n          competition_control.checkpoint()\n          drive.control_motor(2, remote_controller.get_axis(remote_controller.RIGHT_Y) * 0.66, soft_break=False)\n        else:\n          competition_control.checkpoint()\n          drive.control_motor(1, remote_controller.get_axis(remote_controller.LEFT_Y) * 0.85, soft_break=False)\n          competition_control.checkpoint()\n          drive.control_motor(2, remote_controller.get_axis(remote_controller.RIGHT_Y) * 0.85, soft_break=False)\n      competition_control.checkpoint()\n      if remote_controller.get_button(remote_controller.R1):\n        competition_control.checkpoint()\n        吸轮马达.openloop_turn(int(80))\n      elif remote_controller.get_button(remote_controller.R2):\n        competition_control.checkpoint()\n        吸轮马达.openloop_turn(int(-80))\n      else:\n        competition_control.checkpoint()\n        吸轮马达.openloop_turn(int(0))\n",
  "programmingMode": "blocks"
}