f8d97b8a228504adc12a2286c62f0fd7827a3a3c,Projects/BasicRobotControl/runnable.py,,Main,#,31

Before Change



def Main():

    try:

        // GoPiGo3WithKeyboard is used for mapping
        // keyboard keys to actual GoPiGo3 commands
        // the keys-to-gopigo3 bindings are defined inside the class
        gopigo3 = GoPiGo3WithKeyboard()
    except IOError as error:

        // if the GoPiGo3 is not reachable
        // then print the error and exit
        print(str(error))
        exit(1)

    // draws the GoPiGo3 logo
    gopigo3.drawLogo()
    // writes some description on the GoPiGo3
    gopigo3.drawDescription()
    // writes the menu for controlling the GoPiGo3 robot

After Change


    // to be pressed once in order for the robot to start moving
    manual_mode = False
    successful_exit = True
    refresh_rate = 20.0

    with Input(keynames = "curtsies", sigint_event = True) as input_generator:
        while True:
            period = 1 / refresh_rate
            // if nothing is captured in [period] seconds
            // then send() function returns None
            key = input_generator.send(period)

            // if we"ve captured something from the keyboard
            if key is not None:
                result = gopigo3.executeKeyboardJob(key)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: DexterInd/GoPiGo3
Commit Name: f8d97b8a228504adc12a2286c62f0fd7827a3a3c
Time: 2017-07-20
Author: robert.lucian.chiriac@gmail.com
File Name: Projects/BasicRobotControl/runnable.py
Class Name:
Method Name: Main


Project Name: DexterInd/GoPiGo3
Commit Name: 1fb289b0de21ec00d28046eff88d6da8f4c15319
Time: 2017-07-21
Author: robert.lucian.chiriac@gmail.com
File Name: Projects/BasicRobotControl/runnable.py
Class Name:
Method Name: Main


Project Name: nilearn/nilearn
Commit Name: e3d577b5595af3e1c9a05d3be84dbdf1a7c4aa20
Time: 2020-07-29
Author: jerome@dockes.org
File Name: nilearn/datasets/neurovault.py
Class Name:
Method Name: _get_batch