예제 #1
0
    def test_arduino_nano(self):
        """Test Arduino Nano generation"""

        generate_from_settings("tests/tmp/arduino-nano.py",
                               "tests/arduino-nano.yml")
        self.assertEqualsFile("tests/tmp/arduino-nano.py",
                              "tests/arduino-nano.py")
예제 #2
0
    def test_esp12_ftdi_header(self):
        """Test ESP FTDI header generation"""

        generate_from_settings("tests/tmp/esp12-ftdi-header.py",
                               "tests/esp12-ftdi-header.yml")
        self.assertEqualsFile("tests/tmp/esp12-ftdi-header.py",
                              "tests/esp12-ftdi-header.py")
예제 #3
0
    def test_wemos_d1_mini_18b20u(self):
        """Test ESP12 board 1"""

        generate_from_settings("tests/tmp/wemos_d1_mini_18b20u.py",
                               "tests/wemos_d1_mini_18b20u.yml")
        self.assertEqualsFile("tests/tmp/wemos_d1_mini_18b20u.py",
                              "tests/wemos_d1_mini_18b20u.py")
예제 #4
0
    def test_esp12_reset_and_flash(self):
        """Test generation of ESP12 breakout with reset line, reset button and flash button"""

        generate_from_settings("tests/tmp/esp12-reset-flash.py",
                               "tests/esp12-reset-flash.yml")
        self.assertEqualsFile("tests/tmp/esp12-reset-flash.py",
                              "tests/esp12-reset-flash.py")
예제 #5
0
    def test_basic_esp12(self):
        """Test basic ESP12 breakout with FTDI -header"""

        generate_from_settings("tests/tmp/basic-esp12.py",
                               "tests/basic-esp12.yml")
        self.assertEqualsFile("tests/tmp/basic-esp12.py",
                              "tests/basic-esp12.py")
예제 #6
0
    def test_esp_12_mcp73831_ap2112k_cp2104_feather(self):
        """Test ESP12 board with mcp73831, ap2112"""

        generate_from_settings(
            "tests/tmp/esp-12-mcp73831-ap2112k-cp2104-feather.py",
            "tests/esp-12-mcp73831-ap2112k-cp2104-feather.yml")
        self.assertEqualsFile(
            "tests/tmp/esp-12-mcp73831-ap2112k-cp2104-feather.py",
            "tests/esp-12-mcp73831-ap2112k-cp2104-feather.py")
예제 #7
0
        layout.addWidget(self.generate)
        self.generate.clicked.connect(self.generate_handler)
        self.setLayout(layout)

    def generate_handler(self):
        generate_skidl(self)


if __name__ == '__main__':
    import sys
    parser = argparse.ArgumentParser(
        description='Skimibowi - SKiDL Microcontroller Board Wizard')
    parser.add_argument(
        '--no-window',
        metavar='FILE',
        help='Do not show ui, but generate SKiDL from settings.yml')
    parser.add_argument('-f',
                        metavar='settings.yml',
                        help='Settings.yml filename')
    args = parser.parse_args()
    settings_file = args.f or 'settings.yml'

    if args.no_window:
        generate_from_settings(args.no_window, settings_file)
    else:
        app = QtWidgets.QApplication(sys.argv)
        wizard = Skimibowi()
        wizard.show()
        load_settings(wizard, settings_file)
        sys.exit(app.exec_())
예제 #8
0
    def test_esp12(self):
        """Test basic ESP12"""

        generate_from_settings("tests/tmp/esp12.py", "tests/esp12.yml")
        self.assertEqualsFile("tests/tmp/esp12.py", "tests/esp12.py")
예제 #9
0
    def test_empty_board(self):
        """Test empty board"""

        generate_from_settings("tests/tmp/empty.py", "tests/empty.yml")
        self.assertEqualsFile("tests/tmp/empty.py", "tests/empty.py")