Coder Social home page Coder Social logo

lignite's Issues

Error when btaddr config file does not exist

Using lignite 0.1.0 installed from gem.

When running ev3tool with no USB attached, I get the following error:

/home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection/bluetooth.rb:24:in `read': No such file or directory @ rb_sysopen - /home/david/.config/lignite-btaddr (Errno::ENOENT)
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection/bluetooth.rb:24:in `address_from_file'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection/bluetooth.rb:10:in `initialize'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:8:in `new'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:8:in `rescue in create'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:5:in `create'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/system_commands.rb:8:in `initialize'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/bin/ev3tool:58:in `new'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/bin/ev3tool:58:in `<top (required)>'
        from /home/david/.rbenv/versions/2.1.7/bin/ev3tool:23:in `load'
        from /home/david/.rbenv/versions/2.1.7/bin/ev3tool:23:in `<main>'

running files

Two suggestions when running files with ev3tool run.

  1. Show an error message if the file does not exist.
  2. Don't make me have to know about ../prjs/. Just have the user type the path that is on the screen of the EV3 and add ../prjs/ internally in ev3tool.

Error when no bluetooth adapter

I don't have built-in bluetooth, so after creating the bluetooth address config file, I get the following error

/home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection/bluetooth.rb:19:in `connect': No route to host - connect(2) for unknown address family 31 (Errno::EHOSTUNREACH)
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection/bluetooth.rb:19:in `initialize'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:8:in `new'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:8:in `rescue in create'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/connection.rb:5:in `create'
        from /home/david/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/lignite-0.1.0/lib/lignite/direct_commands.rb:5:in `initialize'
        from hello.rb:4:in `new'
        from hello.rb:4:in `<main>'

A friendly error message, such as "no Bluetooth or USB devices found", would be better.

udev rules

You can avoid the need for sudo by creating a udev rule

echo SUBSYSTEM=="usb", ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0005", MODE="0666"' > sudo tee /etc/udev/rules.d/99-lego.rules

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.