Giter Club home page Giter Club logo

kle2netlist's Introduction

kle2netlist's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kle2netlist's Issues

IndexError when using controller circuit template with layout with unsupported number of columns

Some layouts will cause runtime error when attempting to use --controller-circuit option.
Example layout can be found here: adamws/keyboard-tools#11

/kicad/.local/lib/python3.10/site-packages/kle2netlist/skidl.py:376 in │
│ add_controller_circuit │
│ │
│ 373 │ for _, row in rows.items(): │
│ 374 │ │ row += uc[pins.pop(0)] │
│ 375 │ for _, column in columns.items(): │
│ ❱ 376 │ │ column += uc[pins.pop(0)] │
│ 377 │
│ 378 │
│ 379 def build_circuit(layout, **kwargs): │
IndexError: pop from empty list

Parsing labels in skidl.py

Issue

Firstly, thank you so much for making this. It's amazing.
Forgive me if I am doing something incorrectly, my ultimate goal was to place a dip socket instead of the ATMEGA32U4AU. I have an STM32F411CEU6 board that I'd like to use to prototype a keyboard.

I take the default KLE json of "keycool 84":
https://pastebin.com/AiS5TqFj

And convert it to "internal form":
https://pastebin.com/HfpJhNSw

I then run (I just grabbed the tar from the github workflow build.yml for the switch symbols):
kle2netlist --layout keyboard-layout-converted.json --output-dir out --lib-path "/home/queso/src/kicad-symbols-v5"

In skidl.py, line 197 I run into a problem on the split of None:

        row, column = map(int, labels[0].split(","))

As you'll see in the internal form of the KLE json, the first element of labels is null in most cases:

{
  "keys": [
    {
      "color": "#cccccc",
      "labels": [
        null,
        null,
        null,
        "Esc"
      ],

If I change the line to:

        row, column = key['y'], key['x']

I think that might solve the issue? but I'm not sure as I'm not very familiar with the internal representation.

Other notes:

Do you know why .erc and .log files are created every time I run a file in the project?

I had to manually downgrade MarkupSafe==2.0.1 to fix issue:
ImportError: cannot import name 'soft_unicode' from 'markupsafe'
I think the poetry.lock file could be updated.

[package.dependencies]
MarkupSafe = ">=0.23"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.